This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Mistakenly changed web.xml

 
Nick Price
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • 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

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65228
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • 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
  • 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
Author and ninkuma
Marshal
Pie
Posts: 65228
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You set it in tomcat-users.xml.

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65228
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • 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
  • 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
Author and ninkuma
Marshal
Pie
Posts: 65228
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Each web app has its own.
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic