| 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: 56521
|
|
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.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56521
|
|
|
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: 56521
|
|
|
Except that Java scriptlets should no longer be used in JSPs. The correct way to obtain the context path is ${pageContext.request.contextPath}
|
 |
 |
|
|
subject: Want an answer for this
|
|
|