You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Matt Filion <mf...@csc.com> on 2007/02/23 20:54:51 UTC
Struts 2 and QueryString
I sent an post about this a few days ago and didnt really get a response.
I'm starting to have the need to do some AJAX calls now and need some help
on resolving this. I basically have not found any way to get the values
from the querystring within an Interceptor or Action. I've tried accessing
the request directly, having struts set the values for me on my action and
by searching the value stack and cannot find the values anywhere. In fact,
when I access the request directly and call the getQuerystring method it
returns null. Has anyone else come across this issue? I'm running struts
2.0.5 jdk 1.4.2 version.
Thanks
Matt
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery. NOTE: Regardless of content, this e-mail shall not operate to
bind CSC to any order or other contract unless pursuant to explicit
written agreement or government initiative expressly permitting the use of
e-mail for such purpose.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Re: Struts 2 and QueryString
Posted by Matt Filion <mf...@csc.com>.
I tried the interceptor as suggested below. I placed it before all other
interceptors and am still seeing the querystring coming across as null.
I'm running this on OC4J. Attatched is my struts config (with some
modification to package names out of consideration for my client).
I've used the 3 following ways to access the request and all end up with
an empty querystring:
1. HttpServletRequest request = (HttpServletRequest)
_invocation.getInvocationContext().get(ServletActionContext.HTTP_REQUEST);
2. HttpServletRequest request = (HttpServletRequest)
_invocation.getInvocationContext().get(StrutsStatics.HTTP_REQUEST);
3. HttpServletRequest request = ServletActionContext.getRequest();
I assume they all point to the same place but wanted to be doubly sure.
Below is the list of jars I have within my web projects classpath.
backport-util-concurrent-3.0.jar
commons-logging-1.1.jar
freemarker-2.3.8.jar
itext-1.4.8.jar
ognl-2.6.9.jar
retrotranslator-runtime-1.2.0.jar
retrotranslator-transformer-1.2.0.jar
struts2-api-j4-2.0.5.jar
struts2-core-j4-2.0.5.jar
xwork-j4-2.0.0.jar
Matt Filion
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery. NOTE: Regardless of content, this e-mail shall not operate to
bind CSC to any order or other contract unless pursuant to explicit
written agreement or government initiative expressly permitting the use of
e-mail for such purpose.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
"Tom Schneider" <sc...@gmail.com>
02/23/2007 12:19 PM
Please respond to
"Struts Users Mailing List" <us...@struts.apache.org>
To
"Struts Users Mailing List" <us...@struts.apache.org>
cc
Subject
Re: Struts 2 and QueryString
Might this be the issue:
https://issues.apache.org/struts/browse/WW-1563 This was an issue for
websphere, but other app servers may act the same. (Not jetty or
jboss though)
Tom
On 2/23/07, Matt Filion <mf...@csc.com> wrote:
> I sent an post about this a few days ago and didnt really get a
response.
> I'm starting to have the need to do some AJAX calls now and need some
help
> on resolving this. I basically have not found any way to get the values
> from the querystring within an Interceptor or Action. I've tried
accessing
> the request directly, having struts set the values for me on my action
and
> by searching the value stack and cannot find the values anywhere. In
fact,
> when I access the request directly and call the getQuerystring method it
> returns null. Has anyone else come across this issue? I'm running struts
> 2.0.5 jdk 1.4.2 version.
>
> Thanks
>
> Matt
>
>
>
>
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> This is a PRIVATE message. If you are not the intended recipient, please
> delete without copying and kindly advise us by e-mail of the mistake in
> delivery. NOTE: Regardless of content, this e-mail shall not operate to
> bind CSC to any order or other contract unless pursuant to explicit
> written agreement or government initiative expressly permitting the use
of
> e-mail for such purpose.
>
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Struts 2 and QueryString
Posted by Tom Schneider <sc...@gmail.com>.
Might this be the issue:
https://issues.apache.org/struts/browse/WW-1563 This was an issue for
websphere, but other app servers may act the same. (Not jetty or
jboss though)
Tom
On 2/23/07, Matt Filion <mf...@csc.com> wrote:
> I sent an post about this a few days ago and didnt really get a response.
> I'm starting to have the need to do some AJAX calls now and need some help
> on resolving this. I basically have not found any way to get the values
> from the querystring within an Interceptor or Action. I've tried accessing
> the request directly, having struts set the values for me on my action and
> by searching the value stack and cannot find the values anywhere. In fact,
> when I access the request directly and call the getQuerystring method it
> returns null. Has anyone else come across this issue? I'm running struts
> 2.0.5 jdk 1.4.2 version.
>
> Thanks
>
> Matt
>
>
>
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> This is a PRIVATE message. If you are not the intended recipient, please
> delete without copying and kindly advise us by e-mail of the mistake in
> delivery. NOTE: Regardless of content, this e-mail shall not operate to
> bind CSC to any order or other contract unless pursuant to explicit
> written agreement or government initiative expressly permitting the use of
> e-mail for such purpose.
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Struts 2 and QueryString - Found the Issue (OC4J 10.3.1)
Posted by Matt Filion <mf...@csc.com>.
There is a patch for OC4J (number 5608209) that resolves this direct
issue. I found it on the below threads.
http://www.archivesat.com/Java_Webworks_Users/thread1648946.htm
I'm working on applying the patch. I'll send an update if I still have the
issue.
Matt Filion
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery. NOTE: Regardless of content, this e-mail shall not operate to
bind CSC to any order or other contract unless pursuant to explicit
written agreement or government initiative expressly permitting the use of
e-mail for such purpose.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Dave Newton <ne...@yahoo.com>
02/23/2007 12:26 PM
Please respond to
"Struts Users Mailing List" <us...@struts.apache.org>
To
Struts Users Mailing List <us...@struts.apache.org>
cc
Subject
Re: Struts 2 and QueryString
--- Matt Filion <mf...@csc.com> wrote:
> I basically have not found any way to get the values
> from the querystring within an Interceptor or
> Action. I've tried accessing the request directly,
> having struts set the values for me on my action and
> by searching the value stack and cannot find the
> values anywhere.
I do Ajax calls via Actions w/ querystring parameters
using the standard ParameterAware interface and
everything works fine.
Perhaps if you (re-)post some code and configs someone
will point out where you've gone wrong.
d.
____________________________________________________________________________________
Cheap talk?
Check out Yahoo! Messenger's low PC-to-Phone call rates.
http://voice.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Struts 2 and QueryString
Posted by Dave Newton <ne...@yahoo.com>.
--- Matt Filion <mf...@csc.com> wrote:
> I basically have not found any way to get the values
> from the querystring within an Interceptor or
> Action. I've tried accessing the request directly,
> having struts set the values for me on my action and
> by searching the value stack and cannot find the
> values anywhere.
I do Ajax calls via Actions w/ querystring parameters
using the standard ParameterAware interface and
everything works fine.
Perhaps if you (re-)post some code and configs someone
will point out where you've gone wrong.
d.
____________________________________________________________________________________
Cheap talk?
Check out Yahoo! Messenger's low PC-to-Phone call rates.
http://voice.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org