JNDI / web.xml question

2005-02-09 Thread Jack Lauman
I'm trying to clean up a few files that have JNDI data access.  I want 
to move the datasource name to the web.xml for easier maintenance and to 
avoid having to hardcode it into the app.

If I have a datasource in the context-param area of the web.xml file, 
how can it be called?

context-param
   param-namejdbcDataSource/param-name
   param-valuejava:comp/env/jdbc/RestaurantDS/param-value
/context-param
pageContext.
getServletContext().getInitParameter(insert-context-param-name-here);
The above doesn't work here... does anyone know how this can be done?
Thanks,
Jack

private void initialize()
{
   try {
   Context ctx = null;
   DataSource ds = null;
   Connection conn = null;
   Result result = null;
   try {
   ctx = new InitialContext();
   ds = (DataSource)
ctx.lookup(java:comp/env/jdbc/RestaurantDS);
   } catch (Exception e) {
   System.out.println(DataSource context lookup failed:  + e);
   }
   try {
   conn = ds.getConnection();
   } catch (Exception e) {
   System.out.println(DataSource getConnection failed:  + e);
 e.printStackTrace();
   }

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


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

web.xml question

2003-07-14 Thread Astrid Wagner
Hi,
This is an (hopefully) easy question:
I run my new web application but do not seem to get the servlet to run.
I can run a simple index.html page 
(machine:port/my-web-appl/index.html) within my web application 
installation so $CATALINA_HOME/webapps/my-web-appl/index.html is
found. But when I try to call a servlet having simply in web.xml:
!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
   servlet
   servlet-nameRegEntryPage/servlet-name
   
servlet-classcom.mot.sps.ipr.ipConsumer.registration.RegEntryPage/servlet-class
   /servlet
/web-app

and by calling it in the browser with 
machine:port/my-web-appl/RegEntryPage

it fails. Has someone a quick answer?
The log file simply says:
Mapping contextPath='/iprweb' with requestURI='/iprweb/RegEntryPage'
and relativeURI='/RegEntryPage'
2003-07-14 17:00:40 StandardContext[/iprweb]:   Trying exact match
2003-07-14 17:00:40 StandardContext[/iprweb]:   Trying prefix match
2003-07-14 17:00:40 StandardContext[/iprweb]:   Trying extension match
2003-07-14 17:00:40 StandardContext[/iprweb]:   Trying default match
2003-07-14 17:00:40 StandardContext[/iprweb]:  Mapped to servlet 
'default' with servlet path '/RegEntryPage' and path info 'null' and 
update=true

Thanks.

Astrid


Re: web.xml question

2003-07-14 Thread John Turner
http://jakarta.apache.org/tomcat/faq/misc.html#invoker

You'll need to map your servlet to a URL.

John

On Mon, 14 Jul 2003 17:02:17 +0200, Astrid Wagner 
[EMAIL PROTECTED] wrote:

Hi,
This is an (hopefully) easy question:
I run my new web application but do not seem to get the servlet to run.
I can run a simple index.html page (machine:port/my-web- 
appl/index.html) within my web application installation so 
$CATALINA_HOME/webapps/my-web-appl/index.html is
found. But when I try to call a servlet having simply in web.xml:
!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
servlet
servlet-nameRegEntryPage/servlet-name
servlet- 
classcom.mot.sps.ipr.ipConsumer.registration.RegEntryPage/servlet- 
class
/servlet
/web-app

and by calling it in the browser with machine:port/my-web- 
appl/RegEntryPage

it fails. Has someone a quick answer?
The log file simply says:
Mapping contextPath='/iprweb' with requestURI='/iprweb/RegEntryPage'
and relativeURI='/RegEntryPage'
2003-07-14 17:00:40 StandardContext[/iprweb]:   Trying exact match
2003-07-14 17:00:40 StandardContext[/iprweb]:   Trying prefix match
2003-07-14 17:00:40 StandardContext[/iprweb]:   Trying extension match
2003-07-14 17:00:40 StandardContext[/iprweb]:   Trying default match
2003-07-14 17:00:40 StandardContext[/iprweb]:  Mapped to servlet 
'default' with servlet path '/RegEntryPage' and path info 'null' and 
update=true

Thanks.

Astrid



--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


web.xml question

2003-02-03 Thread Pooleery, Manoj
Is it necessary that for each of the servlet elements in the web.xml, a
corresponding servlet-mapping element should be there? (For a context
other than root).

Thanks
-Manoj.



RE: web.xml question

2003-02-03 Thread Shapira, Yoav
Hi,
No.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Pooleery, Manoj [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 03, 2003 5:22 PM
To: 'Tomcat Users List'
Subject: web.xml question

Is it necessary that for each of the servlet elements in the web.xml,
a
corresponding servlet-mapping element should be there? (For a context
other than root).

Thanks
-Manoj.

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




Re: web.xml question

2003-02-03 Thread Paul Hsu
Not really, if you have a servlet is used for startup a background process,
then you do not need a mapping section.

- Original Message -
From: Pooleery, Manoj [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Monday, February 03, 2003 2:22 PM
Subject: web.xml question


 Is it necessary that for each of the servlet elements in the web.xml, a
 corresponding servlet-mapping element should be there? (For a context
 other than root).

 Thanks
 -Manoj.



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




RE: web.xml question

2003-02-03 Thread Pooleery, Manoj
Maybe I am doing this incorrectly - but I have a servlet class in my
WEB-INF/classes directory(SessionTestServlet.class) and in my web.xml, I
have an entry like this
servlet
  servlet-nameSessionTest/servlet-name
  servlet-classSessionTestServlet/servlet-class
/servlet

When I type http://localhost:8080/test/SessioinTest, it gives me an error
saying requested resource not found.  What could I be doing wrong?

Thanks
-Manoj.



-Original Message-
From: Paul Hsu [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 03, 2003 5:24 PM
To: Tomcat Users List
Subject: Re: web.xml question


Not really, if you have a servlet is used for startup a background process,
then you do not need a mapping section.

- Original Message -
From: Pooleery, Manoj [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Monday, February 03, 2003 2:22 PM
Subject: web.xml question


 Is it necessary that for each of the servlet elements in the web.xml, a
 corresponding servlet-mapping element should be there? (For a context
 other than root).

 Thanks
 -Manoj.



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



Re: web.xml question

2003-02-03 Thread Jeanfrancois Arcand
Is your Servlet have a package name? If no, it should.

example:

WEB-INF/classes/my/package/SessionTestServlet

and then try something like that

 servlet-nameSessionTest/servlet-name
 servlet-classmy.package.SessionTestServlet/servlet-class

-- Jeanfrancois

Pooleery, Manoj wrote:


Maybe I am doing this incorrectly - but I have a servlet class in my
WEB-INF/classes directory(SessionTestServlet.class) and in my web.xml, I
have an entry like this
servlet
 servlet-nameSessionTest/servlet-name
 servlet-classSessionTestServlet/servlet-class
/servlet

When I type http://localhost:8080/test/SessioinTest, it gives me an error
saying requested resource not found.  What could I be doing wrong?

Thanks
-Manoj.

	

-Original Message-
From: Paul Hsu [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 03, 2003 5:24 PM
To: Tomcat Users List
Subject: Re: web.xml question


Not really, if you have a servlet is used for startup a background process,
then you do not need a mapping section.

- Original Message -
From: Pooleery, Manoj [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Monday, February 03, 2003 2:22 PM
Subject: web.xml question


 

Is it necessary that for each of the servlet elements in the web.xml, a
corresponding servlet-mapping element should be there? (For a context
other than root).

Thanks
-Manoj.

   



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

 



Re: web.xml question

2003-02-03 Thread Erik Price
If you don't have a servlet-mapping with a url-pattern then typing 
something into the browser will have no effect.

Erik



Pooleery, Manoj wrote:
Maybe I am doing this incorrectly - but I have a servlet class in my
WEB-INF/classes directory(SessionTestServlet.class) and in my web.xml, I
have an entry like this
servlet
  servlet-nameSessionTest/servlet-name
  servlet-classSessionTestServlet/servlet-class
/servlet

When I type http://localhost:8080/test/SessioinTest, it gives me an error
saying requested resource not found.  What could I be doing wrong?

Thanks
-Manoj.

	

-Original Message-
From: Paul Hsu [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 03, 2003 5:24 PM
To: Tomcat Users List
Subject: Re: web.xml question


Not really, if you have a servlet is used for startup a background process,
then you do not need a mapping section.

- Original Message -
From: Pooleery, Manoj [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Monday, February 03, 2003 2:22 PM
Subject: web.xml question




Is it necessary that for each of the servlet elements in the web.xml, a
corresponding servlet-mapping element should be there? (For a context
other than root).

Thanks
-Manoj.





-
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: web.xml question

2003-02-03 Thread Haytham Samad
Hi,

I think you need to change your url to the following:

http://localhost:8080/test/servlets/SessioinTest

or change servlets to servlet, not sure which at this point.  This is
basically how you call a servlet that is not mapped to a specific url
pattern in your web.xml config file.  I am assuming test is your context
name!?

...

-Original Message-
From: Pooleery, Manoj [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 03, 2003 4:31 PM
To: 'Tomcat Users List'
Subject: RE: web.xml question


Maybe I am doing this incorrectly - but I have a servlet class in my
WEB-INF/classes directory(SessionTestServlet.class) and in my web.xml, I
have an entry like this
servlet
  servlet-nameSessionTest/servlet-name
  servlet-classSessionTestServlet/servlet-class
/servlet

When I type http://localhost:8080/test/SessioinTest, it gives me an error
saying requested resource not found.  What could I be doing wrong?

Thanks
-Manoj.



-Original Message-
From: Paul Hsu [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 03, 2003 5:24 PM
To: Tomcat Users List
Subject: Re: web.xml question


Not really, if you have a servlet is used for startup a background process,
then you do not need a mapping section.

- Original Message -
From: Pooleery, Manoj [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Monday, February 03, 2003 2:22 PM
Subject: web.xml question


 Is it necessary that for each of the servlet elements in the web.xml, a
 corresponding servlet-mapping element should be there? (For a context
 other than root).

 Thanks
 -Manoj.



-
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: web.xml question

2003-02-03 Thread Tim Moore
 -Original Message-
 From: Haytham Samad [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, February 03, 2003 5:47 PM
 To: Tomcat Users List
 Subject: RE: web.xml question
 
 
 Hi,
 
 I think you need to change your url to the following:
 
 http://localhost:8080/test/servlets/SessioinTest
 
 or change servlets to servlet, not sure which at this point.  
 This is basically how you call a servlet that is not mapped 
 to a specific url pattern in your web.xml config file.  I am 
 assuming test is your context name!?

Note that in Tomcat 4.1.12 and later, this won't work either on an
out-of-the-box install.  You should define an explicit servlet-mapping
in your web.xml.

-- 
Tim Moore / Blackboard Inc. / Software Engineer
1899 L Street, NW / 5th Floor / Washington, DC 20036
Phone 202-463-4860 ext. 258 / Fax 202-463-4863

 
 ...
 
 -Original Message-
 From: Pooleery, Manoj [mailto:[EMAIL PROTECTED]]
 Sent: Monday, February 03, 2003 4:31 PM
 To: 'Tomcat Users List'
 Subject: RE: web.xml question
 
 
 Maybe I am doing this incorrectly - but I have a servlet 
 class in my WEB-INF/classes 
 directory(SessionTestServlet.class) and in my web.xml, I have 
 an entry like this servlet
   servlet-nameSessionTest/servlet-name
   servlet-classSessionTestServlet/servlet-class
 /servlet
 
 When I type http://localhost:8080/test/SessioinTest, it gives 
 me an error saying requested resource not found.  What could 
 I be doing wrong?
 
 Thanks
 -Manoj.
 
 
 
 -Original Message-
 From: Paul Hsu [mailto:[EMAIL PROTECTED]]
 Sent: Monday, February 03, 2003 5:24 PM
 To: Tomcat Users List
 Subject: Re: web.xml question
 
 
 Not really, if you have a servlet is used for startup a 
 background process, then you do not need a mapping section.
 
 - Original Message -
 From: Pooleery, Manoj [EMAIL PROTECTED]
 To: 'Tomcat Users List' [EMAIL PROTECTED]
 Sent: Monday, February 03, 2003 2:22 PM
 Subject: web.xml question
 
 
  Is it necessary that for each of the servlet elements in the 
  web.xml, a corresponding servlet-mapping element should be there? 
  (For a context other than root).
 
  Thanks
  -Manoj.
 
 
 
 -
 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]




RE: web.xml question

2003-02-03 Thread Pooleery, Manoj
Is there some documentation regarding this?  I remember this used to work
earlier.  is this the case only with tomcat or with all app servers?  

I tried out different options like putting /servlets or /servlet before the
servlet class, but the only time it worked was when I specified the servlet
class in the web.xml AND a servlet-mapping entry as well.  My question is,
is this a standard being followed universally?

Thanks
-Manoj.

-Original Message-
From: Tim Moore [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 03, 2003 5:50 PM
To: Tomcat Users List
Subject: RE: web.xml question


 -Original Message-
 From: Haytham Samad [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, February 03, 2003 5:47 PM
 To: Tomcat Users List
 Subject: RE: web.xml question
 
 
 Hi,
 
 I think you need to change your url to the following:
 
 http://localhost:8080/test/servlets/SessioinTest
 
 or change servlets to servlet, not sure which at this point.  
 This is basically how you call a servlet that is not mapped 
 to a specific url pattern in your web.xml config file.  I am 
 assuming test is your context name!?

Note that in Tomcat 4.1.12 and later, this won't work either on an
out-of-the-box install.  You should define an explicit servlet-mapping
in your web.xml.

-- 
Tim Moore / Blackboard Inc. / Software Engineer
1899 L Street, NW / 5th Floor / Washington, DC 20036
Phone 202-463-4860 ext. 258 / Fax 202-463-4863

 
 ...
 
 -Original Message-
 From: Pooleery, Manoj [mailto:[EMAIL PROTECTED]]
 Sent: Monday, February 03, 2003 4:31 PM
 To: 'Tomcat Users List'
 Subject: RE: web.xml question
 
 
 Maybe I am doing this incorrectly - but I have a servlet 
 class in my WEB-INF/classes 
 directory(SessionTestServlet.class) and in my web.xml, I have 
 an entry like this servlet
   servlet-nameSessionTest/servlet-name
   servlet-classSessionTestServlet/servlet-class
 /servlet
 
 When I type http://localhost:8080/test/SessioinTest, it gives 
 me an error saying requested resource not found.  What could 
 I be doing wrong?
 
 Thanks
 -Manoj.
 
 
 
 -Original Message-
 From: Paul Hsu [mailto:[EMAIL PROTECTED]]
 Sent: Monday, February 03, 2003 5:24 PM
 To: Tomcat Users List
 Subject: Re: web.xml question
 
 
 Not really, if you have a servlet is used for startup a 
 background process, then you do not need a mapping section.
 
 - Original Message -
 From: Pooleery, Manoj [EMAIL PROTECTED]
 To: 'Tomcat Users List' [EMAIL PROTECTED]
 Sent: Monday, February 03, 2003 2:22 PM
 Subject: web.xml question
 
 
  Is it necessary that for each of the servlet elements in the 
  web.xml, a corresponding servlet-mapping element should be there? 
  (For a context other than root).
 
  Thanks
  -Manoj.
 
 
 
 -
 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]



RE: web.xml question

2003-02-03 Thread Larry Meadors
A typo?

http://localhost:8080/test/SessionTest

instead of 

http://localhost:8080/test/SessioinTest

Larry

 [EMAIL PROTECTED] 02/03/03 15:32 PM 
Maybe I am doing this incorrectly - but I have a servlet class in my
WEB-INF/classes directory(SessionTestServlet.class) and in my web.xml, I
have an entry like this
servlet
  servlet-nameSessionTest/servlet-name
  servlet-classSessionTestServlet/servlet-class
/servlet

When I type http://localhost:8080/test/SessioinTest, it gives me an
error
saying requested resource not found.  What could I be doing wrong?

Thanks
-Manoj.



-Original Message-
From: Paul Hsu [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 03, 2003 5:24 PM
To: Tomcat Users List
Subject: Re: web.xml question


Not really, if you have a servlet is used for startup a background
process,
then you do not need a mapping section.

- Original Message -
From: Pooleery, Manoj [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Monday, February 03, 2003 2:22 PM
Subject: web.xml question


 Is it necessary that for each of the servlet elements in the
web.xml, a
 corresponding servlet-mapping element should be there? (For a
context
 other than root).

 Thanks
 -Manoj.



-
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: web.xml question

2003-02-03 Thread Pooleery, Manoj
Sorry that I mistyped the URL.  It is not because of a typo.

-Original Message-
From: Larry Meadors [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 03, 2003 5:36 PM
To: [EMAIL PROTECTED]
Subject: RE: web.xml question


A typo?

http://localhost:8080/test/SessionTest

instead of 

http://localhost:8080/test/SessioinTest

Larry

 [EMAIL PROTECTED] 02/03/03 15:32 PM 
Maybe I am doing this incorrectly - but I have a servlet class in my
WEB-INF/classes directory(SessionTestServlet.class) and in my web.xml, I
have an entry like this
servlet
  servlet-nameSessionTest/servlet-name
  servlet-classSessionTestServlet/servlet-class
/servlet

When I type http://localhost:8080/test/SessioinTest, it gives me an
error
saying requested resource not found.  What could I be doing wrong?

Thanks
-Manoj.



-Original Message-
From: Paul Hsu [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 03, 2003 5:24 PM
To: Tomcat Users List
Subject: Re: web.xml question


Not really, if you have a servlet is used for startup a background
process,
then you do not need a mapping section.

- Original Message -
From: Pooleery, Manoj [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Monday, February 03, 2003 2:22 PM
Subject: web.xml question


 Is it necessary that for each of the servlet elements in the
web.xml, a
 corresponding servlet-mapping element should be there? (For a
context
 other than root).

 Thanks
 -Manoj.



-
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: web.xml question

2003-02-03 Thread Haytham Samad
Tim,

Thanks for the clarification there.  I have not used this in a while since I
typically map my servlets to a url.

Haytham

-Original Message-
From: Haytham Samad [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 03, 2003 4:47 PM
To: Tomcat Users List
Subject: RE: web.xml question


Hi,

I think you need to change your url to the following:

http://localhost:8080/test/servlets/SessioinTest

or change servlets to servlet, not sure which at this point.  This is
basically how you call a servlet that is not mapped to a specific url
pattern in your web.xml config file.  I am assuming test is your context
name!?

...

-Original Message-
From: Pooleery, Manoj [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 03, 2003 4:31 PM
To: 'Tomcat Users List'
Subject: RE: web.xml question


Maybe I am doing this incorrectly - but I have a servlet class in my
WEB-INF/classes directory(SessionTestServlet.class) and in my web.xml, I
have an entry like this
servlet
  servlet-nameSessionTest/servlet-name
  servlet-classSessionTestServlet/servlet-class
/servlet

When I type http://localhost:8080/test/SessioinTest, it gives me an error
saying requested resource not found.  What could I be doing wrong?

Thanks
-Manoj.



-Original Message-
From: Paul Hsu [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 03, 2003 5:24 PM
To: Tomcat Users List
Subject: Re: web.xml question


Not really, if you have a servlet is used for startup a background process,
then you do not need a mapping section.

- Original Message -
From: Pooleery, Manoj [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Monday, February 03, 2003 2:22 PM
Subject: web.xml question


 Is it necessary that for each of the servlet elements in the web.xml, a
 corresponding servlet-mapping element should be there? (For a context
 other than root).

 Thanks
 -Manoj.



-
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]




Re: web.xml question

2003-02-03 Thread Erik Price
This does not apply (by default) in Tomcat 4.1 or later.




Haytham Samad wrote:

Hi,

I think you need to change your url to the following:

http://localhost:8080/test/servlets/SessioinTest

or change servlets to servlet, not sure which at this point.  This is
basically how you call a servlet that is not mapped to a specific url
pattern in your web.xml config file.  I am assuming test is your context
name!?

...

-Original Message-
From: Pooleery, Manoj [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 03, 2003 4:31 PM
To: 'Tomcat Users List'
Subject: RE: web.xml question


Maybe I am doing this incorrectly - but I have a servlet class in my
WEB-INF/classes directory(SessionTestServlet.class) and in my web.xml, I
have an entry like this
servlet
  servlet-nameSessionTest/servlet-name
  servlet-classSessionTestServlet/servlet-class
/servlet

When I type http://localhost:8080/test/SessioinTest, it gives me an error
saying requested resource not found.  What could I be doing wrong?

Thanks
-Manoj.



-Original Message-
From: Paul Hsu [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 03, 2003 5:24 PM
To: Tomcat Users List
Subject: Re: web.xml question


Not really, if you have a servlet is used for startup a background process,
then you do not need a mapping section.

- Original Message -
From: Pooleery, Manoj [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Monday, February 03, 2003 2:22 PM
Subject: web.xml question




Is it necessary that for each of the servlet elements in the web.xml, a
corresponding servlet-mapping element should be there? (For a context
other than root).

Thanks
-Manoj.





-
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]




RE: web.xml question

2003-02-03 Thread Tim Moore
 -Original Message-
 From: Pooleery, Manoj [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, February 03, 2003 5:54 PM
 To: 'Tomcat Users List'
 Subject: RE: web.xml question
 
 
 Is there some documentation regarding this?

The Tomcat 4.1.12 release notes.

  I remember this 
 used to work earlier.

Right.  The invoker servlet was disabled due to inherent security risks.

  is this the case only with tomcat or 
 with all app servers?  

Well, it never worked across all app servers in the first place.  The
invoker servlet is common in many app servers, but it was never part of
the spec.

 
 I tried out different options like putting /servlets or 
 /servlet before the servlet class, but the only time it 
 worked was when I specified the servlet class in the web.xml 
 AND a servlet-mapping entry as well.  My question is, is 
 this a standard being followed universally?

The /servlet thing was never any kind of magic special case, it was just
mapped to a servlet called InvokerServlet that invokes other servlets by
name.  Frequently, however, this poses security risks that might not be
known to server administrators or application developers, so in Tomcat
4.1.12 and later, the mapping to the InvokerServlet is commented out by
default.  It is generally true that for a URL to be served by a servlet
container, it needs to refer either to a resource in the webapp, or a
mapping defined for a servlet or filter.

-- 
Tim Moore / Blackboard Inc. / Software Engineer
1899 L Street, NW / 5th Floor / Washington, DC 20036
Phone 202-463-4860 ext. 258 / Fax 202-463-4863

 
 Thanks
 -Manoj.
 
 -Original Message-
 From: Tim Moore [mailto:[EMAIL PROTECTED]]
 Sent: Monday, February 03, 2003 5:50 PM
 To: Tomcat Users List
 Subject: RE: web.xml question
 
 
  -Original Message-
  From: Haytham Samad [mailto:[EMAIL PROTECTED]]
  Sent: Monday, February 03, 2003 5:47 PM
  To: Tomcat Users List
  Subject: RE: web.xml question
  
  
  Hi,
  
  I think you need to change your url to the following:
  
  http://localhost:8080/test/servlets/SessioinTest
  
  or change servlets to servlet, not sure which at this point.
  This is basically how you call a servlet that is not mapped 
  to a specific url pattern in your web.xml config file.  I am 
  assuming test is your context name!?
 
 Note that in Tomcat 4.1.12 and later, this won't work either 
 on an out-of-the-box install.  You should define an explicit 
 servlet-mapping in your web.xml.
 
 -- 
 Tim Moore / Blackboard Inc. / Software Engineer
 1899 L Street, NW / 5th Floor / Washington, DC 20036
 Phone 202-463-4860 ext. 258 / Fax 202-463-4863
 
  
  ...
  
  -Original Message-
  From: Pooleery, Manoj [mailto:[EMAIL PROTECTED]]
  Sent: Monday, February 03, 2003 4:31 PM
  To: 'Tomcat Users List'
  Subject: RE: web.xml question
  
  
  Maybe I am doing this incorrectly - but I have a servlet
  class in my WEB-INF/classes 
  directory(SessionTestServlet.class) and in my web.xml, I have 
  an entry like this servlet
servlet-nameSessionTest/servlet-name
servlet-classSessionTestServlet/servlet-class
  /servlet
  
  When I type http://localhost:8080/test/SessioinTest, it gives
  me an error saying requested resource not found.  What could 
  I be doing wrong?
  
  Thanks
  -Manoj.
  
  
  
  -Original Message-
  From: Paul Hsu [mailto:[EMAIL PROTECTED]]
  Sent: Monday, February 03, 2003 5:24 PM
  To: Tomcat Users List
  Subject: Re: web.xml question
  
  
  Not really, if you have a servlet is used for startup a
  background process, then you do not need a mapping section.
  
  - Original Message -
  From: Pooleery, Manoj [EMAIL PROTECTED]
  To: 'Tomcat Users List' [EMAIL PROTECTED]
  Sent: Monday, February 03, 2003 2:22 PM
  Subject: web.xml question
  
  
   Is it necessary that for each of the servlet elements in the
   web.xml, a corresponding servlet-mapping element should 
 be there? 
   (For a context other than root).
  
   Thanks
   -Manoj.
  
  
  
  
 -
  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]
 

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




RE: web.xml question

2003-02-03 Thread Micael
Read recent posts on this.

At 05:49 PM 2/3/03 -0500, you wrote:

 -Original Message-
 From: Haytham Samad [mailto:[EMAIL PROTECTED]]
 Sent: Monday, February 03, 2003 5:47 PM
 To: Tomcat Users List
 Subject: RE: web.xml question


 Hi,

 I think you need to change your url to the following:

 http://localhost:8080/test/servlets/SessioinTest

 or change servlets to servlet, not sure which at this point.
 This is basically how you call a servlet that is not mapped
 to a specific url pattern in your web.xml config file.  I am
 assuming test is your context name!?

Note that in Tomcat 4.1.12 and later, this won't work either on an
out-of-the-box install.  You should define an explicit servlet-mapping
in your web.xml.

--
Tim Moore / Blackboard Inc. / Software Engineer
1899 L Street, NW / 5th Floor / Washington, DC 20036
Phone 202-463-4860 ext. 258 / Fax 202-463-4863


 ...

 -Original Message-
 From: Pooleery, Manoj [mailto:[EMAIL PROTECTED]]
 Sent: Monday, February 03, 2003 4:31 PM
 To: 'Tomcat Users List'
 Subject: RE: web.xml question


 Maybe I am doing this incorrectly - but I have a servlet
 class in my WEB-INF/classes
 directory(SessionTestServlet.class) and in my web.xml, I have
 an entry like this servlet
   servlet-nameSessionTest/servlet-name
   servlet-classSessionTestServlet/servlet-class
 /servlet

 When I type http://localhost:8080/test/SessioinTest, it gives
 me an error saying requested resource not found.  What could
 I be doing wrong?

 Thanks
 -Manoj.



 -Original Message-
 From: Paul Hsu [mailto:[EMAIL PROTECTED]]
 Sent: Monday, February 03, 2003 5:24 PM
 To: Tomcat Users List
 Subject: Re: web.xml question


 Not really, if you have a servlet is used for startup a
 background process, then you do not need a mapping section.

 - Original Message -
 From: Pooleery, Manoj [EMAIL PROTECTED]
 To: 'Tomcat Users List' [EMAIL PROTECTED]
 Sent: Monday, February 03, 2003 2:22 PM
 Subject: web.xml question


  Is it necessary that for each of the servlet elements in the
  web.xml, a corresponding servlet-mapping element should be there?
  (For a context other than root).
 
  Thanks
  -Manoj.
 


 -
 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]




LEGAL NOTICE

This electronic mail  transmission and any accompanying documents contain 
information belonging to the sender which may be confidential and legally 
privileged.  This information is intended only for the use of the 
individual or entity to whom this electronic mail transmission was sent as 
indicated above. If you are not the intended recipient, any disclosure, 
copying, distribution, or action taken in reliance on the contents of the 
information contained in this transmission is strictly prohibited.  If you 
have received this transmission in error, please delete the message.  Thank 
you  



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



Re: web.xml question

2003-02-03 Thread Erik Price


Pooleery, Manoj wrote:

Is there some documentation regarding this?  I remember this used to work
earlier.  is this the case only with tomcat or with all app servers?  

I tried out different options like putting /servlets or /servlet before the
servlet class, but the only time it worked was when I specified the servlet
class in the web.xml AND a servlet-mapping entry as well.  My question is,
is this a standard being followed universally?

This raises a good point -- considering that probably 99% of tutorials 
and books teach Hello World using the invoker servlet, I'm surprised 
there isn't a strong warning that this functionality has been disabled 
on the front page of the Tomcat pages.

Then again, a big warning about the introduction of superglobals and 
deprecation of register_globals on the PHP site didn't do anything to 
stop the tide of confusion, so maybe it'd be for naught.


Erik


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



Re: web.xml question

2003-02-03 Thread Craig R. McClanahan


On Mon, 3 Feb 2003, Pooleery, Manoj wrote:

 Date: Mon, 3 Feb 2003 17:22:16 -0500
 From: Pooleery, Manoj [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: 'Tomcat Users List' [EMAIL PROTECTED]
 Subject: web.xml question

 Is it necessary that for each of the servlet elements in the web.xml, a
 corresponding servlet-mapping element should be there? (For a context
 other than root).

If you want your servlet to be accessible from a client request, you need
to provide at least one mapping for it.  It's perfectly legal to have more
than one mapping, if that suits your needs -- but a servlet definition
that does not have at least one servlet-mapping is not going to be of
much use to you.


 Thanks
 -Manoj.


Craig


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




Re: web.xml question

2003-02-03 Thread Craig R. McClanahan


On Mon, 3 Feb 2003, Erik Price wrote:

 Date: Mon, 03 Feb 2003 18:00:35 -0500
 From: Erik Price [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Subject: Re: web.xml question



 Pooleery, Manoj wrote:
  Is there some documentation regarding this?  I remember this used to work
  earlier.  is this the case only with tomcat or with all app servers?
 
  I tried out different options like putting /servlets or /servlet before the
  servlet class, but the only time it worked was when I specified the servlet
  class in the web.xml AND a servlet-mapping entry as well.  My question is,
  is this a standard being followed universally?

 This raises a good point -- considering that probably 99% of tutorials
 and books teach Hello World using the invoker servlet, I'm surprised
 there isn't a strong warning that this functionality has been disabled
 on the front page of the Tomcat pages.

 Then again, a big warning about the introduction of superglobals and
 deprecation of register_globals on the PHP site didn't do anything to
 stop the tide of confusion, so maybe it'd be for naught.


If people don't read the release notes, they aren't going to read warnings
anywhere else either :-).


 Erik

Craig


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




RE: web.xml question

2003-02-03 Thread Tam, Michael
It is since 4.1.12.  Just read the release-note for changes under [4.1.12].

Regards,
Michael

-Original Message-
From: Pooleery, Manoj [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 03, 2003 2:54 PM
To: 'Tomcat Users List'
Subject: RE: web.xml question


Is there some documentation regarding this?  I remember this used to work
earlier.  is this the case only with tomcat or with all app servers?  

I tried out different options like putting /servlets or /servlet before the
servlet class, but the only time it worked was when I specified the servlet
class in the web.xml AND a servlet-mapping entry as well.  My question is,
is this a standard being followed universally?

Thanks
-Manoj.

-Original Message-
From: Tim Moore [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 03, 2003 5:50 PM
To: Tomcat Users List
Subject: RE: web.xml question


 -Original Message-
 From: Haytham Samad [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, February 03, 2003 5:47 PM
 To: Tomcat Users List
 Subject: RE: web.xml question
 
 
 Hi,
 
 I think you need to change your url to the following:
 
 http://localhost:8080/test/servlets/SessioinTest
 
 or change servlets to servlet, not sure which at this point.  
 This is basically how you call a servlet that is not mapped 
 to a specific url pattern in your web.xml config file.  I am 
 assuming test is your context name!?

Note that in Tomcat 4.1.12 and later, this won't work either on an
out-of-the-box install.  You should define an explicit servlet-mapping
in your web.xml.

-- 
Tim Moore / Blackboard Inc. / Software Engineer
1899 L Street, NW / 5th Floor / Washington, DC 20036
Phone 202-463-4860 ext. 258 / Fax 202-463-4863

 
 ...
 
 -Original Message-
 From: Pooleery, Manoj [mailto:[EMAIL PROTECTED]]
 Sent: Monday, February 03, 2003 4:31 PM
 To: 'Tomcat Users List'
 Subject: RE: web.xml question
 
 
 Maybe I am doing this incorrectly - but I have a servlet 
 class in my WEB-INF/classes 
 directory(SessionTestServlet.class) and in my web.xml, I have 
 an entry like this servlet
   servlet-nameSessionTest/servlet-name
   servlet-classSessionTestServlet/servlet-class
 /servlet
 
 When I type http://localhost:8080/test/SessioinTest, it gives 
 me an error saying requested resource not found.  What could 
 I be doing wrong?
 
 Thanks
 -Manoj.
 
 
 
 -Original Message-
 From: Paul Hsu [mailto:[EMAIL PROTECTED]]
 Sent: Monday, February 03, 2003 5:24 PM
 To: Tomcat Users List
 Subject: Re: web.xml question
 
 
 Not really, if you have a servlet is used for startup a 
 background process, then you do not need a mapping section.
 
 - Original Message -
 From: Pooleery, Manoj [EMAIL PROTECTED]
 To: 'Tomcat Users List' [EMAIL PROTECTED]
 Sent: Monday, February 03, 2003 2:22 PM
 Subject: web.xml question
 
 
  Is it necessary that for each of the servlet elements in the 
  web.xml, a corresponding servlet-mapping element should be there? 
  (For a context other than root).
 
  Thanks
  -Manoj.
 
 
 
 -
 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]

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




web.xml question

2002-08-22 Thread Dinesh Khetarpal

!DOCTYPE web-app
PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN
  http://java.sun.com/dtd/web-app_2_2.dtd
http://java.sun.com/dtd/web-app_2_2.dtd;
we put in the web.xml file and ship the application assuming everybody
has internet connection, what is the preferred way when customers don't
have internet connection.
 
Dinesh



web.xml question

2002-08-22 Thread Dinesh Khetarpal

!DOCTYPE web-app

PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN

 http://java.sun.com/dtd/web-app_2_2.dtd

http://java.sun.com/dtd/web-app_2_2.dtd;

we put above lines in the web.xml file and ship the application assuming
everybody

has internet connection, what is the preferred way when customers don't

have internet connection.

Dinesh




Re: web.xml question

2002-08-22 Thread Jean-Francois Arcand

Which version are you using? If you are using 4.x, Tomcat will redirect 
the remote DOCTYPE to a local version.  The remote version is never used.

-- Jeanfrancois

Dinesh Khetarpal wrote:

!DOCTYPE web-app

PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN

 http://java.sun.com/dtd/web-app_2_2.dtd

http://java.sun.com/dtd/web-app_2_2.dtd;

we put above lines in the web.xml file and ship the application assuming
everybody

has internet connection, what is the preferred way when customers don't

have internet connection.

Dinesh


  




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




Re: web.xml question

2002-08-22 Thread rsequeira


Tomcat is programmed to look for the dtd in the
$CATALINA_HOME/common/lib/servlet.jar. This is how you can run Tomcat
offline w/o facing any problems :-)

Rosh


   

  Dinesh  

  Khetarpal   To:   
[EMAIL PROTECTED]  
  dkhetarpal@karorcc: 

  a.caSubject:  web.xml question  

   

  08/22/02 09:39 AM

  Please respond to

  Tomcat Users

  List

   

   





!DOCTYPE web-app
PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN
  http://java.sun.com/dtd/web-app_2_2.dtd
http://java.sun.com/dtd/web-app_2_2.dtd;
we put in the web.xml file and ship the application assuming everybody
has internet connection, what is the preferred way when customers don't
have internet connection.

Dinesh






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




Re: web.xml Question

2002-01-22 Thread yilmaz

i think in the same way...
there should be a necessary reason to do so, that we are missing, otherwise
it seems illogical

- Original Message -
From: Nikola Milutinovic [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, January 22, 2002 3:56 PM
Subject: Re: web.xml Question


  Usually the web.xml file of a web application starts with the following:
 
  !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application
  2.3//EN
   http://java.sun.com/dtd/web-app_2_3.dtd;
 
  This URL referst to the dtd file on SUN's server. I think most XML
parsers
  like SAX need to read the dtd file to be able to parse the XML file.

 That would be a big problem. I'm no expert on the mnatter, but since
web-app DTD is something no Servlet container can work without, couldn't the
the container provide it to the parser? That URL is just an identifier,
saying yes, I'm build upon Sun's public DTD for web.xml. So, the container
could tell the parser look, here is that DTD, don't go fetching it.

 Maybe it's naive of me, but that's how I would do it. I've been using
Tomcat for some time now and it never complained on web.xml. I'm behind a
firewall and Tomcat is not even aware of that.

 Nix.




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: web.xml Question

2002-01-22 Thread Tom Bednarz

OK, I just wanted to know how this works. My development environment is not 
the same as an environment in a large company which usually has a lot of 
restrictions regarding accessing the internet.

I have made a simple test and unplugged the network cable of my 
workstation. TOMCAT still started without a problem. So it seems that the 
DTD's are somehow embedded in the source code.

Thanks for your information.

Thomas

At 22.01.2002 16:44, you wrote:
i think in the same way...
there should be a necessary reason to do so, that we are missing, otherwise
it seems illogical

- Original Message -
From: Nikola Milutinovic [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, January 22, 2002 3:56 PM
Subject: Re: web.xml Question


   Usually the web.xml file of a web application starts with the following:
  
   !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application
   2.3//EN
http://java.sun.com/dtd/web-app_2_3.dtd;
  
   This URL referst to the dtd file on SUN's server. I think most XML
parsers
   like SAX need to read the dtd file to be able to parse the XML file.
 
  That would be a big problem. I'm no expert on the mnatter, but since
web-app DTD is something no Servlet container can work without, couldn't the
the container provide it to the parser? That URL is just an identifier,
saying yes, I'm build upon Sun's public DTD for web.xml. So, the container
could tell the parser look, here is that DTD, don't go fetching it.
 
  Maybe it's naive of me, but that's how I would do it. I've been using
Tomcat for some time now and it never complained on web.xml. I'm behind a
firewall and Tomcat is not even aware of that.
 
  Nix.
 



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: web.xml Question

2002-01-22 Thread John Wadkin

I'm no expert on XML, but I do write documents in XML which are then
parsed/interpreted by a servlet (which I didn't write).

As far as I know, any XML document will parse without a DTD. A DTD just
provides the syntax - e.g. tag names, tag attributes, tag structures (list
of tags that a tag can contain). Without a DTD, the document is just checked
for well-formedness - e.g. that all start tags have an end tag. It should
be possible to store the web.xml DTD locally and modify the identifier to
point to it. Don't ask me what the syntax of the identifier is - all I know
is that it's different for DTDs that are local! Look in a good XML book
(e.g. New Riders, Inside XML).

I guess that having the DTD locally would also help when creating server.xml
and web.xml files: you'd be able to use an XML editor with the DTD and
therefore guarantee that all your service, engine, etc. tags where in
the right order, with the right attributes.

Thanks,
 
John
 
Quote for the week:
 
The men with the muck-rakes are often indispensable to the well-being of
society; but only if they know when to stop raking the muck.
 
Theodore Roosevelt, Speech in New York, 11 Nov. 1902
 


-Original Message-
From: Tom Bednarz [mailto:[EMAIL PROTECTED]]
Sent: 22 January 2002 07:49
To: [EMAIL PROTECTED]
Subject: web.xml Question


Hi everybody,

Usually the web.xml file of a web application starts with the following:

!DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 
2.3//EN
 http://java.sun.com/dtd/web-app_2_3.dtd;

This URL referst to the dtd file on SUN's server. I think most XML parsers 
like SAX need to read the dtd file to be able to parse the XML file.

Questions:

What happens if I deploy an application on an Intranet which allows access 
to the internet only through a proxy server (with username / password 
authentication)? The dtd cannot be accessed and must be someware on the 
local disk.

I found that TOMCAT has a web.xml in its conf directory. Could anybody 
explain me, which XML files I need to change and where do I need to put the 
downloaded web-app_2_3.dtd file?  Is the web.xml in the conf directory like 
a parent to all web.xml files found under webapps\application\WEB-INF? 
(Something like the defaults for all web apps)?

Could anybody help me out of this XML jungle?

Many thanks!

Thomas


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: web.xml Question

2002-01-22 Thread jeff . guttadauro


It's included in $CATALINA_HOME/common/lib/servlet.jar.



   

Tom Bednarz

list@bednarzTo: [EMAIL PROTECTED]

.ch cc:   

 Subject: web.xml Question 

01/22/02   

01:48 AM   

Please 

respond to 

Tomcat Users  

List  

   

   





Hi everybody,

Usually the web.xml file of a web application starts with the following:

!DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application
2.3//EN
 http://java.sun.com/dtd/web-app_2_3.dtd;

This URL referst to the dtd file on SUN's server. I think most XML parsers
like SAX need to read the dtd file to be able to parse the XML file.

Questions:

What happens if I deploy an application on an Intranet which allows access
to the internet only through a proxy server (with username / password
authentication)? The dtd cannot be accessed and must be someware on the
local disk.

I found that TOMCAT has a web.xml in its conf directory. Could anybody
explain me, which XML files I need to change and where do I need to put the
downloaded web-app_2_3.dtd file?  Is the web.xml in the conf directory like
a parent to all web.xml files found under webapps\application\WEB-INF?
(Something like the defaults for all web apps)?

Could anybody help me out of this XML jungle?

Many thanks!

Thomas


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]






--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: web.xml Question

2002-01-22 Thread Craig R. McClanahan



On Tue, 22 Jan 2002, Tom Bednarz wrote:

 Date: Tue, 22 Jan 2002 08:48:40 +0100
 From: Tom Bednarz [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: web.xml Question

 Hi everybody,

 Usually the web.xml file of a web application starts with the following:

 !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application
 2.3//EN
  http://java.sun.com/dtd/web-app_2_3.dtd;

 This URL referst to the dtd file on SUN's server. I think most XML parsers
 like SAX need to read the dtd file to be able to parse the XML file.

 Questions:

 What happens if I deploy an application on an Intranet which allows access
 to the internet only through a proxy server (with username / password
 authentication)? The dtd cannot be accessed and must be someware on the
 local disk.


It's actually inside the servlet.jar file.  Tomcat registers a local copy
of the DTDs it uses, so as long as you spell the public identifier
correctly the internal copy will be used.

I use this mode of operation all the time, to run Tomcat on a disconnected
laptop.  The only other reason it might not work is if you are using an
XML parser that does not properly implement the SAX EntityResolver APIs.

 I found that TOMCAT has a web.xml in its conf directory. Could anybody
 explain me, which XML files I need to change and where do I need to put the
 downloaded web-app_2_3.dtd file?  Is the web.xml in the conf directory like
 a parent to all web.xml files found under webapps\application\WEB-INF?
 (Something like the defaults for all web apps)?

 Could anybody help me out of this XML jungle?

 Many thanks!

 Thomas


Craig


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




web.xml Question

2002-01-21 Thread Tom Bednarz

Hi everybody,

Usually the web.xml file of a web application starts with the following:

!DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 
2.3//EN
 http://java.sun.com/dtd/web-app_2_3.dtd;

This URL referst to the dtd file on SUN's server. I think most XML parsers 
like SAX need to read the dtd file to be able to parse the XML file.

Questions:

What happens if I deploy an application on an Intranet which allows access 
to the internet only through a proxy server (with username / password 
authentication)? The dtd cannot be accessed and must be someware on the 
local disk.

I found that TOMCAT has a web.xml in its conf directory. Could anybody 
explain me, which XML files I need to change and where do I need to put the 
downloaded web-app_2_3.dtd file?  Is the web.xml in the conf directory like 
a parent to all web.xml files found under webapps\application\WEB-INF? 
(Something like the defaults for all web apps)?

Could anybody help me out of this XML jungle?

Many thanks!

Thomas


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: web.xml Question

2002-01-21 Thread Nikola Milutinovic

 Usually the web.xml file of a web application starts with the following:
 
 !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 
 2.3//EN
  http://java.sun.com/dtd/web-app_2_3.dtd;
 
 This URL referst to the dtd file on SUN's server. I think most XML parsers 
 like SAX need to read the dtd file to be able to parse the XML file.

That would be a big problem. I'm no expert on the mnatter, but since web-app DTD is 
something no Servlet container can work without, couldn't the the container provide it 
to the parser? That URL is just an identifier, saying yes, I'm build upon Sun's 
public DTD for web.xml. So, the container could tell the parser look, here is that 
DTD, don't go fetching it.

Maybe it's naive of me, but that's how I would do it. I've been using Tomcat for some 
time now and it never complained on web.xml. I'm behind a firewall and Tomcat is not 
even aware of that.

Nix.



Web.xml Question

2001-04-01 Thread Amir Nuri

Hi
I have two tomcat instances , each one of them has it's own server.xml file
and it's context.
My directory structure is webapps   -App1-WEB-INF-web.xml
-App2-WEB-INF-web.xml
Tomcat#1 has App1 context and Tomcat#2 has App2 context (defined in
server1.xml and server2.xml)
On my web.xml files i have load-on-startup directive.
My Problem is that i expexted that each tomcat will activate its own web.xml
file ( in it's WEB-INF directory of the context)

But every tomcat uses both web.xml files 
The indication of the problem is that both tomcat's instances try to load on
startup all the servlets defined in the web.xml files.

Tomcat version 3.2.1
Apache version 1.3.14 (Unix) mod_jk





Re: Web.xml Question

2001-04-01 Thread Ed Gomolka

On Sunday 01 April 2001 11:48, Amir Nuri wrote:
 Hi
 I have two tomcat instances , each one of them has it's own server.xml file
 and it's context.
 My directory structure is webapps -App1-WEB-INF-web.xml
   -App2-WEB-INF-web.xml
 Tomcat#1 has App1 context and Tomcat#2 has App2 context (defined in
 server1.xml and server2.xml)
 On my web.xml files i have load-on-startup directive.
 My Problem is that i expexted that each tomcat will activate its own
 web.xml file ( in it's WEB-INF directory of the context)

 But every tomcat uses both web.xml files 
 The indication of the problem is that both tomcat's instances try to load
 on startup all the servlets defined in the web.xml files.

 Tomcat version 3.2.1
 Apache version 1.3.14 (Unix) mod_jk

If both Tomcat instances use the same webapps directory, each 
Tomcat instance will try to load all of the webapps within the webapps
directory, regardless of whether a particular webapp is identified in the 
server.xml file.
I believe that if you don't want to automatically pick up everything in the 
webapps directory, you will need to uncomment the following line in your
server.xml file:
ContextInterceptor className="org.apache.tomcat.context.AutoSetup" /


-- 

Ed Gomolka
([EMAIL PROTECTED])



Re: Web.xml Question

2001-04-01 Thread Ed Gomolka

Oops. I meant "comment out" in my last post, rather than "uncomment".
Sorry about that.

Ed
On Sunday 01 April 2001 15:38, Ed Gomolka wrote:
 On Sunday 01 April 2001 11:48, Amir Nuri wrote:
  Hi
  I have two tomcat instances , each one of them has it's own server.xml
  file and it's context.
  My directory structure is webapps   -App1-WEB-INF-web.xml
  -App2-WEB-INF-web.xml
  Tomcat#1 has App1 context and Tomcat#2 has App2 context (defined in
  server1.xml and server2.xml)
  On my web.xml files i have load-on-startup directive.
  My Problem is that i expexted that each tomcat will activate its own
  web.xml file ( in it's WEB-INF directory of the context)
 
  But every tomcat uses both web.xml files 
  The indication of the problem is that both tomcat's instances try to load
  on startup all the servlets defined in the web.xml files.
 
  Tomcat version 3.2.1
  Apache version 1.3.14 (Unix) mod_jk

 If both Tomcat instances use the same webapps directory, each
 Tomcat instance will try to load all of the webapps within the webapps
 directory, regardless of whether a particular webapp is identified in the
 server.xml file.
 I believe that if you don't want to automatically pick up everything in the
 webapps directory, you will need to uncomment the following line in your
 server.xml file:
 ContextInterceptor className="org.apache.tomcat.context.AutoSetup" /

-- 

Ed Gomolka
([EMAIL PROTECTED])



Re: web.xml question

2000-12-06 Thread Catherine Jung

On Wed, 6 Dec 2000, Kedar Choudary wrote:

 Regarding the second question, unfortunately, there seems to be no way to
 specify a servelt, in place of a "welcome-file". So, I guess, easiest way to
 setup your servlet as welcome-file, will be to have a index.jsp in your
 context's root directory which simply forwards the request to your servlet,
 using jsp:forward.

Can't you use a servlet as a welcome-file in your welcome-file-list
tag in web.xml then? I've never done it myself, but I've also not read
anything that says you can't.

Catherine

 
 Kedar Choudhary.
 
 - Original Message -
 From: Vanja Vlaski [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, December 05, 2000 3:58 PM
 Subject: web.xml question
 
 
  Since I am new to the tomcat I have one probably stupid question.Do I have
  to register all the servlets I use in web.xml or just the first servlet
 that
  is called?
 
  Also how can I call the servlet at the beging instead of index.html?
 
  Thanks
 
 
 _
  Get more from the Web.  FREE MSN Explorer download :
 http://explorer.msn.com
 
 
 
 




web.xml question

2000-12-05 Thread Vanja Vlaski

Since I am new to the tomcat I have one probably stupid question.Do I have 
to register all the servlets I use in web.xml or just the first servlet that 
is called?

Also how can I call the servlet at the beging instead of index.html?

Thanks
_
Get more from the Web.  FREE MSN Explorer download : http://explorer.msn.com




web.xml question

2000-12-05 Thread Vanja Vlaski

In web.xml do I have to register all the servlets I will use or only first 
one that is being invoked?
Also how do I call servlet first instead of index.html?


Thanks

From: "G.Nagarajan" [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: RE: tools for Stress Testing
Date: Tue, 5 Dec 2000 11:29:55 +0100

tools for Stress TestingHi,
Try OpenSta.org, MS web stress tool, www.rswsoftware.com.

These should help. I am using OpenSta for testing my jsps and servlets and
it takes care of handling
cookies.

Cheers,
Nagaraj.
   -Original Message-
   From: Chris Chen [mailto:[EMAIL PROTECTED]]
   Sent: Monday, December 04, 2000 9:06 PM
   To: '[EMAIL PROTECTED]'
   Subject: tools for Stress Testing


   Hi all,

I am just wondering if there is a way to do a stress testing on my
jsp/servlet
   pages even I am using the session tracking in my application.

   for example, I have:
   1.jsp for user logon checking
   2.jsp for loading data from database
   3.jsp for business data calculation
   4.jsp for modifying data to database

   The application works like:
when user passed 1.jsp, there will be a set of data in their session,
hold by
   Java data Beans, from database. Base on those data, 3.jsp will 
performance
a
   certain business logic, then 4.jsp will write data to database.

I want to build a set of benchmark/stress testing for all those *.jsp
pages.
   How long it will take? How's the response performance? ...

   How could I do this? Is there any this kind of tools?
   By using Tomcat, how can I let tomcat know that I am in the session, and
performance certain data set for me?

   Regards,
Chris


_
Get more from the Web.  FREE MSN Explorer download : http://explorer.msn.com




Re: web.xml question

2000-12-05 Thread Kedar Choudary

Hi,

You dont *have* to register any servlet in web.xml.
Registering servlet in web.xml is only required if you want to access the
servlet by a "nickname".
Typically one creates a nickname for his servlet in web.xml to
1) Hide the actual implementation class name being exposed to the world in
the URL
2) To create short name, espicially to drop that long list of package
prefixes.

But you can verywell access any servlet, that is present in WEB-INF/classes
directory, by URL /yourcontext/servlet/package.prefix.classname.

Regarding the second question, unfortunately, there seems to be no way to
specify a servelt, in place of a "welcome-file". So, I guess, easiest way to
setup your servlet as welcome-file, will be to have a index.jsp in your
context's root directory which simply forwards the request to your servlet,
using jsp:forward.

Kedar Choudhary.

- Original Message -
From: Vanja Vlaski [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, December 05, 2000 3:58 PM
Subject: web.xml question


 Since I am new to the tomcat I have one probably stupid question.Do I have
 to register all the servlets I use in web.xml or just the first servlet
that
 is called?

 Also how can I call the servlet at the beging instead of index.html?

 Thanks


_
 Get more from the Web.  FREE MSN Explorer download :
http://explorer.msn.com