• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Bear Bibeault
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • salvin francis
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
Bartenders:
  • Jj Roberts
  • Carey Brown
  • Scott Selikoff

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:

 
That's a very big dog. I think I want to go home now and hug this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic