*
The moose likes JSP and the fly likes Mistakenly changed web.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Mistakenly changed web.xml" Watch "Mistakenly changed web.xml" New topic
Author

Mistakenly changed web.xml

Nick Price
Greenhorn

Joined: Jan 03, 2009
Posts: 25
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

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61071
    
  66

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Nick Price
Greenhorn

Joined: Jan 03, 2009
Posts: 25
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
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61071
    
  66

You set it in tomcat-users.xml.

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61071
    
  66

It looks as if Tomcat is quite unhappy with your web.xml.
Nick Price
Greenhorn

Joined: Jan 03, 2009
Posts: 25
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
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61071
    
  66

Each web app has its own.
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
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

Joined: Oct 08, 2006
Posts: 2458
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Mistakenly changed web.xml