Re: Struts2 with Jersey

2013-06-26 Thread Lukasz Lenart
Struts2 doesn't support JAX-RS spec, so you cannot mix those two. If
you annotated your action as a JAX-RS bean, Jersey will take control
over, Struts2 won't be engaged


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

2013/6/25 lily vch...@gmail.com:
 Have anybody tried with using jersey along with struts for the rest api.

 Before I have an execute() method in the rest api that has code for
 redirecting into get , and now if I replace my code with jersey path
 annotations how can I use the work done by action in struts



 --
 View this message in context: 
 http://struts.1045723.n5.nabble.com/Struts2-with-Jersey-tp5712879.html
 Sent from the Struts - User mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Struts 2.3.14.3 seems to drop .action from the generated form action

2013-06-26 Thread Lukasz Lenart
Hi Bruno,

You already mentioned that, right now I don't have any solution and
this looks like a bug. As I understand it happens randomly, it isn't a
common pattern?

And using s:form action=login ... is the proper way


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

2013/6/24 Litman, Bruno blit...@alabamainteractive.org:
 Dear all,

 In the context of an s:form tag, for instance for a login action, we 
 previously always coded forms as :
 s:form action=login namespace=/

 And in the struts.xml we have been using :

 action name=login_* method={1} class=com.company.LoginAction
 result name=input type=tilescontent.login/result
 result name=success type=tilescontent.menu/result
 result name=summary type=chainsummary_input/result
 result name=session_error type=chainwelcome/result
  /action

 This has worked in the past and allowed us to not only use the action=login 
 to target the execute method of the action, but also to build links to, for 
 instance, login_checkStatus.action to target other, specific methods within 
 the action. I am not sure this Is a common/best practice, I had no prior 
 struts2 experience before joining this company and this is how a lot of the 
 existing functionality is coded. (If this is wrong/there is a better way, 
 please let me know)

 Now randomly, this fails to generate the proper action url in the html (it is 
 missing the '.action', which results in a 404 once you post the form)

 The only workaround we have found so far is to add the '.action' suffix to the
 s:form's action attribute. Before it was always added for us by struts.

 So now we are having success with
 s:form action=login.action namespace=/...


 I can only assume that this has been affected by the changes related to 
 S2-015 and the wildcard action matching.

 Any help would be greatly appreciated.


 Bruno Litman




-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: redirectAction result - parameter in URL problem

2013-06-26 Thread Lukasz Lenart
Struts2 version?

There is constant struts.url.includeParams which can be set to all,
get or none and by default it's set to none (from some 2.3.x or 2.2.x
version).

So define constant in struts.xml to disable including params from GET
constant name=struts.url.includeParams value=none/


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

2013/6/24 Jan Peterka dolezal...@hotmail.com:
 Hello there,
 im new to the whole mailing lists thing, so if iam doing something wrong, 
 tell me. I am
 using all configuration via Annotations.

 Anyway, im starting with struts and im dealing with redirectAction result 
 right now.
 Problem is, that im using now variable Actions SlashesInActionNames. Next, 
 im using
 defaultStack interceptor for my classes.

 via.

 {code:xml}
 constant name=struts.patternMatcher value=namedVariable/
 constant name=struts.mapper.alwaysSelectFullNamespace value=false/
 constant name=struts.enable.SlashesInActionNames value=true/
 {code:xml}

 so i can go to the action like this localhost/draft/edit/123

 {code:java}
  @Action(value = edit/{ident}, results = {
 @Result(name = SUCCESS, type = redirectAction, params = {
 actionName, index, namespace, /home
 })
 })
 public String getDraft() {
 return SUCCESS;
 }
 {code:java}


 But if i will put there result fe. SUCCESS , what will redirect this result 
 to another action,
 fe. index in namespace home, i will get 
 localhost/home/index.action?ident=123

 In this moment, struts will show error message (because my dev mode is 
 enabled), that
 it cant set ident variable because of missing setter in home Action.. But i 
 dont need that setter
 in home action.

 How to disable redirectAction to pass any variable from parent Action to URL 
 on redirect ???

 Thanks,
 Regards,
 John


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Secure data coming from a WYSIWYG editor

2013-06-26 Thread Simone Camillo Buzzi
Hi,
how can I secure data coming from a WYSIWYG editor?
I want to allow user to change properties of the text but not to link
images or add scripts to his post.
I'll use this feature to allow user to add comment or compile complex pages.
I'm not worried about data coming from the editor but data that a malicious
user can send me from a modified page
Does Struts 2 has any interceptor that implements this kind of feature?
Does anyone has experience on this task?

Simone Buzzi


Re: Struts2 with Jersey

2013-06-26 Thread Frans Thamura
Our yama work. Yama.java.net use jaxrs and struts2. We share same spring
service. and the jersey and s2 work separtely

F
On Jun 26, 2013 1:21 PM, Lukasz Lenart lukaszlen...@apache.org wrote:

 Struts2 doesn't support JAX-RS spec, so you cannot mix those two. If
 you annotated your action as a JAX-RS bean, Jersey will take control
 over, Struts2 won't be engaged


 Regards
 --
 Łukasz
 + 48 606 323 122 http://www.lenart.org.pl/

 2013/6/25 lily vch...@gmail.com:
  Have anybody tried with using jersey along with struts for the rest api.
 
  Before I have an execute() method in the rest api that has code for
  redirecting into get , and now if I replace my code with jersey path
  annotations how can I use the work done by action in struts
 
 
 
  --
  View this message in context:
 http://struts.1045723.n5.nabble.com/Struts2-with-Jersey-tp5712879.html
  Sent from the Struts - User mailing list archive at Nabble.com.
 
  -
  To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
  For additional commands, e-mail: user-h...@struts.apache.org
 

 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org




RE: redirectAction result - parameter in URL problem

2013-06-26 Thread Jan Peterka
Hi Łukasz,

version of Struts is 2.3.15 , so includeParams should be none.
I tried it anyway, but it does same thing, it will put variables into URL also.

 From: lukaszlen...@apache.org
 Date: Wed, 26 Jun 2013 09:04:27 +0200
 Subject: Re: redirectAction result - parameter in URL problem
 To: user@struts.apache.org; jan.dole...@intelek.cz
 
 Struts2 version?
 
 There is constant struts.url.includeParams which can be set to all,
 get or none and by default it's set to none (from some 2.3.x or 2.2.x
 version).
 
 So define constant in struts.xml to disable including params from GET
 constant name=struts.url.includeParams value=none/
 
 
 Regards
 -- 
 Łukasz
 + 48 606 323 122 http://www.lenart.org.pl/
 
 2013/6/24 Jan Peterka dolezal...@hotmail.com:
  Hello there,
  im new to the whole mailing lists thing, so if iam doing something wrong, 
  tell me. I am
  using all configuration via Annotations.
 
  Anyway, im starting with struts and im dealing with redirectAction result 
  right now.
  Problem is, that im using now variable Actions SlashesInActionNames. 
  Next, im using
  defaultStack interceptor for my classes.
 
  via.
 
  {code:xml}
  constant name=struts.patternMatcher value=namedVariable/
  constant name=struts.mapper.alwaysSelectFullNamespace value=false/
  constant name=struts.enable.SlashesInActionNames value=true/
  {code:xml}
 
  so i can go to the action like this localhost/draft/edit/123
 
  {code:java}
   @Action(value = edit/{ident}, results = {
  @Result(name = SUCCESS, type = redirectAction, params = {
  actionName, index, namespace, /home
  })
  })
  public String getDraft() {
  return SUCCESS;
  }
  {code:java}
 
 
  But if i will put there result fe. SUCCESS , what will redirect this result 
  to another action,
  fe. index in namespace home, i will get 
  localhost/home/index.action?ident=123
 
  In this moment, struts will show error message (because my dev mode is 
  enabled), that
  it cant set ident variable because of missing setter in home Action.. But i 
  dont need that setter
  in home action.
 
  How to disable redirectAction to pass any variable from parent Action to 
  URL on redirect ???
 
  Thanks,
  Regards,
  John
 
 
 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org
 
  

Re: s:action tag showing result

2013-06-26 Thread Lukasz Lenart
As I understand you use s:action executeResult=false/ ? Which
means result named json shouldn't be executed, you can even remove
it.


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

2013/6/22 Felipe Lorenz felipe.lor...@idealogic.com.br:
 Hello Lukasz,

 I still facing this behaviour. Even with 2.3.16-SNAPSHOT.

 One thing that make me thing, was the flush attribute. When it is true, the 
 json result (the string) appear in the position where the action tag is in 
 the jsp. But, when I change it to false, the result appears in the top os my 
 page.

 One workaround that I can use is return a result name that is no defined in 
 the struts.xml. This workaround throw an exception, since struts could no 
 find my result name, but my list is populated and no result from this action 
 tag appear in my page.

 I hope this information can help.

 Also, I am printing my config:

 struts.xml:

 ?xml version=1.0 encoding=UTF-8 ?
 !DOCTYPE struts PUBLIC
 -//Apache Software Foundation//DTD Struts Configuration 2.3//EN
 http://struts.apache.org/dtds/struts-2.3.dtd;
 struts order=10
 constant name=struts.devMode value=false /
 constant name=struts.action.extension value=,json,xhtml,xml/

 constant name=struts.convention.action.mapAllMatches value=true 
 /
 constant name=struts.convention.default.parent.package 
 value=default/

 constant name=struts.custom.i18n.resources value=global /

 constant name=struts.mapper.class 
 value=org.apache.struts2.dispatcher.mapper.PrefixBasedActionMapper/
 constant name=struts.mapper.prefixMapping 
 value=:rest,/ajax:struts,/login:struts/

 package name=default extends=rest-default

 interceptors
 interceptor 
 class=br.com.idealogic.interceptor.LoginInterceptor name=login/
 interceptor 
 class=br.com.idealogic.interceptor.PermissaoInterceptor name=permissao/
 interceptor 
 class=br.com.idealogic.interceptor.I18nInterceptor name=idioma/
 interceptor 
 class=br.com.idealogic.interceptor.JPAInterceptor name=jpa/
 interceptor-stack name=jpaStack
 interceptor-ref name=login/
 interceptor-ref name=permissao/
 interceptor-ref name=idioma/
 interceptor-ref name=jpa/
 interceptor-ref name=restDefaultStack/
 /interceptor-stack
 /interceptors
 default-interceptor-ref name=jpaStack/


 default-action-ref name=login_sistema/default-action-ref

 global-results
 result name=login/login.jsp/result
 result name=forbidden/forbidden.jsp/result
 /global-results

 /package

 include file=struts-ajax.xml/
 include file=struts-login.xml/
 include file=struts-filtro.xml/
 /struts

 struts-ajax.xml

 ?xml version=1.0 encoding=UTF-8?
 !DOCTYPE struts PUBLIC
  -//Apache Software Foundation//DTD Struts Configuration 2.0//EN
  http://struts.apache.org/dtds/struts-2.0.dtd;
 struts
 package name=ajax extends=json-default namespace=/ajax
 interceptors
 interceptor 
 class=br.com.idealogic.interceptor.JPAInterceptor name=jpa/
 interceptor-stack name=jpaJsonStack
 interceptor-ref name=jpa/
 interceptor-ref 
 name=jsonValidationWorkflowStack/
 /interceptor-stack
 /interceptors
 default-interceptor-ref name=jpaJsonStack/


 action name=loadCidadeByEstado method=loadCidadeByEstado 
 class=br.com.seedingControl.action.CidadeAction
 result name=json type=json
 param name=includeProperties
 ^cidades\[\d+\]\.idCidade,
 ^cidades\[\d+\]\.nmCidade
 /param
 /result
 /action

 /package
 /struts

 Thanks for all your help!

 Felipe Lorenz

 Em 22/06/2013, às 04:27, Lukasz Lenart escreveu:

 2013/6/22 Litman, Bruno blit...@alabamainteractive.org:
 We are also experiencing issues with tags and theme files, we are upgrading 
 many applications from 2.3.4.1 to 2.3.14.3
 I am not sure if this is related - if not and if I need to start a new 
 discussion please let me know and accept my apology.

 1/

 We previously always coded forms as :
s:form action=login namespace=/
 Now randomly, this fails to generate the proper action url in the html (it 
 is missing the '.action', which results in a 404 once you post the form)

 The only workaround we 

Re: redirectAction result - parameter in URL problem

2013-06-26 Thread Lukasz Lenart
Hi Jan,

Yes, you are right but the problem is you are mixing two things -
slashes in action names and RESTful urls. If you want to have RESTfull
urls take a look on RestfulActionMapper [1] or REST plugin [2]

[1] http://struts.apache.org/development/2.x/docs/restfulactionmapper.html
[2] http://struts.apache.org/development/2.x/docs/rest-plugin.html


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

2013/6/26 Jan Peterka dolezal...@hotmail.com:
 Hi Łukasz,

 version of Struts is 2.3.15 , so includeParams should be none.
 I tried it anyway, but it does same thing, it will put variables into URL 
 also.

 From: lukaszlen...@apache.org
 Date: Wed, 26 Jun 2013 09:04:27 +0200
 Subject: Re: redirectAction result - parameter in URL problem
 To: user@struts.apache.org; jan.dole...@intelek.cz

 Struts2 version?

 There is constant struts.url.includeParams which can be set to all,
 get or none and by default it's set to none (from some 2.3.x or 2.2.x
 version).

 So define constant in struts.xml to disable including params from GET
 constant name=struts.url.includeParams value=none/


 Regards
 --
 Łukasz
 + 48 606 323 122 http://www.lenart.org.pl/

 2013/6/24 Jan Peterka dolezal...@hotmail.com:
  Hello there,
  im new to the whole mailing lists thing, so if iam doing something wrong, 
  tell me. I am
  using all configuration via Annotations.
 
  Anyway, im starting with struts and im dealing with redirectAction result 
  right now.
  Problem is, that im using now variable Actions SlashesInActionNames. 
  Next, im using
  defaultStack interceptor for my classes.
 
  via.
 
  {code:xml}
  constant name=struts.patternMatcher value=namedVariable/
  constant name=struts.mapper.alwaysSelectFullNamespace 
  value=false/
  constant name=struts.enable.SlashesInActionNames value=true/
  {code:xml}
 
  so i can go to the action like this localhost/draft/edit/123
 
  {code:java}
   @Action(value = edit/{ident}, results = {
  @Result(name = SUCCESS, type = redirectAction, params = {
  actionName, index, namespace, /home
  })
  })
  public String getDraft() {
  return SUCCESS;
  }
  {code:java}
 
 
  But if i will put there result fe. SUCCESS , what will redirect this 
  result to another action,
  fe. index in namespace home, i will get 
  localhost/home/index.action?ident=123
 
  In this moment, struts will show error message (because my dev mode is 
  enabled), that
  it cant set ident variable because of missing setter in home Action.. But 
  i dont need that setter
  in home action.
 
  How to disable redirectAction to pass any variable from parent Action to 
  URL on redirect ???
 
  Thanks,
  Regards,
  John
 

 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org



-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Difficulty in understanding Struts 2 distribution

2013-06-26 Thread Sreekanth S. Nair
Hi,
 Now the struts2 distribution is a single zip file which includes all
optional and required jars together which is making life very difficult to
understand, which are the jars required for struts2 to make up and running
and what are the other optional and dependency jar for plugin and other
framework support.

It would be better if the distribution can modular in such a way that
required
optional---
   plugin---
convenstional jars and its dependency
json   jars and its dependency
   spring---  jars and its dependency
   xyz--- jars and its dependency


-- 
Thanks  Regards
Srikanth
Software Developer

eGovernments Foundations
www.egovernments.org
Mob : 9980078913



RE: redirectAction result - parameter in URL problem

2013-06-26 Thread Jan Peterka
I know REST plugin, but i saw many examples with just action slash names.
I just want to URL /drat/id/1 to set setId inside Action, which is working 
great,
but after redirect (with redirectAction) i will get this id inside redirected 
url,
?id=1 . This is undesirable, because of ugly url, and errors in log about not 
having
setter inside that redirected action.

Is there way how to do this without REST plugin ?

 From: lukaszlen...@apache.org
 Date: Wed, 26 Jun 2013 10:23:59 +0200
 Subject: Re: redirectAction result - parameter in URL problem
 To: user@struts.apache.org; jan.dole...@intelek.cz
 
 Hi Jan,
 
 Yes, you are right but the problem is you are mixing two things -
 slashes in action names and RESTful urls. If you want to have RESTfull
 urls take a look on RestfulActionMapper [1] or REST plugin [2]
 
 [1] http://struts.apache.org/development/2.x/docs/restfulactionmapper.html
 [2] http://struts.apache.org/development/2.x/docs/rest-plugin.html
 
 
 Regards
 -- 
 Łukasz
 + 48 606 323 122 http://www.lenart.org.pl/
 
 2013/6/26 Jan Peterka dolezal...@hotmail.com:
  Hi Łukasz,
 
  version of Struts is 2.3.15 , so includeParams should be none.
  I tried it anyway, but it does same thing, it will put variables into URL 
  also.
 
  From: lukaszlen...@apache.org
  Date: Wed, 26 Jun 2013 09:04:27 +0200
  Subject: Re: redirectAction result - parameter in URL problem
  To: user@struts.apache.org; jan.dole...@intelek.cz
 
  Struts2 version?
 
  There is constant struts.url.includeParams which can be set to all,
  get or none and by default it's set to none (from some 2.3.x or 2.2.x
  version).
 
  So define constant in struts.xml to disable including params from GET
  constant name=struts.url.includeParams value=none/
 
 
  Regards
  --
  Łukasz
  + 48 606 323 122 http://www.lenart.org.pl/
 
  2013/6/24 Jan Peterka dolezal...@hotmail.com:
   Hello there,
   im new to the whole mailing lists thing, so if iam doing something 
   wrong, tell me. I am
   using all configuration via Annotations.
  
   Anyway, im starting with struts and im dealing with redirectAction 
   result right now.
   Problem is, that im using now variable Actions SlashesInActionNames. 
   Next, im using
   defaultStack interceptor for my classes.
  
   via.
  
   {code:xml}
   constant name=struts.patternMatcher value=namedVariable/
   constant name=struts.mapper.alwaysSelectFullNamespace 
   value=false/
   constant name=struts.enable.SlashesInActionNames value=true/
   {code:xml}
  
   so i can go to the action like this localhost/draft/edit/123
  
   {code:java}
@Action(value = edit/{ident}, results = {
   @Result(name = SUCCESS, type = redirectAction, params = {
   actionName, index, namespace, /home
   })
   })
   public String getDraft() {
   return SUCCESS;
   }
   {code:java}
  
  
   But if i will put there result fe. SUCCESS , what will redirect this 
   result to another action,
   fe. index in namespace home, i will get 
   localhost/home/index.action?ident=123
  
   In this moment, struts will show error message (because my dev mode is 
   enabled), that
   it cant set ident variable because of missing setter in home Action.. 
   But i dont need that setter
   in home action.
  
   How to disable redirectAction to pass any variable from parent Action to 
   URL on redirect ???
  
   Thanks,
   Regards,
   John
  
 
  -
  To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
  For additional commands, e-mail: user-h...@struts.apache.org
 
 
 
 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org
 
  

Re: Difficulty in understanding Struts 2 distribution

2013-06-26 Thread Umesh Awasthi
Though in most of the cases people use some kind of dependency management
system like
Maven, Ivy etc

which take care of all these aspects.
Though this is clearly mentioned in the Project dependencies page what all
is required
for details refer
http://struts.apache.org/release/2.3.x/struts2-core/dependencies.html

On Wed, Jun 26, 2013 at 2:00 PM, Sreekanth S. Nair 
sreekanth.n...@egovernments.org wrote:

 Hi,
  Now the struts2 distribution is a single zip file which includes all
 optional and required jars together which is making life very difficult to
 understand, which are the jars required for struts2 to make up and running
 and what are the other optional and dependency jar for plugin and other
 framework support.

 It would be better if the distribution can modular in such a way that
 required
 optional---
plugin---
 convenstional jars and its dependency
 json   jars and its dependency
spring---  jars and its dependency
xyz--- jars and its dependency


 --
 Thanks  Regards
 Srikanth
 Software Developer
 
 eGovernments Foundations
 www.egovernments.org
 Mob : 9980078913
 




-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


Re: Difficulty in understanding Struts 2 distribution

2013-06-26 Thread Sreekanth S. Nair
I dont think this is correct, we are not using velocity then how come
struts2 depends on velocity, same for junit. These all are not required
dependency for strust2 to up and running.

-- 
Thanks  Regards
Srikanth
Software Developer

eGovernments Foundations
www.egovernments.org
Mob : 9980078913



On Wed, Jun 26, 2013 at 2:18 PM, Umesh Awasthi umeshawas...@gmail.comwrote:

 Though in most of the cases people use some kind of dependency management
 system like
 Maven, Ivy etc

 which take care of all these aspects.
 Though this is clearly mentioned in the Project dependencies page what all
 is required
 for details refer
 http://struts.apache.org/release/2.3.x/struts2-core/dependencies.html

 On Wed, Jun 26, 2013 at 2:00 PM, Sreekanth S. Nair 
 sreekanth.n...@egovernments.org wrote:

  Hi,
   Now the struts2 distribution is a single zip file which includes all
  optional and required jars together which is making life very difficult
 to
  understand, which are the jars required for struts2 to make up and
 running
  and what are the other optional and dependency jar for plugin and other
  framework support.
 
  It would be better if the distribution can modular in such a way that
  required
  optional---
 plugin---
  convenstional jars and its dependency
  json   jars and its dependency
 spring---  jars and its dependency
 xyz--- jars and its dependency
 
 
  --
  Thanks  Regards
  Srikanth
  Software Developer
  
  eGovernments Foundations
  www.egovernments.org
  Mob : 9980078913
  
 



 --
 With Regards
 Umesh Awasthi
 http://www.travellingrants.com/



Re: Difficulty in understanding Struts 2 distribution

2013-06-26 Thread Lukasz Lenart
2013/6/26 Sreekanth S. Nair sreekanth.n...@egovernments.org:
 I dont think this is correct, we are not using velocity then how come
 struts2 depends on velocity, same for junit. These all are not required
 dependency for strust2 to up and running.

Please read about Maven dependencies first. Both are marked as an
optional dependency which means they are needed to build the framework
and to run it depends on you - if you don't use Velocity you don't
need it.


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Difficulty in understanding Struts 2 distribution

2013-06-26 Thread Umesh Awasthi
There is a colum with header Optional which indicate what all is optional
and what is not optional

On Wed, Jun 26, 2013 at 2:32 PM, Sreekanth S. Nair 
sreekanth.n...@egovernments.org wrote:

 I dont think this is correct, we are not using velocity then how come
 struts2 depends on velocity, same for junit. These all are not required
 dependency for strust2 to up and running.

 --
 Thanks  Regards
 Srikanth
 Software Developer
 
 eGovernments Foundations
 www.egovernments.org
 Mob : 9980078913
 


 On Wed, Jun 26, 2013 at 2:18 PM, Umesh Awasthi umeshawas...@gmail.com
 wrote:

  Though in most of the cases people use some kind of dependency management
  system like
  Maven, Ivy etc
 
  which take care of all these aspects.
  Though this is clearly mentioned in the Project dependencies page what
 all
  is required
  for details refer
  http://struts.apache.org/release/2.3.x/struts2-core/dependencies.html
 
  On Wed, Jun 26, 2013 at 2:00 PM, Sreekanth S. Nair 
  sreekanth.n...@egovernments.org wrote:
 
   Hi,
Now the struts2 distribution is a single zip file which includes
 all
   optional and required jars together which is making life very difficult
  to
   understand, which are the jars required for struts2 to make up and
  running
   and what are the other optional and dependency jar for plugin and other
   framework support.
  
   It would be better if the distribution can modular in such a way that
   required
   optional---
  plugin---
   convenstional jars and its dependency
   json   jars and its dependency
  spring---  jars and its dependency
  xyz--- jars and its dependency
  
  
   --
   Thanks  Regards
   Srikanth
   Software Developer
   
   eGovernments Foundations
   www.egovernments.org
   Mob : 9980078913
   
  
 
 
 
  --
  With Regards
  Umesh Awasthi
  http://www.travellingrants.com/
 




-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


Re: Difficulty in understanding Struts 2 distribution

2013-06-26 Thread Sreekanth S. Nair
Thanks for clarifying all these but don't you think its better to make the
same thing in distribution itself, which will help developer to make
strust2 project development and plugin integration and do many more strust2
things faster and easier.

-- 
Thanks  Regards
Srikanth
Software Developer

eGovernments Foundations
www.egovernments.org
Mob : 9980078913



On Wed, Jun 26, 2013 at 2:38 PM, Umesh Awasthi umeshawas...@gmail.comwrote:

 There is a colum with header Optional which indicate what all is optional
 and what is not optional

 On Wed, Jun 26, 2013 at 2:32 PM, Sreekanth S. Nair 
 sreekanth.n...@egovernments.org wrote:

  I dont think this is correct, we are not using velocity then how come
  struts2 depends on velocity, same for junit. These all are not required
  dependency for strust2 to up and running.
 
  --
  Thanks  Regards
  Srikanth
  Software Developer
  
  eGovernments Foundations
  www.egovernments.org
  Mob : 9980078913
  
 
 
  On Wed, Jun 26, 2013 at 2:18 PM, Umesh Awasthi umeshawas...@gmail.com
  wrote:
 
   Though in most of the cases people use some kind of dependency
 management
   system like
   Maven, Ivy etc
  
   which take care of all these aspects.
   Though this is clearly mentioned in the Project dependencies page what
  all
   is required
   for details refer
   http://struts.apache.org/release/2.3.x/struts2-core/dependencies.html
  
   On Wed, Jun 26, 2013 at 2:00 PM, Sreekanth S. Nair 
   sreekanth.n...@egovernments.org wrote:
  
Hi,
 Now the struts2 distribution is a single zip file which includes
  all
optional and required jars together which is making life very
 difficult
   to
understand, which are the jars required for struts2 to make up and
   running
and what are the other optional and dependency jar for plugin and
 other
framework support.
   
It would be better if the distribution can modular in such a way that
required
optional---
   plugin---
convenstional jars and its dependency
json   jars and its dependency
   spring---  jars and its dependency
   xyz--- jars and its dependency
   
   
--
Thanks  Regards
Srikanth
Software Developer

eGovernments Foundations
www.egovernments.org
Mob : 9980078913

   
  
  
  
   --
   With Regards
   Umesh Awasthi
   http://www.travellingrants.com/
  
 



 --
 With Regards
 Umesh Awasthi
 http://www.travellingrants.com/



Re: Difficulty in understanding Struts 2 distribution

2013-06-26 Thread Lukasz Lenart
Yes, you are right that's why we are using Maven to manage
dependencies and not to do it by hand.


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

2013/6/26 Sreekanth S. Nair sreekanth.n...@egovernments.org:
 Thanks for clarifying all these but don't you think its better to make the
 same thing in distribution itself, which will help developer to make
 strust2 project development and plugin integration and do many more strust2
 things faster and easier.

 --
 Thanks  Regards
 Srikanth
 Software Developer
 
 eGovernments Foundations
 www.egovernments.org
 Mob : 9980078913
 


 On Wed, Jun 26, 2013 at 2:38 PM, Umesh Awasthi umeshawas...@gmail.comwrote:

 There is a colum with header Optional which indicate what all is optional
 and what is not optional

 On Wed, Jun 26, 2013 at 2:32 PM, Sreekanth S. Nair 
 sreekanth.n...@egovernments.org wrote:

  I dont think this is correct, we are not using velocity then how come
  struts2 depends on velocity, same for junit. These all are not required
  dependency for strust2 to up and running.
 
  --
  Thanks  Regards
  Srikanth
  Software Developer
  
  eGovernments Foundations
  www.egovernments.org
  Mob : 9980078913
  
 
 
  On Wed, Jun 26, 2013 at 2:18 PM, Umesh Awasthi umeshawas...@gmail.com
  wrote:
 
   Though in most of the cases people use some kind of dependency
 management
   system like
   Maven, Ivy etc
  
   which take care of all these aspects.
   Though this is clearly mentioned in the Project dependencies page what
  all
   is required
   for details refer
   http://struts.apache.org/release/2.3.x/struts2-core/dependencies.html
  
   On Wed, Jun 26, 2013 at 2:00 PM, Sreekanth S. Nair 
   sreekanth.n...@egovernments.org wrote:
  
Hi,
 Now the struts2 distribution is a single zip file which includes
  all
optional and required jars together which is making life very
 difficult
   to
understand, which are the jars required for struts2 to make up and
   running
and what are the other optional and dependency jar for plugin and
 other
framework support.
   
It would be better if the distribution can modular in such a way that
required
optional---
   plugin---
convenstional jars and its dependency
json   jars and its dependency
   spring---  jars and its dependency
   xyz--- jars and its dependency
   
   
--
Thanks  Regards
Srikanth
Software Developer

eGovernments Foundations
www.egovernments.org
Mob : 9980078913

   
  
  
  
   --
   With Regards
   Umesh Awasthi
   http://www.travellingrants.com/
  
 



 --
 With Regards
 Umesh Awasthi
 http://www.travellingrants.com/


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Difficulty in understanding Struts 2 distribution

2013-06-26 Thread Sreekanth S. Nair
Unfortunately we are not using maven  but ant, for us it would be good to
have the zip distribution with required/optional kind of modularization :).
I dont know the feasibility of doing something like that so i'm leaving to
you :).

-- 
Thanks  Regards
Srikanth
Software Developer

eGovernments Foundations
www.egovernments.org
Mob : 9980078913



On Wed, Jun 26, 2013 at 2:49 PM, Lukasz Lenart lukaszlen...@apache.orgwrote:

 Yes, you are right that's why we are using Maven to manage
 dependencies and not to do it by hand.


 Regards
 --
 Łukasz
 + 48 606 323 122 http://www.lenart.org.pl/

 2013/6/26 Sreekanth S. Nair sreekanth.n...@egovernments.org:
  Thanks for clarifying all these but don't you think its better to make
 the
  same thing in distribution itself, which will help developer to make
  strust2 project development and plugin integration and do many more
 strust2
  things faster and easier.
 
  --
  Thanks  Regards
  Srikanth
  Software Developer
  
  eGovernments Foundations
  www.egovernments.org
  Mob : 9980078913
  
 
 
  On Wed, Jun 26, 2013 at 2:38 PM, Umesh Awasthi umeshawas...@gmail.com
 wrote:
 
  There is a colum with header Optional which indicate what all is
 optional
  and what is not optional
 
  On Wed, Jun 26, 2013 at 2:32 PM, Sreekanth S. Nair 
  sreekanth.n...@egovernments.org wrote:
 
   I dont think this is correct, we are not using velocity then how come
   struts2 depends on velocity, same for junit. These all are not
 required
   dependency for strust2 to up and running.
  
   --
   Thanks  Regards
   Srikanth
   Software Developer
   
   eGovernments Foundations
   www.egovernments.org
   Mob : 9980078913
   
  
  
   On Wed, Jun 26, 2013 at 2:18 PM, Umesh Awasthi 
 umeshawas...@gmail.com
   wrote:
  
Though in most of the cases people use some kind of dependency
  management
system like
Maven, Ivy etc
   
which take care of all these aspects.
Though this is clearly mentioned in the Project dependencies page
 what
   all
is required
for details refer
   
 http://struts.apache.org/release/2.3.x/struts2-core/dependencies.html
   
On Wed, Jun 26, 2013 at 2:00 PM, Sreekanth S. Nair 
sreekanth.n...@egovernments.org wrote:
   
 Hi,
  Now the struts2 distribution is a single zip file which
 includes
   all
 optional and required jars together which is making life very
  difficult
to
 understand, which are the jars required for struts2 to make up and
running
 and what are the other optional and dependency jar for plugin and
  other
 framework support.

 It would be better if the distribution can modular in such a way
 that
 required
 optional---
plugin---
 convenstional jars and its dependency
 json   jars and its dependency
spring---  jars and its dependency
xyz--- jars and its dependency


 --
 Thanks  Regards
 Srikanth
 Software Developer
 
 eGovernments Foundations
 www.egovernments.org
 Mob : 9980078913
 

   
   
   
--
With Regards
Umesh Awasthi
http://www.travellingrants.com/
   
  
 
 
 
  --
  With Regards
  Umesh Awasthi
  http://www.travellingrants.com/
 

 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org




Re: Difficulty in understanding Struts 2 distribution

2013-06-26 Thread jlmagc
We use apache ivy for the dependency management, which works with ant. It works 
absolutely fine, and it has solved our problems with dependency management. You 
should take a look at it.

JL

Sent via BlackBerry from T-Mobile

-Original Message-
From: Sreekanth S. Nair sreekanth.n...@egovernments.org
Date: Wed, 26 Jun 2013 14:56:31 
To: Struts Users Mailing Listuser@struts.apache.org
Reply-To: Struts Users Mailing List user@struts.apache.org
Subject: Re: Difficulty in understanding Struts 2 distribution

Unfortunately we are not using maven  but ant, for us it would be good to
have the zip distribution with required/optional kind of modularization :).
I dont know the feasibility of doing something like that so i'm leaving to
you :).

-- 
Thanks  Regards
Srikanth
Software Developer

eGovernments Foundations
www.egovernments.org
Mob : 9980078913



On Wed, Jun 26, 2013 at 2:49 PM, Lukasz Lenart lukaszlen...@apache.orgwrote:

 Yes, you are right that's why we are using Maven to manage
 dependencies and not to do it by hand.


 Regards
 --
 Łukasz
 + 48 606 323 122 http://www.lenart.org.pl/

 2013/6/26 Sreekanth S. Nair sreekanth.n...@egovernments.org:
  Thanks for clarifying all these but don't you think its better to make
 the
  same thing in distribution itself, which will help developer to make
  strust2 project development and plugin integration and do many more
 strust2
  things faster and easier.
 
  --
  Thanks  Regards
  Srikanth
  Software Developer
  
  eGovernments Foundations
  www.egovernments.org
  Mob : 9980078913
  
 
 
  On Wed, Jun 26, 2013 at 2:38 PM, Umesh Awasthi umeshawas...@gmail.com
 wrote:
 
  There is a colum with header Optional which indicate what all is
 optional
  and what is not optional
 
  On Wed, Jun 26, 2013 at 2:32 PM, Sreekanth S. Nair 
  sreekanth.n...@egovernments.org wrote:
 
   I dont think this is correct, we are not using velocity then how come
   struts2 depends on velocity, same for junit. These all are not
 required
   dependency for strust2 to up and running.
  
   --
   Thanks  Regards
   Srikanth
   Software Developer
   
   eGovernments Foundations
   www.egovernments.org
   Mob : 9980078913
   
  
  
   On Wed, Jun 26, 2013 at 2:18 PM, Umesh Awasthi 
 umeshawas...@gmail.com
   wrote:
  
Though in most of the cases people use some kind of dependency
  management
system like
Maven, Ivy etc
   
which take care of all these aspects.
Though this is clearly mentioned in the Project dependencies page
 what
   all
is required
for details refer
   
 http://struts.apache.org/release/2.3.x/struts2-core/dependencies.html
   
On Wed, Jun 26, 2013 at 2:00 PM, Sreekanth S. Nair 
sreekanth.n...@egovernments.org wrote:
   
 Hi,
  Now the struts2 distribution is a single zip file which
 includes
   all
 optional and required jars together which is making life very
  difficult
to
 understand, which are the jars required for struts2 to make up and
running
 and what are the other optional and dependency jar for plugin and
  other
 framework support.

 It would be better if the distribution can modular in such a way
 that
 required
 optional---
plugin---
 convenstional jars and its dependency
 json   jars and its dependency
spring---  jars and its dependency
xyz--- jars and its dependency


 --
 Thanks  Regards
 Srikanth
 Software Developer
 
 eGovernments Foundations
 www.egovernments.org
 Mob : 9980078913
 

   
   
   
--
With Regards
Umesh Awasthi
http://www.travellingrants.com/
   
  
 
 
 
  --
  With Regards
  Umesh Awasthi
  http://www.travellingrants.com/
 

 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org




-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org


Re: redirectAction result - parameter in URL problem

2013-06-26 Thread Lukasz Lenart
Have you tried to use RestfulActionMapper or Restful2ActionMapper?
Anyway, this is the desired behaviour, request parameters are
transferred to Result to allow expose them (if you would like to use
them on jsp for example).

You can always define your own CustomerServletActionRedirectResult
which override ServletActionRedirectResult and
getProhibitedResultParams() method and return ident as one of
prohibited paramaters


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

2013/6/26 Jan Peterka dolezal...@hotmail.com:
 I know REST plugin, but i saw many examples with just action slash names.
 I just want to URL /drat/id/1 to set setId inside Action, which is working 
 great,
 but after redirect (with redirectAction) i will get this id inside redirected 
 url,
 ?id=1 . This is undesirable, because of ugly url, and errors in log about not 
 having
 setter inside that redirected action.

 Is there way how to do this without REST plugin ?

 From: lukaszlen...@apache.org
 Date: Wed, 26 Jun 2013 10:23:59 +0200
 Subject: Re: redirectAction result - parameter in URL problem
 To: user@struts.apache.org; jan.dole...@intelek.cz

 Hi Jan,

 Yes, you are right but the problem is you are mixing two things -
 slashes in action names and RESTful urls. If you want to have RESTfull
 urls take a look on RestfulActionMapper [1] or REST plugin [2]

 [1] http://struts.apache.org/development/2.x/docs/restfulactionmapper.html
 [2] http://struts.apache.org/development/2.x/docs/rest-plugin.html


 Regards
 --
 Łukasz
 + 48 606 323 122 http://www.lenart.org.pl/

 2013/6/26 Jan Peterka dolezal...@hotmail.com:
  Hi Łukasz,
 
  version of Struts is 2.3.15 , so includeParams should be none.
  I tried it anyway, but it does same thing, it will put variables into URL 
  also.
 
  From: lukaszlen...@apache.org
  Date: Wed, 26 Jun 2013 09:04:27 +0200
  Subject: Re: redirectAction result - parameter in URL problem
  To: user@struts.apache.org; jan.dole...@intelek.cz
 
  Struts2 version?
 
  There is constant struts.url.includeParams which can be set to all,
  get or none and by default it's set to none (from some 2.3.x or 2.2.x
  version).
 
  So define constant in struts.xml to disable including params from GET
  constant name=struts.url.includeParams value=none/
 
 
  Regards
  --
  Łukasz
  + 48 606 323 122 http://www.lenart.org.pl/
 
  2013/6/24 Jan Peterka dolezal...@hotmail.com:
   Hello there,
   im new to the whole mailing lists thing, so if iam doing something 
   wrong, tell me. I am
   using all configuration via Annotations.
  
   Anyway, im starting with struts and im dealing with redirectAction 
   result right now.
   Problem is, that im using now variable Actions SlashesInActionNames. 
   Next, im using
   defaultStack interceptor for my classes.
  
   via.
  
   {code:xml}
   constant name=struts.patternMatcher value=namedVariable/
   constant name=struts.mapper.alwaysSelectFullNamespace 
   value=false/
   constant name=struts.enable.SlashesInActionNames value=true/
   {code:xml}
  
   so i can go to the action like this localhost/draft/edit/123
  
   {code:java}
@Action(value = edit/{ident}, results = {
   @Result(name = SUCCESS, type = redirectAction, params = {
   actionName, index, namespace, /home
   })
   })
   public String getDraft() {
   return SUCCESS;
   }
   {code:java}
  
  
   But if i will put there result fe. SUCCESS , what will redirect this 
   result to another action,
   fe. index in namespace home, i will get 
   localhost/home/index.action?ident=123
  
   In this moment, struts will show error message (because my dev mode is 
   enabled), that
   it cant set ident variable because of missing setter in home Action.. 
   But i dont need that setter
   in home action.
  
   How to disable redirectAction to pass any variable from parent Action 
   to URL on redirect ???
  
   Thanks,
   Regards,
   John
  
 
  -
  To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
  For additional commands, e-mail: user-h...@struts.apache.org
 
 

 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org



-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Secure data coming from a WYSIWYG editor

2013-06-26 Thread Maurizio Cucchiara
Out of there, there are a lot of WYSWYG editors (like CKEditor) which allow
to define the list of the supported tags.

For what concerns the server side aspect, I'd suggest you JSOUP. It allows
to clean the HTML submitted by the user [1].

Also, have a look at hdiv [2], IIRC there is a plugin for struts2 which
should protect against XSS and other security issues.

[1] http://jsoup.org/cookbook/cleaning-html/whitelist-sanitizer
[2] http://hdiv.org/
On 26 June 2013 09:06, Simone Camillo Buzzi simonebu...@gmail.com wrote:

 I'll use this feature to allow user to add comment or compile complex
 pages.
 I'm not worried about data coming from the editor but data that a malicious
 user can send me from a modified page
 Does Struts 2 has any interceptor that implements this kind of feature?
 Does anyone has experience on this t




Twitter :http://www.twitter.com/m_cucchiara
G+  :https://plus.google.com/107903711540963855921
Linkedin:http://www.linkedin.com/in/mauriziocucchiara
VisualizeMe: http://vizualize.me/maurizio.cucchiara?r=maurizio.cucchiara

Maurizio Cucchiara


Struts dispatcher apparently not started

2013-06-26 Thread Fabian Richter

Hello all,

I am faily new with struts, and to get a grip on the mechanics I 
volunteered to migrate one of our applications from Webwork to struts2 
latest.


So far I made progress, the application is not only running but also 
rendered some UI in the browser.


But I have exceptions like

The Struts dispatcher cannot be found.  This is usually caused by using 
Struts tags without the associated filter. Struts tags are only usable 
when the request has passed through its servlet filter, which 
initializes the Struts dispatcher needed for this tag. - [unknown location]

at org.apache.struts2.views.jsp.TagUtils.getStack(TagUtils.java:60)
	at 
org.apache.struts2.views.jsp.StrutsBodyTagSupport.getStack(StrutsBodyTagSupport.java:44)
	at 
org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTagSupport.java:48)


On every action I do on the website.

I am always calling actions (as far as I know) so no .jsp pages directly.

My web.xml looks like:

---% SNIP 

filter
filter-nameappFilter/filter-name
filter-classown.ApplicationFilter/filter-class
/filter

filter
filter-namestruts-prepare/filter-name

filter-classorg.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter/filter-class
/filter
filter
filter-namestruts-execute/filter-name

filter-classorg.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter/filter-class
/filter

filter
filter-namesitemesh/filter-name

filter-classcom.opensymphony.sitemesh.webapp.SiteMeshFilter/filter-class
/filter

filter-mapping
filter-nameappFilter/filter-name
url-pattern*.html/url-pattern
/filter-mapping

filter-mapping
filter-namestruts-prepare/filter-name
url-pattern/*/url-pattern
/filter-mapping

filter-mapping
filter-namesitemesh/filter-name
url-pattern/*/url-pattern
dispatcherREQUEST/dispatcher
dispatcherFORWARD/dispatcher
dispatcherINCLUDE/dispatcher
/filter-mapping

filter-mapping
filter-namestruts-execute/filter-name
url-pattern/*/url-pattern
/filter-mapping

listener
listener-classown.StartupListener/listener-class
/listener

listener

listener-classorg.apache.struts2.dispatcher.ng.listener.StrutsListener/listener-class
/listener

listener

listener-classorg.springframework.web.util.Log4jConfigListener/listener-class
/listener


servlet
servlet-namesitemesh-freemarker/servlet-name

servlet-classorg.apache.struts2.sitemesh.FreemarkerDecoratorServlet/servlet-class
init-param
param-namedefault_encoding/param-name
param-valueUTF-8/param-value
/init-param
load-on-startup1/load-on-startup
/servlet

servlet-mapping
servlet-namesitemesh-freemarker/servlet-name
url-pattern*.ftl/url-pattern
/servlet-mapping

servlet
servlet-nameJspSupportServlet/servlet-name

servlet-classorg.apache.struts2.views.JspSupportServlet/servlet-class
load-on-startup1/load-on-startup
/servlet

---% SNIP 

The rest of the file is simple configuration. I thought by calling the 
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter right after 
my AppFilter (which handles cert based authentification) I would already 
be calling the Struts Dispatcher, but apparently thats where I'm wrong?


Thank you for your help to a newbie!

Best
Fabian



smime.p7s
Description: S/MIME Kryptografische Unterschrift


RE: Difficulty in understanding Struts 2 distribution

2013-06-26 Thread Martin Gainty
take a look at master parent pom for building struts in struts/src

project
 modelVersion4.0.0/modelVersion
groupIdorg.apache.struts/groupId
artifactIdstruts2-parent/artifactId
version2.3.4/version
packagingpom/packaging

 modules
modulexwork-core/module
modulecore/module
moduleapps/module
moduleplugins/module
modulebundles/module
modulearchetypes/module
/modules
...
/project

*Martin*
__ 
Maven: yiddish for 'all-knowing'


 
 From: lukaszlen...@apache.org
 Date: Wed, 26 Jun 2013 11:19:41 +0200
 Subject: Re: Difficulty in understanding Struts 2 distribution
 To: user@struts.apache.org
 
 Yes, you are right that's why we are using Maven to manage
 dependencies and not to do it by hand.
 
 
 Regards
 -- 
 Łukasz
 + 48 606 323 122 http://www.lenart.org.pl/
 
 2013/6/26 Sreekanth S. Nair sreekanth.n...@egovernments.org:
  Thanks for clarifying all these but don't you think its better to make the
  same thing in distribution itself, which will help developer to make
  strust2 project development and plugin integration and do many more strust2
  things faster and easier.
 
  --
  Thanks  Regards
  Srikanth
  Software Developer
  
  eGovernments Foundations
  www.egovernments.org
  Mob : 9980078913
  
 
 
  On Wed, Jun 26, 2013 at 2:38 PM, Umesh Awasthi 
  umeshawas...@gmail.comwrote:
 
  There is a colum with header Optional which indicate what all is optional
  and what is not optional
 
  On Wed, Jun 26, 2013 at 2:32 PM, Sreekanth S. Nair 
  sreekanth.n...@egovernments.org wrote:
 
   I dont think this is correct, we are not using velocity then how come
   struts2 depends on velocity, same for junit. These all are not required
   dependency for strust2 to up and running.
  
   --
   Thanks  Regards
   Srikanth
   Software Developer
   
   eGovernments Foundations
   www.egovernments.org
   Mob : 9980078913
   
  
  
   On Wed, Jun 26, 2013 at 2:18 PM, Umesh Awasthi umeshawas...@gmail.com
   wrote:
  
Though in most of the cases people use some kind of dependency
  management
system like
Maven, Ivy etc
   
which take care of all these aspects.
Though this is clearly mentioned in the Project dependencies page what
   all
is required
for details refer
http://struts.apache.org/release/2.3.x/struts2-core/dependencies.html
   
On Wed, Jun 26, 2013 at 2:00 PM, Sreekanth S. Nair 
sreekanth.n...@egovernments.org wrote:
   
 Hi,
  Now the struts2 distribution is a single zip file which includes
   all
 optional and required jars together which is making life very
  difficult
to
 understand, which are the jars required for struts2 to make up and
running
 and what are the other optional and dependency jar for plugin and
  other
 framework support.

 It would be better if the distribution can modular in such a way that
 required
 optional---
plugin---
 convenstional jars and its dependency
 json   jars and its dependency
spring---  jars and its dependency
xyz--- jars and its dependency


 --
 Thanks  Regards
 Srikanth
 Software Developer
 
 eGovernments Foundations
 www.egovernments.org
 Mob : 9980078913
 

   
   
   
--
With Regards
Umesh Awasthi
http://www.travellingrants.com/
   
  
 
 
 
  --
  With Regards
  Umesh Awasthi
  http://www.travellingrants.com/
 
 
 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org
 
  

Re: s:action tag showing result

2013-06-26 Thread Felipe Lorenz
Hi Lukasz,

I could identify one plugin wich could be creating this behaviour, the rest 
plugin.


Since I have this configuration:
 constant name=struts.mapper.class 
 value=org.apache.struts2.dispatcher.mapper.PrefixBasedActionMapper/
 constant name=struts.mapper.prefixMapping 
 value=:rest,/ajax:struts,/login:struts/


I expect that, when I request the following url 
http://xxx.com/ajax/anyThingHere, struts should handle this call. But 
instead, RestActionProxyFactory is handle this call.

But the RestActionProxyFactory class has a if, and every time the namespace 
attribute is injected with /ajax value. So the condition always is redirect 
to the rest plugin handler and not to the struts default.

Here is my ActionProxyFactory implementation:

public class CustomActionProxyFactory extends RestActionProxyFactory {

@Override
public ActionProxy createActionProxy(String namespace, String 
actionName, String methodName, MapString, Object extraContext, boolean 
executeResult, boolean cleanupContext) {
RestActionProxyFactory p = new RestActionProxyFactory();
p.setContainer(container);
if (/ajax.equals(namespace)) {
p.setNamespace(/idealogic);
}

return p.createActionProxy(namespace, actionName, methodName, 
extraContext, executeResult, cleanupContext);
}
}

By some reason, it fixed the origin behaviour.

I hope it could help you.

Thanks,
Felipe Lorenz

Em 26/06/2013, às 04:45, Lukasz Lenart escreveu:

 As I understand you use s:action executeResult=false/ ? Which
 means result named json shouldn't be executed, you can even remove
 it.
 
 
 Regards
 -- 
 Łukasz
 + 48 606 323 122 http://www.lenart.org.pl/
 
 2013/6/22 Felipe Lorenz felipe.lor...@idealogic.com.br:
 Hello Lukasz,
 
 I still facing this behaviour. Even with 2.3.16-SNAPSHOT.
 
 One thing that make me thing, was the flush attribute. When it is true, the 
 json result (the string) appear in the position where the action tag is in 
 the jsp. But, when I change it to false, the result appears in the top os my 
 page.
 
 One workaround that I can use is return a result name that is no defined in 
 the struts.xml. This workaround throw an exception, since struts could no 
 find my result name, but my list is populated and no result from this action 
 tag appear in my page.
 
 I hope this information can help.
 
 Also, I am printing my config:
 
 struts.xml:
 
 ?xml version=1.0 encoding=UTF-8 ?
 !DOCTYPE struts PUBLIC
-//Apache Software Foundation//DTD Struts Configuration 2.3//EN
http://struts.apache.org/dtds/struts-2.3.dtd;
 struts order=10
constant name=struts.devMode value=false /
constant name=struts.action.extension value=,json,xhtml,xml/
 
constant name=struts.convention.action.mapAllMatches value=true 
 /
constant name=struts.convention.default.parent.package 
 value=default/
 
constant name=struts.custom.i18n.resources value=global /
 
constant name=struts.mapper.class 
 value=org.apache.struts2.dispatcher.mapper.PrefixBasedActionMapper/
constant name=struts.mapper.prefixMapping 
 value=:rest,/ajax:struts,/login:struts/
 
package name=default extends=rest-default
 
interceptors
interceptor 
 class=br.com.idealogic.interceptor.LoginInterceptor name=login/
interceptor 
 class=br.com.idealogic.interceptor.PermissaoInterceptor name=permissao/
interceptor 
 class=br.com.idealogic.interceptor.I18nInterceptor name=idioma/
interceptor 
 class=br.com.idealogic.interceptor.JPAInterceptor name=jpa/
interceptor-stack name=jpaStack
interceptor-ref name=login/
interceptor-ref name=permissao/
interceptor-ref name=idioma/
interceptor-ref name=jpa/
interceptor-ref name=restDefaultStack/
/interceptor-stack
/interceptors
default-interceptor-ref name=jpaStack/
 
 
default-action-ref name=login_sistema/default-action-ref
 
global-results
result name=login/login.jsp/result
result name=forbidden/forbidden.jsp/result
/global-results
 
/package
 
include file=struts-ajax.xml/
include file=struts-login.xml/
include file=struts-filtro.xml/
 /struts
 
 struts-ajax.xml
 
 ?xml version=1.0 encoding=UTF-8?
 !DOCTYPE struts PUBLIC
 -//Apache Software Foundation//DTD Struts Configuration 2.0//EN
 http://struts.apache.org/dtds/struts-2.0.dtd;
 struts
package name=ajax extends=json-default namespace=/ajax
interceptors
interceptor 
 

FKerberos + struts2 + SpringMVC

2013-06-26 Thread Emi Lu


Hello,

Could someone provide an example or online document about how struts2 +
kerberos + tomcat7 + SpringFramework SSO login model works?

E.g.,
==
(1) User login to windows/unix within local network
(2) Open:
https://www.local_network_webapp1.com
https://www.local_network_webapp2.com
...
https://www.local_network_webappN.com

Users have already login in (1). So, instead of going to login
page, all weblinks in (2) show main menu page directly.

Thanks a lot!
Emi





-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



intercepter parameters in actions

2013-06-26 Thread Cameron Morris
Hello Strut-ers,

When I override an interceptor's parameter in several actions, only the
last action's parameters are applied.  (Note I'm not referencing a stack,
but just one interceptor.) I was expecting that a separate interceptor was
created for each action or that the param would be set before the action
was called.  Here is an example:

action name=action1 class=example.myAction1
 intercepter-ref name=myInterceptor
   param name=paramA/param
 /intercepter-ref
/action
action name=action2 class=example.myAction2
 intercepter-ref name=myInterceptor
   param name=paramB/param
 /intercepter-ref
/action
action name=action3 class=example.myAction3
 intercepter-ref name=myInterceptor
   param name=paramC/param
 /intercepter-ref
/action

When calling action1, action2, and action3 the param of myInterceptor
is always C.  Is this expected behavior or is this bug?

- Cam Morris


Re: intercepter parameters in actions

2013-06-26 Thread Umesh Awasthi
You first assumptions is wrong interceptor was
created for each action

Interceptors are not created per action/request but only once and any such
action level data changes are not the best place to do that

On Wed, Jun 26, 2013 at 8:22 PM, Cameron Morris cmor...@part.net wrote:

 Hello Strut-ers,

 When I override an interceptor's parameter in several actions, only the
 last action's parameters are applied.  (Note I'm not referencing a stack,
 but just one interceptor.) I was expecting that a separate interceptor was
 created for each action or that the param would be set before the action
 was called.  Here is an example:

 action name=action1 class=example.myAction1
  intercepter-ref name=myInterceptor
param name=paramA/param
  /intercepter-ref
 /action
 action name=action2 class=example.myAction2
  intercepter-ref name=myInterceptor
param name=paramB/param
  /intercepter-ref
 /action
 action name=action3 class=example.myAction3
  intercepter-ref name=myInterceptor
param name=paramC/param
  /intercepter-ref
 /action

 When calling action1, action2, and action3 the param of myInterceptor
 is always C.  Is this expected behavior or is this bug?

 - Cam Morris




-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


Re: intercepter parameters in actions

2013-06-26 Thread Cameron Morris
Thanks Umesh,
Would the expected behavior change if referencing a stack?
example:
action name=action1 class=example.myAction1
 intercepter-ref name=myStack
   param name=myInterceptor.paramA/param
 /intercepter-ref
/action
action name=action2 class=example.myAction2
 intercepter-ref name=myStack
   param name=myInterceptor.paramB/param
 /intercepter-ref
/action


On Wed, Jun 26, 2013 at 8:55 AM, Umesh Awasthi umeshawas...@gmail.comwrote:

 You first assumptions is wrong interceptor was
 created for each action

 Interceptors are not created per action/request but only once and any such
 action level data changes are not the best place to do that

 On Wed, Jun 26, 2013 at 8:22 PM, Cameron Morris cmor...@part.net wrote:

  Hello Strut-ers,
 
  When I override an interceptor's parameter in several actions, only the
  last action's parameters are applied.  (Note I'm not referencing a stack,
  but just one interceptor.) I was expecting that a separate interceptor
 was
  created for each action or that the param would be set before the action
  was called.  Here is an example:
 
  action name=action1 class=example.myAction1
   intercepter-ref name=myInterceptor
 param name=paramA/param
   /intercepter-ref
  /action
  action name=action2 class=example.myAction2
   intercepter-ref name=myInterceptor
 param name=paramB/param
   /intercepter-ref
  /action
  action name=action3 class=example.myAction3
   intercepter-ref name=myInterceptor
 param name=paramC/param
   /intercepter-ref
  /action
 
  When calling action1, action2, and action3 the param of myInterceptor
  is always C.  Is this expected behavior or is this bug?
 
  - Cam Morris
 



 --
 With Regards
 Umesh Awasthi
 http://www.travellingrants.com/



Re: Choosing locale from browser settings

2013-06-26 Thread Antonio Sánchez
It seems I18nInterceptor does it by default. 

I've not found this feature in the documentation. I think it would be great to 
document it. 

Doing some research I've found that the way to do it, in case I18nInterceptor 
is not enough, is inspecting the value of the Accept-Language request 
header, in the Action or using a custom interceptor. I guess the last option 
is better. 

Thanks!

El Martes, 25 de junio de 2013 13:23:28 Chester Twomey escribió:
 Look into the i18n intereceptor:
 
 http://struts.apache.org/release/2.3.x/docs/i18n-interceptor.html
 
 An example:
 http://www.mkyong.com/struts2/struts-2-i18n-or-localization-example/
 
 On Tue, Jun 25, 2013 at 5:27 AM, Antonio Sánchez
 
 juntandolin...@gmail.com wrote:
  Hello.
  
  I need to return content localized to the browser locale from the very
  first visit.
  
  I guess I need:
  
  1. Detect browser locale.
  2. Apply that locale in response and subsequent session.
  
  How can I do it?
  
  Thanks!
  
  Antonio
 
 --
 ~Chester
 
 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



RE: FKerberos + struts2 + SpringMVC

2013-06-26 Thread Martin Gainty
Comprendre comment implémenter Kerberos :
http://web.mit.edu/kerberos/


Travaux de SPRING avec SSO avec ACEGI security module via configuration 
personnalisée en sécurité-context.xml
http://mallsop.com/downloads/Using_CAS_with_Acegi.pdf

SSO sur tomcat est implémentée avec soupape de SingleSignOn par exempleHost 
name=localhost ...
  ...
  Valve className=org.apache.catalina.authenticator.SingleSignOn/
  ...
/Host
Sachez que votre client doit être capable de lire et écrire des cookies au 
dossier tempBon Chance,
Martin 
__ 
Note de déni et de confidentialité

Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.

 
 Date: Wed, 26 Jun 2013 09:28:23 -0400
 From: em...@encs.concordia.ca
 To: user@struts.apache.org
 Subject: FKerberos + struts2 + SpringMVC
 
 
 Hello,
 
 Could someone provide an example or online document about how struts2 +
 kerberos + tomcat7 + SpringFramework SSO login model works?
 
 E.g.,
 ==
 (1) User login to windows/unix within local network
 (2) Open:
  https://www.local_network_webapp1.com
  https://www.local_network_webapp2.com
  ...
  https://www.local_network_webappN.com
 
  Users have already login in (1). So, instead of going to login
 page, all weblinks in (2) show main menu page directly.
 
 Thanks a lot!
 Emi
 
 
 
 
 
 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org
 
  

Re: intercepter parameters in actions

2013-06-26 Thread Cameron Morris
I verified that the same behavior is true on interceptor stacks.  This
seems like a broken feature, a feature that we should discourage anyone
from using.  If I override an interceptor parameter on one action, when
that action runs, the interceptor will likely have different parameters.


On Wed, Jun 26, 2013 at 9:28 AM, Cameron Morris cmor...@part.net wrote:

 Thanks Umesh,
 Would the expected behavior change if referencing a stack?
 example:
 action name=action1 class=example.myAction1
  intercepter-ref name=myStack
param name=myInterceptor.paramA/param
  /intercepter-ref
 /action
 action name=action2 class=example.myAction2
  intercepter-ref name=myStack
param name=myInterceptor.paramB/param
  /intercepter-ref
 /action


 On Wed, Jun 26, 2013 at 8:55 AM, Umesh Awasthi umeshawas...@gmail.comwrote:

 You first assumptions is wrong interceptor was
 created for each action

 Interceptors are not created per action/request but only once and any such
 action level data changes are not the best place to do that

 On Wed, Jun 26, 2013 at 8:22 PM, Cameron Morris cmor...@part.net wrote:

  Hello Strut-ers,
 
  When I override an interceptor's parameter in several actions, only the
  last action's parameters are applied.  (Note I'm not referencing a
 stack,
  but just one interceptor.) I was expecting that a separate interceptor
 was
  created for each action or that the param would be set before the action
  was called.  Here is an example:
 
  action name=action1 class=example.myAction1
   intercepter-ref name=myInterceptor
 param name=paramA/param
   /intercepter-ref
  /action
  action name=action2 class=example.myAction2
   intercepter-ref name=myInterceptor
 param name=paramB/param
   /intercepter-ref
  /action
  action name=action3 class=example.myAction3
   intercepter-ref name=myInterceptor
 param name=paramC/param
   /intercepter-ref
  /action
 
  When calling action1, action2, and action3 the param of
 myInterceptor
  is always C.  Is this expected behavior or is this bug?
 
  - Cam Morris
 



 --
 With Regards
 Umesh Awasthi
 http://www.travellingrants.com/





Re: Struts dispatcher apparently not started

2013-06-26 Thread vEnkaTa mohAna rAo SriperumbUdUru
http://struts.apache.org/release/2.3.x/struts2-core/apidocs/org/apache/struts2/dispatcher/ng/filter/StrutsPrepareAndExecuteFilter.html
try to point to this filter. Usually get the above message when you are
using struts2 tags in jsp trying to display and not passing through the
StrutsPrepareAndExecuteFilter filter.


On Wed, Jun 26, 2013 at 4:07 PM, Fabian Richter frich...@mtg.de wrote:

 Hello all,

 I am faily new with struts, and to get a grip on the mechanics I
 volunteered to migrate one of our applications from Webwork to struts2
 latest.

 So far I made progress, the application is not only running but also
 rendered some UI in the browser.

 But I have exceptions like

 The Struts dispatcher cannot be found.  This is usually caused by using
 Struts tags without the associated filter. Struts tags are only usable when
 the request has passed through its servlet filter, which initializes the
 Struts dispatcher needed for this tag. - [unknown location]
 at org.apache.struts2.views.jsp.**TagUtils.getStack(TagUtils.**
 java:60)
 at org.apache.struts2.views.jsp.**StrutsBodyTagSupport.getStack(**
 StrutsBodyTagSupport.java:44)
 at org.apache.struts2.views.jsp.**ComponentTagSupport.**
 doStartTag(**ComponentTagSupport.java:48)

 On every action I do on the website.

 I am always calling actions (as far as I know) so no .jsp pages directly.

 My web.xml looks like:

 ---% SNIP 

 filter
 filter-nameappFilter/**filter-name
 filter-classown.**ApplicationFilter/filter-**class
 /filter

 filter
 filter-namestruts-prepare/**filter-name

 filter-classorg.apache.**struts2.dispatcher.ng.filter.**
 StrutsPrepareFilter/filter-**class
 /filter
 filter
 filter-namestruts-execute/**filter-name

 filter-classorg.apache.**struts2.dispatcher.ng.filter.**
 StrutsExecuteFilter/filter-**class
 /filter

 filter
 filter-namesitemesh/filter-**name

 filter-classcom.**opensymphony.sitemesh.webapp.**
 SiteMeshFilter/filter-class
 /filter

 filter-mapping
 filter-nameappFilter/**filter-name
 url-pattern*.html/url-**pattern
 /filter-mapping

 filter-mapping
 filter-namestruts-prepare/**filter-name
 url-pattern/*/url-pattern
 /filter-mapping

 filter-mapping
 filter-namesitemesh/filter-**name
 url-pattern/*/url-pattern
 dispatcherREQUEST/**dispatcher
 dispatcherFORWARD/**dispatcher
 dispatcherINCLUDE/**dispatcher
 /filter-mapping

 filter-mapping
 filter-namestruts-execute/**filter-name
 url-pattern/*/url-pattern
 /filter-mapping

 listener
 listener-classown.**StartupListener/listener-**class
 /listener

 listener

 listener-classorg.apache.**struts2.dispatcher.ng.**
 listener.StrutsListener/**listener-class
 /listener

 listener

 listener-classorg.**springframework.web.util.**
 Log4jConfigListener/listener-**class
 /listener


 servlet
 servlet-namesitemesh-**freemarker/servlet-name

 servlet-classorg.apache.**struts2.sitemesh.**
 FreemarkerDecoratorServlet/**servlet-class
 init-param
 param-namedefault_encoding/**param-name
 param-valueUTF-8/param-**value
 /init-param
 load-on-startup1/load-on-**startup
 /servlet

 servlet-mapping
 servlet-namesitemesh-**freemarker/servlet-name
 url-pattern*.ftl/url-**pattern
 /servlet-mapping

 servlet
 servlet-name**JspSupportServlet/servlet-**name

 servlet-classorg.apache.**struts2.views.**JspSupportServlet/servlet-**
 class
 load-on-startup1/load-on-**startup
 /servlet

 ---% SNIP 

 The rest of the file is simple configuration. I thought by calling the
 org.apache.struts2.dispatcher.**ng.filter.StrutsPrepareFilter right after
 my AppFilter (which handles cert based authentification) I would already be
 calling the Struts Dispatcher, but apparently thats where I'm wrong?

 Thank you for your help to a newbie!

 Best
 Fabian




OGNL s:interator index problem

2013-06-26 Thread john lee


an class

    class SearchInfo {

   String input_part;
   String search_part;
   int current_page=0;
   int total_find=0;
   int total_pages=0;
   int size=20;
   /* set, get  skip */
  }

after search, 

   session.put(searchinfo, searchinfo);

at jsp, 

   s:property value=#session.searchinfo.input_part/ returns xxx

   s:property value=#session.searchinfo.total_find/  returns 208

    s:property value=#session.searchinfo.total_pages/   returns 11

   s:property value=#session.searchinfo.current_page/    return 1 


at bottom of jsp, i need to provide the page link, such as following

  if current page is 1, the followign will display

    1,2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,15,16,17,18,19

 if current page is 22, the following will display
    2139

so, i use the s:iterator to loop, but never works

    s:iterator value=%{#session.searchinfo.current_page} var=page 
begin=(#session.searchinfo.current_page/20)*20+1 
end=(#session.searchinfo.current_page/20)+20 status=status step=1
    s:property value=#stauts.index/
  /s:iterator

But, it never works

for sttut1, i used jsp to implement the above, it is straight forward, but 
struts2's OGNL looks like more complicate.

please advise

thanks in advance

john


Re: Struts dispatcher apparently not started

2013-06-26 Thread Lukasz Lenart
What URL do you enter to get the exception?


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

2013/6/26 Fabian Richter frich...@mtg.de:
 Hello all,

 I am faily new with struts, and to get a grip on the mechanics I volunteered
 to migrate one of our applications from Webwork to struts2 latest.

 So far I made progress, the application is not only running but also
 rendered some UI in the browser.

 But I have exceptions like

 The Struts dispatcher cannot be found.  This is usually caused by using
 Struts tags without the associated filter. Struts tags are only usable when
 the request has passed through its servlet filter, which initializes the
 Struts dispatcher needed for this tag. - [unknown location]
 at org.apache.struts2.views.jsp.TagUtils.getStack(TagUtils.java:60)
 at
 org.apache.struts2.views.jsp.StrutsBodyTagSupport.getStack(StrutsBodyTagSupport.java:44)
 at
 org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTagSupport.java:48)

 On every action I do on the website.

 I am always calling actions (as far as I know) so no .jsp pages directly.

 My web.xml looks like:

 ---% SNIP 

 filter
 filter-nameappFilter/filter-name
 filter-classown.ApplicationFilter/filter-class
 /filter

 filter
 filter-namestruts-prepare/filter-name

 filter-classorg.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter/filter-class
 /filter
 filter
 filter-namestruts-execute/filter-name

 filter-classorg.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter/filter-class
 /filter

 filter
 filter-namesitemesh/filter-name

 filter-classcom.opensymphony.sitemesh.webapp.SiteMeshFilter/filter-class
 /filter

 filter-mapping
 filter-nameappFilter/filter-name
 url-pattern*.html/url-pattern
 /filter-mapping

 filter-mapping
 filter-namestruts-prepare/filter-name
 url-pattern/*/url-pattern
 /filter-mapping

 filter-mapping
 filter-namesitemesh/filter-name
 url-pattern/*/url-pattern
 dispatcherREQUEST/dispatcher
 dispatcherFORWARD/dispatcher
 dispatcherINCLUDE/dispatcher
 /filter-mapping

 filter-mapping
 filter-namestruts-execute/filter-name
 url-pattern/*/url-pattern
 /filter-mapping

 listener
 listener-classown.StartupListener/listener-class
 /listener

 listener

 listener-classorg.apache.struts2.dispatcher.ng.listener.StrutsListener/listener-class
 /listener

 listener

 listener-classorg.springframework.web.util.Log4jConfigListener/listener-class
 /listener


 servlet
 servlet-namesitemesh-freemarker/servlet-name

 servlet-classorg.apache.struts2.sitemesh.FreemarkerDecoratorServlet/servlet-class
 init-param
 param-namedefault_encoding/param-name
 param-valueUTF-8/param-value
 /init-param
 load-on-startup1/load-on-startup
 /servlet

 servlet-mapping
 servlet-namesitemesh-freemarker/servlet-name
 url-pattern*.ftl/url-pattern
 /servlet-mapping

 servlet
 servlet-nameJspSupportServlet/servlet-name

 servlet-classorg.apache.struts2.views.JspSupportServlet/servlet-class
 load-on-startup1/load-on-startup
 /servlet

 ---% SNIP 

 The rest of the file is simple configuration. I thought by calling the
 org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter right after my
 AppFilter (which handles cert based authentification) I would already be
 calling the Struts Dispatcher, but apparently thats where I'm wrong?

 Thank you for your help to a newbie!

 Best
 Fabian


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: intercepter parameters in actions

2013-06-26 Thread Lukasz Lenart
Interceptors are singletons per stack - if you referencing them with
interceptor-ref from within actions you are reusing the same instance.


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

2013/6/26 Cameron Morris cmor...@part.net:
 Hello Strut-ers,

 When I override an interceptor's parameter in several actions, only the
 last action's parameters are applied.  (Note I'm not referencing a stack,
 but just one interceptor.) I was expecting that a separate interceptor was
 created for each action or that the param would be set before the action
 was called.  Here is an example:

 action name=action1 class=example.myAction1
  intercepter-ref name=myInterceptor
param name=paramA/param
  /intercepter-ref
 /action
 action name=action2 class=example.myAction2
  intercepter-ref name=myInterceptor
param name=paramB/param
  /intercepter-ref
 /action
 action name=action3 class=example.myAction3
  intercepter-ref name=myInterceptor
param name=paramC/param
  /intercepter-ref
 /action

 When calling action1, action2, and action3 the param of myInterceptor
 is always C.  Is this expected behavior or is this bug?

 - Cam Morris

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: OGNL s:interator index problem

2013-06-26 Thread jlmagc
Did you get an exception in the logs?
Sent via BlackBerry from T-Mobile

-Original Message-
From: john lee sh_thorn_b...@yahoo.com
Date: Wed, 26 Jun 2013 22:13:52 
To: struts supportuser@struts.apache.org
Reply-To: Struts Users Mailing List user@struts.apache.org
Subject: OGNL s:interator index problem



an class

    class SearchInfo {

   String input_part;
   String search_part;
   int current_page=0;
   int total_find=0;
   int total_pages=0;
   int size=20;
   /* set, get  skip */
  }

after search, 

   session.put(searchinfo, searchinfo);

at jsp, 

   s:property value=#session.searchinfo.input_part/ returns xxx

   s:property value=#session.searchinfo.total_find/  returns 208

    s:property value=#session.searchinfo.total_pages/   returns 11

   s:property value=#session.searchinfo.current_page/    return 1 


at bottom of jsp, i need to provide the page link, such as following

  if current page is 1, the followign will display

    1,2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,15,16,17,18,19

 if current page is 22, the following will display
    2139

so, i use the s:iterator to loop, but never works

    s:iterator value=%{#session.searchinfo.current_page} var=page 
begin=(#session.searchinfo.current_page/20)*20+1 
end=(#session.searchinfo.current_page/20)+20 status=status step=1
    s:property value=#stauts.index/
  /s:iterator

But, it never works

for sttut1, i used jsp to implement the above, it is straight forward, but 
struts2's OGNL looks like more complicate.

please advise

thanks in advance

john


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org