wood burning stoves*
The moose likes Struts and the fly likes remove a name/value pair from request Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "remove a name/value pair from request" Watch "remove a name/value pair from request" New topic
Author

remove a name/value pair from request

rick collette
Ranch Hand

Joined: Mar 22, 2002
Posts: 208
Hi, guys:

I am trying to programmatically remove a name/value pair from
request in my jsp file. For example, if I have a path like
the following:
http://localhost:8080/mysampleweb/initpage?isHome=true

If I want to remove "isHome=true" and produce the following
path:
http://localhost:8080/mysampleweb/initpage

Is there a way to do it?

regards,
Kedar Dravid
Ranch Hand

Joined: May 28, 2004
Posts: 333
This should do it:
StringBuffer parURL=(StringBuffer)request.getRequestURL();
someString = parURL+"";
rick collette
Ranch Hand

Joined: Mar 22, 2002
Posts: 208
Originally posted by Kedar Dravid:
This should do it:
StringBuffer parURL=(StringBuffer)request.getRequestURL();
someString = parURL+"";


Thanks, Kedar. That works.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: remove a name/value pair from request
 
Similar Threads
Paths and requestDispatcher
young HACKER's training: pass gen :)))
Obtain Get Parameters using HttpServletRequest
How to set conf file file
young HACKER's training: pass gen :)))