Juggy1
asked on
Urgent: JSP & Servlet problem
Hello All
I am using a servlet to create a means of entry to web site, basically a Log In. Furthermore incorporate JSP to work with my servlet, thus the JSP is a form with the username and password fields.
Technologies I'm using are:
1. MySQL 3.23.52
2. Tomcat 4.0.4
3. JPadpro (editor to build Java)
The problem is that I'm having is that Tomcat states "servlet is not availbale".
I have set the context in my web.xml file so Tomcat can see it where it is. But I have used various ways of changing it but still the problem occurs (servlet is not available).
Here is the web.xml file:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2.2.dtd">
<web-app>
<!-- pdn 15 sept 2001: xsql servlet mapping added -->
<servlet>
<servlet-name>
XSQLServlet
</servlet-name>
<servlet-class>
oracle.xml.xsql.XSQLServle t
</servlet-class>
</servlet>
<servlet>
<servlet-name>
mylogin
</servlet-name>
<servlet-class>
LoginServlet
</servlet-class>
</servlet>
<servlet>
<servlet-name>
soaprouter
</servlet-name>
<servlet-class>
oracle.soap.server.http.SO APServlet
</servlet-class>
<!-- location of soapConfig.xml -->
<init-param>
<param-name>soapConfig</pa ram-name>
<param-value>%SOAP_HOME%/a dmin/soapC onfig.xml< /param-val ue>
</init-param>
<!-- SOAP installation directory -->
<init-param>
<param-name>soapHome</para m-name>
<param-value>%SOAP_HOME%</ param-valu e>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>
XSQLServlet
</servlet-name>
<url-pattern>
*.xsql
</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>
mylogin
</servlet-name>
<url-pattern>
*/servlet/
</url-pattern>
</servlet-mapping>
<!-- remove the servlet-mapping entry for Tomcat -->
<servlet-mapping>
<servlet-name>soaprouter</ servlet-na me>
<url-pattern>/soap/servlet /soaproute r</url-pat tern>
</servlet-mapping>
<taglib>
<taglib-uri>
petshow-custom-tag-library
</taglib-uri>
<taglib-location>
/WEB-INF/tld/petshow-tagli b.tld
</taglib-location>
</taglib>
</web-app>
As you can see I have stated the name (mylogin) and class(LoginServlet) of the servlet above in top part of the code. Thus put the mapping underneath the XSQLServlet mapping, giving it a url pattern (*/servlet/).
Please can anyone give some advice or help to this problem, I would be grateful for the help or suggestion in this matter.
Thanks
Regards
Juggy
I am using a servlet to create a means of entry to web site, basically a Log In. Furthermore incorporate JSP to work with my servlet, thus the JSP is a form with the username and password fields.
Technologies I'm using are:
1. MySQL 3.23.52
2. Tomcat 4.0.4
3. JPadpro (editor to build Java)
The problem is that I'm having is that Tomcat states "servlet is not availbale".
I have set the context in my web.xml file so Tomcat can see it where it is. But I have used various ways of changing it but still the problem occurs (servlet is not available).
Here is the web.xml file:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2.2.dtd">
<web-app>
<!-- pdn 15 sept 2001: xsql servlet mapping added -->
<servlet>
<servlet-name>
XSQLServlet
</servlet-name>
<servlet-class>
oracle.xml.xsql.XSQLServle
</servlet-class>
</servlet>
<servlet>
<servlet-name>
mylogin
</servlet-name>
<servlet-class>
LoginServlet
</servlet-class>
</servlet>
<servlet>
<servlet-name>
soaprouter
</servlet-name>
<servlet-class>
oracle.soap.server.http.SO
</servlet-class>
<!-- location of soapConfig.xml -->
<init-param>
<param-name>soapConfig</pa
<param-value>%SOAP_HOME%/a
</init-param>
<!-- SOAP installation directory -->
<init-param>
<param-name>soapHome</para
<param-value>%SOAP_HOME%</
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>
XSQLServlet
</servlet-name>
<url-pattern>
*.xsql
</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>
mylogin
</servlet-name>
<url-pattern>
*/servlet/
</url-pattern>
</servlet-mapping>
<!-- remove the servlet-mapping entry for Tomcat -->
<servlet-mapping>
<servlet-name>soaprouter</
<url-pattern>/soap/servlet
</servlet-mapping>
<taglib>
<taglib-uri>
petshow-custom-tag-library
</taglib-uri>
<taglib-location>
/WEB-INF/tld/petshow-tagli
</taglib-location>
</taglib>
</web-app>
As you can see I have stated the name (mylogin) and class(LoginServlet) of the servlet above in top part of the code. Thus put the mapping underneath the XSQLServlet mapping, giving it a url pattern (*/servlet/).
Please can anyone give some advice or help to this problem, I would be grateful for the help or suggestion in this matter.
Thanks
Regards
Juggy
ASKER
Thanks for the advice.
I'm still getting same problem:
The requested resource (/servlet/LoginServlet) is not available
Here is LoginServlet.java code:
package petshowservlets;
import java.sql.*;
import java.io.IOException;
import javax.servlet.*;
import javax.servlet.RequestDispa tcher;
import javax.servlet.ServletExcep tion;
import javax.servlet.ServletConte xt;
import javax.servlet.http.HttpSer vlet;
import javax.servlet.http.HttpSer vletReques t;
import javax.servlet.http.HttpSer vletRespon se;
import javax.servlet.http.HttpSes sion;
public class LoginServlet extends HttpServlet
{
private String bnDbDriver = "org.gjt.mm.mysql.Driver";
private String bnDbId = "jdbc:mysql://localhost/it x98jkdb";
private String bnDbUser = "username";
private String bnDbPassword = "Password";
public void doGet(HttpServletRequest argRequest, HttpServletResponse argResponse) throws ServletException, java.io.IOException
{
String targetPage ="/petshow/jsp/Login.jsp";
String UserId = argRequest.getParameter("f rmUserId") ;
String Password = argRequest.getParameter("f rmPassword ");
String test = "ok";
try
{
//************************ ********** *****
// get the connection
//************************ ********** *****
Class.forName(bnDbDriver);
Connection myConnection = DriverManager.getConnectio n(bnDbId, bnDbUser, bnDbPassword);
//************************ ********** *****
// BUILD SQL QUERY
//************************ ********** *****
String sqlQuery = "SELECT dbAuthorSurName, dbAuthorFirstNames, dbAuthorPassword, dbEmail, dbFaculty, dbJobId FROM Job, Author WHERE dbEmail='" + UserId + "' AND dbAuthorPassword='" + Password + "'";
//************************ ********** *****
// Do the Sql Query
//************************ ********** *****
Statement myStatement = myConnection.createStateme nt();
ResultSet myResultSet = myStatement.executeQuery(s qlQuery);
myResultSet.first();
String dbAuthorSurName = myResultSet.getString("dbA uthorSurNa me");
System.out.println("Author Surname: " + dbAuthorSurName);
String dbAuthorFirstNames = myResultSet.getString("dbA uthorFirst Names");
System.out.println("Author Firstnames: " + dbAuthorFirstNames);
if (!(Password.equals(myResul tSet.getSt ring("Pass word"))))
{
argRequest.setAttribute("m essage", "Wrong Password!");
targetPage="/petshow/jsp/E rrorPage.j sp";
}
argRequest.setAttribute("A SName", myResultSet.getString("dbA uthorSurNa me"));
argRequest.setAttribute("A FNames", myResultSet.getString("dbA uthorFirst Names"));
argRequest.setAttribute("A Email", myResultSet.getString("dbE mail"));
argRequest.setAttribute("A Type", myResultSet.getString("dbA uthorId")) ;
}
catch(Exception e)
{
System.out.println("LoginS ervlet.doP ost() :" + e);
test = "Wrong ID";
System.out.println("LoginS ervlet.doG et(: userId = " + UserId + ", Password = " + Password + ", test = " + test);
argRequest.setAttribute("m essage", "UserId not Found!");
targetPage="/petshow/jsp/E rrorPage.j sp";
forwardTo(targetPage, argRequest, argResponse);
}
}
//------------------------ ---------- ---------- ---------- ---------- ---------- --
private void forwardTo(String url, HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
{
RequestDispatcher myRequestDispatcher;
myRequestDispatcher = getServletContext().getReq uestDispat cher(url);
myRequestDispatcher.forwar d(request, response);
}
}
************************** ********** ********** ********** *********
Here is the Login.jsp code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page errorPage="ErrorPage.jsp" %>
<jsp:useBean
id="myLogIn"
scope="session"
class="petshowservlets.Log inServlet"
/>
<jsp:setProperty
name="myLogIn"
property="*"
param="frmUserId"
/>
<jsp:setProperty
name="myLogIn"
property="*"
param="frmPassword"
/>
<html>
<head>
<title>LogIn Page</title>
</head>
<body>
<form method="post" action="/servlet/LoginServ let">
<center>
<table cellpadding=4 cellspacing=2 border=0 width="40%">
<th bgcolor="#99FF66" colspan=2>
<font size=5>LOG IN</font>
<font size=1><sup>*</sup> Required Fields</font>
</th>
<tr bgcolor="#99CC66">
<td>
<b>Email<sup>*</sup></b>
<br>
<input type="text" name="frmUserId" size=22 maxlength=50>
</td>
<td>
<b>Password<sup>*</sup></b >
<br>
<input type="password" name="frmPassword" size=10 maxlength=10>
</td>
</tr>
<tr bgcolor="#99CC66">
<td align=center colspan="2">
<input type="submit" value="Submit">
<input type="reset" value="Reset">
</td>
</tr>
</table>
</form>
</body>
</html>
Maybe the problem is in the code somewhere, I would appreciate it if you can review the code and see where I have gone wrong.
Thanks again for your help.
Juggy
I'm still getting same problem:
The requested resource (/servlet/LoginServlet) is not available
Here is LoginServlet.java code:
package petshowservlets;
import java.sql.*;
import java.io.IOException;
import javax.servlet.*;
import javax.servlet.RequestDispa
import javax.servlet.ServletExcep
import javax.servlet.ServletConte
import javax.servlet.http.HttpSer
import javax.servlet.http.HttpSer
import javax.servlet.http.HttpSer
import javax.servlet.http.HttpSes
public class LoginServlet extends HttpServlet
{
private String bnDbDriver = "org.gjt.mm.mysql.Driver";
private String bnDbId = "jdbc:mysql://localhost/it
private String bnDbUser = "username";
private String bnDbPassword = "Password";
public void doGet(HttpServletRequest argRequest, HttpServletResponse argResponse) throws ServletException, java.io.IOException
{
String targetPage ="/petshow/jsp/Login.jsp";
String UserId = argRequest.getParameter("f
String Password = argRequest.getParameter("f
String test = "ok";
try
{
//************************
// get the connection
//************************
Class.forName(bnDbDriver);
Connection myConnection = DriverManager.getConnectio
//************************
// BUILD SQL QUERY
//************************
String sqlQuery = "SELECT dbAuthorSurName, dbAuthorFirstNames, dbAuthorPassword, dbEmail, dbFaculty, dbJobId FROM Job, Author WHERE dbEmail='" + UserId + "' AND dbAuthorPassword='" + Password + "'";
//************************
// Do the Sql Query
//************************
Statement myStatement = myConnection.createStateme
ResultSet myResultSet = myStatement.executeQuery(s
myResultSet.first();
String dbAuthorSurName = myResultSet.getString("dbA
System.out.println("Author
String dbAuthorFirstNames = myResultSet.getString("dbA
System.out.println("Author
if (!(Password.equals(myResul
{
argRequest.setAttribute("m
targetPage="/petshow/jsp/E
}
argRequest.setAttribute("A
argRequest.setAttribute("A
argRequest.setAttribute("A
argRequest.setAttribute("A
}
catch(Exception e)
{
System.out.println("LoginS
test = "Wrong ID";
System.out.println("LoginS
argRequest.setAttribute("m
targetPage="/petshow/jsp/E
forwardTo(targetPage, argRequest, argResponse);
}
}
//------------------------
private void forwardTo(String url, HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
{
RequestDispatcher myRequestDispatcher;
myRequestDispatcher = getServletContext().getReq
myRequestDispatcher.forwar
}
}
**************************
Here is the Login.jsp code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page errorPage="ErrorPage.jsp" %>
<jsp:useBean
id="myLogIn"
scope="session"
class="petshowservlets.Log
/>
<jsp:setProperty
name="myLogIn"
property="*"
param="frmUserId"
/>
<jsp:setProperty
name="myLogIn"
property="*"
param="frmPassword"
/>
<html>
<head>
<title>LogIn Page</title>
</head>
<body>
<form method="post" action="/servlet/LoginServ
<center>
<table cellpadding=4 cellspacing=2 border=0 width="40%">
<th bgcolor="#99FF66" colspan=2>
<font size=5>LOG IN</font>
<font size=1><sup>*</sup> Required Fields</font>
</th>
<tr bgcolor="#99CC66">
<td>
<b>Email<sup>*</sup></b>
<br>
<input type="text" name="frmUserId" size=22 maxlength=50>
</td>
<td>
<b>Password<sup>*</sup></b
<br>
<input type="password" name="frmPassword" size=10 maxlength=10>
</td>
</tr>
<tr bgcolor="#99CC66">
<td align=center colspan="2">
<input type="submit" value="Submit">
<input type="reset" value="Reset">
</td>
</tr>
</table>
</form>
</body>
</html>
Maybe the problem is in the code somewhere, I would appreciate it if you can review the code and see where I have gone wrong.
Thanks again for your help.
Juggy
you need full qualified name for your class
<servlet>
<servlet-name>
mylogin
</servlet-name>
<servlet-class>
petshowservlets.petshowser vlets
</servlet-class>
</servlet>
and your petshowservlets.class should be in WEB-INF/classes/petshowser vlets dir.
<servlet>
<servlet-name>
mylogin
</servlet-name>
<servlet-class>
petshowservlets.petshowser
</servlet-class>
</servlet>
and your petshowservlets.class should be in WEB-INF/classes/petshowser
ASKER
Thanks for the advice.
I actually changed the class name towards what you suggested and still the same error in the web browser:
Servlet is not available.
My petshowservlets is in the WEB-INF/classes/petshowser vlets dir.
Thanks for the help.
Juggy
I actually changed the class name towards what you suggested and still the same error in the web browser:
Servlet is not available.
My petshowservlets is in the WEB-INF/classes/petshowser
Thanks for the help.
Juggy
I'm sorry type some copy/paste mistabke in my previous post.
your servlet defination was fine:
package petshowservlets;
...
public class LoginServlet extends HttpServlet
complile this and put the LoginServlet.class in WEB-INF/classes/petshowser vlets, open a DOS windows to double check all the upper/lower case is correct, don't trust windows explorer.
use this in web.xml:
<servlet>
<servlet-name>
mylogin
</servlet-name>
<servlet-class>
petshowservlets.LoginServl et
</servlet-class>
</servlet>
...
<servlet-mapping>
<servlet-name>
mylogin
</servlet-name>
<url-pattern>
/servlet/LoginServlet
</url-pattern>
</servlet-mapping>
restart your server.
your servlet defination was fine:
package petshowservlets;
...
public class LoginServlet extends HttpServlet
complile this and put the LoginServlet.class in WEB-INF/classes/petshowser
use this in web.xml:
<servlet>
<servlet-name>
mylogin
</servlet-name>
<servlet-class>
petshowservlets.LoginServl
</servlet-class>
</servlet>
...
<servlet-mapping>
<servlet-name>
mylogin
</servlet-name>
<url-pattern>
/servlet/LoginServlet
</url-pattern>
</servlet-mapping>
restart your server.
ASKER
I'm sorry I am not clear in what your trying to say?
I have changed the class: petshowservlets.LoginServl et
and restarted Tomcat and tested still same problem.
I have changed the class: petshowservlets.LoginServl
and restarted Tomcat and tested still same problem.
ASKER
I'm sorry I am not clear in what your trying to say?
Could you please explain again.
I have changed the class: petshowservlets.LoginServl et
and restarted Tomcat and tested still same problem.
Thanks Juggy
Could you please explain again.
I have changed the class: petshowservlets.LoginServl
and restarted Tomcat and tested still same problem.
Thanks Juggy
did you followed the instruction in my last post?
if you still have problem. please
1. tell us the url on your browser that you try to access your servlet and filesystem directory path to your webapp.
2. check the tomcat console/log and post error message if there is any.
if you still have problem. please
1. tell us the url on your browser that you try to access your servlet and filesystem directory path to your webapp.
2. check the tomcat console/log and post error message if there is any.
ASKER
1. Here is the URL for the filesystem dir path:
http://localhost:8080/yourid
For the servlet:
First it is the Login.jsp
http://localhost:8080/yourid/petshow/jsp/Login.jsp
Secondly the servlet
http://localhost:8080/servlet/LoginServlet
2. The errors in the log:
2003-03-21 20:32:25 Internal Error: File /WEB-INF/web.xml not found
2003-03-21 20:32:25 StandardHost[localhost]: Installing web application at context path from URL file:C:\j3t\tomcat\webapps \ROOT
2003-03-21 20:32:25 WebappLoader[]: Deploying class repositories to work directory C:\j3t\tomcat\work\Standal one\localh ost\_
2003-03-21 20:32:25 StandardManager[]: Seeding random number generator class java.security.SecureRandom
2003-03-21 20:32:25 StandardManager[]: Seeding of random number generator has been completed
2003-03-21 20:32:25 ContextConfig[]: Added certificates -> request attribute Valve
2003-03-21 20:32:25 StandardWrapper[:default]: Loading container servlet default
2003-03-21 20:32:25 default: init
2003-03-21 20:32:25 StandardWrapper[:invoker]: Loading container servlet invoker
2003-03-21 20:32:25 invoker: init
2003-03-21 20:38:00 invoker: Cannot allocate servlet instance for path /servlet/LoginServlet
javax.servlet.ServletExcep tion: Wrapper cannot find servlet class LoginServlet or a class it depends on
at org.apache.catalina.core.S tandardWra pper.loadS ervlet(Sta ndardWrapp er.java:87 3)
at org.apache.catalina.core.S tandardWra pper.alloc ate(Standa rdWrapper. java:655)
Thanks again
Juggy
http://localhost:8080/yourid
For the servlet:
First it is the Login.jsp
http://localhost:8080/yourid/petshow/jsp/Login.jsp
Secondly the servlet
http://localhost:8080/servlet/LoginServlet
2. The errors in the log:
2003-03-21 20:32:25 Internal Error: File /WEB-INF/web.xml not found
2003-03-21 20:32:25 StandardHost[localhost]: Installing web application at context path from URL file:C:\j3t\tomcat\webapps
2003-03-21 20:32:25 WebappLoader[]: Deploying class repositories to work directory C:\j3t\tomcat\work\Standal
2003-03-21 20:32:25 StandardManager[]: Seeding random number generator class java.security.SecureRandom
2003-03-21 20:32:25 StandardManager[]: Seeding of random number generator has been completed
2003-03-21 20:32:25 ContextConfig[]: Added certificates -> request attribute Valve
2003-03-21 20:32:25 StandardWrapper[:default]:
2003-03-21 20:32:25 default: init
2003-03-21 20:32:25 StandardWrapper[:invoker]:
2003-03-21 20:32:25 invoker: init
2003-03-21 20:38:00 invoker: Cannot allocate servlet instance for path /servlet/LoginServlet
javax.servlet.ServletExcep
at org.apache.catalina.core.S
at org.apache.catalina.core.S
Thanks again
Juggy
>> 2003-03-21 20:32:25 Internal Error: File /WEB-INF/web.xml not found
there is something wrong when you start you tomcat.
>> 1. Here is the URL for the filesystem dir path:
>> http://localhost:8080/yourid
FILESYSTEM means hard disk, e.g. c:\xxx\tomcat\webapps\yyyy . list detail under webapps.
there is something wrong when you start you tomcat.
>> 1. Here is the URL for the filesystem dir path:
>> http://localhost:8080/yourid
FILESYSTEM means hard disk, e.g. c:\xxx\tomcat\webapps\yyyy
BTW, what is "yourid"? try to access it as http://localhost:8080/yourid/servlet/LoginServlet
ASKER
The list under webapps is:
C:/j3t/tomcat/webapps/exam ples
C:/j3t/tomcat/webapps/tomc at-docs
C:/j3t/tomcat/webapps/mana ger
C:/j3t/tomcat/webapps/webd av
C:/j3t/tomcat/webapps/ROOT
However, when I create my java classes it is setup in my classes, its like this:
C:/j3t/webappfolder/WEB-IN F/classes/ petshowser vlets
yourid is directory to see petshow where it contains jsp documents in tomcat:
C:/j3t/tomcat/work/Standal one/localh ost/yourid /petshow/j sp
Therefore when I type localhost in the url, I need to state yourid as the directory to point to get my petshow and then to jsp.
However, I do have a web.xml files it is not exactly in Tomcat:
C:/j3t/webappfolder/WEB-IN F/web.xml
As I stated I store my work in this directory, but I thought Tomcat would be able to see it.
C:/j3t/tomcat/webapps/exam
C:/j3t/tomcat/webapps/tomc
C:/j3t/tomcat/webapps/mana
C:/j3t/tomcat/webapps/webd
C:/j3t/tomcat/webapps/ROOT
However, when I create my java classes it is setup in my classes, its like this:
C:/j3t/webappfolder/WEB-IN
yourid is directory to see petshow where it contains jsp documents in tomcat:
C:/j3t/tomcat/work/Standal
Therefore when I type localhost in the url, I need to state yourid as the directory to point to get my petshow and then to jsp.
However, I do have a web.xml files it is not exactly in Tomcat:
C:/j3t/webappfolder/WEB-IN
As I stated I store my work in this directory, but I thought Tomcat would be able to see it.
ASKER
1. I have moved my jar files from my webappfolder directory into tomcat's common lib.
C:/j3t/webappfolder/WEB-IN F/lib/all my jar files
to
C:/j3t/tomcat/common/lib
2. Started tomcat and in the logs I get this, something is really screwed up:
2003-03-22 15:02:36 WebappLoader[/yourid]: Deploying class repositories to work directory C:\j3t\tomcat\work\Standal one\localh ost\yourid
2003-03-22 15:02:36 WebappLoader[/yourid]: Deploy JAR /WEB-INF/lib/cos.jar to c:\j3t\webappfolder\WEB-IN F\lib\cos. jar
2003-03-22 15:02:36 WebappLoader[/yourid]: Deploy JAR /WEB-INF/lib/struts.jar to c:\j3t\webappfolder\WEB-IN F\lib\stru ts.jar
2003-03-22 15:02:36 WebappLoader[/yourid]: Deploy JAR /WEB-INF/lib/uploadbean.ja r to c:\j3t\webappfolder\WEB-IN F\lib\uplo adbean.jar
2003-03-22 15:02:36 WebappLoader[/yourid]: Reloading checks are enabled for this Context
2003-03-22 15:02:36 StandardManager[/yourid]: Seeding random number generator class java.security.SecureRandom
2003-03-22 15:02:36 StandardManager[/yourid]: Seeding of random number generator has been completed
2003-03-22 15:02:36 ContextConfig[/yourid]: ContextConfig: Processing START
2003-03-22 15:02:36 StandardContext[/yourid]: Setting deployment descriptor public ID to '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN'
2003-03-22 15:02:36 StandardContext[/yourid]: Setting deployment descriptor public ID to '-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN'
2003-03-22 15:02:36 ContextConfig[/yourid]: Scanning web.xml tag libraries
2003-03-22 15:02:36 ContextConfig[/yourid]: URI='petshow-custom-tag-li brary', ResourcePath='/WEB-INF/tld /petshow-t aglib.tld'
2003-03-22 15:02:36 ContextConfig[/yourid]: tldConfigJar(/WEB-INF/tld/ petshow-ta glib.tld): java.io.IOException: The system cannot find the path specified
2003-03-22 15:02:36 ContextConfig[/yourid]: Scanning TLD files in /WEB-INF
2003-03-22 15:02:36 ContextConfig[/yourid]: Scanning library JAR files
2003-03-22 15:02:36 ContextConfig[/yourid]: tldConfigJar(/WEB-INF/lib/ cos.jar): java.io.IOException: The system cannot find the path specified
2003-03-22 15:02:36 ContextConfig[/yourid]: tldConfigJar(/WEB-INF/lib/ struts.jar ): java.io.IOException: The system cannot find the path specified
2003-03-22 15:02:37 ContextConfig[/yourid]: tldConfigJar(/WEB-INF/lib/ uploadbean .jar): java.io.IOException: The system cannot find the path specified
2003-03-22 15:02:37 ContextConfig[/yourid]: Added certificates -> request attribute Valve
2003-03-22 15:02:37 ContextConfig[/yourid]: Pipline Configuration:
2003-03-22 15:02:37 ContextConfig[/yourid]: org.apache.catalina.valves .Certifica tesValve/1 .0
2003-03-22 15:02:37 ContextConfig[/yourid]: org.apache.catalina.core.S tandardCon textValve/ 1.0
2003-03-22 15:02:37 ContextConfig[/yourid]: ======================
2003-03-22 15:02:37 StandardContext[/yourid]: Configuring application event listeners
2003-03-22 15:02:37 StandardContext[/yourid]: Sending application start events
2003-03-22 15:02:37 StandardContext[/yourid]: Starting filters
2003-03-22 15:02:37 StandardContext[/yourid]: Posting standard context attributes
2003-03-22 15:02:37 StandardWrapper[/yourid:de fault]: Loading container servlet default
2003-03-22 15:02:37 default: init
2003-03-22 15:02:37 StandardWrapper[/yourid:in voker]: Loading container servlet invoker
2003-03-22 15:02:37 invoker: init
2003-03-22 15:02:37 jsp: init
2003-03-22 15:02:37 StandardContext[/yourid]: Starting completed
2003-03-22 15:02:38 WebappLoader[/xsql]: Deploying class repositories to work directory C:\j3t\tomcat\work\Standal one\localh ost\xsql
2003-03-22 15:02:38 StandardManager[/xsql]: Seeding random number generator class java.security.SecureRandom
2003-03-22 15:02:38 StandardManager[/xsql]: Seeding of random number generator has been completed
2003-03-22 15:02:38 ContextConfig[/xsql]: Missing application web.xml, using defaults only
2003-03-22 15:02:38 ContextConfig[/xsql]: Added certificates -> request attribute Valve
2003-03-22 15:02:38 StandardWrapper[/xsql:defa ult]: Loading container servlet default
2003-03-22 15:02:38 default: init
2003-03-22 15:02:38 StandardWrapper[/xsql:invo ker]: Loading container servlet invoker
2003-03-22 15:02:38 invoker: init
2003-03-22 15:02:38 jsp: init
2003-03-22 15:02:38 Internal Error: File /WEB-INF/web.xml not found
2003-03-22 15:02:38 StandardHost[localhost]: Installing web application at context path from URL file:C:\j3t\tomcat\webapps \ROOT
2003-03-22 15:02:38 WebappLoader[]: Deploying class repositories to work directory C:\j3t\tomcat\work\Standal one\localh ost\_
2003-03-22 15:02:38 StandardManager[]: Seeding random number generator class java.security.SecureRandom
2003-03-22 15:02:38 StandardManager[]: Seeding of random number generator has been completed
Thanks again for your help.
Juggy
C:/j3t/webappfolder/WEB-IN
to
C:/j3t/tomcat/common/lib
2. Started tomcat and in the logs I get this, something is really screwed up:
2003-03-22 15:02:36 WebappLoader[/yourid]: Deploying class repositories to work directory C:\j3t\tomcat\work\Standal
2003-03-22 15:02:36 WebappLoader[/yourid]: Deploy JAR /WEB-INF/lib/cos.jar to c:\j3t\webappfolder\WEB-IN
2003-03-22 15:02:36 WebappLoader[/yourid]: Deploy JAR /WEB-INF/lib/struts.jar to c:\j3t\webappfolder\WEB-IN
2003-03-22 15:02:36 WebappLoader[/yourid]: Deploy JAR /WEB-INF/lib/uploadbean.ja
2003-03-22 15:02:36 WebappLoader[/yourid]: Reloading checks are enabled for this Context
2003-03-22 15:02:36 StandardManager[/yourid]: Seeding random number generator class java.security.SecureRandom
2003-03-22 15:02:36 StandardManager[/yourid]: Seeding of random number generator has been completed
2003-03-22 15:02:36 ContextConfig[/yourid]: ContextConfig: Processing START
2003-03-22 15:02:36 StandardContext[/yourid]: Setting deployment descriptor public ID to '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN'
2003-03-22 15:02:36 StandardContext[/yourid]: Setting deployment descriptor public ID to '-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN'
2003-03-22 15:02:36 ContextConfig[/yourid]: Scanning web.xml tag libraries
2003-03-22 15:02:36 ContextConfig[/yourid]: URI='petshow-custom-tag-li
2003-03-22 15:02:36 ContextConfig[/yourid]: tldConfigJar(/WEB-INF/tld/
2003-03-22 15:02:36 ContextConfig[/yourid]: Scanning TLD files in /WEB-INF
2003-03-22 15:02:36 ContextConfig[/yourid]: Scanning library JAR files
2003-03-22 15:02:36 ContextConfig[/yourid]: tldConfigJar(/WEB-INF/lib/
2003-03-22 15:02:36 ContextConfig[/yourid]: tldConfigJar(/WEB-INF/lib/
2003-03-22 15:02:37 ContextConfig[/yourid]: tldConfigJar(/WEB-INF/lib/
2003-03-22 15:02:37 ContextConfig[/yourid]: Added certificates -> request attribute Valve
2003-03-22 15:02:37 ContextConfig[/yourid]: Pipline Configuration:
2003-03-22 15:02:37 ContextConfig[/yourid]: org.apache.catalina.valves
2003-03-22 15:02:37 ContextConfig[/yourid]: org.apache.catalina.core.S
2003-03-22 15:02:37 ContextConfig[/yourid]: ======================
2003-03-22 15:02:37 StandardContext[/yourid]: Configuring application event listeners
2003-03-22 15:02:37 StandardContext[/yourid]: Sending application start events
2003-03-22 15:02:37 StandardContext[/yourid]: Starting filters
2003-03-22 15:02:37 StandardContext[/yourid]: Posting standard context attributes
2003-03-22 15:02:37 StandardWrapper[/yourid:de
2003-03-22 15:02:37 default: init
2003-03-22 15:02:37 StandardWrapper[/yourid:in
2003-03-22 15:02:37 invoker: init
2003-03-22 15:02:37 jsp: init
2003-03-22 15:02:37 StandardContext[/yourid]: Starting completed
2003-03-22 15:02:38 WebappLoader[/xsql]: Deploying class repositories to work directory C:\j3t\tomcat\work\Standal
2003-03-22 15:02:38 StandardManager[/xsql]: Seeding random number generator class java.security.SecureRandom
2003-03-22 15:02:38 StandardManager[/xsql]: Seeding of random number generator has been completed
2003-03-22 15:02:38 ContextConfig[/xsql]: Missing application web.xml, using defaults only
2003-03-22 15:02:38 ContextConfig[/xsql]: Added certificates -> request attribute Valve
2003-03-22 15:02:38 StandardWrapper[/xsql:defa
2003-03-22 15:02:38 default: init
2003-03-22 15:02:38 StandardWrapper[/xsql:invo
2003-03-22 15:02:38 invoker: init
2003-03-22 15:02:38 jsp: init
2003-03-22 15:02:38 Internal Error: File /WEB-INF/web.xml not found
2003-03-22 15:02:38 StandardHost[localhost]: Installing web application at context path from URL file:C:\j3t\tomcat\webapps
2003-03-22 15:02:38 WebappLoader[]: Deploying class repositories to work directory C:\j3t\tomcat\work\Standal
2003-03-22 15:02:38 StandardManager[]: Seeding random number generator class java.security.SecureRandom
2003-03-22 15:02:38 StandardManager[]: Seeding of random number generator has been completed
Thanks again for your help.
Juggy
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for the response..
I see the problem very clearly now, I had got the software from University and one of my lecturers gave document on its installation for home use and configued Tomcat.
How would I configure it, here is the script my lecturer (it was in the server.xml) did:
<!-- pdn/rbc 9 sept 2002 yourid Context added
-->
<Context path="/yourid" docBase="c:/j3t/webappfold er" debug="99" privileged="false" reloadable="true" crossContext="false" />
- <!-- pdn/rbc 10 sept 2002 xsql Context added
-->
<Context path="/xsql" docBase="c:/j3t/xsql/xdk" debug="0" privileged="false" reloadable="false" crossContext="false" />
They have Tomcat at uni as well, but I would like to keep this the same as I got it at uni, so there is little changes I have to make when I transfer the work to the uni network.
Thanks again
Juggy
I see the problem very clearly now, I had got the software from University and one of my lecturers gave document on its installation for home use and configued Tomcat.
How would I configure it, here is the script my lecturer (it was in the server.xml) did:
<!-- pdn/rbc 9 sept 2002 yourid Context added
-->
<Context path="/yourid" docBase="c:/j3t/webappfold
- <!-- pdn/rbc 10 sept 2002 xsql Context added
-->
<Context path="/xsql" docBase="c:/j3t/xsql/xdk" debug="0" privileged="false" reloadable="false" crossContext="false" />
They have Tomcat at uni as well, but I would like to keep this the same as I got it at uni, so there is little changes I have to make when I transfer the work to the uni network.
Thanks again
Juggy
right, that's what I mean you need to configure the tomcat's server.xml. glad to know your problem is solved.
ASKER
You have been very helpful and I have learned from the responses you had given me.
Thanks again
Juggy
Thanks again
Juggy
ASKER
In my previous email I was talking about my lecturer he had given the documents on installing Tomcat and so on.
I'm sorry if I confused you in some way, however, I have awarded you the points because I see where there problem is.
In the server.xml how would I get it to recognise:
c:/j3t/webappfolder
As you can see in my previous message there is a context written by one of my lecturers, but as you know and I do its not working properly, how could I rectify this?
I would be grateful if you could provide any assistance at all.
Thanks again
Juggy
I'm sorry if I confused you in some way, however, I have awarded you the points because I see where there problem is.
In the server.xml how would I get it to recognise:
c:/j3t/webappfolder
As you can see in my previous message there is a context written by one of my lecturers, but as you know and I do its not working properly, how could I rectify this?
I would be grateful if you could provide any assistance at all.
Thanks again
Juggy
thanks for your points.
>> I would be grateful if you could provide any assistance at all.
I'm here to help :)
so what's the error message you are getting now?
you shoud add the line right before </Host> in server.xml file.
>> I would be grateful if you could provide any assistance at all.
I'm here to help :)
so what's the error message you are getting now?
you shoud add the line right before </Host> in server.xml file.
ASKER
I'm not worrying about servlets anymore, Its a scew up in the web.xml on my home PC.
Anyway I have just posted a comment in the question about redirecting JSP, Bobbit31 is helping me out.
I wondered if you can take a look, I think I need a third person it just something minor to do.
response.redirect its not going to a error jsp page if a person exists in the DB.
Thanks again for your help.
Juggy
Anyway I have just posted a comment in the question about redirecting JSP, Bobbit31 is helping me out.
I wondered if you can take a look, I think I need a third person it just something minor to do.
response.redirect its not going to a error jsp page if a person exists in the DB.
Thanks again for your help.
Juggy
is your problem in another question solved? I saw bobbit was working hard on it :)
if not, can you zip up your web app and send it to me, kennethxu at hotmail.com, so I can test it out.
if not, can you zip up your web app and send it to me, kennethxu at hotmail.com, so I can test it out.
try map to /servlet/LoginServlet