CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 11th, 2003, 03:29 AM
HappyTomato HappyTomato is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Posts: 32 HappyTomato User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 31 m 31 sec
Reputation Power: 6
CSS in Servlet help (version 2!!)

..(i was informed with a database error when i posted the previous messages so i didn't know they were actually gonna post but with an EMPTY message in it!! :/... luckily i saved the post so i'll just paste it here again....this'd better work.. >.<)




Hi everyone!

This may be the simpliest thing to most of you but I'm just wondering if anyone can give me a little help on how i can call and use a CSS in a servlet...

Here's what i tried:

out.println("<link rel=\"alternate stylesheet\" href=\"someCSS.css\" type=\"text/css\" title = \"someCSS\">");

I have also tried putting the .css files inside different directories
Web\WEB-INF\classes\someCSS.css
or
Web\WEB-INF\someCSS.css
or even
Web\someCSS.css

I really don't know what's wrong, I did try searching through the forums but it's not leading me anywhere...

Anyone who can help would be greatly appreciated


Tomato
__________________
The probability of someone watching you is proportional to the stupidity of your action

Reply With Quote
  #2  
Old October 11th, 2003, 12:30 PM
Nemi Nemi is offline
Clueless llama
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Feb 2001
Location: Lincoln, NE. USA
Posts: 2,353 Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level)Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level)Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level)Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level)Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level)Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level)Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level)Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 2 Days 12 h 35 m 19 sec
Reputation Power: 111
Well, I would suggest using a web root relative url for the css file. Place the css file somewhere web accessible like

Web\someCSS.css

(WEB-INF is not web accessible). Then you can get to it by telling the browser to find it relative to the web root like this

out.println("<link rel=\"alternate stylesheet\" href=\"" + req.getContextPath() + "/someCSS.css\" type=\"text/css\" title = \"someCSS\">");
__________________
~Nemi

Before posting did you try:
[ Javadocs | Google ]

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > CSS in Servlet help (version 2!!)


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway