wood burning stoves 2.0*
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
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: 61095
    
  66

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]
 
wood burning stoves
 
subject: html in variable inside a servlet