View Full Version : paths, directories and servers

07-15-2008, 02:43 PM
Here is one that hasn't been here before (that I've seen).

I'm developing a system in jsp. That system is being developed in RAD. We are using struts. Enough background.

The server is "localhost:9080" and the structure is:

/images/several go here
/pages/html goes here

If I wanted to pull up the login page I would enter:

RAD/jsp/struts would then change the next page to:

Notice the directory and name change.

Now the problem. When I hard code the http://localhost:9080/RIN/css/RIN.css part in each of the pages to include the css it works find. I can't use relative positioning because the positioning changes and I can't control that. Is there a way to avoid the hard coding of the css and images?

07-15-2008, 02:47 PM
Maybe try /RIN/css/RIN.css instead of http://localhost:9080/RIN/css/RIN.css[i]

That will tell the document to look for the stylesheet at the root of the site. I'm assuming you are wanting to do this because you will be moving this to a live server.

07-15-2008, 03:20 PM
Yes, it will (maybe) move to a "real" site. We are using this as a training exercise to learn jsp, java and struts. BTW, that worked.

Thanks for the quick and correct solution.