File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes Please help me Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Please help me" Watch "Please help me" New topic

Please help me

Krishna Tota
Ranch Hand

Joined: Mar 22, 2008
Posts: 40
Hello friends,

I am developing a jsp page by providing components like RegisterHear and Login using
<input type="submit" value="RegisterHear"> and
<input type="submit" value="Login">

And at the top i used <form action="form/registration.jsp">

Now my quetion is where should i keep Login.jsp to open login page when we press login button.Please explain with code.

And also explain using Java script and using href.

which way is bettor for creating Login page

If there is any source code for developing Login module using struts please give me.

kappiil patel

Joined: Aug 06, 2006
Posts: 14
You can write a java script function for that. This java script function should be called onClick event of both buttons.
function openPage(var s)
document.YourFormName.action = 'Login.jsp';
document.YourFormName.action = 'Register.jsp';


Ben Souther

Joined: Dec 11, 2004
Posts: 13410


It would take an awful lot of typing to answer all of these questions.
Have you worked through any JSP tutorials or books on the subject?
If not, this might be a better way to start than asking for this much information from a web forum.

Also, if you're using Struts, we have a forum dedicated to that subject.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63852

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

You can go back and change your post to add a more meaningful subject by clicking the .

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: Please help me
jQuery in Action, 3rd edition