RE: Validate method not working in Action after using Interceptor

2011-06-07 Thread Pankaj Shrivastava
Did you mean to have only one interceptor in your stack?
You stack has only one interceptor and none which invokes the validate()
method. Perhaps you can try having your stack like this:


 
 
 

  


OR better soln is

You can copy over the default stack and replace the WorkFlowInterceptor with
your own.

Also, ActionSupport already implements the Validateable, so you only need to
extend it (no need for "implements Validateable").

-Pankaj


-Original Message-
From: Nikul Suthar [mailto:nikulsut...@gmail.com] 
Sent: Wednesday, June 08, 2011 10:03 AM
To: user@struts.apache.org
Subject: Validate method not working in Action after using Interceptor

Hi There,

I'm pretty new to using Struts 2 for developing a web application. So I
would be very thankful if someone can clear out this roadblock for me.

I'm trying to write some custom validation code in method *public void
validate()* in the Action class. I also created an interceptor extending *
DefaultWorkflowInterceptor* checking for session object validity. But since
I implemented the interceptor my validate method does not get executed at
all. I need the validate method to be executed to implement custom field
validations every time the request is received. Since I'm new to using
Struts 2 this is the best design I could come up with. Your help in making
the validate method execute every time the request is received without
removing the interceptor will be highly appreciated. Following is my code:

*ShowChangePassword2Of2Action*
*
*
public class ShowChangePassword2Of2Action extends ActionSupport implements
Validateable{
[Field variables]

public String show(){
[My business logic]
}

public void validate(){
[My validation logic]
}

[Field variables getters and setters]
}



*SessionInterceptor*
*
*
public class SessionInterceptor extends DefaultWorkflowInterceptor{
private static final long serialVersionUID = 1L;

public String intercept(ActionInvocation invocation) throws Exception {
ActionContext context = invocation.getInvocationContext();
Map sessionMap = context.getSession();
if(sessionMap == null || sessionMap.isEmpty()){
 System.out.println("Session expired...");
 return "sessionExpired";
}//if
else{
return invocation.invoke();
}//else
}

public void destroy() {
System.out.println("Destroying Session Interceptor...");
}
public void init() {
System.out.println("Initializing Session Interceptor...");
}
}



*struts.xml*
*
*





 
 




 
welcome

 

showChangePassword2Of2
errorPage
showChangePassword1Of2




Thank you very much in advance.

Thanks,
Nikul


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



Re: Validate method not working in Action after using Interceptor

2011-06-07 Thread Chris Pratt
In your interceptor, you're replacing the logic from the
DefaultWorkflowInterceptor with your own.  What you really want to do is
perform your work, then allow it to do it's job.  So, instead of return
invocation.invoke();, try  return super.intercept(invocation); and see if
that does more what you are looking for.
  (*Chris*)

On Tue, Jun 7, 2011 at 9:32 PM, Nikul Suthar  wrote:

> Hi There,
>
> I'm pretty new to using Struts 2 for developing a web application. So I
> would be very thankful if someone can clear out this roadblock for me.
>
> I'm trying to write some custom validation code in method *public void
> validate()* in the Action class. I also created an interceptor extending *
> DefaultWorkflowInterceptor* checking for session object validity. But since
> I implemented the interceptor my validate method does not get executed at
> all. I need the validate method to be executed to implement custom field
> validations every time the request is received. Since I'm new to using
> Struts 2 this is the best design I could come up with. Your help in making
> the validate method execute every time the request is received without
> removing the interceptor will be highly appreciated. Following is my code:
>
> *ShowChangePassword2Of2Action*
> *
> *
> public class ShowChangePassword2Of2Action extends ActionSupport implements
> Validateable{
>[Field variables]
>
>public String show(){
>[My business logic]
>}
>
>public void validate(){
>[My validation logic]
>}
>
>[Field variables getters and setters]
> }
>
>
>
> *SessionInterceptor*
> *
> *
> public class SessionInterceptor extends DefaultWorkflowInterceptor{
>private static final long serialVersionUID = 1L;
>
>public String intercept(ActionInvocation invocation) throws Exception {
>ActionContext context = invocation.getInvocationContext();
>Map sessionMap = context.getSession();
>if(sessionMap == null || sessionMap.isEmpty()){
> System.out.println("Session expired...");
> return "sessionExpired";
>}//if
>else{
>return invocation.invoke();
>}//else
>}
>
>public void destroy() {
>System.out.println("Destroying Session Interceptor...");
>}
>public void init() {
>System.out.println("Initializing Session Interceptor...");
>}
> }
>
>
>
> *struts.xml*
> *
> *
> 
> 
> 
>  class="org.apache.struts2.views.tiles.TilesResult"
> />
> 
>  
>  class="org.zssinfo.interceptor.SessionInterceptor">
>
>
>
> 
>  
> welcome
> 
>   class="org.zssinfo.action.ShowChangePassword2Of2Action">
> 
> showChangePassword2Of2
> errorPage
> showChangePassword1Of2
> 
> 
> 
>
> Thank you very much in advance.
>
> Thanks,
> Nikul
>


Validate method not working in Action after using Interceptor

2011-06-07 Thread Nikul Suthar
Hi There,

I'm pretty new to using Struts 2 for developing a web application. So I
would be very thankful if someone can clear out this roadblock for me.

I'm trying to write some custom validation code in method *public void
validate()* in the Action class. I also created an interceptor extending *
DefaultWorkflowInterceptor* checking for session object validity. But since
I implemented the interceptor my validate method does not get executed at
all. I need the validate method to be executed to implement custom field
validations every time the request is received. Since I'm new to using
Struts 2 this is the best design I could come up with. Your help in making
the validate method execute every time the request is received without
removing the interceptor will be highly appreciated. Following is my code:

*ShowChangePassword2Of2Action*
*
*
public class ShowChangePassword2Of2Action extends ActionSupport implements
Validateable{
[Field variables]

public String show(){
[My business logic]
}

public void validate(){
[My validation logic]
}

[Field variables getters and setters]
}



*SessionInterceptor*
*
*
public class SessionInterceptor extends DefaultWorkflowInterceptor{
private static final long serialVersionUID = 1L;

public String intercept(ActionInvocation invocation) throws Exception {
ActionContext context = invocation.getInvocationContext();
Map sessionMap = context.getSession();
if(sessionMap == null || sessionMap.isEmpty()){
 System.out.println("Session expired...");
 return "sessionExpired";
}//if
else{
return invocation.invoke();
}//else
}

public void destroy() {
System.out.println("Destroying Session Interceptor...");
}
public void init() {
System.out.println("Initializing Session Interceptor...");
}
}



*struts.xml*
*
*





 
 




 
welcome

 

showChangePassword2Of2
errorPage
showChangePassword1Of2




Thank you very much in advance.

Thanks,
Nikul


Re: XWork

2011-06-07 Thread Maurizio Cucchiara
Hi Frans,
try to change the doctype definition with:
http://struts.apache.org/dtds/xwork-validator-config-1.0.dtd";>


On 8 June 2011 00:13, Frans Thamura  wrote:
> this is the screen capture
>
> http://twitpic.com/58eyvp
>
>
> On Wed, Jun 8, 2011 at 5:09 AM, Frans Thamura  wrote:
>
>> we have also the 2.2 in sf.net
>>
>> but the problem in old version of struts
>>
>>
>> http://cimande.svn.sourceforge.net/viewvc/cimande/trunk/WebContent/WEB-INF/lib/
>>
>>
>> --
>> Frans Thamura
>> Chief of Advisory
>> Meruvian.
>> Integrated Hypermedia Java Solution Provider.
>>
>> Mobile: +628557888699
>> Blog: http://blogs.mervpolis.com/roller/flatburger (id)
>>
>> FB: http://www.facebook.com/meruvian
>> TW: http://www.twitter.com/meruvian / @meruvian
>> Website: http://www.meruvian.org
>>
>> "We grow because we share the same belief."
>>
>>
>>
>> On Wed, Jun 8, 2011 at 5:08 AM, Frans Thamura  wrote:
>>
>>> i believe struts 2.0.x not the 2.2.x
>>>
>>> F
>>>
>>>
>>> On Wed, Jun 8, 2011 at 5:03 AM, Jason Pyeron  wrote:
>>>
 > -Original Message-
 > From: Frans Thamura [mailto:fr...@meruvian.org]
 > Sent: Tuesday, June 07, 2011 17:51
 > To: Struts Users Mailing List
 > Subject: Re: XWork
 >
 > our old struts2 using the non maven version. we use ant..
 >
 > and we got problem with DTD of XWork

 Roger that. But please answer the question of which version are you
 using?

 >
 > and our newest project using maven, the problem gone.
 >
 > but we still need workaround for this xwork.
 >
 > F
 >
 > On Wed, Jun 8, 2011 at 4:48 AM, Jason Pyeron  wrote:
 >
 > > > -Original Message-
 > > > From: Frans Thamura
 > > > Sent: Tuesday, June 07, 2011 16:43
 > > > To: Struts Users Mailing List
 > > > Subject: XWork
 > > >
 > > > hi all
 > > >
 > > > we know that opensymphony has final day
 > > >
 > > > any idea for xwork implementation for old struts2 version
 > >
 > > I am not sure I understand your question. Are you looking
 > for the jars?
 > >
 > > Which version? Have you googled for it?
 > >
 > > Do you use maven?
 > >



 --
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 -                                                               -
 - Jason Pyeron                      PD Inc. http://www.pdinc.us -
 - Principal Consultant              10 West 24th Street #100    -
 - +1 (443) 269-1555 x333            Baltimore, Maryland 21218   -
 -                                                               -
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 This message is copyright PD Inc, subject to license 20080407P00.




 -
 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: XWork

2011-06-07 Thread Frans Thamura
this is the screen capture

http://twitpic.com/58eyvp


On Wed, Jun 8, 2011 at 5:09 AM, Frans Thamura  wrote:

> we have also the 2.2 in sf.net
>
> but the problem in old version of struts
>
>
> http://cimande.svn.sourceforge.net/viewvc/cimande/trunk/WebContent/WEB-INF/lib/
>
>
> --
> Frans Thamura
> Chief of Advisory
> Meruvian.
> Integrated Hypermedia Java Solution Provider.
>
> Mobile: +628557888699
> Blog: http://blogs.mervpolis.com/roller/flatburger (id)
>
> FB: http://www.facebook.com/meruvian
> TW: http://www.twitter.com/meruvian / @meruvian
> Website: http://www.meruvian.org
>
> "We grow because we share the same belief."
>
>
>
> On Wed, Jun 8, 2011 at 5:08 AM, Frans Thamura  wrote:
>
>> i believe struts 2.0.x not the 2.2.x
>>
>> F
>>
>>
>> On Wed, Jun 8, 2011 at 5:03 AM, Jason Pyeron  wrote:
>>
>>> > -Original Message-
>>> > From: Frans Thamura [mailto:fr...@meruvian.org]
>>> > Sent: Tuesday, June 07, 2011 17:51
>>> > To: Struts Users Mailing List
>>> > Subject: Re: XWork
>>> >
>>> > our old struts2 using the non maven version. we use ant..
>>> >
>>> > and we got problem with DTD of XWork
>>>
>>> Roger that. But please answer the question of which version are you
>>> using?
>>>
>>> >
>>> > and our newest project using maven, the problem gone.
>>> >
>>> > but we still need workaround for this xwork.
>>> >
>>> > F
>>> >
>>> > On Wed, Jun 8, 2011 at 4:48 AM, Jason Pyeron  wrote:
>>> >
>>> > > > -Original Message-
>>> > > > From: Frans Thamura
>>> > > > Sent: Tuesday, June 07, 2011 16:43
>>> > > > To: Struts Users Mailing List
>>> > > > Subject: XWork
>>> > > >
>>> > > > hi all
>>> > > >
>>> > > > we know that opensymphony has final day
>>> > > >
>>> > > > any idea for xwork implementation for old struts2 version
>>> > >
>>> > > I am not sure I understand your question. Are you looking
>>> > for the jars?
>>> > >
>>> > > Which version? Have you googled for it?
>>> > >
>>> > > Do you use maven?
>>> > >
>>>
>>>
>>>
>>> --
>>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
>>> -   -
>>> - Jason Pyeron  PD Inc. http://www.pdinc.us -
>>> - Principal Consultant  10 West 24th Street #100-
>>> - +1 (443) 269-1555 x333Baltimore, Maryland 21218   -
>>> -   -
>>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
>>> This message is copyright PD Inc, subject to license 20080407P00.
>>>
>>>
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>> For additional commands, e-mail: user-h...@struts.apache.org
>>>
>>>
>>
>


Re: XWork

2011-06-07 Thread Frans Thamura
i believe struts 2.0.x not the 2.2.x

F

On Wed, Jun 8, 2011 at 5:03 AM, Jason Pyeron  wrote:

> > -Original Message-
> > From: Frans Thamura [mailto:fr...@meruvian.org]
> > Sent: Tuesday, June 07, 2011 17:51
> > To: Struts Users Mailing List
> > Subject: Re: XWork
> >
> > our old struts2 using the non maven version. we use ant..
> >
> > and we got problem with DTD of XWork
>
> Roger that. But please answer the question of which version are you using?
>
> >
> > and our newest project using maven, the problem gone.
> >
> > but we still need workaround for this xwork.
> >
> > F
> >
> > On Wed, Jun 8, 2011 at 4:48 AM, Jason Pyeron  wrote:
> >
> > > > -Original Message-
> > > > From: Frans Thamura
> > > > Sent: Tuesday, June 07, 2011 16:43
> > > > To: Struts Users Mailing List
> > > > Subject: XWork
> > > >
> > > > hi all
> > > >
> > > > we know that opensymphony has final day
> > > >
> > > > any idea for xwork implementation for old struts2 version
> > >
> > > I am not sure I understand your question. Are you looking
> > for the jars?
> > >
> > > Which version? Have you googled for it?
> > >
> > > Do you use maven?
> > >
>
>
>
> --
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> -   -
> - Jason Pyeron  PD Inc. http://www.pdinc.us -
> - Principal Consultant  10 West 24th Street #100-
> - +1 (443) 269-1555 x333Baltimore, Maryland 21218   -
> -   -
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> This message is copyright PD Inc, subject to license 20080407P00.
>
>
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


Re: XWork

2011-06-07 Thread Frans Thamura
we have also the 2.2 in sf.net

but the problem in old version of struts

http://cimande.svn.sourceforge.net/viewvc/cimande/trunk/WebContent/WEB-INF/lib/


--
Frans Thamura
Chief of Advisory
Meruvian.
Integrated Hypermedia Java Solution Provider.

Mobile: +628557888699
Blog: http://blogs.mervpolis.com/roller/flatburger (id)

FB: http://www.facebook.com/meruvian
TW: http://www.twitter.com/meruvian / @meruvian
Website: http://www.meruvian.org

"We grow because we share the same belief."


On Wed, Jun 8, 2011 at 5:08 AM, Frans Thamura  wrote:

> i believe struts 2.0.x not the 2.2.x
>
> F
>
>
> On Wed, Jun 8, 2011 at 5:03 AM, Jason Pyeron  wrote:
>
>> > -Original Message-
>> > From: Frans Thamura [mailto:fr...@meruvian.org]
>> > Sent: Tuesday, June 07, 2011 17:51
>> > To: Struts Users Mailing List
>> > Subject: Re: XWork
>> >
>> > our old struts2 using the non maven version. we use ant..
>> >
>> > and we got problem with DTD of XWork
>>
>> Roger that. But please answer the question of which version are you using?
>>
>> >
>> > and our newest project using maven, the problem gone.
>> >
>> > but we still need workaround for this xwork.
>> >
>> > F
>> >
>> > On Wed, Jun 8, 2011 at 4:48 AM, Jason Pyeron  wrote:
>> >
>> > > > -Original Message-
>> > > > From: Frans Thamura
>> > > > Sent: Tuesday, June 07, 2011 16:43
>> > > > To: Struts Users Mailing List
>> > > > Subject: XWork
>> > > >
>> > > > hi all
>> > > >
>> > > > we know that opensymphony has final day
>> > > >
>> > > > any idea for xwork implementation for old struts2 version
>> > >
>> > > I am not sure I understand your question. Are you looking
>> > for the jars?
>> > >
>> > > Which version? Have you googled for it?
>> > >
>> > > Do you use maven?
>> > >
>>
>>
>>
>> --
>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
>> -   -
>> - Jason Pyeron  PD Inc. http://www.pdinc.us -
>> - Principal Consultant  10 West 24th Street #100-
>> - +1 (443) 269-1555 x333Baltimore, Maryland 21218   -
>> -   -
>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
>> This message is copyright PD Inc, subject to license 20080407P00.
>>
>>
>>
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
>


RE: XWork

2011-06-07 Thread Jason Pyeron
> -Original Message-
> From: Frans Thamura [mailto:fr...@meruvian.org] 
> Sent: Tuesday, June 07, 2011 17:51
> To: Struts Users Mailing List
> Subject: Re: XWork
> 
> our old struts2 using the non maven version. we use ant..
> 
> and we got problem with DTD of XWork

Roger that. But please answer the question of which version are you using?

> 
> and our newest project using maven, the problem gone.
> 
> but we still need workaround for this xwork.
> 
> F
> 
> On Wed, Jun 8, 2011 at 4:48 AM, Jason Pyeron  wrote:
> 
> > > -Original Message-
> > > From: Frans Thamura
> > > Sent: Tuesday, June 07, 2011 16:43
> > > To: Struts Users Mailing List
> > > Subject: XWork
> > >
> > > hi all
> > >
> > > we know that opensymphony has final day
> > >
> > > any idea for xwork implementation for old struts2 version
> >
> > I am not sure I understand your question. Are you looking 
> for the jars?
> >
> > Which version? Have you googled for it?
> >
> > Do you use maven?
> >



--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-   -
- Jason Pyeron  PD Inc. http://www.pdinc.us -
- Principal Consultant  10 West 24th Street #100-
- +1 (443) 269-1555 x333Baltimore, Maryland 21218   -
-   -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
This message is copyright PD Inc, subject to license 20080407P00.

 


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



Re: XWork

2011-06-07 Thread Frans Thamura
our old struts2 using the non maven version. we use ant..

and we got problem with DTD of XWork

and our newest project using maven, the problem gone.

but we still need workaround for this xwork.

F

On Wed, Jun 8, 2011 at 4:48 AM, Jason Pyeron  wrote:

> > -Original Message-
> > From: Frans Thamura
> > Sent: Tuesday, June 07, 2011 16:43
> > To: Struts Users Mailing List
> > Subject: XWork
> >
> > hi all
> >
> > we know that opensymphony has final day
> >
> > any idea for xwork implementation for old struts2 version
>
> I am not sure I understand your question. Are you looking for the jars?
>
> Which version? Have you googled for it?
>
> Do you use maven?
>
> --
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> -   -
> - Jason Pyeron  PD Inc. http://www.pdinc.us -
> - Principal Consultant  10 West 24th Street #100-
> - +1 (443) 269-1555 x333Baltimore, Maryland 21218   -
> -   -
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> This message is copyright PD Inc, subject to license 20080407P00.
>
>
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


RE: XWork

2011-06-07 Thread Jason Pyeron
> -Original Message-
> From: Frans Thamura 
> Sent: Tuesday, June 07, 2011 16:43
> To: Struts Users Mailing List
> Subject: XWork
> 
> hi all
> 
> we know that opensymphony has final day
> 
> any idea for xwork implementation for old struts2 version

I am not sure I understand your question. Are you looking for the jars?

Which version? Have you googled for it? 

Do you use maven?

--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-   -
- Jason Pyeron  PD Inc. http://www.pdinc.us -
- Principal Consultant  10 West 24th Street #100-
- +1 (443) 269-1555 x333Baltimore, Maryland 21218   -
-   -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
This message is copyright PD Inc, subject to license 20080407P00.

 


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



XWork

2011-06-07 Thread Frans Thamura
hi all

we know that opensymphony has final day

any idea for xwork implementation for old struts2 version

F


Re: Adding a JNDI lookup yields unexpected Struts errors

2011-06-07 Thread Miguel
On a follow-up of the previous post, the error is the same in Tomcat. It
happens whenever this line is added to applicationContext.xml:


Even if no xoxoGG env property is defined, if I add a
default-value="YYY" to the above property Struts will say (for every
action):
There is no Action mapped for action name
YYY/tutorial/randomiseRedirect.

Why is it adding my jndi property to the URL?

On Tue, 2011-06-07 at 18:07 +0100, Miguel wrote:

> Dear all,
> 
> I am having a strange problem and was hoping anyone knows why this is
> happening.
> 
> My web app was working correctly and running in development in jetty
> running with maven. I'm using Spring's to inject dependencies.
> 
> The problem arises when I add a JNDI entry. To do so I:
> 
> 1) change my container configuration in Maven's pom, so that it sees
> jetty-env.xml:
> 
>   /
>   ${basedir}/src/main/resources/jetty/jetty-env.xml
>   
> 
> 
> 2) Configure a new env-entry in the jetty-env.xml:
> 
>   
>   
>   xoxoGG
>   AAA
>   true
>   
> 
> 
> 3) Add a spring bean definition for this JNDI entry:
>  id="currentEnvironment"  />
> 
> The outcome of this is that all links are appended with the value of
> xoxoGG (AAA), yielding errors like:
> There is no Action mapped for action name
> AAA/tutorial/randomiseRedirect. -
> or trying to reach http://localhost:8080/AAA/welcome!AAA.action#AAA (why
> it is appending so many AAA I don't know)
> 
> While this is not strictly a problem with struts, perhaps somehow this
> configuration is conflicting with Struts. 
> Any help is appreciated in trying to understand this problem!
> 
> Regards,
> 
> Miguel Almeida
> 
> 




Adding a JNDI lookup yields unexpected Struts errors

2011-06-07 Thread Miguel
Dear all,

I am having a strange problem and was hoping anyone knows why this is
happening.

My web app was working correctly and running in development in jetty
running with maven. I'm using Spring's to inject dependencies.

The problem arises when I add a JNDI entry. To do so I:

1) change my container configuration in Maven's pom, so that it sees
jetty-env.xml:

/
${basedir}/src/main/resources/jetty/jetty-env.xml



2) Configure a new env-entry in the jetty-env.xml:



xoxoGG
AAA
true



3) Add a spring bean definition for this JNDI entry:


The outcome of this is that all links are appended with the value of
xoxoGG (AAA), yielding errors like:
There is no Action mapped for action name
AAA/tutorial/randomiseRedirect. -
or trying to reach http://localhost:8080/AAA/welcome!AAA.action#AAA (why
it is appending so many AAA I don't know)

While this is not strictly a problem with struts, perhaps somehow this
configuration is conflicting with Struts. 
Any help is appreciated in trying to understand this problem!

Regards,

Miguel Almeida




Re: ognl and getText for s:textfield/placeholder

2011-06-07 Thread Lukasz Lenart
2011/6/7 Stephen Ince :
> Thanx a lot Lukask! That was quick.

Please test it if you can, thanks in advance!


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
Warszawa JUG conference - Confitura http://confitura.pl/

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



Re: ognl and getText for s:textfield/placeholder

2011-06-07 Thread Stephen Ince

Thanx a lot Lukask! That was quick.

Steve
- Original Message - 
From: "Lukasz Lenart" 

To: "Struts Users Mailing List" 
Sent: Tuesday, June 07, 2011 7:40 AM
Subject: Re: ognl and getText for s:textfield/placeholder


Ok, solved, please wait a bit, SNAPSHOT version should be available soon ;-)


Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
Warszawa JUG conference - Confitura http://confitura.pl/


2011/6/7 Stephen Ince :


Lukasz,
I reported the issue. Thx again for you time.

Steve
https://issues.apache.org/jira/browse/WW-3644

- Original Message - From: "Lukasz Lenart"

To: "Struts Users Mailing List" 
Sent: Tuesday, June 07, 2011 7:07 AM
Subject: Re: ognl and getText for s:textfield/placeholder


https://issues.apache.org/jira/browse/WW

2011/6/7 Stephen Ince :


Sure. Can you point to the where I should report the issue?
placeHolder will be an issue for HTML5 and anyone wanting to use resource
keys.

Steve
- Original Message - From: "Lukasz Lenart"

To: "Struts Users Mailing List" 
Sent: Tuesday, June 07, 2011 6:57 AM
Subject: Re: ognl and getText for s:textfield/placeholder


It isn't supported, but it can be, I think. Could you register an
issue ? It's not only related to Dojo tags (as TextField doesn't have
Dojo version).

The change should be simple:

AbstractUITag, line 294

public void setDynamicAttribute(String uri, String localName,
Object value) throws JspException {
dynamicAttributes.put(localName, value);
}

and replace with

public void setDynamicAttribute(String uri, String localName,
Object value) throws JspException {
dynamicAttributes.put(localName, findString(value));
}


Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
Warszawa JUG conference - Confitura http://confitura.pl/


2011/6/7 Stephen Ince :


Lukasz,
Thx for your response. A resource key. I tried that. It seems that 
strut2

will only ognl evaluate certains fields and "placeholder" is not one of
the
fields. Is there a flag that I can tell struts2 to evaluate placeholder
field.

The following did work:


The submit button has the correct resource key value.
but this will not work.


Steve
- Original Message - From: "Lukasz Lenart"

To: "Struts Users Mailing List" 
Sent: Tuesday, June 07, 2011 5:57 AM
Subject: Re: ognl and getText for s:textfield/placeholder


2011/6/7 Stephen Ince :





What is placeHolder, a bean or a resource key ?

If bean: "%{getText(placeHolder.Username)}"
If key: '%{getText("placeHolder.Username")}'


Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
Warszawa JUG conference - Confitura http://confitura.pl/

-
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




-
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: ognl and getText for s:textfield/placeholder

2011-06-07 Thread Lukasz Lenart
Ok, solved, please wait a bit, SNAPSHOT version should be available soon ;-)


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
Warszawa JUG conference - Confitura http://confitura.pl/


2011/6/7 Stephen Ince :
>
> Lukasz,
>  I reported the issue. Thx again for you time.
>
> Steve
> https://issues.apache.org/jira/browse/WW-3644
>
> - Original Message - From: "Lukasz Lenart"
> 
> To: "Struts Users Mailing List" 
> Sent: Tuesday, June 07, 2011 7:07 AM
> Subject: Re: ognl and getText for s:textfield/placeholder
>
>
> https://issues.apache.org/jira/browse/WW
>
> 2011/6/7 Stephen Ince :
>>
>> Sure. Can you point to the where I should report the issue?
>> placeHolder will be an issue for HTML5 and anyone wanting to use resource
>> keys.
>>
>> Steve
>> - Original Message - From: "Lukasz Lenart"
>> 
>> To: "Struts Users Mailing List" 
>> Sent: Tuesday, June 07, 2011 6:57 AM
>> Subject: Re: ognl and getText for s:textfield/placeholder
>>
>>
>> It isn't supported, but it can be, I think. Could you register an
>> issue ? It's not only related to Dojo tags (as TextField doesn't have
>> Dojo version).
>>
>> The change should be simple:
>>
>> AbstractUITag, line 294
>>
>> public void setDynamicAttribute(String uri, String localName,
>> Object value) throws JspException {
>> dynamicAttributes.put(localName, value);
>> }
>>
>> and replace with
>>
>> public void setDynamicAttribute(String uri, String localName,
>> Object value) throws JspException {
>> dynamicAttributes.put(localName, findString(value));
>> }
>>
>>
>> Regards
>> --
>> Łukasz
>> + 48 606 323 122 http://www.lenart.org.pl/
>> Warszawa JUG conference - Confitura http://confitura.pl/
>>
>>
>> 2011/6/7 Stephen Ince :
>>>
>>> Lukasz,
>>> Thx for your response. A resource key. I tried that. It seems that strut2
>>> will only ognl evaluate certains fields and "placeholder" is not one of
>>> the
>>> fields. Is there a flag that I can tell struts2 to evaluate placeholder
>>> field.
>>>
>>> The following did work:
>>> >> value='%{getText("placeHolder.Username")}' />
>>>
>>> The submit button has the correct resource key value.
>>> but this will not work.
>>> >> placeholder='%{getText("placeHolder.Username")}' id="j_username"
>>> name="j_username" cssStyle="width:180px" />
>>>
>>> Steve
>>> - Original Message - From: "Lukasz Lenart"
>>> 
>>> To: "Struts Users Mailing List" 
>>> Sent: Tuesday, June 07, 2011 5:57 AM
>>> Subject: Re: ognl and getText for s:textfield/placeholder
>>>
>>>
>>> 2011/6/7 Stephen Ince :

 >>> placeholder="%{getText('placeHolder.Username')}" id="j_username"
 name="j_username" cssStyle="width:180px" />
>>>
>>> What is placeHolder, a bean or a resource key ?
>>>
>>> If bean: "%{getText(placeHolder.Username)}"
>>> If key: '%{getText("placeHolder.Username")}'
>>>
>>>
>>> Regards
>>> --
>>> Łukasz
>>> + 48 606 323 122 http://www.lenart.org.pl/
>>> Warszawa JUG conference - Confitura http://confitura.pl/
>>>
>>> -
>>> 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
>
>

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



Re: ognl and getText for s:textfield/placeholder

2011-06-07 Thread Stephen Ince


Lukasz,
  I reported the issue. Thx again for you time.

Steve
https://issues.apache.org/jira/browse/WW-3644

- Original Message - 
From: "Lukasz Lenart" 

To: "Struts Users Mailing List" 
Sent: Tuesday, June 07, 2011 7:07 AM
Subject: Re: ognl and getText for s:textfield/placeholder


https://issues.apache.org/jira/browse/WW

2011/6/7 Stephen Ince :

Sure. Can you point to the where I should report the issue?
placeHolder will be an issue for HTML5 and anyone wanting to use resource
keys.

Steve
- Original Message - From: "Lukasz Lenart"

To: "Struts Users Mailing List" 
Sent: Tuesday, June 07, 2011 6:57 AM
Subject: Re: ognl and getText for s:textfield/placeholder


It isn't supported, but it can be, I think. Could you register an
issue ? It's not only related to Dojo tags (as TextField doesn't have
Dojo version).

The change should be simple:

AbstractUITag, line 294

public void setDynamicAttribute(String uri, String localName,
Object value) throws JspException {
dynamicAttributes.put(localName, value);
}

and replace with

public void setDynamicAttribute(String uri, String localName,
Object value) throws JspException {
dynamicAttributes.put(localName, findString(value));
}


Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
Warszawa JUG conference - Confitura http://confitura.pl/


2011/6/7 Stephen Ince :


Lukasz,
Thx for your response. A resource key. I tried that. It seems that strut2
will only ognl evaluate certains fields and "placeholder" is not one of
the
fields. Is there a flag that I can tell struts2 to evaluate placeholder
field.

The following did work:


The submit button has the correct resource key value.
but this will not work.


Steve
- Original Message - From: "Lukasz Lenart"

To: "Struts Users Mailing List" 
Sent: Tuesday, June 07, 2011 5:57 AM
Subject: Re: ognl and getText for s:textfield/placeholder


2011/6/7 Stephen Ince :





What is placeHolder, a bean or a resource key ?

If bean: "%{getText(placeHolder.Username)}"
If key: '%{getText("placeHolder.Username")}'


Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
Warszawa JUG conference - Confitura http://confitura.pl/

-
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


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



Re: ognl and getText for s:textfield/placeholder

2011-06-07 Thread Lukasz Lenart
https://issues.apache.org/jira/browse/WW

2011/6/7 Stephen Ince :
> Sure. Can you point to the where I should report the issue?
> placeHolder will be an issue for HTML5 and anyone wanting to use resource
> keys.
>
> Steve
> - Original Message - From: "Lukasz Lenart"
> 
> To: "Struts Users Mailing List" 
> Sent: Tuesday, June 07, 2011 6:57 AM
> Subject: Re: ognl and getText for s:textfield/placeholder
>
>
> It isn't supported, but it can be, I think. Could you register an
> issue ? It's not only related to Dojo tags (as TextField doesn't have
> Dojo version).
>
> The change should be simple:
>
> AbstractUITag, line 294
>
>   public void setDynamicAttribute(String uri, String localName,
> Object value) throws JspException {
>       dynamicAttributes.put(localName, value);
>   }
>
> and replace with
>
>   public void setDynamicAttribute(String uri, String localName,
> Object value) throws JspException {
>       dynamicAttributes.put(localName, findString(value));
>   }
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
> Warszawa JUG conference - Confitura http://confitura.pl/
>
>
> 2011/6/7 Stephen Ince :
>>
>> Lukasz,
>> Thx for your response. A resource key. I tried that. It seems that strut2
>> will only ognl evaluate certains fields and "placeholder" is not one of
>> the
>> fields. Is there a flag that I can tell struts2 to evaluate placeholder
>> field.
>>
>> The following did work:
>> > value='%{getText("placeHolder.Username")}' />
>>
>> The submit button has the correct resource key value.
>> but this will not work.
>> > placeholder='%{getText("placeHolder.Username")}' id="j_username"
>> name="j_username" cssStyle="width:180px" />
>>
>> Steve
>> - Original Message - From: "Lukasz Lenart"
>> 
>> To: "Struts Users Mailing List" 
>> Sent: Tuesday, June 07, 2011 5:57 AM
>> Subject: Re: ognl and getText for s:textfield/placeholder
>>
>>
>> 2011/6/7 Stephen Ince :
>>>
>>> >> placeholder="%{getText('placeHolder.Username')}" id="j_username"
>>> name="j_username" cssStyle="width:180px" />
>>
>> What is placeHolder, a bean or a resource key ?
>>
>> If bean: "%{getText(placeHolder.Username)}"
>> If key: '%{getText("placeHolder.Username")}'
>>
>>
>> Regards
>> --
>> Łukasz
>> + 48 606 323 122 http://www.lenart.org.pl/
>> Warszawa JUG conference - Confitura http://confitura.pl/
>>
>> -
>> 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: ognl and getText for s:textfield/placeholder

2011-06-07 Thread Stephen Ince

Sure. Can you point to the where I should report the issue?
placeHolder will be an issue for HTML5 and anyone wanting to use resource 
keys.


Steve
- Original Message - 
From: "Lukasz Lenart" 

To: "Struts Users Mailing List" 
Sent: Tuesday, June 07, 2011 6:57 AM
Subject: Re: ognl and getText for s:textfield/placeholder


It isn't supported, but it can be, I think. Could you register an
issue ? It's not only related to Dojo tags (as TextField doesn't have
Dojo version).

The change should be simple:

AbstractUITag, line 294

   public void setDynamicAttribute(String uri, String localName,
Object value) throws JspException {
   dynamicAttributes.put(localName, value);
   }

and replace with

   public void setDynamicAttribute(String uri, String localName,
Object value) throws JspException {
   dynamicAttributes.put(localName, findString(value));
   }


Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
Warszawa JUG conference - Confitura http://confitura.pl/


2011/6/7 Stephen Ince :

Lukasz,
Thx for your response. A resource key. I tried that. It seems that strut2
will only ognl evaluate certains fields and "placeholder" is not one of 
the

fields. Is there a flag that I can tell struts2 to evaluate placeholder
field.

The following did work:


The submit button has the correct resource key value.
but this will not work.


Steve
- Original Message - From: "Lukasz Lenart"

To: "Struts Users Mailing List" 
Sent: Tuesday, June 07, 2011 5:57 AM
Subject: Re: ognl and getText for s:textfield/placeholder


2011/6/7 Stephen Ince :





What is placeHolder, a bean or a resource key ?

If bean: "%{getText(placeHolder.Username)}"
If key: '%{getText("placeHolder.Username")}'


Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
Warszawa JUG conference - Confitura http://confitura.pl/

-
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: ognl and getText for s:textfield/placeholder

2011-06-07 Thread Lukasz Lenart
It isn't supported, but it can be, I think. Could you register an
issue ? It's not only related to Dojo tags (as TextField doesn't have
Dojo version).

The change should be simple:

AbstractUITag, line 294

public void setDynamicAttribute(String uri, String localName,
Object value) throws JspException {
dynamicAttributes.put(localName, value);
}

and replace with

public void setDynamicAttribute(String uri, String localName,
Object value) throws JspException {
dynamicAttributes.put(localName, findString(value));
}


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
Warszawa JUG conference - Confitura http://confitura.pl/


2011/6/7 Stephen Ince :
> Lukasz,
>  Thx for your response. A resource key. I tried that. It seems that strut2
> will only ognl evaluate certains fields and "placeholder" is not one of the
> fields. Is there a flag that I can tell struts2 to evaluate placeholder
> field.
>
> The following did work:
>  value='%{getText("placeHolder.Username")}' />
>
> The submit button has the correct resource key value.
> but this will not work.
>  placeholder='%{getText("placeHolder.Username")}' id="j_username"
> name="j_username" cssStyle="width:180px" />
>
> Steve
> - Original Message - From: "Lukasz Lenart"
> 
> To: "Struts Users Mailing List" 
> Sent: Tuesday, June 07, 2011 5:57 AM
> Subject: Re: ognl and getText for s:textfield/placeholder
>
>
> 2011/6/7 Stephen Ince :
>>
>> > placeholder="%{getText('placeHolder.Username')}" id="j_username"
>> name="j_username" cssStyle="width:180px" />
>
> What is placeHolder, a bean or a resource key ?
>
> If bean: "%{getText(placeHolder.Username)}"
> If key: '%{getText("placeHolder.Username")}'
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
> Warszawa JUG conference - Confitura http://confitura.pl/
>
> -
> 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: ognl and getText for s:textfield/placeholder

2011-06-07 Thread Stephen Ince

Lukasz,
 Thx for your response. A resource key. I tried that. It seems that strut2 
will only ognl evaluate certains fields and "placeholder" is not one of the 
fields. Is there a flag that I can tell struts2 to evaluate placeholder 
field.


The following did work:
value='%{getText("placeHolder.Username")}' />


The submit button has the correct resource key value.
but this will not work.
placeholder='%{getText("placeHolder.Username")}' id="j_username" 
name="j_username" cssStyle="width:180px" />


Steve
- Original Message - 
From: "Lukasz Lenart" 

To: "Struts Users Mailing List" 
Sent: Tuesday, June 07, 2011 5:57 AM
Subject: Re: ognl and getText for s:textfield/placeholder


2011/6/7 Stephen Ince :
placeholder="%{getText('placeHolder.Username')}" id="j_username" 
name="j_username" cssStyle="width:180px" />


What is placeHolder, a bean or a resource key ?

If bean: "%{getText(placeHolder.Username)}"
If key: '%{getText("placeHolder.Username")}'


Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
Warszawa JUG conference - Confitura http://confitura.pl/

-
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: ognl and getText for s:textfield/placeholder

2011-06-07 Thread Lukasz Lenart
2011/6/7 Stephen Ince :
>  placeholder="%{getText('placeHolder.Username')}" id="j_username" 
> name="j_username" cssStyle="width:180px" />

What is placeHolder, a bean or a resource key ?

If bean: "%{getText(placeHolder.Username)}"
If key: '%{getText("placeHolder.Username")}'


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
Warszawa JUG conference - Confitura http://confitura.pl/

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



ognl and getText for s:textfield/placeholder

2011-06-07 Thread Stephen Ince
I am trying to use ognl/getText to assign a placeholder attribute for a 
s:textfield. I can not seem to get it to work. I am using struts 2.2.3.

e.g.


My hunch is that the placeholder field is not being evaluated . I am using dojo 
with struts2 and would like to add placeholder attributes where necessary. I 
don't want to use a s:text variable. That is kinda clumsy and a I may have to 
do add a lot of placeholder attributes.

I know this a HTML5 feature but dojo has an implementation for non HTML5 
browsers. 

Any help would be greatly appreciated.

Steve