aspose file tools
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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Servlets
Reply 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: 12268
    
    1
Servlets typically write HTML formatted pages - how would you include CSS code in HTML? Think about it.

Bill

Java Resources at www.wbrogden.com
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56191
    
  13

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.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Arun Giridhar
Ranch Hand

Joined: Mar 10, 2012
Posts: 89

I bet you can write inline style. Why you need to do that in Servlet aka Controller ?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56191
    
  13

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: 89

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://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Is it possible to merge css code in servlet without creating separate css file?
 
Similar Threads
colspan TableItem j2MEPOlish
Is Servlet implementation is example of Singleton pattern?
Merging word documents server -side
css browswer compatibility
want to remove this hardcoding Ie &nbsp