Question

i'm struggling with configuring the root-path of my WebApplication. I'm developing with Struts2 on TomCat7-Server. My structure in Eclipse is the following image:

http://schlangguru.de.vu/tmp/Auswahl_006.jpg

In my struts and tiles config files, i can access my resources by entering an absolute path like "/pv/common/css/style.css" but in my jsp-files i have to enter "/pv-jetzendorf_4.0/pv/common/css/style.css" as an absolute path. How can i configure the root-path for all elements to be "/pv/..."?

Was it helpful?

Solution

Configuring the root path is not the appropriate fix for your problem. The application should work whatever the root path is. Simply use the JSTL <c:url> tag or the struts tag to generate your URLs:

<link href="<c:url value='/pv/common/css/style.css'/>" .../>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top