facebook

jsp deploy Jboss/Tomcat problem

  1. MyEclipse Archived
  2.  > 
  3. Application Servers and Deployment
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #240645 Reply

    frantuma
    Member

    Hi,

    I have a web application which I succesfully deployed to Tomcat 4.1, with MyEclipse deploy tool. I use the expanded option.

    My login page is in myproj/web/jsp/login/login.jsp

    and refers to a css and images in myproj/web/images/login/myImage.gif

    I use a url in my login.jsp whith url:

    <img src=”../../images/login/A0025.gif”>

    thus relative to the position of the login page.

    This works perfectly in Tomcat. I tried to deploy the same app to JBoss 4.0 which works but doesn’t show images or css becouse of bad url, as it looks for :

    http://myserver:8080/images/login/myImage.gif

    instead of

    http://myserver:8080/myproj/images/login/myImage.gif

    Web context root is set to /myproj

    web root folder is /web

    Any hint?

    thanks

    Francesco

    #240653 Reply

    Riyad Kalla
    Member

    Francesco,
    When you deploy to JBoss and then load up the URL in your browser, do you need to specify the /myproj web context root in the URL? JBoss just uses Tomcat as it’s web/servlet/jsp container internally, so I’m surprised you are getting different behavior.

    #240656 Reply

    frantuma
    Member

    Hi,

    when I access the app in JBoss or Tomcat I specify the context root, thus I type

    http://myserver:8080/myproj/jsp/login.jsp

    my images fo the login page are located in

    myproj/web/images/login

    and the img tag points to <img src=”../../images/login/A0025.gif”>

    If I manually type the url:

    http://myserver:8080/myproj/images/login/A0025.gif

    I can see the image is there

    Hope you can help,

    thanks

    Francesco

    #240669 Reply

    Riyad Kalla
    Member

    Francesco,
    Given your dir structure above, your img tag should be just ../images/login/A0025.gif, that backs you up from the “jsp” dir, up one level into the “myproj” dir, and then down into the “images/login” dir.

    #240670 Reply

    frantuma
    Member

    Sorry,

    http://myserver:8080/myproj/jsp/login/login.jsp

    is my actual path for the login page and NOT

    http://myserver:8080/myproj/jsp/login/login.jsp

    which I mistyped…

    Francesco

    #240671 Reply

    Riyad Kalla
    Member

    I see, very strange, and ../../ is resolving to the root of your app server instead of the /myproj dir?

    #240674 Reply

    frantuma
    Member

    yes, that’s exactly the problem..

    #240677 Reply

    Riyad Kalla
    Member

    Francesco,
    This is a JBoss issue and unfortunately I don’t have any more suggestions for you at this time. If you change the double ../../ to just ../, does it work on JBoss and break on Tomcat?

    You could try asking on the JBoss forums why.

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: jsp deploy Jboss/Tomcat problem

You must be logged in to post in the forum log in