File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » Servlets
Bookmark "Guys help me.." Watch "Guys help me.." New topic

Guys help me..

Raj Kumar Gopal

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")
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 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 "" LEAF is "/applName" as an example. Also assume the ServletUtilities class is a utilitiy class which has a static method called 'gotoPage(..)'.
maha anna

[This message has been edited by maha anna (edited October 26, 2000).]
I agree. Here's the link:
subject: Guys help me..
It's not a secret anymore!