File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Want an answer for this Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Want an answer for this " Watch "Want an answer for this " New topic
Author

Want an answer for this

subhash birje
Greenhorn

Joined: Sep 08, 2012
Posts: 1
How to call a servlet from JSP???
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Welcome to JavaRanch subhash

there is a good book called Head First Servlets & JSP which contains excellent tutorial regarding your question.

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61199
    
  66

Please be sure to take the time to compose descriptive subjects for your posts. You will attract people who will can give you better and faster answers when your posts have good, descriptive subjects. For more information, please click this link ⇒ UseAMeaningfulSubjectLine.

Using a title such as "Want an answer for this" isn't going to attract the attention of those who can best help you.

I have updated the subject for you -- please use it as a guide for future topics.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61199
    
  66

By creating a link using the URL of the servlet, or by making the URL of the servlet a form action.
Mandar Rdongare
Greenhorn

Joined: Feb 12, 2013
Posts: 7
<a href="<%=request.getContextPath()%>/callme">Call the servlet</a>
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61199
    
  66

Except that Java scriptlets should no longer be used in JSPs. The correct way to obtain the context path is ${pageContext.request.contextPath}
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Want an answer for this