New User Web.xml question

2004-02-25 Thread nrapagnani
Windows Server 2k, Tomcat 4.1.
 
I'm relatively new at building web applications.  I'm ok with the
programming, I've never learned how to make a web.xml file.
 
I've gotten by on the invoker running all of my jsp pages.  It's now time to
do things right.  I have many books in front of me.  
NetBeans The Definitive Guide
Tomcat Kick Start
Apache Tomcat Bible
Tomcat The Definitive Guide
Web Development with JavaServer Pages
CORE JSTL Mastering the JSP Standard Tag Library
CORE Servlets and JavaServer Pages
 
I still have no clue.  I only write jsp pages, no servlets.  I understand
that Tomcat converts this to a servlet.  I understand that this servlet is a
class.
 
The sample web.xml in the ROOT directory of webapps does not mention a
class, yet the index page runs.
 
The sample web.xml in the examples directory of webapps has lots of filter
and filter-mapping entries.  I have only a vague idea of what they do.
 
I have a few very simple webapps.  1 page to login, 1 page to search.  I
would like to make a web.xml file for my webapps.  Right now, whatever I try
I get a 404 error when I restart Tomcat, then I delete the web.xml I made
and everything is good again.
 
Can someone give me a tip.  If your webapp's root was
\\webserver\www.company.com
file:///\\webserver\www.company.com%20and%20you%20added%20test.jsp  and
you added test.jsp to that web app.  What entry would you make in your
web.xml file?
 
Thanks in advance.


RE: New User Web.xml question

2004-02-25 Thread Shapira, Yoav

Howdy,
You don't need to declare JSPs in your web.xml even though they really
are servlets, because there's a special servlet that serves JSP pages.
That servlet is declared and mapped in the master web.xml file located
in the $CATALINA_HOME/conf directory.

Start with a web.xml file that just has an empty webapp element:
?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/dtd/web-app_2_3.dtd;

web-app
/web-app


Alternatively, you can use the basic web.xml provided in the tomcat
First Webapp guide:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/appdev/web.xml.txt

(In general, I suggest reading
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/appdev/ before any of
your many printed books).

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 25, 2004 12:14 PM
To: [EMAIL PROTECTED]
Subject: New User Web.xml question

Windows Server 2k, Tomcat 4.1.

I'm relatively new at building web applications.  I'm ok with the
programming, I've never learned how to make a web.xml file.

I've gotten by on the invoker running all of my jsp pages.  It's now
time
to
do things right.  I have many books in front of me.
NetBeans The Definitive Guide
Tomcat Kick Start
Apache Tomcat Bible
Tomcat The Definitive Guide
Web Development with JavaServer Pages
CORE JSTL Mastering the JSP Standard Tag Library
CORE Servlets and JavaServer Pages

I still have no clue.  I only write jsp pages, no servlets.  I
understand
that Tomcat converts this to a servlet.  I understand that this servlet
is
a
class.

The sample web.xml in the ROOT directory of webapps does not mention a
class, yet the index page runs.

The sample web.xml in the examples directory of webapps has lots of
filter
and filter-mapping entries.  I have only a vague idea of what they do.

I have a few very simple webapps.  1 page to login, 1 page to search.
I
would like to make a web.xml file for my webapps.  Right now, whatever
I
try
I get a 404 error when I restart Tomcat, then I delete the web.xml I
made
and everything is good again.

Can someone give me a tip.  If your webapp's root was
\\webserver\www.company.com
file:///\\webserver\www.company.com%20and%20you%20added%20test.jsp
and
you added test.jsp to that web app.  What entry would you make in your
web.xml file?

Thanks in advance.



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]



RE: New User Web.xml question

2004-02-25 Thread Filip Hanik \(lists\)
JSP do not need any entries in web.xml caused they are simply mapped by
filename
Servlets need an entry so that you can map the servlet class to a URL
pattern
Filip

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 25, 2004 9:14 AM
To: [EMAIL PROTECTED]
Subject: New User Web.xml question


Windows Server 2k, Tomcat 4.1.

I'm relatively new at building web applications.  I'm ok with the
programming, I've never learned how to make a web.xml file.

I've gotten by on the invoker running all of my jsp pages.  It's now time to
do things right.  I have many books in front of me.
NetBeans The Definitive Guide
Tomcat Kick Start
Apache Tomcat Bible
Tomcat The Definitive Guide
Web Development with JavaServer Pages
CORE JSTL Mastering the JSP Standard Tag Library
CORE Servlets and JavaServer Pages

I still have no clue.  I only write jsp pages, no servlets.  I understand
that Tomcat converts this to a servlet.  I understand that this servlet is a
class.

The sample web.xml in the ROOT directory of webapps does not mention a
class, yet the index page runs.

The sample web.xml in the examples directory of webapps has lots of filter
and filter-mapping entries.  I have only a vague idea of what they do.

I have a few very simple webapps.  1 page to login, 1 page to search.  I
would like to make a web.xml file for my webapps.  Right now, whatever I try
I get a 404 error when I restart Tomcat, then I delete the web.xml I made
and everything is good again.

Can someone give me a tip.  If your webapp's root was
\\webserver\www.company.com
file:///\\webserver\www.company.com%20and%20you%20added%20test.jsp  and
you added test.jsp to that web app.  What entry would you make in your
web.xml file?

Thanks in advance.

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.594 / Virus Database: 377 - Release Date: 2/24/2004

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.594 / Virus Database: 377 - Release Date: 2/24/2004


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: New User Web.xml question

2004-02-25 Thread nrapagnani
Thank you Flip and Yoav for your help.  That cleared up a lot of confusion.

I have used the empty web.xml listed below, restarted tomcat, and everything
was fine.

I then added some taglibs to the web.xml:
?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/dtd/web-app_2_3.dtd;

web-app
taglib
taglib-urihttp://jakarta.apache.org/taglibs/c/taglib-uri
taglib-location/WEB-INF/c.tld/taglib-location
/taglib
taglib
taglib-urihttp://jakarta.apache.org/taglibs/sql/taglib-uri
taglib-location/WEB-INF/sql.tld/taglib-location
/taglib
/web-app


When I restart Tomcat, I get a 404 error.  Any ideas?


-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 25, 2004 12:20 PM
To: Tomcat Users List
Subject: RE: New User Web.xml question


Howdy,
You don't need to declare JSPs in your web.xml even though they really
are servlets, because there's a special servlet that serves JSP pages.
That servlet is declared and mapped in the master web.xml file located
in the $CATALINA_HOME/conf directory.

Start with a web.xml file that just has an empty webapp element:
?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/dtd/web-app_2_3.dtd;

web-app
/web-app


Alternatively, you can use the basic web.xml provided in the tomcat
First Webapp guide:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/appdev/web.xml.txt

(In general, I suggest reading
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/appdev/ before any of
your many printed books).

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 25, 2004 12:14 PM
To: [EMAIL PROTECTED]
Subject: New User Web.xml question

Windows Server 2k, Tomcat 4.1.

I'm relatively new at building web applications.  I'm ok with the
programming, I've never learned how to make a web.xml file.

I've gotten by on the invoker running all of my jsp pages.  It's now
time
to
do things right.  I have many books in front of me.
NetBeans The Definitive Guide
Tomcat Kick Start
Apache Tomcat Bible
Tomcat The Definitive Guide
Web Development with JavaServer Pages
CORE JSTL Mastering the JSP Standard Tag Library
CORE Servlets and JavaServer Pages

I still have no clue.  I only write jsp pages, no servlets.  I
understand
that Tomcat converts this to a servlet.  I understand that this servlet
is
a
class.

The sample web.xml in the ROOT directory of webapps does not mention a
class, yet the index page runs.

The sample web.xml in the examples directory of webapps has lots of
filter
and filter-mapping entries.  I have only a vague idea of what they do.

I have a few very simple webapps.  1 page to login, 1 page to search.
I
would like to make a web.xml file for my webapps.  Right now, whatever
I
try
I get a 404 error when I restart Tomcat, then I delete the web.xml I
made
and everything is good again.

Can someone give me a tip.  If your webapp's root was
\\webserver\www.company.com
file:///\\webserver\www.company.com%20and%20you%20added%20test.jsp
and
you added test.jsp to that web app.  What entry would you make in your
web.xml file?

Thanks in advance.



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]



RE: New User Web.xml question

2004-02-25 Thread Shapira, Yoav

Howdy,

When I restart Tomcat, I get a 404 error.  Any ideas?

You don't get a 404 error when you restart tomcat.  You get a 404 error
when you try to access some resource that tomcat can't find.  What
resource, what is its mapping if any, and what errors are in your logs?

Yoav Shapira



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]



RE: New User Web.xml question

2004-02-25 Thread nrapagnani
)
at
org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1233)
at
org.apache.catalina.core.StandardService.stop(StandardService.java:554)
at
org.apache.catalina.core.StandardServer.stop(StandardServer.java:2225)
at
org.apache.catalina.startup.CatalinaService.stop(CatalinaService.java:295)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.apache.catalina.startup.BootstrapService.stop(BootstrapService.java:260)
at
org.apache.catalina.startup.BootstrapService.main(BootstrapService.java:309)

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 25, 2004 1:52 PM
To: Tomcat Users List
Subject: RE: New User Web.xml question


Howdy,

When I restart Tomcat, I get a 404 error.  Any ideas?

You don't get a 404 error when you restart tomcat.  You get a 404 error
when you try to access some resource that tomcat can't find.  What
resource, what is its mapping if any, and what errors are in your logs?

Yoav Shapira



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]



RE: New User Web.xml question

2004-02-25 Thread Shapira, Yoav

Hi,
When you get an error processing your web.xml, the entire context
becomes unavailable: all requests to it will result in 4xx or 5xx
errors, depending on the request.  As for the specific error:
http://marc.theaimsgroup.com/?l=tomcat-userw=2r=1s=Exception+processi
ng+tldq=b

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 25, 2004 2:31 PM
To: [EMAIL PROTECTED]
Subject: RE: New User Web.xml question


Tomcat Log for web app, after I add taglibs to web.xml:
2004-02-25 13:41:02 WebappLoader[]: Deploying class repositories to
work
directory C:\Program Files\Apache Group\Tomcat
4.1\work\Standalone\www.company.com\_
2004-02-25 13:41:02 WebappLoader[]: Deploy class files /WEB-INF/classes
to
E:\Inetpub\wwwroot\www.company.com\WEB-INF\classes
2004-02-25 13:41:02 WebappLoader[]: Deploy JAR /WEB-INF/lib/dom.jar to
E:\Inetpub\wwwroot\www.company.com\WEB-INF\lib\dom.jar
2004-02-25 13:41:02 WebappLoader[]: Deploy JAR
/WEB-INF/lib/jaxen-full.jar
to E:\Inetpub\wwwroot\www.company.com\WEB-INF\lib\jaxen-full.jar
2004-02-25 13:41:02 WebappLoader[]: Deploy JAR
/WEB-INF/lib/jaxp-api.jar to
E:\Inetpub\wwwroot\www.company.com\WEB-INF\lib\jaxp-api.jar
2004-02-25 13:41:02 WebappLoader[]: Deploy JAR
/WEB-INF/lib/jdbc2_0-stdext.jar to
E:\Inetpub\wwwroot\www.company.com\WEB-INF\lib\jdbc2_0-stdext.jar
2004-02-25 13:41:02 WebappLoader[]: Deploy JAR /WEB-INF/lib/jstl.jar to
E:\Inetpub\wwwroot\www.company.com\WEB-INF\lib\jstl.jar
2004-02-25 13:41:02 WebappLoader[]: Deploy JAR /WEB-INF/lib/sax.jar to
E:\Inetpub\wwwroot\www.company.com\WEB-INF\lib\sax.jar
2004-02-25 13:41:02 WebappLoader[]: Deploy JAR /WEB-INF/lib/saxpath.jar
to
E:\Inetpub\wwwroot\www.company.com\WEB-INF\lib\saxpath.jar
2004-02-25 13:41:02 WebappLoader[]: Deploy JAR
/WEB-INF/lib/standard.jar to
E:\Inetpub\wwwroot\www.company.com\WEB-INF\lib\standard.jar
2004-02-25 13:41:02 WebappLoader[]: Deploy JAR /WEB-INF/lib/xalan.jar
to
E:\Inetpub\wwwroot\www.company.com\WEB-INF\lib\xalan.jar
2004-02-25 13:41:02 WebappLoader[]: Deploy JAR
/WEB-INF/lib/xercesImpl.jar
to E:\Inetpub\wwwroot\www.company.com\WEB-INF\lib\xercesImpl.jar
2004-02-25 13:41:02 WebappLoader[]: Reloading checks are enabled for
this
Context
2004-02-25 13:41:02 ContextConfig[] Exception processing TLD at
resource
path /WEB-INF/c.tld
javax.servlet.ServletException: Exception processing TLD at resource
path
/WEB-INF/c.tld
   at
org.apache.catalina.startup.ContextConfig.tldScanTld(ContextConfig.java
:101
0
)
   at
org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:87
0)
   at
org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647)
   at
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.
java
:
243)
   at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleS
uppo
r
t.java:166)
   at
org.apache.catalina.core.StandardContext.start(StandardContext.java:356
8)
   at
org.apache.catalina.startup.HostConfig.checkWebXmlLastModified(HostConf
ig.j
a
va:614)
   at
org.apache.catalina.startup.HostConfig.run(HostConfig.java:854)
   at java.lang.Thread.run(Thread.java:534)
- Root Cause -
java.lang.IllegalArgumentException: Invalid TLD resource path /WEB-
INF/c.tld
   at
org.apache.catalina.startup.ContextConfig.tldScanTld(ContextConfig.java
:100
2
)
   at
org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:87
0)
   at
org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647)
   at
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.
java
:
243)
   at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleS
uppo
r
t.java:166)
   at
org.apache.catalina.core.StandardContext.start(StandardContext.java:356
8)
   at
org.apache.catalina.startup.HostConfig.checkWebXmlLastModified(HostConf
ig.j
a
va:614)
   at
org.apache.catalina.startup.HostConfig.run(HostConfig.java:854)
   at java.lang.Thread.run(Thread.java:534)

2004-02-25 13:41:02 ContextConfig[]: Marking this application
unavailable
due to previous error(s)
2004-02-25 13:41:02 StandardManager[]: Seeding random number generator
class
java.security.SecureRandom
2004-02-25 13:41:02 StandardManager[]: Seeding of random number
generator
has been completed
2004-02-25 13:41:02 StandardContext[]: Context startup failed due to
previous errors
2004-02-25 13:41:39 StandardHost[www.company.com]: Removing web
application
at context path
2004-02-25 13:41:39 StandardHost[www.company.com]:
ContainerBase.removeChild: stop:
LifecycleException:  Container StandardContext[] has not been started
   at
org.apache.catalina.core.StandardContext.stop(StandardContext.java:3644
)
   at
org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:1
036)
   at
org.apache.catalina.core.StandardHostDeployer.remove(StandardHostDeploy
er.j
a
va:470