File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes forward from one JSP to another JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "forward from one JSP to another JSP" Watch "forward from one JSP to another JSP" New topic

forward from one JSP to another JSP

JiaPei Jen
Ranch Hand

Joined: Nov 19, 2000
Posts: 1309
Whenever I submit or forward from one jsp to
another jsp I cannot use the passed variables
correctly. Example...
<%String event = request.getParameter("EVENT");
if (event="Test") {

If I call this file and pass in event="Test", it will
print it correctly, but when I use it in a conditional
statement it doesn't understand it. It will not print
the word "Check".
Please help.
Jayant Shirkhedkar

Joined: Aug 08, 2001
Posts: 2
Hey JaiPei,
Try using this
if (event.equals("Test")
if (event.equalsIgnoreCase("Test")
These are methods given by String of Java.
look up on
for more info.
FYI the syntax
if(event="Test") would always equate event to Test
the comparison is done using "=="

all the best
I agree. Here's the link:
subject: forward from one JSP to another JSP
It's not a secret anymore!