• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Context root problem

 
Ranch Hand
Posts: 244
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

My application was running fine when the context root was '/' in application.xml file.
But after changing the context root in application.xml to 'MyApplication' it is abruptly behaving. Although I have added jboss-web.xml file with the context root added in it.
But still some images are not being shown and application is trying to run in the jboss root context.
Is there any way to check for hard coding?
Please help.
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do not set the context in both the application.xml file and the jboss-web.xml file. Usually, if you have an application.xml file, it is best to set the context there only.

Have you asked the browser to display the source for the page that contains a missing picture, and dug through the source to see what the URL is for the <img> tag? That might explain what is going on.

If that does not help, please provide a specific example. This would include the actual <img> entry from the page source from the browser, and the exact location of that image file within the WAR, and the context entry in the application.xml file (assuming you removed it from jboss-web.xml).
 
Kousik Majumder
Ranch Hand
Posts: 244
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
application.xml




ear structure:-



in jsp file image refered as:-

 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Shouldn't you have:

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic