my dog learned polymorphism*
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: 60782
    
  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]
 
 
subject: html in variable inside a servlet
 
Similar Threads
Struts 1.1 using RAD7
Struts module problem
LookupDispatchAction - Request does not contain handler parameter name
confustion regarding forward
Struts Validation not working