You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Hookom, Jacob" <Ja...@redline.mckhboc.com> on 2004/07/09 17:53:07 UTC

[OT] Get Servlet Mapping at Runtime

Hey all, does anyone have any ideas of how to get the Servlet mapping during
runtime?  So if I were inside of a servlet, I want the mapping for it when
handling the request.  I can't assert suffix parsing of the request URI.

Thanks for any ideas in advance.... :-)


Jacob Hookom
Senior Analyst/Programmer
McKesson Medical-Surgical, Minnesota


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


RE: [OT] Get Servlet Mapping at Runtime

Posted by Robert Taylor <rt...@mulework.com>.
I think you would have to define the mapping that exists in web.xml for that 
servlet in one of that servlets init parameters. I don't believe its explicitely
available through an API call. 

robert

> -----Original Message-----
> From: Hookom, Jacob [mailto:Jacob.Hookom@redline.mckhboc.com]
> Sent: Friday, July 09, 2004 11:53 AM
> To: 'Struts Users Mailing List'
> Subject: [OT] Get Servlet Mapping at Runtime
> 
> 
> Hey all, does anyone have any ideas of how to get the Servlet mapping during
> runtime?  So if I were inside of a servlet, I want the mapping for it when
> handling the request.  I can't assert suffix parsing of the request URI.
> 
> Thanks for any ideas in advance.... :-)
> 
> 
> Jacob Hookom
> Senior Analyst/Programmer
> McKesson Medical-Surgical, Minnesota
> 
> 
> ---------------------------------------------------------------------
> 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


[EVIL] Modifying a request parameter

Posted by Andrew Hill <an...@gridnode.com>.
String[] foo = request.getParameterValues("foo");
foo[2] = "you"; //Naughty naughty. Very naughty. Wicked! Absolutely
outrageous mate! ;->

In hindsight an odious but obvious and doubtlessly documented hack, yet Ive
spent four frustrating hours figuring out how my poor parameters were
getting maliciously murdered! This is a tale of tracing a thousand torturous
lines of config driven code and deep deep down in the dismal depths of their
convoluted bowels there lurks a menacing method that consumes string arrays
and does unspeakable things to them without allocating a new array
instance...


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