aspose file tools*
The moose likes JSP and the fly likes How to call the servlet without form action 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 "How to call the servlet without form action" Watch "How to call the servlet without form action" New topic
Author

How to call the servlet without form action

P Arunkumar
Ranch Hand

Joined: Jan 05, 2012
Posts: 119
Hi

I have designed login page by using jsp,script and iam verifying to user name and password from the server by using servlet mapping its working fine. but i need to change some modification, after i click submit button its wants to open one jsp page how i wants to code i don't know.

In form action i have given action to myservlet class, please help me how i wants to code. Iam beginner and new for this field, below i have attached my code.

Login.jsp




WelcomeServlet.java



web.xml:



now my servlet code also wants to work and in the same time after i click submit button one jsp page wants to open.


Please help me.

Thanks in advance.
Tarun Bolla
Ranch Hand

Joined: Jun 20, 2011
Posts: 89
What i understood -
You want to submit your form to a servlet and then display a JSP
You can do that, You need to do servlet mapping in web.xml as usual and in the servlet after your business logic is dealt with use the view as jsp. Heres how...

Read more about MVC pattern
P Arunkumar
Ranch Hand

Joined: Jan 05, 2012
Posts: 119
Thank you so much. its working fine
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to call the servlet without form action