This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Accessing web resource error (mapping problem)

 
Ramesh kangamuthu
Ranch Hand
Posts: 79
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I work in an EProduct Catalogue application that accesses different web resources like images,applying styles for jsps.If I start running the application from a welcome page under for example http://localhost:8080/EProductCatalogue/admin/login.jsp it works with applying styles for the page and shows the required images.I used adminPanel.jsp as my template and change the content as and when require by including child jsps. here is my directory structure.

EProductCatalogue web application root directory

admin folder

login.jsp
adminPanel.jsp
admin_styles.css
..
..other jsps

images folder

image1
image2
..
..other images

From the adminPanel.jsp file if I call a servlet and return to the template page styles are not applied to the pages where it is used and
image links are broken.I want a unique way to refer the web resource within the web application. Anybody can help me to get rid of this problem.

Best Regards,
Ramesh Kangamuthu
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I had to guess, I'd say that your relative links are not well formed.

We have a FAQ entry on building links that are relative to the contextPath.
You can read it here:
http://faq.javaranch.com/java/ResourceUrlProblems
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic