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 Calling jsp from servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Servlets
Bookmark "Calling jsp from servlet" Watch "Calling jsp from servlet" New topic

Calling jsp from servlet

Shanthi Surendar

Joined: Mar 23, 2012
Posts: 1
I am calling a jsp page from servlet using out.println("<html><script>var url='/print.jsp'; window.showmodaldialog(url); </html>") statement.

I am able to call the jsp page without any error.
But after consecutive calls (around 100 times), the jsp page does not get loaded properly. I get a blank page with '#' in the body and "--" in the title.
I am not able to figure out what and where the problem could be.

Could you please assisst me in this?
Eshwin Sukhdeve
Ranch Hand

Joined: Mar 15, 2012
Posts: 89
the way which you are following I have no idea about that.but jeneraly when we call jasp from servlet.we use
getServletContext().getRequestDispatcher("/print.jsp").forward(request, response);

try with this..

I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Calling jsp from servlet
It's not a secret anymore!