This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

jsp  RSS feed

 
manoj Mahadik
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to call servlet from jsp page?
 
Paul Ramsden
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Manoj,
One way would be to add a form to the JSP and set the form action to call the servlet.
You can include content into a JSP from another JSP (which is essentially a servlet)
Paul
------------------
 
nirmal baba
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello
U can use the <jsp:forward>action tag to allow the request to be forwarded to another servlet. The only constraint with this tag is the servlet to which the request is being forwarded must be in the same context as the JSP dispatching the request.
U can also use the <jsp:include> tag to include the servlet output in the calling JSP
Nirmal
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!