You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Dave Newton <ne...@pingsite.com> on 2005/05/02 16:37:12 UTC
Re: ActionForm key in request/session
Frank W. Zammetti wrote:
> Alternatively, you could use the Commons Servlet packages'
> getRequestParameter(), getRequestHeaders() and getRequestAttributes()
> methods of the RequestUtils class, and if you need it there is also a
> getSessionAttributes() method in SessionUtils (I know because I added
> all four!)
>
> http://svn.apache.org/viewcvs.cgi/jakarta/commons/sandbox/servlet/
I think I'm probably missing something here, but it looks like this
takes the parameters or attributes of the request and puts them into a
hash. Is this just to decouple it from the ServletRequest? For
parameters, at least, isn't there already a method that returns the map?
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: ActionForm key in request/session
Posted by Dave Newton <ne...@pingsite.com>.
Frank W. Zammetti wrote:
>Fair point, at least as far as params go :) I never noticed the
>getParameterMap() method to be honest.
>
>
The wonders of an API larger than... well, something Really Big. I
didn't know it was there either until today when I thought to myself
"nobody's ever written that before?!"
>It's certainly not rocket science or anything, I
>certainly never claimed these functions were the savior of the world or
>anything :)
>
But if it was... that'd be neat. Although I think the odds of anything
world-saving being written in Java are minimal ;)
>but it's a nice and easy way to see what's going on (I do my
>development in Tomcat, so I simply glance over to my second monitor in the
>console window to see the output in real-time).
>
>
Gotcha; that's handy. Being a tail -f kind of guy myself I enjoy
console-related debugging :D
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: ActionForm key in request/session
Posted by "Frank W. Zammetti" <fz...@omnytex.com>.
Fair point, at least as far as params go :) I never noticed the
getParameterMap() method to be honest.
The methods in RequestUtils (and the one in SessionUtils) came from the
fact that during debugging I (and I think most of us) have a need to
easily see what's coming in with a request. So, I wind up doing the
following in Actions and/or JSPs with these methods:
log.debug(RequestUtils.getAllRequestInfo(request));
(getAllRequestInfo calls the other three methods to get parameters,
attributes and headers). It's certainly not rocket science or anything, I
certainly never claimed these functions were the savior of the world or
anything :) but it's a nice and easy way to see what's going on (I do my
development in Tomcat, so I simply glance over to my second monitor in the
console window to see the output in real-time).
--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
On Mon, May 2, 2005 10:37 am, Dave Newton said:
> Frank W. Zammetti wrote:
>
>> Alternatively, you could use the Commons Servlet packages'
>> getRequestParameter(), getRequestHeaders() and getRequestAttributes()
>> methods of the RequestUtils class, and if you need it there is also a
>> getSessionAttributes() method in SessionUtils (I know because I added
>> all four!)
>>
>> http://svn.apache.org/viewcvs.cgi/jakarta/commons/sandbox/servlet/
>
> I think I'm probably missing something here, but it looks like this
> takes the parameters or attributes of the request and puts them into a
> hash. Is this just to decouple it from the ServletRequest? For
> parameters, at least, isn't there already a method that returns the map?
>
> Dave
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org