Re: App Developer's Guide Example

2003-06-25 Thread Jon Haugsand
* Yoav Shapira
 Howdy,

Thanks, it helped.  No errors during deploy.  However, I cannot get in
touch with my servlet.  I _know_ this is really newbie questions, but
I cannot find ONE tutorial on these issues.  Here is my web.xml:

 It is unfortunate that most tutorials out there (plenty exist, just
 google for servlet tutorial for example) are out of date, especially
 by assuming the presence of an invoker servlet.

servlet-mapping
  servlet-namehallo/servlet-name
  url-pattern/*do/url-pattern
/servlet-mapping

 So you would access your servlet using any URL that ends in do, e.g.
 http://yourhost:yourport/yourwebapp/xdo

 The above url-pattern is probably not what you really want, although
 it's legal and will work.  Try something simpler instead:
 servlet
   servlet-namehallo/servlet-name
   servlet-classwhatver/servlet-class
 /servlet
 servlet-mapping
   servlet-namehallo/servlet-name
   url-pattern/halloPage/url-pattern
 /servlet-mapping

 Then you will access your servlet by going to:
 http://yourhost:yourport/yourwebapp/halloPage

Did so:

2003-06-25 10:11:25 - Ctx( /wartest ): 404 R( /wartest + /halloPage + null) null

However, the index.html is reached.  (Directory structure:

computer jar tf wartest.war 
META-INF/
META-INF/MANIFEST.MF
WEB-INF/
WEB-INF/classes/
WEB-INF/classes/HelloWorld.class
WEB-INF/web.xml
WEB-INF/web.xml~
index.html

computer wget http://localhost:8082/wartest/index.html  -- ok
computer wget http://localhost:8082/wartest/halloPage  -- error

-- 
 Jon Haugsand, [EMAIL PROTECTED]
 http://www.norges-bank.no





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



RE: App Developer's Guide Example

2003-06-25 Thread Shapira, Yoav

Howdy,
You did put HelloWorld as the servlet class, right? ;)  I hope you
didn't just leave in the whatever example I gave...

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Jon Haugsand [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 25, 2003 4:13 AM
To: Tomcat Users List
Subject: Re: App Developer's Guide Example

* Yoav Shapira
 Howdy,

Thanks, it helped.  No errors during deploy.  However, I cannot get
in
touch with my servlet.  I _know_ this is really newbie questions, but
I cannot find ONE tutorial on these issues.  Here is my web.xml:

 It is unfortunate that most tutorials out there (plenty exist, just
 google for servlet tutorial for example) are out of date,
especially
 by assuming the presence of an invoker servlet.

servlet-mapping
  servlet-namehallo/servlet-name
  url-pattern/*do/url-pattern
/servlet-mapping

 So you would access your servlet using any URL that ends in do, e.g.
 http://yourhost:yourport/yourwebapp/xdo

 The above url-pattern is probably not what you really want, although
 it's legal and will work.  Try something simpler instead:
 servlet
   servlet-namehallo/servlet-name
   servlet-classwhatver/servlet-class
 /servlet
 servlet-mapping
   servlet-namehallo/servlet-name
   url-pattern/halloPage/url-pattern
 /servlet-mapping

 Then you will access your servlet by going to:
 http://yourhost:yourport/yourwebapp/halloPage

Did so:

2003-06-25 10:11:25 - Ctx( /wartest ): 404 R( /wartest + /halloPage +
null)
null

However, the index.html is reached.  (Directory structure:

computer jar tf wartest.war
META-INF/
META-INF/MANIFEST.MF
WEB-INF/
WEB-INF/classes/
WEB-INF/classes/HelloWorld.class
WEB-INF/web.xml
WEB-INF/web.xml~
index.html

computer wget http://localhost:8082/wartest/index.html  -- ok
computer wget http://localhost:8082/wartest/halloPage  -- error

--
 Jon Haugsand, [EMAIL PROTECTED]
 http://www.norges-bank.no





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




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



Re: App Developer's Guide Example

2003-06-25 Thread Jon Haugsand
* Yoav Shapira
 Howdy,
 You did put HelloWorld as the servlet class, right? ;)  I hope you
 didn't just leave in the whatever example I gave...

Everything is working better with Tomcat4, so I almost start from
scratch.  Anyway, looking into some of the examples, I see that
accessing http://machine:port/examples/ automatically loads the file
${TOMCAT_HOME}/webapps/examples/servlets/index.html but I cannot find
any reference to this directory in the WEB-INF/web.xml.  Why is that?

-- 
 Jon Haugsand, [EMAIL PROTECTED]
 http://www.norges-bank.no


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



Re: App Developer's Guide Example

2003-06-24 Thread Jon Haugsand
* Yoav Shapira
 Howdy,
 You can download these files by right-clicking on them and choosing Save
 target as.  Part of the point of the app developer's guide is to show
 the structure for development and deployment.  That's why there's no
 one-file-package that you can download with this structure.  

All the files are now gone.  Where can I find a complete very simple
example with one servlet, one jsp file and a complete directory
structure with correct web.xml all which total to an example.war file
deployable with my tomcat installation (preferrable bundled with
jboss)?

-- 
 Jon Haugsand, [EMAIL PROTECTED]
 http://www.norges-bank.no


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



Re: App Developer's Guide Example

2003-06-24 Thread Jon Haugsand
* Jon Haugsand
 All the files are now gone.  Where can I find a complete very simple
 example with one servlet, one jsp file and a complete directory
 structure with correct web.xml all which total to an example.war file
 deployable with my tomcat installation (preferrable bundled with
 jboss)?


To be more specific.  I tried the following directory structure:

  wartest/WEB-INF/web.xml
  wartest/WEB-INF/classes/HelloWorld.class

The wartest directory was packed with:

  jar cf wartest.war wartest

An wartest.war was deployed on a jboss-3.2.1_tomcat-4.1.24
installation.  Message during deployment:

12:07:54,905 INFO  [MainDeployer] Starting deployment of package: 
file:/usr/local/share/jboss-3.2.1_tomcat-4.1.24/server/test/deploy/wartest.war
12:07:54,921 INFO  [EmbeddedCatalinaService41] deploy, ctxPath=, 
warUrl=file:/usr/local/share/jboss-3.2.1_tomcat-4.1.24/server/test/tmp/deploy/server/test/deploy/wartest.war/64.wartest.war
12:07:54,980 INFO  [Engine] WebappLoader[]: Deploying class repositories to work 
directory 
/usr/local/share/jboss-3.2.1_tomcat-4.1.24/server/test/tmp/deploy/server/test/deploy/work/MainEngine/localhost/_
12:07:56,025 INFO  [Engine] ContextConfig[]: Missing application web.xml, using 
defaults only
12:07:56,031 INFO  [Engine] ContextConfig[]: Added certificates - request attribute 
Valve
12:07:56,129 INFO  [EmbeddedCatalinaService41] Using Java2 parent classloader 
delegation: true
12:07:56,131 INFO  [Engine] StandardManager[]: Seeding random number generator class 
java.security.SecureRandom
12:07:56,134 INFO  [Engine] StandardManager[]: Seeding of random number generator has 
been completed
12:07:56,144 INFO  [Engine] StandardWrapper[:default]: Loading container servlet 
default
12:07:56,146 INFO  [Engine] StandardWrapper[:invoker]: Loading container servlet 
invoker
12:07:56,181 INFO  [MainDeployer] Deployed package: 
file:/usr/local/share/jboss-3.2.1_tomcat-4.1.24/server/test/deploy/wartest.war

I did obviously something wrong as I do have a web.xml file.  However,
I cannot access my servlet.

-- 
 Jon Haugsand, [EMAIL PROTECTED]
 http://www.norges-bank.no


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



RE: App Developer's Guide Example

2003-06-24 Thread Shapira, Yoav

Howdy,

To be more specific.  I tried the following directory structure:

  wartest/WEB-INF/web.xml
  wartest/WEB-INF/classes/HelloWorld.class

The wartest directory was packed with:

  jar cf wartest.war wartest

You need to be in the wartest directory and do
jar cf wartest.war *

Yoav Shapria



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: App Developer's Guide Example

2003-06-24 Thread Jon Haugsand
* Yoav Shapira
 You need to be in the wartest directory and do 
 jar cf wartest.war *

Thanks, it helped.  No errors during deploy.  However, I cannot get in
touch with my servlet.  I _know_ this is really newbie questions, but
I cannot find ONE tutorial on these issues.  Here is my web.xml:

web-app
display-nameJons test-applikasjon/display-name
description
  Jon tester og har det bra.  Jeg bor på [EMAIL PROTECTED]
/description
context-param
  param-namesjef/param-name
  param-value[EMAIL PROTECTED]/param-value
  description
Epost-adressen til sjefen.
  /description
/context-param
servlet
  servlet-namehallo/servlet-name
  description
Ja, her sier vi hallo
  /description
  servlet-classHelloWorld/servlet-class
  init-param
param-nameIQ/param-name
param-value200/param-value
  /init-param
  !-- Load this servlet at server startup time --
  load-on-startup5/load-on-startup
/servlet
servlet-mapping
  servlet-namehallo/servlet-name
  url-pattern/*do/url-pattern
/servlet-mapping
session-config
  session-timeout30/session-timeout!-- 30 minutes --
/session-config
/web-app

-- 
 Jon Haugsand, [EMAIL PROTECTED]
 http://www.norges-bank.no


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



RE: App Developer's Guide Example

2003-06-24 Thread Shapira, Yoav

Howdy,

Thanks, it helped.  No errors during deploy.  However, I cannot get in
touch with my servlet.  I _know_ this is really newbie questions, but
I cannot find ONE tutorial on these issues.  Here is my web.xml:

It is unfortunate that most tutorials out there (plenty exist, just
google for servlet tutorial for example) are out of date, especially
by assuming the presence of an invoker servlet.

servlet-mapping
  servlet-namehallo/servlet-name
  url-pattern/*do/url-pattern
/servlet-mapping

So you would access your servlet using any URL that ends in do, e.g.
http://yourhost:yourport/yourwebapp/xdo

The above url-pattern is probably not what you really want, although
it's legal and will work.  Try something simpler instead:
servlet
  servlet-namehallo/servlet-name
  servlet-classwhatver/servlet-class
/servlet
servlet-mapping
  servlet-namehallo/servlet-name
  url-pattern/halloPage/url-pattern
/servlet-mapping

Then you will access your servlet by going to:
http://yourhost:yourport/yourwebapp/halloPage

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: App Developer's Guide Example

2003-06-24 Thread Tim Funk
I don't think this a valid url-pattern:
try *.do
-Tim

Jon Haugsand wrote:
servlet-mapping
  servlet-namehallo/servlet-name
  url-pattern/*do/url-pattern
/servlet-mapping


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


RE: App Developer's Guide Example

2003-06-24 Thread Shapira, Yoav

D'oh ;)  I looked at it and saw /*.do already, thinking this guy was
using struts ;)

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 24, 2003 10:05 AM
To: Tomcat Users List
Subject: Re: App Developer's Guide Example

I don't think this a valid url-pattern:
try *.do

-Tim

Jon Haugsand wrote:
 servlet-mapping
   servlet-namehallo/servlet-name
   url-pattern/*do/url-pattern
 /servlet-mapping



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




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



Re: App Developer's Guide Example

2003-06-24 Thread Jon Haugsand
* Yoav Shapira
 Howdy,

Thanks, it helped.  No errors during deploy.  However, I cannot get in
touch with my servlet.  I _know_ this is really newbie questions, but
I cannot find ONE tutorial on these issues.  Here is my web.xml:

 It is unfortunate that most tutorials out there (plenty exist, just
 google for servlet tutorial for example) are out of date, especially
 by assuming the presence of an invoker servlet.

servlet-mapping
  servlet-namehallo/servlet-name
  url-pattern/*do/url-pattern
/servlet-mapping

 So you would access your servlet using any URL that ends in do, e.g.
 http://yourhost:yourport/yourwebapp/xdo

 The above url-pattern is probably not what you really want, although
 it's legal and will work.  Try something simpler instead:
 servlet
   servlet-namehallo/servlet-name
   servlet-classwhatver/servlet-class
 /servlet
 servlet-mapping
   servlet-namehallo/servlet-name
   url-pattern/halloPage/url-pattern
 /servlet-mapping

 Then you will access your servlet by going to:
 http://yourhost:yourport/yourwebapp/halloPage


Thanks, I'll try this in a standalone tomcat installation.  It didn't
work in my JBoss bundled tomcat though.

-- 
 Jon Haugsand, [EMAIL PROTECTED]
 http://www.norges-bank.no


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