• 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

Mistakenly changed web.xml

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I mistakenly changed my web.xml, and now when i just try to load up a simple jsp through http://localhost:8080/cmt3082/Register.jsp, i get the error
description The requested resource () is not available.

My folder hierachy is like so:
C:
cmt3082 - jsp files
WEB-INF
classes - servlets
Olympics - java classes

My web.xml is one i got from uni, quite long. What could i have changed which will stop me from loading up a simple jsp from the cmt3082 folder?

web.xml

 
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
Dang, my average web.xml is under 100 lines. I'd trim out all the useless crap if I were you.

Check the logs. It's likely that the web app is never starting due to some error. If you are using Tomcat, check the Manager application to see if it's running or not.
 
Nick Price
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is the first part of my error log, i have no idea what it means.


I am using Tomcat, but i dont know what the username and password is for the manager application.
 
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 set it in tomcat-users.xml.

 
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
It looks as if Tomcat is quite unhappy with your web.xml.
 
Nick Price
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Let me ask you a quick question so i understand this better. When you download and install tomcat, you get a web.xml off them. Now say i create my own internet application using jsp, servlets and java, but i am saving this application in my own folder rather than the Tomcat's web apps folder. SHould i be creating a new web.xml and placing it in my new folder, or should i be making changes to the web.xml in the Tomcat folder?
 
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
Each web app has its own.
 
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bear Bibeault wrote:Dang, my average web.xml is under 100 lines. I'd trim out all the useless crap if I were you.

ThatĀ“s the web.xml of the application server, not of the web application.
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Nick Price wrote:Let me ask you a quick question so i understand this better. When you download and install tomcat, you get a web.xml off them. Now say i create my own internet application using jsp, servlets and java, but i am saving this application in my own folder rather than the Tomcat's web apps folder. SHould i be creating a new web.xml and placing it in my new folder, or should i be making changes to the web.xml in the Tomcat folder?

You should never ever need to change the appserverĀ“s configuration files.

Imagine what would happen when you decide to change/upgrade the appserver, distribute your app and/or wanted to use a public hosting provider.
reply
    Bookmark Topic Watch Topic
  • New Topic