Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Run Servlet in Jsp page  RSS feed

 
rossella catalano
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
How can I call(invoke) a Servlet in a Jsp page?

Thanks
 
Tim Cooke
Marshal
Posts: 3873
233
Clojure IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's quite a generalised question. What specifically are you having trouble with? Perhaps show us what you've got so far?
 
Francesco Marchioni
author
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you mean invoke a Servlet, a simple form Submit (pointing to the Servlet in the action) will do it.
If you want to embed the Servlet within the JSP then you could add:

Hope it helps
 
Amit Ghorpade
Bartender
Posts: 2856
10
Fedora Firefox Browser Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would not recommend embedding a servlet inside a JSP. Just get the data in a bean and display it in the JSP.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66208
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree with Amit: that's a pretty antiquated and shoddy approach.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!