Teh,
The web.xml looks fine to me. Can you confirm that you war file is
packaged correctly i.e
its created with proper packages structure and dir/file names.
Also, I was wondering why are you being asked to (explicitly) create a
<context> element in server.xml. Is it a TC v4.x requirement ?
I have used TC 3,4 and 5 but never was I required to explicitly create a
context entry in server.xml for any webapp.
I used more of a traditional way of dropping a war file into webapps/
and re-starting the container and it has been working
fine for me so far.
Experts, any thoughts on this one ?
Teh, if you are sure that the deployed WAR is sane then we should wait
for experts to provide an answer.
-Prasad.
Teh Noranis Mohd Aris wrote:
The web.xml looks like this:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web
Application 2.3//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_3.dtd">
<web-app>
<servlet>
<servlet-name>MyFirstServlet</servlet-name>
<servlet-class>com.wrox.projsp.ch03.myfirstwebapp.MyFirstServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>MyFirstServlet</servlet-name>
<url-pattern>
/MyFirstServlet
</url-pattern>
</servlet-mapping>
</web-app>
I placed the web.xml in
c:\jakarta-tomcat-4.1.31\webapps\ch03\WEB-INF
directory.
How about the server.xml file in
c:\jakarta-tomcat-4.1.31\conf directory? The original
file looks like this:
.
.
.
<!-- Tomcat Examples Context -->
<Context path="/examples" docBase="examples"
debug="0"
reloadable="true"
crossContext="true">
<Logger
className="org.apache.catalina.logger.FileLogger"
prefix="localhost_examples_log."
suffix=".txt"
timestamp="true"/>
<Ejb name="ejb/EmplRecord" type="Entity"
home="com.wombat.empl.EmployeeRecordHome"
remote="com.wombat.empl.EmployeeRecord"/>
.
.
.
Should I replace <Context path="/examples" to <Context
path="ch03" and docBase="examples" to
docBase="myfirstwebapp" (the war file for
myfirstwebapp in the
c:\jakarta-tomcat-4.1.31\webapps\ch03 directory)?
Thanks.
TEH
--- Prasad <[EMAIL PROTECTED]> wrote:
Can you post your web.xml. I think I can help you
with this but only
after looking at your web.xml.
I think the problem is with <servlet> and
<servlet-mapping> in your
web.xml. Moreover as David said, you can find all
the information in the
Docs.
-Prasad.
---------------------------------------------------------------------
To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]