Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Printer Friendly Servlet  RSS feed

Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would like to create a printer friendly servlet and link to this via a number of jsp's. Basically, I would like to be able to click on a "Printer Friendly" link within a jsp, pass through the HTML that is created from the jsp to the printer friendly servlet, and then in the servlet remove unnessecary information.
My question is ;
How do I pass through the HTML that makes up the page the person is currently viewing.
As far as I am aware, my only alternative is to pass through a URL to the servlet and then within the servlet, re-request the information and parse the HTML output to remove what I don't want. The drawback of this is it will mean submitted the same query again. I would like to avoid this situation if possible.
Any ideas ??
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!