need help on forward tag......

  • Thread starter nagendraprasad.kr
  • Start date
N

nagendraprasad.kr

hello
Im new to jsp and i am encountring this problem.....
im designing a login page....now if the login password and password are
entered and then once the user clicks submit.....the validate.jsp page
is called which validates the user entry...is its valid ill forward to
the welcome.jsp page......else back to the login page......now in the
address bar after i forward.....i can see validate.jsp only instead of
login.jsp or welcome .....how can i solve this........or is my
approcach of creating a validate.jsp to validate user entry is
wrong???? plz help
thanks in advance....
 
P

Philipp Leitner

hello
Im new to jsp and i am encountring this problem.....
im designing a login page....now if the login password and password are
entered and then once the user clicks submit.....the validate.jsp page
is called which validates the user entry...is its valid ill forward to
the welcome.jsp page......else back to the login page......now in the
address bar after i forward.....i can see validate.jsp only instead of
login.jsp or welcome .....how can i solve this........or is my
approcach of creating a validate.jsp to validate user entry is
wrong???? plz help
thanks in advance....

why are you validating your login data on a JSP page? Use a simple
servlet (since there is actually nothing to display, and JSP comes only
in handy when you want to produce HTML).

A good approach is to use the MVC (Model - View - Controller,
http://en.wikipedia.org/wiki/Model-view-controller) pattern. Then you
would use JSP for the view (display), servlets for the controller and
some backend database or bean logic for the model.

/philipp
 
R

raavi

Hi
actually there is no need of this validate.jsp.validate using a
servlet which must be set as the action of the form.whatever path u r
following is displayed on the address bar.so nothing to be done with
address bar too.
hope u got this.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,528
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top