File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes html in variable inside a servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "html in variable inside a servlet" Watch "html in variable inside a servlet" New topic
Author

html in variable inside a servlet

Ed Carrington
Ranch Hand

Joined: Oct 11, 2007
Posts: 77
For my Servlet controller I forward to specific JSP depending on user action. I forward messages using sessions depending on the action and some of the messages need to have HTML <br> so I can break up the message line by line:



For good MVC skills, is it okay to forward html in a Servlet like above example?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60050
    
  65

It wouldn't be my first choice.

You haven't given us any indication as to why you feel the markup needs to be generated from a servlet.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: html in variable inside a servlet
 
Similar Threads
Struts 1.1 using RAD7
confustion regarding forward
Struts module problem
Struts Validation not working
LookupDispatchAction - Request does not contain handler parameter name