Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error: The requested resource /webapplication_name/ is not available

 
Romeo Ranjan
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I am trying to run a webapplication using apache tomcat 5.5.29.It says the requested resource is not available



This is what I get in the log file


This is my web.xml file


Hope the information above will help you to resolve my problem.
Thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64985
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wow! You've got a bunch of issues. Some that I can see off the top of my head:
  • Remove servlet-api.jar from WEB-INF/lib.
  • Same for the JSP jar if it is there.
  • Remove all the tld files that were extracted from the JSTL. Remove their declarations from the deployment descriptor.


  • The API jars will cause your app to not work. The JSTL TLD files will be found in the jar files for the JSTL.

    You are also including old JSTL libraries, the -rt libraries are for Tomcat 4.8
     
    Romeo Ranjan
    Ranch Hand
    Posts: 95
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Bear Bibeault wrote:
  • Remove servlet-api.jar from WEB-INF/lib.
  • -removed
  • Same for the JSP jar if it is there.
  • -none was there
  • Remove all the tld files that were extracted from the JSTL. Remove their declarations from the deployment descriptor.-removed



  • "Remove all the tld files that were extracted from the JSTL"-can you elaborate on this part?

    Since I am getting the same error.
     
    Bear Bibeault
    Author and ninkuma
    Marshal
    Pie
    Posts: 64985
    86
    IntelliJ IDE Java jQuery Mac Mac OS X
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    You have a bunch of declaration for JSTL TLDs in your deployment descriptor such as:
    These all need to be removed; and if the .tld files exist in WEB-INF as declared, they must all be removed as well. The only thing you have to do to use the JSTL is to find the right jar files for the version you are using (JSTL 1.1 for Tomcat 5) and drop them in WEB-INF/lib. That's it. No TLDs, no goop in web.xml.

    I'm not guaranteeing that cleaning things up will cause your app to work, but it sure as heck isn't going to with all these erroneous declaration gumming up the plumbing.
     
    Tim Holloway
    Saloon Keeper
    Pie
    Posts: 18225
    53
    Android Eclipse IDE Linux
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Romeo, I'm guessing that the documentation you got your samples from is really, really old. Explicit definition of TLDs in web.xml is no longer the "way to do it". For quite a few years now, it's been possible for tag library developers to place their TLD files in the jar that defines the tag library itself. Which is much tidier and easier to install.
     
    Romeo Ranjan
    Ranch Hand
    Posts: 95
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Bear Bibeault wrote:You have a bunch of declaration for JSTL TLDs in your deployment descriptor such as:
    These all need to be removed; and if the .tld files exist in WEB-INF as declared, they must all be removed as well. The only thing you have to do to use the JSTL is to find the right jar files for the version you are using (JSTL 1.1 for Tomcat 5) and drop them in WEB-INF/lib. That's it. No TLDs, no goop in web.xml.

    I'm not guaranteeing that cleaning things up will cause your app to work, but it sure as heck isn't going to with all these erroneous declaration gumming up the plumbing.


    Hi Bear and Tim,

    Thanks for your reply. As you had suggested I had removed the .tld files (that was referenced in the web.xml file) from the WEB-INF folder. Removed the declaration in the web.xml file. But still I get the same error. Any suggestion please?

    Now this is my web.xml file


    The things is that the application works just fine (before the changes that you had suggested) when copied to the normal tomcat webapps folder and started using tomcat. Since I wanted to use the eclipse for editing purpose alone, the application does not seem to work in eclipse and I am getting the error message saying the resource is not available.
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic