aspose file tools*
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
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Problem with <jsp:forward>" Watch "Problem with <jsp:forward>" New topic
Author

Problem with <jsp:forward>

Mahtab Alam
Ranch Hand

Joined: Mar 28, 2012
Posts: 259

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
Bartender

Joined: Mar 10, 2008
Posts: 1763
    
    7

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
Marshal

Joined: Jan 10, 2002
Posts: 61220
    
  66

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] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with <jsp:forward>