2 Replies - 4055 Views - Last Post: 05 January 2009 - 09:44 AM Rate Topic: -----

#1 nick2price  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 561
  • View blog
  • Posts: 2,826
  • Joined: 23-November 07

problem with jsp, requested resource not available

Posted 05 January 2009 - 09:27 AM

I accidently changed web.xml in the tomcat folder which has messed a few things up. I uninstalled and reinstalled tomcat to get it back to the original state. I have changed server.xml to point to where my files are
- <Server port="8005" shutdown="SHUTDOWN">
- <GlobalNamingResources>
- <!--  Used by Manager webapp 
  --> 
  <Resource name="UserDatabase" auth="Container" type="org.apache.catalina.UserDatabase" description="User database that can be updated and saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" pathname="conf/tomcat-users.xml" /> 
  </GlobalNamingResources>
- <Service name="Catalina">
  <Connector port="8080" /> 
- <!--  This is here for compatibility only, not required 
  --> 
  <Connector port="8009" protocol="AJP/1.3" /> 
- <Engine name="Catalina" defaultHost="localhost">
  <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase" /> 
- <Host name="localhost" appBase="webapps">
  <Valve className="org.apache.catalina.valves.AccessLogValve" prefix="localhost_access_log." suffix=".txt" pattern="common" /> 
  <Context className="org.apache.catalina.core.StandardContext" path="/cmt3082" docBase="C:\CMT3082" reloadable="true" /> 
  <Context className="org.apache.catalina.core.StandardContext" path="" docBase="ROOT" /> 
  </Host>
  </Engine>
  </Service>
  </Server>



My files are like this
C:\cmt3082 - jsp files
\WEB-INF
\classes - servlet files
\myProject - java files

FOr the time being i am trying to get a simple jsp file to work with no servlet or anything. The jsp file is saved in my cmt3082 folder and looks like
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>London 2012</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.style4 {
	font-size: 14px;
	font-weight: bold;
	font-style: italic;
}
.style5 {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-weight: bold;
	font-style: italic;
	font-size: 14px;
}
-->
</style>
</head>
 
<body>
<table width="884"><td width="884"><img src="mainPageTitle.jpg" alt="" name="topPanel" width="884" height="143" border="4"></td> 
</table>
<table>
<td background="registerImage.jpg">
 
<!--<form name="form1" method="get" action="servlet/main">-->
  <p><span class="style5">Full Name</span><span class="style4">:</span> 
	<input name="fullName" type="text" id="fullName">
  </p>
  <p><span class="style5">User Name:</span> 
	<input name="userName" type="text" id="userName">
  </p>
  <p><span class="style5">Password</span><span class="style4">:</span>	
	<input name="passWord" type="text" id="passWord">
  </p>
 
  <p align="center">
	<input type="submit" name="Submit" value="Register">
  </p>
<!--</form>--></td>
<td><img name="centerPanel" src="mpCPanel.jpg" width="394" height="472" alt=""></td>
 
<td height="482" bordercolor="#000099" background="logInImage.jpg">
 
 
 
<!--<form name="form1" method="get" action="servlet/main">-->
  
  <p><span class="style5">User Name:</span> 
	<input name="userName" type="text" id="userName">
  </p>
  <p><span class="style5">Password:   </span>	
	<input name="passWord" type="text" id="passWord">
  </p>
 
  <p align="center">
	<input type="submit" name="Submit2" value="Login">
  </p>
<!--</form>--></td>
 
</table>
</body>
</html>




So this should be a simple load. But i have tried http://localhost:808...82/Register.jsp, http://localhost:8080/Register.jsp, http://localhost:8080/cmt3082/Register etc
and i get the error returned from everyone. I have looked at the logs and i am getting no complaints there. I have tried everts advise and put a forward slash in the doc base (i am not sure if this needs to be lower case, but i have tried), but still nothing works. I am pretty sure it might have somthing to do with the relative url stuff but i really cant work out what. Any advise as to what could be going wrong?

Is This A Good Question/Topic? 0
  • +

Replies To: problem with jsp, requested resource not available

#2 KYA  Icon User is offline

  • g++ jameson.cpp -o beverage
  • member icon

Reputation: 3093
  • View blog
  • Posts: 19,139
  • Joined: 14-September 07

Re: problem with jsp, requested resource not available

Posted 05 January 2009 - 09:41 AM

When I ran local tomcat examples for class, the folder had to be in the C:\Program Files\%Tomcat Directory%\Webapps\

folder.
Was This Post Helpful? 0
  • +
  • -

#3 nick2price  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 561
  • View blog
  • Posts: 2,826
  • Joined: 23-November 07

Re: problem with jsp, requested resource not available

Posted 05 January 2009 - 09:44 AM

Normally you would put it there, but thats why i changed the servlet.xml to point to another location. Its really strange because it was working before, just since i accidently changed it has it stopped.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1