wood burning stoves*
The moose likes Servlets and the fly likes Is it possible to merge css code in servlet without creating separate css file? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Is it possible to merge css code in servlet without creating separate css file?" Watch "Is it possible to merge css code in servlet without creating separate css file?" New topic
Author

Is it possible to merge css code in servlet without creating separate css file?

Mandar Rdongare
Greenhorn

Joined: Feb 12, 2013
Posts: 7
Hii,
How it can be possible to merge css code in servlet without creating separate css file?
Please help me.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12756
    
    5
Servlets typically write HTML formatted pages - how would you include CSS code in HTML? Think about it.

Bill
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60740
    
  65

Although it is not advisable for markup of any kind to be generated by the servlets. Servlets should serve as controllers, not views. The servlets should perform their processing, then forward to a JSP to render the view. The CSS would be in the JSP.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Arun Giridhar
Ranch Hand

Joined: Mar 10, 2012
Posts: 145

I bet you can write inline style. Why you need to do that in Servlet aka Controller ?


hate Professionalism
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60740
    
  65

Arun Giridhar wrote:you can write inline style

Inline styles are generally frowned upon. It's best to keep style separate from content/structure.
Arun Giridhar
Ranch Hand

Joined: Mar 10, 2012
Posts: 145

Bear Bibeault wrote:
Inline styles are generally frowned upon. It's best to keep style separate from content/structure.

Your right ! ..I usually keep content and structure separate.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Is it possible to merge css code in servlet without creating separate css file?
 
Similar Threads
css browswer compatibility
Merging word documents server -side
want to remove this hardcoding Ie &nbsp
Is Servlet implementation is example of Singleton pattern?
colspan TableItem j2MEPOlish