• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

how to forward to a new page in jsp

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
guys i am pastin this code!! i wrote it in netbeans! When i enter nothing in the textbox and hit the submit button, it moves to the hello.jsp but doesnt come back to index.jsp as desired! This code is from head first servlets and jsp page no : 414!!kindly tell me what is wrong
(index.jsp)



(hello.jsp)


 
Sheriff
Posts: 67752
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A few things to iron out first:

First, just saying "it doesn't work" is completely useless. Please read this for more information and post back with more details.

Secondly, please be sure to use code tags when posting code to the forums. Unformatted code is extremely hard to read and many people that might be able to help you will just move along to posts that are easier to read. Please read this for more information.

You can go back and change your post to add code tags by clicking the button on your post.

And thirdly, Please be sure to take the time to compose descriptive subjects for your posts; read this for more information.

A title such as "problem with the code" is not helpful. What would happen if all posts had such a title? How are we supposed to pick it out of the list?

Please go back and change your post to add a more meaningful subject by clicking the button on your post.

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sujay,

Default value of "user"in index.jsp is set to empty and not null. So check for empty value for request parameter "user" instead of 'null' and that should work.

~Sanchi
 
Sujay Nadkarni
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey thanks buddy!! it worked perfectly fine for me!!
 
What's a year in metric? Do you know this metric stuff tiny ad?
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic