wood burning stoves*
The moose likes Servlets and the fly likes Including servlets into a single HTML file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Including servlets into a single HTML file" Watch "Including servlets into a single HTML file" New topic

Including servlets into a single HTML file

Malcolm White

Joined: Nov 10, 2002
Posts: 15
Hello everyone,

I know I might be clutching at straws here. I'm writing an online bookshop in EJB for an assignment and I'd like to be able to include my ShowCategories, ShowBooks and PageHeader servlets into a single HTML file. I know it is possible to do this with JSP, but since time is short at the moment and converting all the servlets to JSPs would be difficult, do you think there is any way that would allow me to achieve this?

Thanks for any pointers,
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 12759
Have you looked into the RequestDispatcher.include() method?
See the javax.servlet.ServletRequest interface for example of how to get a RequestDispatcher.
It is sorta covered in the JavaRanch Style Guide.
subject: Including servlets into a single HTML file
Similar Threads
Multiple file download
Guidelines for Servlet Design?
questions about EARs and Assembling and deploying multiple web applications