This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Problem with <jsp:forward> Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Problem with <jsp:forward>" Watch "Problem with <jsp:forward>" New topic

Problem with <jsp:forward>

Mahtab Alam
Ranch Hand

Joined: Mar 28, 2012
Posts: 388

This is my first.html

And this is check.jsp

But when I don`t type anything in the input field , it is not forwarding to first.html.

Even when I tried to change it to <% if(request.getParameter("username")== "a") { %> its not forwarding to first.hml when I enter a in the username field.

So whats the problem.

Oracle Java Programmer , Oracle SQL Expert , Oracle Java Web Component Developer, Oracle Web Service Developer
Jelle Klap

Joined: Mar 10, 2008
Posts: 1951

Try adding this scriptlet just above the one that contains the if-check, it should show you what's happening:

Also you may want to read up on why it's a good idea to AvoidTheEqualityOperator.
Also also, if Bear asks: I never told you to add a scriptlet to a JSP.

Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63870

Jelle Klap wrote:Also also, if Bear asks: I never told you to add a scriptlet to a JSP.

Too late. Your transgression has been added to your permanent record.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: Problem with <jsp:forward>
jQuery in Action, 3rd edition