Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

html in variable inside a servlet

 
Ed Carrington
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64851
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic