File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes jsp site organization all in CSS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "jsp site organization all in CSS" Watch "jsp site organization all in CSS" New topic
Author

jsp site organization all in CSS

Stephen Huey
Ranch Hand

Joined: Jul 15, 2003
Posts: 618
< I searched this forum first to try to avoid asking any repeat questions >
I've inherited the development of a JSP site that often makes me wish all the layout stuff was handled by CSS instead of just table cells, etc. I have looked at CSS a lot in the past year or so, and while I don't feel I know tons about it, I am fairly convinced by the CSS evangelists. I feel it would take a lot of effort (especially a lot if it were all done by me) to convert our site (a few dozen JSPs) to use CSS for all the layouts (right now, we just use it for the occasional font change, etc), but I think it would be worth it in the end. I'm wondering if other JSP developers out there like to use CSS extensively in their site (totally in lieu of tables?), and if so, if they have any pointers to some examples or tips on designing this way? I'm not just asking about CSS--if so, I would just continue reading up on CSS. I'm posting here because I'm wondering what (if anything) I need to consider when using it extensively with JSP (since the average CSS site out there doesn't pay any attention to that). Thanks...
[ October 29, 2003: Message edited by: S. C. Huey ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60057
    
  65

Since the JSP merely creates HTML to spit out at the browser, the use or non-use of CSS with respect to JSP is pretty much immaterial. What matters most is how you want the HTML to work.
For the record: I write a lot of JSP pages, and I use a lot of CSS in them.
bear


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60057
    
  65

More...
One of the only 'pitfalls' I've come across, is that in a Servlet/JSP environment, you need to be careful about relative URLs. This is true for all referenced resources, be they images, JS files or style sheet resources.
I mention it here, because I've seen a lot of 'CSS doesn't work in JSP' posts because people do not understand that the relative URL triggers off the request URL and not necessarily the folder where the JSP page resides.
bear
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jsp site organization all in CSS
 
Similar Threads
Adding An XHTML Mobile Site
Dynamic CSS
override value="" ???
on the server side - why Java vs say PHP?
x:transform tag