This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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


JavaRanch » Java Forums » Java » Servlets
Bookmark "Including servlets into a single HTML file" Watch "Including servlets into a single HTML file" New topic
Author

Including servlets into a single HTML file

Malcolm White
Greenhorn

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,
Malcolm
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 13000
    
    5
Have you looked into the RequestDispatcher.include() method?
See the javax.servlet.ServletRequest interface for example of how to get a RequestDispatcher.
Bill
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Including servlets into a single HTML file
 
It's not a secret anymore!