• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Regarding URI

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We have an application using JSP & EJB using struts as framework. The beans are already deployed in the Weblogic sever & the webapplication is accessing that beans under a context path "ECatalogAdmin". The problem is when i am specifying my image path in my JSP file , i am using like <img src="../images/go_.gif"> But it is not able to locate that image because it is not able to findout the CONTEXT path which the application is running.
But i specify the image path like :
<img src="<%=request.getContextPath()%/images/go_.gif"
its working.
If anybody can suggest any idea, that would be fine.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I like to specify a <base> tag in the <head> of a page, then the rest of your references can be relative to that base URI.
Bill
 
Do not set lab on fire. Or this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic