RE: Manual servlet deployment problems on 4.1.18

2003-02-27 Thread Turner, John

There are examples of how to setup servlets in web.xml in the web.xml file
in the /examples webapp that comes with Tomcat.  There's other good stuff in
the examples webapp as well.

John

-Original Message-
From: Steve Hole [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 26, 2003 11:40 PM
To: Tomcat Users List
Subject: RE: Manual servlet deployment problems on 4.1.18


In otherwords, I assumed the servlet-name element linked the servlet 
and servlet-mapping elements.   Is that true?  The documentation for the
servlet-mapping functionality is not exactly great and there is no 
documentation on the default mapping rules at all that I could find.

Anyway, thanks for the help.

Cheers.

---
Steve Hole
Chief Technology Officer - Billing and Payment Systems
ACI Worldwide
mailto:[EMAIL PROTECTED]
Phone: 780-424-4922


-
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: Manual servlet deployment problems on 4.1.18

2003-02-27 Thread Turner, John

Yes, the Invoker servlet is disabled by default.

You need to either:

- enable the Invoker servlet (not recommended)

OR

- explicitly declare your servlet in your web application's web.xml file

John

-Original Message-
From: Ray Tayek [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 26, 2003 9:25 PM
To: Tomcat Users List
Subject: RE: Manual servlet deployment problems on 4.1.18

i can not get 4.1.18-le to run on win98se and i get at a 404 on linux when 
i try to put Hello.class manually in 
.../jakarta-tomcat-4.1.18-LE-jdk14/webapps/ROOT\WEB-INF/classes and using 
localhost:8080/servlet/Hello (without adding to the web.xml)

could the servlet option be turned off by default? (does anyone know 
where to look?)

also, running the sample in 
.../jakarta-tomcat-4.1.18-LE-jdk14/webapps/tomcat-docs/appdev/sample fails 
with 401 when doing the ant install.

if you get 4.1.18 to work, please let me know how you did it.

thanks


---
ray tayek http://tayek.com/ actively seeking mentoring or telecommuting work
vice chair orange county java users group http://www.ocjug.org/ hate spam?
http://samspade.org/ssw/


-
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: Manual servlet deployment problems on 4.1.18

2003-02-27 Thread Steve Hole
On Wed, 26 Feb 2003 22:04:56 -0800 (PST) Steve Guo [EMAIL PROTECTED] 
wrote:

  Steve Hole [EMAIL PROTECTED] wrote:
 This implies that the element defines the name of the 
 web application?
 -- what do you mean? the webapp is defined by the name of the folder (test)

Ah!   Which explains the problem.   I will suggest that there is a problem
somewhere in the JVM dealing with symbolic links to files held on a SAN.  
I'll have to try this on something other than Linux and see if I still see
the problem.   That's why it suddenly worked when I moved it locally and I 
thought it was because I had made a corresponding change in the web.xml 
file.

Thanks for your help Steve.

Cheers.
---
Steve Hole
Chief Technology Officer - Billing and Payment Systems
ACI Worldwide
mailto:[EMAIL PROTECTED]
Phone: 780-424-4922


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



RE: Manual servlet deployment problems on 4.1.18

2003-02-27 Thread Turner, John

Tomcat doesn't follow symbolic links by default.  You have to enable this in
server.xml for each Context where you want to use symbolic links.  I'm not
saying 100% that that was the problem, just that symlink support is not
available out of the box with recent versions of Tomcat.

John


 -Original Message-
 From: Steve Hole [mailto:[EMAIL PROTECTED]
 Sent: Thursday, February 27, 2003 11:06 AM
 To: Tomcat Users List
 Subject: RE: Manual servlet deployment problems on 4.1.18
 
 
 On Wed, 26 Feb 2003 22:04:56 -0800 (PST) Steve Guo 
 [EMAIL PROTECTED] 
 wrote:
 
   Steve Hole [EMAIL PROTECTED] wrote:
  This implies that the element defines the name of the 
  web application?
  -- what do you mean? the webapp is defined by the name 
 of the folder (test)
 
 Ah!   Which explains the problem.   I will suggest that there 
 is a problem
 somewhere in the JVM dealing with symbolic links to files 
 held on a SAN.  
 I'll have to try this on something other than Linux and see 
 if I still see
 the problem.   That's why it suddenly worked when I moved it 
 locally and I 
 thought it was because I had made a corresponding change in 
 the web.xml 
 file.
 
 Thanks for your help Steve.
 
 Cheers.
 ---
 Steve Hole
 Chief Technology Officer - Billing and Payment Systems
 ACI Worldwide
 mailto:[EMAIL PROTECTED]
 Phone: 780-424-4922
 
 
 -
 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: Manual servlet deployment problems on 4.1.18

2003-02-27 Thread Ray Tayek
At 06:02 AM 2/27/03 -0500, you wrote:

Yes, the Invoker servlet is disabled by default.

You need to either:

- enable the Invoker servlet (not recommended)

OR

- explicitly declare your servlet in your web application's web.xml file

John
i enabled it for testing. works like a charm :)

thanks

-Original Message-
From: Ray Tayek [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 26, 2003 9:25 PM
To: Tomcat Users List
Subject: RE: Manual servlet deployment problems on 4.1.18
i can not get 4.1.18-le to run on win98se and i get at a 404 on linux when
i try to put Hello.class manually in
.../jakarta-tomcat-4.1.18-LE-jdk14/webapps/ROOT\WEB-INF/classes and using
localhost:8080/servlet/Hello (without adding to the web.xml)
could the servlet option be turned off by default? (does anyone know
where to look?)
also, running the sample in
.../jakarta-tomcat-4.1.18-LE-jdk14/webapps/tomcat-docs/appdev/sample fails
with 401 when doing the ant install.
if you get 4.1.18 to work, please let me know how you did it
---
ray tayek http://tayek.com/ actively seeking mentoring or telecommuting work
vice chair orange county java users group http://www.ocjug.org/
hate spam? http://samspade.org/ssw/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Manual servlet deployment problems on 4.1.18

2003-02-26 Thread Steve Hole
Yes, I am a newbie.

I am having some difficulty in getting *any* servlets to deploy on a 
Tomcat 4.1.3 installation in my development environment.   It is very 
likely a simple configuration problem, but I have tried about everything I
can think of to resolve it with no luck.

Environment:

 j2sdk1.4.1_01
 jakarta-tomcat-4.1.18
 Redhat Linux 8.0 (kernel 2.4.18)

All of the example, management and admin servlets are working properly in 
the Tomcat instance.

I have tried the simplest possible servlet implementation simple (hello 
world). The class definition was ripped of directly from the shipped 
examples with only a name change in the class itself (to hopefully 
eliminate java class loading problems).

The servlet was deployed as:

  {CATALINA_HOME}/webapps/simple
  {CATALINA_HOME}/webapps/simple/WEB-INF/web.xml
  {CATALINA_HOME}/webapps/simple/WEB-INF/classes/simple.class

The web.xml file contains (less the  delimiters):

?xml version=1.0 encoding=ISO-8859-1?

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

web-app
  servlet
servlet-namesimple/servlet-name
servlet-classca.esys.simple/servlet-class
  /servlet

  servlet-mapping
 servlet-namesimple/servlet-name
 url-pattern/simple/url-pattern
  /servlet-mapping

/web-app


The behaviour that I see is:

1.   The servlet appears to deploy when Tomcat starts up (at least the 
logs seem to say so).   It appears to find the class libraries.

2.   When I run the servlet it simply lists the 
${CATALINA_HOME}/webapps/simple directory.   The logs seem to indicate 
that it maps the URI to the default servlet, which lists directories.  
It does not run the servlet class that I specify in the web.xml file.


I have tried the following things:

1.   I created the following context element in the server.xml file to 
explicitly define the context (rather than letting it build an implicit 
context).

Context path=/simple docBase=simple debug=1 reloadable=true /

Note that I turned on debugging which elicited the following log entries 
in the logs/localhost_log.2003-02-26.txt file.

2003-02-26 10:25:02 StandardContext[/simple]: Mapping contextPath='/simple' with 
requestURI='/simple/' and relativeURI='/'
2003-02-26 10:25:02 StandardContext[/simple]:  Mapped to servlet 'default' with 
servlet path '/' and path info 'null' and update=true

Which seems to confirm the mapping of the URI to the default servlet 
rather than the simple servlet.

2.   The original simple class was not part of a package and I had it
placed directly under the classes directory.  I tried defining it to be 
in the ca.esys package and put it under the classes/ca/esys directory, but
that didn't work.

3.   I've tried referring to the servlet using the URI's:

 localhost:8080/simple
 localhost:8080/servlet/simple

The first maps to the default servlet.   The second gives a resource 
unavailable error - which I would expect.

So ...

I am at a loss.   Any ideas for things to try would be very helpful.  I've
looked at every example I could find and scanned through the list archive 
for similar things, but had no luck. 

Thanks ahead for any help that you can provide.

Cheers.


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



RE: Manual servlet deployment problems on 4.1.18

2003-02-26 Thread Shapira, Yoav

Howdy,

The servlet was deployed as:

  {CATALINA_HOME}/webapps/simple
  {CATALINA_HOME}/webapps/simple/WEB-INF/web.xml
  {CATALINA_HOME}/webapps/simple/WEB-INF/classes/simple.class
snip
The web.xml file contains (less the  delimiters):
  servlet
servlet-namesimple/servlet-name
servlet-classca.esys.simple/servlet-class
  /servlet

That's a mismatch.  If the servlet is in package ca.esys then it should
be under WEB-INF/clases/ca/esys/simple.class.

Yoav Shapira
Millennium ChemInformatics



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: Manual servlet deployment problems on 4.1.18

2003-02-26 Thread Steve Hole
On Wed, 26 Feb 2003 13:12:47 -0500 Shapira, Yoav [EMAIL PROTECTED] 
wrote:

 
 Howdy,
 
 The servlet was deployed as:
 
   {CATALINA_HOME}/webapps/simple
   {CATALINA_HOME}/webapps/simple/WEB-INF/web.xml
   {CATALINA_HOME}/webapps/simple/WEB-INF/classes/simple.class
 snip
 The web.xml file contains (less the  delimiters):
   servlet
 servlet-namesimple/servlet-name
 servlet-classca.esys.simple/servlet-class
   /servlet
 
 That's a mismatch.  If the servlet is in package ca.esys then it should
 be under WEB-INF/clases/ca/esys/simple.class.

Actually, that is a cut and paste error in the mail message.   My 
apologies.  The web.xml file actually contains:

servlet
   servlet-namesimple/servlet-name
   servlet-classsimple/servlet-class
/servlet

The version that I put in the earlier message was my attempt to try 
deploying under a package, which also did not work.

Cheers.

---
Steve Hole
Chief Technical Officer - Electronic Billing and Payment Systems
ACI Worldwide

Email: [EMAIL PROTECTED]
Phone: 780 424 4922


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



RE: Manual servlet deployment problems on 4.1.18

2003-02-26 Thread Steve Guo

3.   I've tried referring to the servlet using the URI's:

 localhost:8080/simple
  localhost:8080/servlet/simple

You tried to make it simple, but actually made it complicated.
Your webapp is simple, so you should invoke the servlet by:
localhost:8080/simple/simple
localhost:8080/simple/servlet/simple
Naming all the same tends to confuse users (not sure confuses Tomcat or not). Why not 
try:
'test' for the webapp
'Simple' for the servlet
'simple' for the servlet name in web.xml
then you will invoke by
http://localhost:8080/test/servlet/Simple or
http://localhost:8080/test/servlet/simple or
http://localhost:8080/test/simple
Good luck.
 
 Steve Hole [EMAIL PROTECTED] wrote:On Wed, 26 Feb 2003 13:12:47 -0500 Shapira, 
Yoav 
wrote:

 
 Howdy,
 
 The servlet was deployed as:
 
  {CATALINA_HOME}/webapps/simple
  {CATALINA_HOME}/webapps/simple/WEB-INF/web.xml
  {CATALINA_HOME}/webapps/simple/WEB-INF/classes/simple.class
 
 The web.xml file contains (less the  delimiters):
  
  simple
  ca.esys.simple
  
 
 That's a mismatch. If the servlet is in package ca.esys then it should
 be under WEB-INF/clases/ca/esys/simple.class.

Actually, that is a cut and paste error in the mail message. My 
apologies. The web.xml file actually contains:


simple
simple


The version that I put in the earlier message was my attempt to try 
deploying under a package, which also did not work.

Cheers.

---
Steve Hole
Chief Technical Officer - Electronic Billing and Payment Systems
ACI Worldwide

Email: [EMAIL PROTECTED]
Phone: 780 424 4922


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



-
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, and more

RE: Manual servlet deployment problems on 4.1.18

2003-02-26 Thread Ray Tayek
At 11:43 AM 2/26/03 -0700, you wrote:
On Wed, 26 Feb 2003 13:12:47 -0500 Shapira, Yoav [EMAIL PROTECTED]
wrote:

 Howdy,

 The servlet was deployed as:
 
   {CATALINA_HOME}/webapps/simple
   {CATALINA_HOME}/webapps/simple/WEB-INF/web.xml
   {CATALINA_HOME}/webapps/simple/WEB-INF/classes/simple.class
 ...

 That's a mismatch
Actually, that is a cut and paste error in the mail message.   My
apologies.  The web.xml file actually contains:
servlet
   servlet-namesimple/servlet-name
   servlet-classsimple/servlet-class
/servlet
The version that I put in the earlier message was my attempt to try
deploying under a package, which also did not work.
i can not get 4.1.18-le to run on win98se and i get at a 404 on linux when 
i try to put Hello.class manually in 
.../jakarta-tomcat-4.1.18-LE-jdk14/webapps/ROOT\WEB-INF/classes and using 
localhost:8080/servlet/Hello (without adding to the web.xml)

could the servlet option be turned off by default? (does anyone know 
where to look?)

also, running the sample in 
.../jakarta-tomcat-4.1.18-LE-jdk14/webapps/tomcat-docs/appdev/sample fails 
with 401 when doing the ant install.

if you get 4.1.18 to work, please let me know how you did it.

thanks

---
ray tayek http://tayek.com/ actively seeking mentoring or telecommuting work
vice chair orange county java users group http://www.ocjug.org/
hate spam? http://samspade.org/ssw/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Manual servlet deployment problems on 4.1.18

2003-02-26 Thread Steve Hole
On Wed, 26 Feb 2003 11:21:21 -0800 (PST) Steve Guo [EMAIL PROTECTED] 
wrote:


 You tried to make it simple, but actually made it complicated.
 Your webapp is simple, so you should invoke the servlet by:
 localhost:8080/simple/simple
 localhost:8080/simple/servlet/simple

That was the trick.

This implies that the servlet-mapping element defines the name of the 
web application?

 Naming all the same tends to confuse users (not sure confuses Tomcat or 
 not). Why not try:
 'test' for the webapp
 'Simple' for the servlet
 'simple' for the servlet name in web.xml
 then you will invoke by
 http://localhost:8080/test/servlet/Simple or
 http://localhost:8080/test/servlet/simple or
 http://localhost:8080/test/simple

So what does the web.xml look like for the above?   Something like:

webapp
  servlet
 servlet-namesimple/servlet-name
 servlet-classSimple/servlet-class
  /servlet

  servlet-mapping
 servlet-namesimple/servlet-name
 url-pattern/test/url-pattern
  /servlet-mapping
/webapp

In otherwords, I assumed the servlet-name element linked the servlet 
and servlet-mapping elements.   Is that true?  The documentation for the
servlet-mapping functionality is not exactly great and there is no 
documentation on the default mapping rules at all that I could find.

Anyway, thanks for the help.

Cheers.

---
Steve Hole
Chief Technology Officer - Billing and Payment Systems
ACI Worldwide
mailto:[EMAIL PROTECTED]
Phone: 780-424-4922


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



RE: Manual servlet deployment problems on 4.1.18

2003-02-26 Thread Steve Guo

 
 Steve Hole [EMAIL PROTECTED] wrote:
This implies that the element defines the name of the 
web application?
-- what do you mean? the webapp is defined by the name of the folder (test)

So what does the web.xml look like for the above? Something like:
servlet
 servlet-namesimple/servlet-name
 servlet-classSimple/servlet-class
  /servlet

  servlet-mapping
 servlet-namesimple/servlet-name
 url-pattern/welcomeme.xxx/url-pattern
  /servlet-mapping


then you will invoke by
http://localhost:8080/test/servlet/Simple - from servlet class
http://localhost:8080/test/servlet/simple -  from servlet tag
http://localhost:8080/test/welcomeme.xxx - from servlet-mapping tag




-
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, and more