This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have David & Dawn Griffiths on-line!
See this thread for details.
Win a copy of Head First Android this week in the Android forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

Error: The requested resource /webapplication_name/ is not available

 
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 67595
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
      Number of slices to send:
      Optional 'thank-you' note:
    • 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
    Sheriff
    Posts: 67595
    173
    Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • 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.
     
    Saloon Keeper
    Posts: 24557
    168
    Android Eclipse IDE Tomcat Server Redhat Java Linux
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • 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
      Number of slices to send:
      Optional 'thank-you' note:
    • 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.
     
    You showed up just in time for the waffles! And this tiny ad:
    Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    reply
      Bookmark Topic Watch Topic
    • New Topic