aspose file tools*
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


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Please help me" Watch "Please help me" New topic
Author

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.

Thanks,
krishna
kappiil patel
Greenhorn

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)
{
if(s=='Login')
document.YourFormName.action = 'Login.jsp';
else
document.YourFormName.action = 'Register.jsp';

document.YourFormName.submit();

}
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Krishna,

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.

-Ben


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

Joined: Jan 10, 2002
Posts: 61760
    
  67

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