• Post Reply Bookmark Topic Watch Topic
  • New Topic

Can we include servlet in JSP ?  RSS feed

 
Rakesh Gadre
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Can I include a servlet code inside JSP file ? If Yes, what will be the implications on the session values set thro. servlet code ?
I am working on Apache/Tomcat.
Thanks in advance
Rakesh
 
Jessica Sant
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can do a dynamic include -- but not a static one.
RequestDispatcher.include();
It will behave just the same as it would if you did a dynamic include from a JSP.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!