• 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
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

Tomcat 6 and jsps

 
Sheriff
Posts: 9103
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I installed Tomcat 6, Sun's java 6 & j2ee 5. I dropped all my jsps (& images, css files, etc) into ROOT.

I have 2 issues.
  • I still see the Tomcat home page even tho I've renamed/replaced index.jsp. The Tomcat docs suggest commenting out something in $CATALINA_HOME/webapps/ROOT/WEB-INF/web.xml that isn't in the web.xml I have at that location. When I commented out what was there (web-app), I got a 404 for index.jsp.


  • The dynamic part of my jsp (jsp:include page='xxx.jsp') is not showing up, only the html part is.

  • Did I miss something?
    [ September 20, 2007: Message edited by: Marilyn de Queiroz ]
     
    Java Cowboy
    Posts: 16084
    88
    Android Scala IntelliJ IDE Spring Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Have you looked at the log files in the 'logs' directory of Tomcat to see if there are any error messages while deploying your applications?

    You could try deleting everything in the 'work' directory (that's where Tomcat stored compiled JSPs etc.) and restarting Tomcat.
     
    Sheriff
    Posts: 13411
    Firefox Browser VI Editor Redhat
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    The JSPs in Tomcat's ROOT webapp have been pre-compiled and each has a servlet entry in the web.xml file. Look for servlet entries that have a jsp-file node instead of a servlet-class node.

    Rather than try to edit that app, you might want to create your own to work with.

    It's quick and easy.
    Simply:
    Create a folder under tomcat/webapps (myapp).
    Inside that folder create another one one named WEB-INF (myapp/WEB-INF)
    That's it, you're done.
    You can put JSPs in the myapp directory and access it with:
    http://localhost:8080/myapp/mypage.jsp


    Another quick way to get started is to download one of the war files from our codebarn to the webapps directory.
    Tomcat will unpack and deploy it for you. You will then have a working app with a deployment descriptor and proper directory structure.
    [ September 21, 2007: Message edited by: Ben Souther ]
     
    Marilyn de Queiroz
    Sheriff
    Posts: 9103
    12
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    I should say that I tested my jsps in orion. Then I tried to put them on the remote server which is running Tomcat (I don't know which version) and they didn't work, so that's the reason I'm trying to run them in Tomcat locally. I do seem, however, to be having the same issue in Tomcat locally that I see on the remote server. I don't have access to Tomcat remotely, so creating directories etc is not really practical. Actually, I'm not sure whether they might not have already done that since the directory my jsps are in is /home/xxx/mainwebapp_html/
    I don't know what the relationship is from that directory to the Tomcat directory(ies).

    I do see an error in the log, however, so let me deal with that first.
    [ September 21, 2007: Message edited by: Marilyn de Queiroz ]
     
    It means our mission is in jeapordy! Quick, read this tiny ad!
    SKIP - a book about connecting industrious people with elderly land owners
    https://coderanch.com/t/skip-book
    reply
      Bookmark Topic Watch Topic
    • New Topic