Sayeed
First I would suggest creating a web.xml and place that in your WEB-INF/ folder. The web.xml allows, among other things, you to set-up servlet-mappings which will for one make the current URL you are using a lot shorter, secondly because the invoker servlet is now set to off by default registering your servlets in the web.xml will make sure that Tomcat is aware off them and calls them successfully. Copy the below text into a editor and save it as web.xml and place it in your apps WEB-INF folder.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<!--
Sun Public License Notice
The contents of this file are subject to the Sun Public License Version 1.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License is available at http://www.sun.com/
The Original Code is NetBeans. The Initial Developer of the Original Code is Sun Microsystems, Inc. Portions Copyright 1997-2000 Sun Microsystems, Inc. All Rights Reserved. --> <web-app> <servlet> <servlet-name>sayeed</servlet-name> <servlet-class>com.wrox.projsp.ch03.myfirstwebapp.sayeed</servlet-class> </servlet> <servlet-mapping> <servlet-name>sayeed</servlet-name> <url-pattern>*.sayeed</url-pattern> </servlet-mapping> <session-config> <session-timeout>30</session-timeout> </session-config> <welcome-file-list> <welcome-file>index.jsp</welcome-file> <welcome-file>index.html</welcome-file> </welcome-file-list> </web-app>
Restart Tomcat and then enter the following URL: http://localhost:8080/ch03/process.sayeed
You can learn more about the web.xml and all of it's features at the following URL: http://e-docs.bea.com/wls/docs61/webapp/web_xml.html
Sayeed wrote:
Hi to all
Sir/Madam
Please help me someone regarding my first WebApplication (Servlet):
I created directories : CATALINA_HOME\webapps\ch03\WEB-IN\classes\com\wrox\projsp\ch03\myfirstwebapp
Then into my sayeed class i starated with a first line as:
package com.wrox.projsp.ch03.myfirstwebapp and other coding stuff.... for the java class..
I compile this java file (sayeed) and it compiled sucessfully and saved into: CATALINA_HOME\webapps\ch03\WEB-IN\classes\com\wrox\projsp\ch03\myfirstwebapp \sayeed.class
Now after startup my tomcat server i put this into url browser which gives error:
http://localhost:8080/ch03/servlet/com.wrox.projsp.ch03.myfirstwebapp.sayeed
the error is:
type Status report
message /ch03/servlet/com.wrox.projsp.ch03.myfirstwebapp.sayeed
description The requested resource (/ch03/servlet/com.wrox.projsp.ch03.myfirstwebapp.sayeed) is not available.
Can anyone please help me? thanx in advance
Saeed
----- Original Message ----- From: "Shapira, Yoav" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Tuesday, July 20, 2004 9:31 PM Subject: RE: Error Starting Sample Tomcat Webapps
Hola, How did you install tomcat?
Yoav Shapira Millennium Research Informatics
message :-----Original Message----- From: Sayeed [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 20, 2004 12:40 PM To: Tomcat Users List Subject: Re: Error Starting Sample Tomcat Webapps
Dear Filip
thanx for the advice - i put the same command and it gives these
Dispatcher.dispatch(Unknown Source)Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
known Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)org.apache.commons.digester.Digester.parse(Digester.java:1548)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
at
atorg.apache.catalina.startup.Catalina.start(Catalina.java:449)
atorg.apache.catalina.startup.Catalina.execute(Catalina.java:400)
atorg.apache.catalina.startup.Catalina.process(Catalina.java:180)
at java.lang.reflect.Method.invoke(Native Method)org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
at
org.apache.xerces.parsers.AbstractSAXParser.startElement(UnknownCatalina.start: sun.misc.InvalidJarIndexException: Invalid index! sun.misc.InvalidJarIndexException: Invalid index! at org.apache.commons.digester.Digester.createSAXException(Digester.java :2540) at org.apache.commons.digester.Digester.createSAXException(Digester.java :2566) at org.apache.commons.digester.Digester.startElement(Digester.java:1276)
at
SourSource)
ce)
at
org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unkn
own Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElemen
t(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
Dispatcher.dispatch(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
known Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)org.apache.commons.digester.Digester.parse(Digester.java:1548)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
at
atorg.apache.catalina.startup.Catalina.start(Catalina.java:449)
atorg.apache.catalina.startup.Catalina.execute(Catalina.java:400)
atorg.apache.catalina.startup.Catalina.process(Catalina.java:180)
at java.lang.reflect.Method.invoke(Native Method)org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
at
under :c:\apache\tomcat\bin
plz advice
Saeed ----- Original Message ----- From: "Filip Hanik - Dev" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Tuesday, July 20, 2004 9:10 PM Subject: Re: Error Starting Sample Tomcat Webapps
type
catalina.bat run
RTFM
----- Original Message ----- From: "Sayeed" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Tuesday, July 20, 2004 11:16 AM Subject: Re: Error Starting Sample Tomcat Webapps
Dear Filip if I issues catalina.bat in DOS then this is all:
C:\Apache\Tomcat\bin>catalina Using CATALINA_BASE: C:\APACHE\TOMCAT Using CATALINA_HOME: C:\APACHE\TOMCAT Using CATALINA_TMPDIR: C:\APACHE\TOMCAT\temp Using JAVA_HOME: C:\jdk1.3 Usage: catalina ( commands ... ) commands: debug Start Catalina in a debugger debug -security Debug Catalina with a security manager embedded Start Catalina in embedded mode jpda start Start Catalina under JPDA debugger run Start Catalina in the current window run -security Start in the current window with security manager start Start Catalina in a separate window start -security Start in a separate window with security manager stop Stop Catalina C:\Apache\Tomcat\bin>
----- Original Message ----- From: "Filip Hanik - Dev" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Tuesday, July 20, 2004 8:44 PM Subject: Re: Error Starting Sample Tomcat Webapps
in your dos window, instead of typing startup.bat
type
catalina.bat run
and tomcat will run in the same window, and show you the error
Filip
----- Original Message ----- From: "Sayeed" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Tuesday, July 20, 2004 10:50 AM Subject: Re: Error Starting Sample Tomcat Webapps
DEAR Yoav Shapira
I have a question for you sir.
I start learning JSP and ohter J2EE tools recently. I buy a book of "Professional JSP 2nd Edition".
Sir i am facing a problem:
I dowload jakarta_tomcat 4.1.30.exe from the website.
I already do have jdk1.3 at my PC ( iam using win98 OS).
Now after installing jakarta_tomcat to a folder "c\apache\tomcat",
I create two environment variables into my Autoexe.bat file as
Startup.batactiveset JAVA_HOME=C:\jdk1.3 set CATALINA_HOME=C:\APACHE\TOMCAT
Now when I Start Tomcat - a DOS base window is opened and remained
for few seconds and then close automatically. Also i try
fileopened
at
MS DOS promt, it shows some lines as follows:
C:\Apache\Tomcat\bin>startup
Using CATALINA_BASE: C:\APACHE\TOMCAT
Using CATALINA_HOME: C:\APACHE\TOMCAT
Using CATALINA_TMPDIR: C:\APACHE\TOMCAT\temp
Using JAVA_HOME: C:\jdk1.3
C:\Apache\Tomcat\bin>
And in the mid also a new DOS base window shows a name 'Java'
fornot
fewinstructions
seconds and automatically closed.
Sir/Madam, whats the wrong with the tomcat? coz as per book
it
must shows a Catalina named window and remained active till I did
xmlissue
a command Shutdown.
So please guide me what I should do in this connection in detail.
An early reply shall highly bhe appreicated.
Saeed Programmer
----- Original Message ----- From: "Shapira, Yoav" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Tuesday, July 20, 2004 5:43 PM Subject: RE: Error Starting Sample Tomcat Webapps
Hi,
Make sure the java installations are clean, i.e. there are no extra
unpackyourAPI or parser implementations (or Digester, come to think of it) in
jre/lib/ext directory (off $JAVA_HOME).
Yoav Shapira Millennium Research Informatics
works,-----Original Message----- From: Debra Bartling [mailto:[EMAIL PROTECTED] Sent: Monday, July 19, 2004 5:25 PM To: [EMAIL PROTECTED] Subject: Error Starting Sample Tomcat Webapps
Tomcat 5.0.27, binary distribution, on two different servers, one
one doesn't. My development server (Solaris 8) works OK when I
own).Tomcat and start it up with the demo webapps (as well as with my
correctlyOn
my production server (Solaris 9) Tomcat does not start up
and2
org.apache.commons.digester.Digester.createSAXException(Digester.java:application atgives the following:
2004-07-19 12:11:25 StandardHost[localhost]: Error deploying
context path null
java.lang.reflect.InvocationTargetException
at
2540)org.apache.commons.digester.Digester.createSAXException(Digester.java:
at
jorg.apache.commons.digester.Digester.endElement(Digester.java:1061)566)
at
org.apache.catalina.util.CatalinaDigester.endElement(CatalinaDigester.at
nava:org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(U
76)org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown
at
Source)
at
iknoworg.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentD
n
Source)
at
nspatorg.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unk
cher.dispatch(Unknown
Source)
at
oownorg.apache.catalina.core.StandardHostDeployer.install(StandardHostDepl
Source)Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
at org.apache.xerces.parsers.XML11Configuration.parse(UnknownSource)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
atorg.apache.commons.digester.Digester.parse(Digester.java:1567)
at
vorg.apache.catalina.core.StandardHost.install(StandardHost.java:863)yer.
java:488)
at
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.jaat
3org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427)a:48
2)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:atorg.apache.catalina.startup.HostConfig.start(HostConfig.java:968)
at
S49)org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycle
at
0org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)uppo
rt.java:119)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)atorg.apache.catalina.core.StandardHost.start(StandardHost.java:789)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)at
org.apache.catalina.core.StandardService.start(StandardService.java:48at
))org.apache.catalina.core.StandardServer.start(StandardServer.java:2313
at
asun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jat org.apache.catalina.startup.Catalina.start(Catalina.java:556)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
ova:3sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess
9)
at
arImpsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j
l.java:25)org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:284)
at java.lang.reflect.Method.invoke(Method.java:324)
at
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
ova:3sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess
9)
at
:rImporg.apache.commons.daemon.support.DaemonLoader.start(DaemonLoader.java
l.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
in218)
My configurations are exactly the same except for the difference
the[EMAIL PROTECTED]
---------------------------------------------------------------------operating system. Any suggestions?
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:
individual(s)proprietary
This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential,
and/or privileged. This e-mail is intended only for the
todisclosed
whom it is addressed, and may not be saved, copied, printed,
orplease
used by anyone else. If you are not the(an) intended recipient,
theimmediately delete this e-mail from your computer system and notify
---------------------------------------------------------------------sender. Thank you.
[EMAIL PROTECTED]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]To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:
------------------------------------------------------------------------------------------------------------------------------------------ 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]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you.
--------------------------------------------------------------------- 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]
-- Kind Regards Schalk Neethling Web Developer.Designer.Programmer.President Volume4.Development.Multimedia.Branding emotionalize.conceptualize.visualize.realize Tel: +27125468436 Fax: +27125468436 email:[EMAIL PROTECTED] web: www.volume4.co.za
This message contains information that is considered to be sensitive or confidential and may not be forwarded or disclosed to any other party without the permission of the sender. If you received this message in error, please notify me immediately so that I can correct and delete the original email. Thank you.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]