Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with <jsp:forward>

 
Mahtab Alam
Ranch Hand
Posts: 391
1
Java MySQL Database PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Jelle Klap
Bartender
Posts: 1952
7
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65228
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic