File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 REST with Spring (video course) this week in the Spring 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: 372

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
Jelle Klap

Joined: Mar 10, 2008
Posts: 1948

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: 63542

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>
It's not a secret anymore!