• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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: 67746
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: 67746
    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: 27752
    196
    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.
     
    reply
      Bookmark Topic Watch Topic
    • New Topic