Click to See Complete Forum and Search --> : Directory Issues


jazz17782
03-02-2007, 05:19 AM
Hi Guys,

I'm having a real hard time trying to reference resources in different directories in my webapp. I'm using eclipse 3.2.1 with tomcat ver 5.5. My directory structure looks like this;


AcegiObs
|-WebContent
|-css
|-default.css
|-secure
|-main.jsp
|-WEB-INF
|-login.jsp


I have a reference to the default.css stylesheet in the css folder from the main.jsp in the secure folder. It goes like this;


<link rel="STYLESHEET" type="text/css" href="/css/default.css">


However nothing is loaded. I have tried omitting the "/" and many different directory paths, including the full directory from the root of the app, but nothing is working. Can anyone help?

I am using tomcat ver 5.5 in the eclipse 3.2.1 IDE.

ryanbutler
03-02-2007, 10:13 AM
Does this work?

<link rel="STYLESHEET" type="text/css" href="../css/default.css">

jazz17782
03-05-2007, 04:38 AM
Does this work?

<link rel="STYLESHEET" type="text/css" href="../css/default.css">


No this doesn't work unfortunately

ray326
03-05-2007, 01:18 PM
What is your context root?

jazz17782
03-06-2007, 03:11 AM
My context root is AcegiObs

ryanbutler
03-06-2007, 10:41 AM
Does this work?

<link rel="STYLESHEET" type="text/css" href="/WebContent/css/default.css">

Other than that, I'm dry for ideas and solutions.

ray326
03-06-2007, 12:42 PM
I was going to say try "/AcegiObs/css/default.css" but you indicate you've already tried that. What goes in the stdout and stderr logs when that request fails?

SpecOpsX
03-06-2007, 03:41 PM
What's the full URL of the page that is using the web application?

And, what is the full working URL of the css file?