wood burning stoves 2.0*
The moose likes Servlets and the fly likes Guys help me.. 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 » Java » Servlets
Bookmark "Guys help me.." Watch "Guys help me.." New topic
Author

Guys help me..

Raj Kumar Gopal
Greenhorn

Joined: Oct 20, 2000
Posts: 6
Here is my code:
A simple.JSP contains two links l1 and l2 calling S1 and S2 resp.
l1 is calling s1 like
<a href="S1?PAGE=o.jsp>Enter new..yada..yada
In Servlet s1 acts as dispatcher. It uses
if req.getParameter(Page).equals("o.jsp")
{
forward(o.jsp);
}
o.jsp is a form and I submit it. I use a hidden field to tell which page is calling servlet S1. But when I submit o.jsp, still i see the PAGE PARAMERTER IN QUERYSTRING...so servlet is thinking request is coming from simple.jsp and not from o.jsp.
Question: when i call jsp from servlet, I need to refresh querystring. I don't want querystring from previous JSP to be present...
maha anna
Ranch Hand

Joined: Jan 31, 2000
Posts: 1467
If you coin a new resource url and then pass this new url to the dispatcher, then the querystring will be the new one which you just supplied. In other words coin the new address string like this. Assume here DOMAIN is "http://webappcabaret.com" LEAF is "/applName" as an example. Also assume the ServletUtilities class is a utilitiy class which has a static method called 'gotoPage(..)'.
regds
maha anna


[This message has been edited by maha anna (edited October 26, 2000).]
 
 
subject: Guys help me..
 
Similar Threads
Error when deploying application in WAS ae 4.0
passing values from JSP to servet
nullpointerexception
How to update the browser address with the displayed page
JSP - Servlet - Session problem