Re: directory structure

2009-09-13 Thread David Kerber

Daniel Blumenthal wrote:

If you're referring to during the development phase



Yes, during the development phase.

  
the IDEs 
I've worked with such as NetBeans and Eclipse does it for you 
automatically.  I don't remember if NetBeans actually make a 
war or not but it does autodeploy.  Eclipse will auto 
synchronize and sometimes it will auto-redeploy the app or 
restart TC depending on what was changed.  What IDE are you 
using? 



Hmm...  I tend to use Eclipse primarily as a Java-aware text editor
(control-click to get to a declaration is invaluable), but my build is done
using ant.

My old solution was to simply do all of my development inside the tomcat
webapps directory.  This worked all right, except that it was incredibly
ugly and caused bizarre problems from time to time (e.g., when allowing
tomcat to autoload altered classes).  I'm trying to get everything set up
"right".

The only way I can see to do it is to play weird tricks with symbolic links,
but this seems like a bad solution.

Thoughts?
  
Yes:  use the full power of Eclipse, and let it do your builds, 
debugging and deployments.


D



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: directory structure

2009-09-13 Thread Daniel Blumenthal
> If you're referring to during the development phase

Yes, during the development phase.

> the IDEs 
> I've worked with such as NetBeans and Eclipse does it for you 
> automatically.  I don't remember if NetBeans actually make a 
> war or not but it does autodeploy.  Eclipse will auto 
> synchronize and sometimes it will auto-redeploy the app or 
> restart TC depending on what was changed.  What IDE are you 
> using? 

Hmm...  I tend to use Eclipse primarily as a Java-aware text editor
(control-click to get to a declaration is invaluable), but my build is done
using ant.

My old solution was to simply do all of my development inside the tomcat
webapps directory.  This worked all right, except that it was incredibly
ugly and caused bizarre problems from time to time (e.g., when allowing
tomcat to autoload altered classes).  I'm trying to get everything set up
"right".

The only way I can see to do it is to play weird tricks with symbolic links,
but this seems like a bad solution.

Thoughts?


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: directory structure

2009-09-12 Thread Hassan Schroeder
On Sat, Sep 12, 2009 at 7:42 PM, Daniel Blumenthal  wrote:

> I'd like to be able to set up a system in which I can make a change to a css
> file (or whatever) and see the change after reloading the page - i.e.,
> without having to run another build.

Uh, wouldn't that just depend on your build system (and platform)?

-- 
Hassan Schroeder  hassan.schroe...@gmail.com
twitter: @hassan

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: directory structure

2009-09-12 Thread Tommy Pham
--- On Sat, 9/12/09, Daniel Blumenthal  wrote:

> From: Daniel Blumenthal 
> Subject: directory structure
> To: users@tomcat.apache.org
> Date: Saturday, September 12, 2009, 9:42 PM
> I'm reorganizing an existing project
> according to the generally accepted
> Java directory structure
> (http://java.sun.com/blueprints/code/projectconventions.html#23136),
> and
> everything seems to be working all right, but there's one
> thing I don't
> understand that seems like it should be a common problem
> with a common
> solution.  Currently, when I build a project for
> testing, it compiles the
> Java source, bundles everything into a .war, inserts it
> into the Tomcat
> webapps directory, and expands it.  However, in order
> to make a small change
> to a jsp file, css file, etc., I have to go through the
> entire build process
> again.
>  
> I'd like to be able to set up a system in which I can make
> a change to a css
> file (or whatever) and see the change after reloading the
> page - i.e.,
> without having to run another build.

If you're referring to during the development phase, the IDEs I've worked with 
such as NetBeans and Eclipse does it for you automatically.  I don't remember 
if NetBeans actually make a war or not but it does autodeploy.  Eclipse will 
auto synchronize and sometimes it will auto-redeploy the app or restart TC 
depending on what was changed.  What IDE are you using?  If you're referring to 
production, isn't a bit a dangerous/risky to be doing changes as you mention?  
Production should be touched after thorough testing of the app on development 
server, correct me if I'm wrong.

Regards,
Tommy

  
> Is there a common way to do this?
>

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



directory structure

2009-09-12 Thread Daniel Blumenthal
I'm reorganizing an existing project according to the generally accepted
Java directory structure
(http://java.sun.com/blueprints/code/projectconventions.html#23136), and
everything seems to be working all right, but there's one thing I don't
understand that seems like it should be a common problem with a common
solution.  Currently, when I build a project for testing, it compiles the
Java source, bundles everything into a .war, inserts it into the Tomcat
webapps directory, and expands it.  However, in order to make a small change
to a jsp file, css file, etc., I have to go through the entire build process
again.
 
I'd like to be able to set up a system in which I can make a change to a css
file (or whatever) and see the change after reloading the page - i.e.,
without having to run another build.
 
Is there a common way to do this?


Caching static files in hierarchical directory structure

2009-05-19 Thread Pantvaidya, Vishwajit
Is there anyway to cache sets of files in multiple levels of a hierarchical 
directory structure e.g. 
/js/*.js
/js/1/*.js
/js/1/1/*.js

I was checking this out on the httpd side using mod_file_cache, mod_headers, 
mod_expires. The Directory and other directives seem to take wildcards like * 
and ? but I don't see anything to span multiple levels.
Or wil it work if I just point to the top of the hierarchy i.e. /js here.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Version 6.0.18 of Tomcat -- Web.xml file and file/directory structure

2008-10-31 Thread John Byrne
It worked!  Thank you all for your help!

John Byrne
Support Network for Battered Women
1257 Tasman Dr. Suite C
Sunnyvale, CA
94089
 
(408) 541-6100 x 138
Fax: (408) 541-
-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 30, 2008 5:27 PM
To: Tomcat Users List
Subject: Re: Version 6.0.18 of Tomcat -- Web.xml file and file/directory
structure

Strip your web.xml file down to this:



http://java.sun.com/xml/ns/javaee";
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
   xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";
   version="2.5">


  Servlet and JSP Examples. Hello World Test

HelloWorld Test


Test
Test



Test
/Test




And it should work if you access http://localhost:8080/Test/Test --
obviously replacing localhost:8080 with whatever you normally use to get
to your tomcat service.  You don't have all those filters, listeners and
other servlets in your webapp, so don't include them.  Later on when you
get some footing in building servlets, you should make sure all your
classes are in packages as well.

--David

John Byrne wrote:
> David, and everyone else,
>
> Here is the file layout:
> C:\tomcat\apache-tomcat-6.0.18\webapps\Test\WEB-INF\web.xml
> C:\tomcat\apache-tomcat-6.0.18\webapps\Test\WEB-INF\lib
> C:\tomcat\apache-tomcat-6.0.18\webapps\Test\WEB-INF\classes\Test.class
>
> (I've also attached a zip file with the Test Directory in it.  The
root
> to this directory is the same as above)
>
> Attached is my web.xml file.  (It is the same xml file that comes with
> the distribution except the added code below.)
>
> The only thing I added was:
> 
>
> 
> Test
> Test
> 
>
> 
> Test
> /Test
> 
> )
>
>
> John Byrne
> Support Network for Battered Women
> 1257 Tasman Dr. Suite C
> Sunnyvale, CA
> 94089
>  
> (408) 541-6100 x 138
> Fax: (408) 541-
>
> -Original Message-
> From: David Smith [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, October 30, 2008 3:53 PM
> To: Tomcat Users List
> Subject: Re: Version 6.0.18 of Tomcat
>
>   
>> However, I get an error in
>> the users log specifying a class is not found. Is this my Test.class
>> file it can't find?  
>> 
> Nope.  The class not found is listeners.SessionListener.  Can you post
> Test/WEB-INF/web.xml?  Also can you post some info regarding your file
> layout?
>
>   
>> The container itself doesn't "start" either.  In the Tomcat output
>> window it says:
>> 
> The container started fine.  Your web application didn't start because
> of the error not finding listeners.SessionListener..
>
> --David
>
> John Byrne wrote:
>   
>> I've tried for 2 days now to get my own HelloWorld program working
>> 
> with
>   
>> Apache Tomcat.  I have the exact same structure that the examples and
>> ROOT containers in the distribution have.  However, I get an error in
>> the users log specifying a class is not found. Is this my Test.class
>> file it can't find?  
>>
>>  
>>
>> Oct 30, 2008 2:25:21 PM org.apache.catalina.core.StandardContext
>> listenerStart
>>
>> SEVERE: Error configuring application listener of class
>> listeners.SessionListener
>>
>> java.lang.ClassNotFoundException: listeners.SessionListener
>>
>> at
>>
>> 
>
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader
>   
>> .java:1387)
>>
>> at
>>
>> 
>
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader
>   
>> .java:1233)
>>
>> at
>>
>> 
>
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.j
>   
>> ava:3786)
>>
>> at
>>
>> 
>
org.apache.catalina.core.StandardContext.start(StandardContext.java:4342
>   
>> )
>>
>> at
>>
>> 
>
org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:124
>   
>> 7)
>>
>> at
>>
>> 
>
org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.
>   
>> java:604)
>>
>> at
>>
>> 
>
org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.
>   
>> java:129)
>>
>> at
>> javax.servlet.http.HttpS

Re: Version 6.0.18 of Tomcat -- Web.xml file and file/directory structure

2008-10-30 Thread David Smith
Strip your web.xml file down to this:



http://java.sun.com/xml/ns/javaee";
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
   xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";
   version="2.5">


  Servlet and JSP Examples. Hello World Test

HelloWorld Test


Test
Test



Test
/Test




And it should work if you access http://localhost:8080/Test/Test --
obviously replacing localhost:8080 with whatever you normally use to get
to your tomcat service.  You don't have all those filters, listeners and
other servlets in your webapp, so don't include them.  Later on when you
get some footing in building servlets, you should make sure all your
classes are in packages as well.

--David

John Byrne wrote:
> David, and everyone else,
>
> Here is the file layout:
> C:\tomcat\apache-tomcat-6.0.18\webapps\Test\WEB-INF\web.xml
> C:\tomcat\apache-tomcat-6.0.18\webapps\Test\WEB-INF\lib
> C:\tomcat\apache-tomcat-6.0.18\webapps\Test\WEB-INF\classes\Test.class
>
> (I've also attached a zip file with the Test Directory in it.  The root
> to this directory is the same as above)
>
> Attached is my web.xml file.  (It is the same xml file that comes with
> the distribution except the added code below.)
>
> The only thing I added was:
> 
>
> 
> Test
> Test
> 
>
> 
> Test
> /Test
> 
> )
>
>
> John Byrne
> Support Network for Battered Women
> 1257 Tasman Dr. Suite C
> Sunnyvale, CA
> 94089
>  
> (408) 541-6100 x 138
> Fax: (408) 541-
>
> -Original Message-
> From: David Smith [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, October 30, 2008 3:53 PM
> To: Tomcat Users List
> Subject: Re: Version 6.0.18 of Tomcat
>
>   
>> However, I get an error in
>> the users log specifying a class is not found. Is this my Test.class
>> file it can't find?  
>> 
> Nope.  The class not found is listeners.SessionListener.  Can you post
> Test/WEB-INF/web.xml?  Also can you post some info regarding your file
> layout?
>
>   
>> The container itself doesn't "start" either.  In the Tomcat output
>> window it says:
>> 
> The container started fine.  Your web application didn't start because
> of the error not finding listeners.SessionListener..
>
> --David
>
> John Byrne wrote:
>   
>> I've tried for 2 days now to get my own HelloWorld program working
>> 
> with
>   
>> Apache Tomcat.  I have the exact same structure that the examples and
>> ROOT containers in the distribution have.  However, I get an error in
>> the users log specifying a class is not found. Is this my Test.class
>> file it can't find?  
>>
>>  
>>
>> Oct 30, 2008 2:25:21 PM org.apache.catalina.core.StandardContext
>> listenerStart
>>
>> SEVERE: Error configuring application listener of class
>> listeners.SessionListener
>>
>> java.lang.ClassNotFoundException: listeners.SessionListener
>>
>> at
>>
>> 
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader
>   
>> .java:1387)
>>
>> at
>>
>> 
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader
>   
>> .java:1233)
>>
>> at
>>
>> 
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.j
>   
>> ava:3786)
>>
>> at
>>
>> 
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4342
>   
>> )
>>
>> at
>>
>> 
> org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:124
>   
>> 7)
>>
>> at
>>
>> 
> org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.
>   
>> java:604)
>>
>> at
>>
>> 
> org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.
>   
>> java:129)
>>
>> at
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
>>
>> at
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>>
>> at
>>
>> 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
>   
>> tionFilterChain.java:290)
>>
>> at
>>
>> 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
>   
>> erChain.java:206)
>>
>> at
>>
>> 
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
>   
>> e.java:233)
>>
>> at
>>
>> 
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
>   
>> e.java:191)
>>
>> at
>>
>> 
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticator
>   
>> Base.java:525)
>>
>> at
>>
>> 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
>   
>> :128)
>>
>> at
>>
>> 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
>   
>> :102)
>>
>> at
>>
>> 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
>   

Re: Version 6.0.18 of Tomcat -- Web.xml file and file/directory structure

2008-10-30 Thread Mark Thomas
Martin Gainty wrote:
> Good Evening John-
> 
> in /WEB-INF/web.xml make sure your listener is configured in e.g.
> 
> listeners.SessionListener
> 

No. Completely wrong.

The whole point is that Tomcat *can't* find a listener that is already
configured in web.xml.

>> Attached is my web.xml file.  (It is the same xml file that comes with
>> the distribution except the added code below.)

That is probably the root cause of your problems. You should not be copying
any of the existing web.xml files to start a new webapp. Use a clean
web.xml as a starting point.

Mark

>>
>> The only thing I added was:
>> 
>>
>> 
>> Test
>> Test
>> 
>>
>> 
>> Test
>> /Test
>> 
>> )
>>
>>
>> John Byrne
>> Support Network for Battered Women
>> 1257 Tasman Dr. Suite C
>> Sunnyvale, CA
>> 94089
>>  
>> (408) 541-6100 x 138
>> Fax: (408) 541-
>>
>> -Original Message-
>> From: David Smith [mailto:[EMAIL PROTECTED] 
>> Sent: Thursday, October 30, 2008 3:53 PM
>> To: Tomcat Users List
>> Subject: Re: Version 6.0.18 of Tomcat
>>
>>> However, I get an error in
>>> the users log specifying a class is not found. Is this my Test.class
>>> file it can't find?  
>> Nope.  The class not found is listeners.SessionListener.  Can you post
>> Test/WEB-INF/web.xml?  Also can you post some info regarding your file
>> layout?
>>
>>> The container itself doesn't "start" either.  In the Tomcat output
>>> window it says:
>> The container started fine.  Your web application didn't start because
>> of the error not finding listeners.SessionListener..
>>
>> --David
>>
>> John Byrne wrote:
>>> I've tried for 2 days now to get my own HelloWorld program working
>> with
>>> Apache Tomcat.  I have the exact same structure that the examples and
>>> ROOT containers in the distribution have.  However, I get an error in
>>> the users log specifying a class is not found. Is this my Test.class
>>> file it can't find?  
>>>
>>>  
>>>
>>> Oct 30, 2008 2:25:21 PM org.apache.catalina.core.StandardContext
>>> listenerStart
>>>
>>> SEVERE: Error configuring application listener of class
>>> listeners.SessionListener
>>>
>>> java.lang.ClassNotFoundException: listeners.SessionListener
>>>
>>> at
>>>
>> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader
>>> .java:1387)
>>>
>>> at
>>>
>> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader
>>> .java:1233)
>>>
>>> at
>>>
>> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.j
>>> ava:3786)
>>>
>>> at
>>>
>> org.apache.catalina.core.StandardContext.start(StandardContext.java:4342
>>> )
>>>
>>> at
>>>
>> org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:124
>>> 7)
>>>
>>> at
>>>
>> org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.
>>> java:604)
>>>
>>> at
>>>
>> org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.
>>> java:129)
>>>
>>> at
>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
>>>
>>> at
>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>>>
>>> at
>>>
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
>>> tionFilterChain.java:290)
>>>
>>> at
>>>
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
>>> erChain.java:206)
>>>
>>> at
>>>
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
>>> e.java:233)
>>>
>>> at
>>>
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
>>> e.java:191)
>>>
>>> at
>>>
>> org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticator
>>> Base.java:525)
>>>
>>> at
>>>
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
>>> :128)
>>>
>>> at
>>>
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
>>> :102)
>>>
>>> at
>>>
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
>>> java:109)
>>>
>>> at
>>>
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:2
>>> 86)
>>>
>>> at
>>>
>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:84
>>> 5)
>>>
>>> at
>>>
>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
>>> Http11Protocol.java:583)
>>>
>>> at
>>>
>> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
>>> at java.lang.Thread.run(Unknown Source)
>>>
>>>  
>>>
>>>  
>>>
>>> The container itself doesn't "start" either.  In the Tomcat output
>>> window it says:
>>>
>>> Oct 30, 2008 3:07:50 PM org.apache.catalina.core.StandardContext start
>>>
>>> SEVERE: Error listenerStart
>>>
>>> Oct 30, 2008 3:07:50 PM org.apache.catalina.core.StandardContext start
>>>

RE: Version 6.0.18 of Tomcat -- Web.xml file and file/directory structure

2008-10-30 Thread Caldarale, Charles R
> From: John Byrne [mailto:[EMAIL PROTECTED]
> Subject: RE: Version 6.0.18 of Tomcat -- Web.xml file and
> file/directory structure
>
> Attached is my web.xml file.

Your web.xml file is completely wrong for your test application.  All of those 
extra filters, listeners, and servlets which aren't present in the lib or 
classes directories will not allow your webapp to load.  The WEB-INF/web.xml 
must describe just what's in your webapp, nothing more.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Version 6.0.18 of Tomcat -- Web.xml file and file/directory structure

2008-10-30 Thread Martin Gainty

Good Evening John-

in /WEB-INF/web.xml make sure your listener is configured in e.g.

listeners.SessionListener


Keep up the good work
Martin 
__ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business 
of Sender. This transmission is of a confidential nature and Sender does not 
endorse distribution to any party other than intended recipient. Sender does 
not necessarily endorse content contained within this transmission. 


> Subject: RE: Version 6.0.18 of Tomcat -- Web.xml file and file/directory 
> structure
> Date: Thu, 30 Oct 2008 16:28:18 -0700
> From: [EMAIL PROTECTED]
> To: users@tomcat.apache.org
> 
> 
> David, and everyone else,
> 
> Here is the file layout:
> C:\tomcat\apache-tomcat-6.0.18\webapps\Test\WEB-INF\web.xml
> C:\tomcat\apache-tomcat-6.0.18\webapps\Test\WEB-INF\lib
> C:\tomcat\apache-tomcat-6.0.18\webapps\Test\WEB-INF\classes\Test.class
> 
> (I've also attached a zip file with the Test Directory in it.  The root
> to this directory is the same as above)
> 
> Attached is my web.xml file.  (It is the same xml file that comes with
> the distribution except the added code below.)
> 
> The only thing I added was:
> 
> 
> 
> Test
> Test
> 
> 
> 
> Test
> /Test
> 
> )
> 
> 
> John Byrne
> Support Network for Battered Women
> 1257 Tasman Dr. Suite C
> Sunnyvale, CA
> 94089
>  
> (408) 541-6100 x 138
> Fax: (408) 541-
> 
> -Original Message-
> From: David Smith [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, October 30, 2008 3:53 PM
> To: Tomcat Users List
> Subject: Re: Version 6.0.18 of Tomcat
> 
> >
> > However, I get an error in
> > the users log specifying a class is not found. Is this my Test.class
> > file it can't find?  
> Nope.  The class not found is listeners.SessionListener.  Can you post
> Test/WEB-INF/web.xml?  Also can you post some info regarding your file
> layout?
> 
> > The container itself doesn't "start" either.  In the Tomcat output
> > window it says:
> The container started fine.  Your web application didn't start because
> of the error not finding listeners.SessionListener..
> 
> --David
> 
> John Byrne wrote:
> > I've tried for 2 days now to get my own HelloWorld program working
> with
> > Apache Tomcat.  I have the exact same structure that the examples and
> > ROOT containers in the distribution have.  However, I get an error in
> > the users log specifying a class is not found. Is this my Test.class
> > file it can't find?  
> >
> >  
> >
> > Oct 30, 2008 2:25:21 PM org.apache.catalina.core.StandardContext
> > listenerStart
> >
> > SEVERE: Error configuring application listener of class
> > listeners.SessionListener
> >
> > java.lang.ClassNotFoundException: listeners.SessionListener
> >
> > at
> >
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader
> > .java:1387)
> >
> > at
> >
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader
> > .java:1233)
> >
> > at
> >
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.j
> > ava:3786)
> >
> > at
> >
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4342
> > )
> >
> > at
> >
> org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:124
> > 7)
> >
> > at
> >
> org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.
> > java:604)
> >
> > at
> >
> org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.
> > java:129)
> >
> > at
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
> >
> > at
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> >
> > at
> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
> > tionFilterChain.java:290)
> >
> > at
> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
> > erChain.java:206)
> >
> > at
> >
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
> > e.java:233)
> >
> > at
> >
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
> > e.

RE: server mapping behaviour when directory structure mirrors mappings

2007-12-11 Thread Matthew Broadhead


Caldarale, Charles R wrote:
> 
>> From: Matthew Thomas Broadhead [mailto:[EMAIL PROTECTED] 
>> Subject: server mapping behaviour when directory structure 
>> mirrors mappings
>> 
>> 
>>  Sales
>>  /sales
>> 
> 
> If you look at the servlet spec (section 11.2), you'll see that the
> above is not valid other than for matching the exact request "/sales".
> Newer versions of Tomcat are more strict in their implementation of the
> rules in the spec, so it's not too surprising that 6.0 works properly
> and 4.1 let you slide by.
> 
> Looks like the  should really be "/sales/*" (without the
> quotes).
> 
>  - Chuck
> 

I want to match the pattern /sales but it instead adds an extra slash and
tries to list directory /sales/.  Is there any way to change the order in
which it resolves the url, i.e. check for servlet-mapping first, then check
for directory?
-- 
View this message in context: 
http://www.nabble.com/server-mapping-behaviour-when-directory-structure-mirrors-mappings-tp14250184p14273740.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: server mapping behaviour when directory structure mirrors mappings

2007-12-10 Thread Caldarale, Charles R
> From: Matthew Thomas Broadhead [mailto:[EMAIL PROTECTED] 
> Subject: server mapping behaviour when directory structure 
> mirrors mappings
> 
> 
>   Sales
>   /sales
> 

If you look at the servlet spec (section 11.2), you'll see that the
above is not valid other than for matching the exact request "/sales".
Newer versions of Tomcat are more strict in their implementation of the
rules in the spec, so it's not too surprising that 6.0 works properly
and 4.1 let you slide by.

Looks like the  should really be "/sales/*" (without the
quotes).

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



server mapping behaviour when directory structure mirrors mappings

2007-12-10 Thread Matthew Thomas Broadhead

Recently upgraded Tomcat from version 4.1.31 to 6.0.14.

In my webapp I mapped servlets to paths without extensions
e.g.

Sales
/sales

Then in the root of the webapp there is a directory with the same  
name (e.g. sales) in which all the resources for that servlet are  
stored.


This worked fine in 4.1.31 but in 6.0.14 it adds a slash at the end  
of the url and behaves like it is in the root of the directory rather  
than loading the servlet mapping first.




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: a simple question about Directory structure in Tomcat

2007-10-24 Thread Mark Thomas
pesho318i wrote:
>   servlet
>   
>   myServlet
>   
>   

Your servlet also needs to be in a package.

Mark

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: a simple question about Directory structure in Tomcat

2007-10-24 Thread pesho318i

thanks,
Well, I see by design the WEB-INF should be directly in webapps/myApp/
but maybe there is a way to change it, e.g. change the web.xml file. Now it
looks like:



 
servlet

myServlet




servlet
/servlet




Thanks
P.




pesho318i wrote:
> 
> Hi all,
> 
> I'd like to access a servlet, which resides in the following directory:
> 
> webapps/myApp/WebContent/WEB-INF/classes/myServlet
> 
> In my web browser I'm typing: http://localhost/myApp/WebContent/servlet 
> //result - "the requested resource is not available"
> (I have done the servlet-mapping in web.xml to /servlet)
> 
> Note that if I move the WebContent directory directly into webapps it
> works! 
> I can't figure out why if it's one directory deeper it cannot find the
> servlet.
> 
> 
> I'll be grateful if you could tell me how to handle this problem...
> Thanks,
> P.
> 

-- 
View this message in context: 
http://www.nabble.com/a-simple-question-about-Directory-structure-in-Tomcat-tf4680899.html#a13381308
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: a simple question about Directory structure in Tomcat

2007-10-23 Thread David Smith
This is by design.  WEB-INF is a special directory that must be a direct 
subdirectory of the webapp's top level.  In other words, 
webapps/myApp/WEB-INF is good.  WEB-INF in any other location within 
your webapp is bad.  All this is described in the servlet spec and not 
tomcat specific.


--David

pesho318i wrote:

Hi all,

I'd like to access a servlet, which resides in the following directory:

webapps/myApp/WebContent/WEB-INF/classes/myServlet

In my web browser I'm typing: http://localhost/myApp/WebContent/servlet 
//result - "the requested resource is not available"

(I have done the servlet-mapping in web.xml to /servlet)

Note that if I move the WebContent directory directly into webapps it works! 
I can't figure out why if it's one directory deeper it cannot find the

servlet.


I'll be grateful if you could tell me how to handle this problem...
Thanks,
P.
  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



a simple question about Directory structure in Tomcat

2007-10-23 Thread pesho318i

Hi all,

I'd like to access a servlet, which resides in the following directory:

webapps/myApp/WebContent/WEB-INF/classes/myServlet

In my web browser I'm typing: http://localhost/myApp/WebContent/servlet 
//result - "the requested resource is not available"
(I have done the servlet-mapping in web.xml to /servlet)

Note that if I move the WebContent directory directly into webapps it works! 
I can't figure out why if it's one directory deeper it cannot find the
servlet.


I'll be grateful if you could tell me how to handle this problem...
Thanks,
P.
-- 
View this message in context: 
http://www.nabble.com/a-simple-question-about-Directory-structure-in-Tomcat-tf4680899.html#a13375489
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to specify my directory structure in Apache?

2007-06-26 Thread shiva sha

How to specify my directory structure
(C:\tomcat5.5.17\webapps\sampleapp\web-inf\classes\com\bean) in Apache? I m
doing tomcat server clustering.
I have to mention in httpd.conf or workers.properties or mod_jk.conf or
mod_jk_cluster.conf?
In which file i have to mention..

Thanks
Shiva


Re: Jar files that have to live outside of tomcat's directory structure?

2006-08-28 Thread Lloyd Zusman
Mikolaj Rydzewski  ceti.pl> writes:

> 
> Lloyd Zusman wrote:
> > Ideally, I'd like to be able to tell tomcat's class loader to look in the
> > home of these business-specific jar files in addition to the standard
> > locations.  [ ... ]
> >   
> You can also use your own class loader to load specific jars. Instead of 
> telling Tomcat to load them, load them yourself.

OK.  Thanks.

-- 
 Lloyd Zusman
 [EMAIL PROTECTED]
 God bless you.






-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Jar files that have to live outside of tomcat's directory structure?

2006-08-28 Thread Mikolaj Rydzewski

Lloyd Zusman wrote:

Ideally, I'd like to be able to tell tomcat's class loader to look in the
home of these business-specific jar files in addition to the standard
locations.  Is there any way to do this?
  
You can also use your own class loader to load specific jars. Instead of 
telling Tomcat to load them, load them yourself.


--
Mikolaj Rydzewski <[EMAIL PROTECTED]>



smime.p7s
Description: S/MIME Cryptographic Signature


Jar files that have to live outside of tomcat's directory structure?

2006-08-28 Thread Lloyd Zusman
I understand that the tomcat standards specify that jar files with
classes that are shared among more than one webapp should live in 
the "shared" directory.

However, for the application that I'm working on, there are some
jars that are shared not only among tomcat-based webapps, but also,
by other non-tomcat-based applications.  These jars contain business
logic for standard, company-wide calculations, and they are updated
from time to time as these calculations evolve.  And they have a
standard "home" in which they live.

I know that I could make copies of these classes or use symbolic links
to get them into tomcat's "shared" directory, but this presents a deployment
problem: if I keep copies, then tomcat's versions can (and often do) get
out of sync with the official versions; if I use symlinks, they get stale
and end up pointing to nothing, because the offical jars have names that
reflect their version numbers.  Furthermore, it's our company policy to
have one and only one copy of each of these business-specific jars in
our production environment.

Ideally, I'd like to be able to tell tomcat's class loader to look in the
home of these business-specific jar files in addition to the standard
locations.  Is there any way to do this?

Thanks in advance.

-- 
 Lloyd Zusman
 [EMAIL PROTECTED]
 God bless you.



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Can't figure out directory structure (again:-(

2006-07-24 Thread David Smith
According to the configurations you posted, the full path of your login 
servlet is /smsinfo/smsinfo/login.  I doubt that was what you were 
really after.  The URL mapping in web.xml is relative to the webapp, not 
the root.


Also, if this is tomcat 5.x, you should put your  definition in 
it's own xml file in conf/Catalina/localhost.  Context definitions in 
server.xml is discouraged in newer tomcat versions.


--David

aladdin wrote:


I had this all working with some basic jsp pages and a (one) servlet.  I went
to continue to build on my application, and all of a sudden, it broke again.

I changed a lot of code (html, jsp, and java), but none of the configuration 
files,
I don't think (but, you know how that goes).  All of a sudden, it can't find the
"requested resource".  It gets through apache (so I'm assuming the workers
stuff is OK), and the message comes from tomcat.  The problem starts on a
jsp login page where the germane element is:


   


Here is the germane part of the server.xml file:
---

 




   

 
-

Here is the web.xml file:
-


http://java.sun.com/j2ee/dtds/web-app_2_3.dtd";>



 
 
 
 login
 UserConfig.login
 
 
 login
 /smsinfo/login
 


---

The login class in question is located in
/var/www/webapps/smsinfo/WEB-INF/classes/UserConfig/login.class.

This whole directory thing and where to find stuff with tomcat and apache
is getting very frustrating.

Thanks for any help!
anw


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Can't figure out directory structure (again:-(

2006-07-23 Thread aladdin
I had this all working with some basic jsp pages and a (one) servlet.  I went
to continue to build on my application, and all of a sudden, it broke again.

I changed a lot of code (html, jsp, and java), but none of the configuration 
files,
I don't think (but, you know how that goes).  All of a sudden, it can't find the
"requested resource".  It gets through apache (so I'm assuming the workers
stuff is OK), and the message comes from tomcat.  The problem starts on a
jsp login page where the germane element is:





Here is the germane part of the server.xml file:
---

  



 


  
-

Here is the web.xml file:
-


http://java.sun.com/j2ee/dtds/web-app_2_3.dtd";>



  
  
  
  login
  UserConfig.login
  
  
  login
  /smsinfo/login
  


---

The login class in question is located in
/var/www/webapps/smsinfo/WEB-INF/classes/UserConfig/login.class.

This whole directory thing and where to find stuff with tomcat and apache
is getting very frustrating.

Thanks for any help!
anw


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Directory Structure and Can't Find Resources in Tomcat

2006-05-21 Thread Hassan Schroeder

On 5/21/06, Allen Williams <[EMAIL PROTECTED]> wrote:


I don't really have a burning need, but would consider it educational


So's putting your hand on a hot stove burner; the value of the lesson
is yours to decide :-)


... was laboring under the impression (rightly or wrongly)
that it would increase performance because Apache was better
at static content


An out-of-date assumption; again, check the archives for more recent
discussion on that. I have one very graphics-intensive site in production
and see no responsiveness issues.


 Would it change the argument if I was hosting multiple,
independent,  disparate virtual hosts?


No; fronting with Apache httpd is even more of a PITA in that case.


Would the fact I was using a second IP make a difference in the ease
of configuration and/or maintenance?


The second IP approach is only suggested if you *need* httpd for some
non-Java applications. Keeping them totally separate from your Tomcat
installation seems a lot easier (more maintainable) to me. YMMV. :-)

HTH!
--
Hassan Schroeder  [EMAIL PROTECTED]

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



RE: Directory Structure and Can't Find Resources in Tomcat

2006-05-21 Thread Allen Williams


> -Original Message-
> From: Hassan Schroeder [mailto:[EMAIL PROTECTED]
> Sent: Sunday, May 21, 2006 4:02 PM
> To: Tomcat Users List
> Subject: Re: Directory Structure and Can't Find Resources in Tomcat


> > Also, now that I have this rudimentary piece of code working, I
> am off to
> > integrate Apache and Tomcat. I started doing this last year,
> spent about a
> > week on it and never got it quite working, but had to leave.  Any good
> > references there?
>
> Do you have a burning *need* to do this (*must* run PHP, FastCGI for
> Rails, or some such)? If not, I'd say don't do it :-)   And if
> you must, get
> a second IP and run Apache httpd separately on that.

I don't really have a burning need, but would consider it educational (is
this
a good reason?;-) and was laboring under the impression (rightly or wrongly)
that
it would increase performance because Apache was better at static content
than
Tomcat.  Would it change the argument if I was hosting multiple,
independent,
disparate virtual hosts?

Would the fact I was using a second IP make a difference in the ease of
configuration
and/or maintenance?

Again, thanks a lot!

>
> Regardless, good luck,
> --
> Hassan Schroeder  [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: Directory Structure and Can't Find Resources in Tomcat

2006-05-21 Thread Hassan Schroeder

On 5/21/06, Allen Williams <[EMAIL PROTECTED]> wrote:


Do you know where I can find a GOOD reference on how Tomcat resolves that
stuff?  I've looked at most of the "official" docs, and a lot of stuff on
the web, but they more or less allude to it peripherally, as though it is
already understood.  This will be particularly important in the future, when
I plan to set up multiple virtual servers.


I've pretty much relied on  the servlet spec and the Tomcat docs -- it's
too easy to find other resources (i.e., books, tutorials, whatever) that are
simply out of date, and hence actually detrimental to understanding.


Also, now that I have this rudimentary piece of code working, I am off to
integrate Apache and Tomcat. I started doing this last year, spent about a
week on it and never got it quite working, but had to leave.  Any good
references there?


Do you have a burning *need* to do this (*must* run PHP, FastCGI for
Rails, or some such)? If not, I'd say don't do it :-)   And if you must, get
a second IP and run Apache httpd separately on that.

The list archives are full of discussion on this -- that may help you decide.

Regardless, good luck,
--
Hassan Schroeder  [EMAIL PROTECTED]

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



RE: Directory Structure and Can't Find Resources in Tomcat

2006-05-21 Thread Allen Williams
Ha!  That was it!  It now works just as expected.  Thanks a million

Do you know where I can find a GOOD reference on how Tomcat resolves that
stuff?  I've looked at most of the "official" docs, and a lot of stuff on
the web, but they more or less allude to it peripherally, as though it is
already understood.  This will be particularly important in the future, when
I plan to set up multiple virtual servers.

Also, now that I have this rudimentary piece of code working, I am off to
integrate Apache and Tomcat. I started doing this last year, spent about a
week on it and never got it quite working, but had to leave.  Any good
references there?

Thanks again!!!  Hopefully, before long, I'll know enough to contribute.

-Original Message-
From: Hassan Schroeder [mailto:[EMAIL PROTECTED]
Sent: Sunday, May 21, 2006 9:30 AM
To: Tomcat Users List
Subject: Re: Directory Structure and Can't Find Resources in Tomcat


On 5/20/06, Allen Williams <[EMAIL PROTECTED]> wrote:
> Sorry, it didn't work.  Once again, in my browser I have:
>
> HTTP Status 404 - /login
> Description: The requested resource (/login) is not available.

> 

Looking back at your original email -- is this your ROOT context?
If not -- if it's "smsinfo" -- then of course the above path has to
reflect that, e.g.



The url-mapping in web.xml is relative to the context; HTML href or
form action attributes are relative to the server.

HTH,
--
Hassan Schroeder  [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: Directory Structure and Can't Find Resources in Tomcat

2006-05-21 Thread Hassan Schroeder

On 5/20/06, Allen Williams <[EMAIL PROTECTED]> wrote:

Sorry, it didn't work.  Once again, in my browser I have:

HTTP Status 404 - /login
Description: The requested resource (/login) is not available.






Looking back at your original email -- is this your ROOT context?
If not -- if it's "smsinfo" -- then of course the above path has to
reflect that, e.g.



The url-mapping in web.xml is relative to the context; HTML href or
form action attributes are relative to the server.

HTH,
--
Hassan Schroeder  [EMAIL PROTECTED]

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



RE: Directory Structure and Can't Find Resources in Tomcat

2006-05-20 Thread Allen Williams
Sorry, it didn't work.  Once again, in my browser I have:

HTTP Status 404 - /login
Type: Status report
Message: /login
Description: The requested resource (/login) is not available.
Apache Tomcat/5.0
*
Here is the suggested line directly from my login.jsp:


*
Here is my entire web.xml file:

http://java.sun.com/j2ee/dtds/web-app_2_3.dtd";>



login
UserConfig.login


login

/login



All the rest (directory structure, etc.) is as in my first post.

-Original Message-
From: Hassan Schroeder [mailto:[EMAIL PROTECTED]
Sent: Saturday, May 20, 2006 2:19 PM
To: Tomcat Users List
Subject: Re: Directory Structure and Can't Find Resources in Tomcat


On 5/19/06, Allen Williams <[EMAIL PROTECTED]> wrote:

>  action="WEB-INF/classes/UserConfig.login">

You can't directly address something under WEB-INF; your action
should be something like `action="/login"` with a mapping in your
web.xml like


   login
   UserConfig.login


   login
   /login


Note: NO "/servlet" in there -- read the Tomcat doc or google for
"Tomcat invoker servlet" to understand why...

HTH,
-- 
Hassan Schroeder  [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: Directory Structure and Can't Find Resources in Tomcat

2006-05-20 Thread Allen Williams
So, I don't need 'action="servlet/login"', like the book I'm using said? 
Or, don't need 'action="classes/login"', like I might infer?

Thanks, I'll do the google you recommend, try it, and be back with you
in short order (or maybe tomorrow;-).

Thanks again!

-Original Message-
From: Hassan Schroeder [mailto:[EMAIL PROTECTED]
Sent: Saturday, May 20, 2006 2:19 PM
To: Tomcat Users List
Subject: Re: Directory Structure and Can't Find Resources in Tomcat


On 5/19/06, Allen Williams <[EMAIL PROTECTED]> wrote:

>  action="WEB-INF/classes/UserConfig.login">

You can't directly address something under WEB-INF; your action
should be something like `action="/login"` with a mapping in your
web.xml like


   login
   UserConfig.login


   login
   /login


Note: NO "/servlet" in there -- read the Tomcat doc or google for
"Tomcat invoker servlet" to understand why...

HTH,
-- 
Hassan Schroeder  [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: Directory Structure and Can't Find Resources in Tomcat

2006-05-20 Thread Hassan Schroeder

On 5/19/06, Allen Williams <[EMAIL PROTECTED]> wrote:





You can't directly address something under WEB-INF; your action
should be something like `action="/login"` with a mapping in your
web.xml like


  login
  UserConfig.login


  login
  /login


Note: NO "/servlet" in there -- read the Tomcat doc or google for
"Tomcat invoker servlet" to understand why...

HTH,
--
Hassan Schroeder  [EMAIL PROTECTED]

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



FW: FW: Directory Structure and Can't Find Resources in Tomcat

2006-05-20 Thread Allen Williams
When I do that, I just get this in my browser:

***
Type: Status report

Message: /smsinfo/

Description: The requested resource (/smsinfo/) is not available.
**

Also, for what it's worth, none of the documentation seems to indicate that
I put this under ROOT.

Any further ideas, from anyone out there?

On Saturday 20 May 2006 11:11, you wrote:
> Try putting your webapp under:
>
> docroot= /usr/share/tomcat5/webapps/ROOT/smsinfo
>
>   -=> Gregg <=-
>
> Mladen Adamovic wrote:
> > I would suggest you to install and work with Netbeans 5.0. Netbeans
> > 5.0 have bundled Tomcat which work out of the box. Than you will not
> > have problems like these before deployment.
> >
> > Allen Williams wrote:
> >> Well, I can't figure out this directory structure and finding stuff
> >> at all.
> >>
> >> Here are my directory listings
> >>
> >> docroot= /usr/share/tomcat5/webapps/smsinfo
> >> ***
> >> anw-dev:/usr/share/tomcat5/webapps/smsinfo$ ls -laF
> >> total 20
> >> drwxr-xr-x  3 anw root 4096 2006-05-19 21:14 ./
> >> drwxr-xr-x  9 tomcat5 root 4096 2006-05-13 16:10 ../
> >> -rw-r--r--  1 anw anw   564 2006-05-19 21:20 login.jsp
> >> drwxr-xr-x  4 anw anw  4096 2006-05-19 21:15 WEB-INF/
> >> -rw-r--r--  1 anw anw   241 2006-05-19 21:20 welcome.jsp
> >>
> >> 
> >> anw-dev:/usr/share/tomcat5/webapps/smsinfo/WEB-INF$ ls -laF
> >> total 20
> >> drwxr-xr-x  4 anw anw  4096 2006-05-19 21:15 ./
> >> drwxr-xr-x  3 anw root 4096 2006-05-19 21:14 ../
> >> drwxr-xr-x  3 anw root 4096 2006-05-18 20:27 classes/
> >> drwxr-xr-x  2 anw root 4096 2006-05-13 15:49 lib/
> >> -rw-r--r--  1 anw anw   440 2006-05-19 21:18 web.xml
> >>
> >> (lib is empty)
> >> ***
> >> anw-dev:/usr/share/tomcat5/webapps/smsinfo/WEB-INF/classes$ ls -laF
> >> total 12
> >> drwxr-xr-x  3 anw root 4096 2006-05-18 20:27 ./
> >> drwxr-xr-x  4 anw anw  4096 2006-05-19 21:15 ../
> >> drwxr-xr-x  2 anw root 4096 2006-05-18 20:27 UserConfig/
> >> *
> >> anw-dev:/usr/share/tomcat5/webapps/smsinfo/WEB-INF/classes/UserConfig$
> >> ls -laF
> >> total 12
> >> drwxr-xr-x  2 anw root 4096 2006-05-18 20:27 ./
> >> drwxr-xr-x  3 anw root 4096 2006-05-18 20:27 ../
> >> -rwxr-xr-x  1 anw root 1322 2006-05-19 21:18 login.class*
> >> *
> >>
> >> Here is the source to login.jsp (located in docroot,
> >> /usr/share/tomcat5/webapps/smsinfo):
> >>
> >> 
> >> 
> >> SMS Information Transfer Login Page
> >> 
> >> 
> >>
> >> 
> >> 
> >>  >> action="WEB-INF/classes/UserConfig.login">
> >> User Name:
> >> Password: >> name="password">
> >> 
> >> 
> >> 
> >> 
> >>
> >> *
> >> Here is the source to login.class:
> >>
> >> package UserConfig;
> >>
> >> import javax.servlet.*;
> >> import javax.servlet.http.*;
> >> import java.io.*;
> >> import java.util.*;
> >>
> >> public class login extends HttpServlet
> >> {
> >> private String target="/welcome.jsp";
> >> private String getUser(String username, String password)
> >> {
> >> return username;
> >> }
> >> public void doGet(HttpServletRequest request, HttpServletResponse
> >> response)
> >> throws ServletException, IOException
> >> {
> >> // If it is a Get request, forward to doPost
> >> doPost(request, response);
> >> }
> >> public void doPost(HttpServletRequest request, HttpServletResponse
> >> response)
> >> throws ServletException, IOException
> >> {
> >> // Get user name and password:
> >> String username= request.getParameter("username");
> >> String password= request.getParameter("passw

RE: Directory Structure and Can't Find Resources in Tomcat

2006-05-20 Thread Allen Williams
The problem with that approach (admittedly valid if all you care about is
getting something working) is that I'm doing this for the educational value,
and really want to understand how this works and what I'm doing wrong.

Actually, for other Java development, I have used Netbeans, and like it.

Thanks for the help, though.

-Original Message-
From: Mladen Adamovic [mailto:[EMAIL PROTECTED]
Sent: Saturday, May 20, 2006 2:29 AM
To: Tomcat Users List
Subject: Re: Directory Structure and Can't Find Resources in Tomcat


I would suggest you to install and work with Netbeans 5.0. Netbeans 5.0
have bundled Tomcat which work out of the box. Than you will not have
problems like these before deployment.

Allen Williams wrote:
> Well, I can't figure out this directory structure and finding stuff at
all.
>
> Here are my directory listings
>
> docroot= /usr/share/tomcat5/webapps/smsinfo
> ***
> anw-dev:/usr/share/tomcat5/webapps/smsinfo$ ls -laF
> total 20
> drwxr-xr-x  3 anw root 4096 2006-05-19 21:14 ./
> drwxr-xr-x  9 tomcat5 root 4096 2006-05-13 16:10 ../
> -rw-r--r--  1 anw anw   564 2006-05-19 21:20 login.jsp
> drwxr-xr-x  4 anw anw  4096 2006-05-19 21:15 WEB-INF/
> -rw-r--r--  1 anw anw   241 2006-05-19 21:20 welcome.jsp
>
> 
> anw-dev:/usr/share/tomcat5/webapps/smsinfo/WEB-INF$ ls -laF
> total 20
> drwxr-xr-x  4 anw anw  4096 2006-05-19 21:15 ./
> drwxr-xr-x  3 anw root 4096 2006-05-19 21:14 ../
> drwxr-xr-x  3 anw root 4096 2006-05-18 20:27 classes/
> drwxr-xr-x  2 anw root 4096 2006-05-13 15:49 lib/
> -rw-r--r--  1 anw anw   440 2006-05-19 21:18 web.xml
>
> (lib is empty)
> ***
> anw-dev:/usr/share/tomcat5/webapps/smsinfo/WEB-INF/classes$ ls -laF
> total 12
> drwxr-xr-x  3 anw root 4096 2006-05-18 20:27 ./
> drwxr-xr-x  4 anw anw  4096 2006-05-19 21:15 ../
> drwxr-xr-x  2 anw root 4096 2006-05-18 20:27 UserConfig/
> *
> anw-dev:/usr/share/tomcat5/webapps/smsinfo/WEB-INF/classes/UserConfig$
> ls -laF
> total 12
> drwxr-xr-x  2 anw root 4096 2006-05-18 20:27 ./
> drwxr-xr-x  3 anw root 4096 2006-05-18 20:27 ../
> -rwxr-xr-x  1 anw root 1322 2006-05-19 21:18 login.class*
> *
>
> Here is the source to login.jsp (located in docroot,
> /usr/share/tomcat5/webapps/smsinfo):
>
> 
> 
> SMS Information Transfer Login Page
> 
> 
>
> 
> 
>  action="WEB-INF/classes/UserConfig.login">
> User Name:
> Password:
> 
> 
> 
> 
>
> *
> Here is the source to login.class:
>
> package UserConfig;
>
> import javax.servlet.*;
> import javax.servlet.http.*;
> import java.io.*;
> import java.util.*;
>
> public class login extends HttpServlet
> {
> private String target="/welcome.jsp";
> private String getUser(String username, String password)
> {
> return username;
> }
> public void doGet(HttpServletRequest request, HttpServletResponse
> response)
> throws ServletException, IOException
> {
> // If it is a Get request, forward to doPost
> doPost(request, response);
> }
> public void doPost(HttpServletRequest request, HttpServletResponse
> response)
> throws ServletException, IOException
> {
> // Get user name and password:
> String username= request.getParameter("username");
> String password= request.getParameter("password");
> String user= getUser(username, password);
> // Add fake user to the request
> request.setAttribute("USER", user);
> ServletContext context= getServletContext();
> RequestDispatcher dispatcher=
context.getRequestDispatcher(target);
> //target defined above
> dispatcher.forward(request, response);
> }
> }
> ***
> Here is the source for my web.xml file:
>
> 
>
>  PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
> "http://java.sun.com/j2ee/dtds/web-app_2_3.dtd";>
>
> 
> 
> login
> UserConfig.login
> 
> 
> login
> /servlet/login
> 
> 
> ***
>
> As can be seen, all this is very simple, my very first Tomcat web app.  I
> have
> followed the instructions in
>

Re: Directory Structure and Can't Find Resources in Tomcat

2006-05-20 Thread Gregg Leichtman
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Try putting your webapp under:

docroot= /usr/share/tomcat5/webapps/ROOT/smsinfo

  -=> Gregg <=-

Mladen Adamovic wrote:
> I would suggest you to install and work with Netbeans 5.0. Netbeans
> 5.0 have bundled Tomcat which work out of the box. Than you will not
> have problems like these before deployment.
>
> Allen Williams wrote:
>> Well, I can't figure out this directory structure and finding stuff
>> at all.
>> 
>> Here are my directory listings
>>
>> docroot= /usr/share/tomcat5/webapps/smsinfo
>> ***
>> anw-dev:/usr/share/tomcat5/webapps/smsinfo$ ls -laF
>> total 20
>> drwxr-xr-x  3 anw root 4096 2006-05-19 21:14 ./
>> drwxr-xr-x  9 tomcat5 root 4096 2006-05-13 16:10 ../
>> -rw-r--r--  1 anw anw   564 2006-05-19 21:20 login.jsp
>> drwxr-xr-x  4 anw anw  4096 2006-05-19 21:15 WEB-INF/
>> -rw-r--r--  1 anw anw   241 2006-05-19 21:20 welcome.jsp
>>
>> 
>> anw-dev:/usr/share/tomcat5/webapps/smsinfo/WEB-INF$ ls -laF
>> total 20
>> drwxr-xr-x  4 anw anw  4096 2006-05-19 21:15 ./
>> drwxr-xr-x  3 anw root 4096 2006-05-19 21:14 ../
>> drwxr-xr-x  3 anw root 4096 2006-05-18 20:27 classes/
>> drwxr-xr-x  2 anw root 4096 2006-05-13 15:49 lib/
>> -rw-r--r--  1 anw anw   440 2006-05-19 21:18 web.xml
>>
>> (lib is empty)
>> ***
>> anw-dev:/usr/share/tomcat5/webapps/smsinfo/WEB-INF/classes$ ls -laF
>> total 12
>> drwxr-xr-x  3 anw root 4096 2006-05-18 20:27 ./
>> drwxr-xr-x  4 anw anw  4096 2006-05-19 21:15 ../
>> drwxr-xr-x  2 anw root 4096 2006-05-18 20:27 UserConfig/
>> *
>> anw-dev:/usr/share/tomcat5/webapps/smsinfo/WEB-INF/classes/UserConfig$
>> ls -laF
>> total 12
>> drwxr-xr-x  2 anw root 4096 2006-05-18 20:27 ./
>> drwxr-xr-x  3 anw root 4096 2006-05-18 20:27 ../
>> -rwxr-xr-x  1 anw root 1322 2006-05-19 21:18 login.class*
>> *
>>
>> Here is the source to login.jsp (located in docroot,
>> /usr/share/tomcat5/webapps/smsinfo):
>>
>> 
>> 
>> SMS Information Transfer Login Page
>> 
>> 
>>
>> 
>> 
>> > action="WEB-INF/classes/UserConfig.login">
>> User Name:
>> Password:> name="password">
>> 
>> 
>> 
>> 
>>
>> *
>> Here is the source to login.class:
>>
>> package UserConfig;
>>
>> import javax.servlet.*;
>> import javax.servlet.http.*;
>> import java.io.*;
>> import java.util.*;
>>
>> public class login extends HttpServlet
>> {
>> private String target="/welcome.jsp";
>> private String getUser(String username, String password)
>> {
>> return username;
>> }
>> public void doGet(HttpServletRequest request, HttpServletResponse
>> response)
>> throws ServletException, IOException
>> {
>> // If it is a Get request, forward to doPost
>> doPost(request, response);
>> }
>> public void doPost(HttpServletRequest request, HttpServletResponse
>> response)
>> throws ServletException, IOException
>> {
>> // Get user name and password:
>> String username= request.getParameter("username");
>> String password= request.getParameter("password");
>> String user= getUser(username, password);
>> // Add fake user to the request
>> request.setAttribute("USER", user);
>> ServletContext context= getServletContext();
>> RequestDispatcher dispatcher=
>> context.getRequestDispatcher(target);
>> //target defined above
>> dispatcher.forward(request, response);
>> }
>> }
>> ***
>> Here is the source for my web.xml file:
>>
>> 
>>
>> > PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
>> "http://java.sun.com/j2ee/dtds/web-app_2_3.dtd";>
>>
>> 
>> 
>> login
>> UserConfig.login
>> 
>> 
>> login
>> /servlet/login
>> 
>> 
>> ***

Re: Directory Structure and Can't Find Resources in Tomcat

2006-05-19 Thread Mladen Adamovic
I would suggest you to install and work with Netbeans 5.0. Netbeans 5.0 
have bundled Tomcat which work out of the box. Than you will not have 
problems like these before deployment.


Allen Williams wrote:

Well, I can't figure out this directory structure and finding stuff at all.
 
Here are my directory listings


docroot= /usr/share/tomcat5/webapps/smsinfo
***
anw-dev:/usr/share/tomcat5/webapps/smsinfo$ ls -laF
total 20
drwxr-xr-x  3 anw root 4096 2006-05-19 21:14 ./
drwxr-xr-x  9 tomcat5 root 4096 2006-05-13 16:10 ../
-rw-r--r--  1 anw anw   564 2006-05-19 21:20 login.jsp
drwxr-xr-x  4 anw anw  4096 2006-05-19 21:15 WEB-INF/
-rw-r--r--  1 anw anw   241 2006-05-19 21:20 welcome.jsp


anw-dev:/usr/share/tomcat5/webapps/smsinfo/WEB-INF$ ls -laF
total 20
drwxr-xr-x  4 anw anw  4096 2006-05-19 21:15 ./
drwxr-xr-x  3 anw root 4096 2006-05-19 21:14 ../
drwxr-xr-x  3 anw root 4096 2006-05-18 20:27 classes/
drwxr-xr-x  2 anw root 4096 2006-05-13 15:49 lib/
-rw-r--r--  1 anw anw   440 2006-05-19 21:18 web.xml

(lib is empty)
***
anw-dev:/usr/share/tomcat5/webapps/smsinfo/WEB-INF/classes$ ls -laF
total 12
drwxr-xr-x  3 anw root 4096 2006-05-18 20:27 ./
drwxr-xr-x  4 anw anw  4096 2006-05-19 21:15 ../
drwxr-xr-x  2 anw root 4096 2006-05-18 20:27 UserConfig/
*
anw-dev:/usr/share/tomcat5/webapps/smsinfo/WEB-INF/classes/UserConfig$
ls -laF
total 12
drwxr-xr-x  2 anw root 4096 2006-05-18 20:27 ./
drwxr-xr-x  3 anw root 4096 2006-05-18 20:27 ../
-rwxr-xr-x  1 anw root 1322 2006-05-19 21:18 login.class*
*

Here is the source to login.jsp (located in docroot,
/usr/share/tomcat5/webapps/smsinfo):



SMS Information Transfer Login Page






User Name:
Password:





*
Here is the source to login.class:

package UserConfig;

import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;

public class login extends HttpServlet
{
private String target="/welcome.jsp";
private String getUser(String username, String password)
{
return username;
}
public void doGet(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, IOException
{
// If it is a Get request, forward to doPost
doPost(request, response);
}
public void doPost(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, IOException
{
// Get user name and password:
String username= request.getParameter("username");
String password= request.getParameter("password");
String user= getUser(username, password);
// Add fake user to the request
request.setAttribute("USER", user);
ServletContext context= getServletContext();
RequestDispatcher dispatcher= context.getRequestDispatcher(target);
//target defined above
dispatcher.forward(request, response);
}
}
***
Here is the source for my web.xml file:



http://java.sun.com/j2ee/dtds/web-app_2_3.dtd";>



login
UserConfig.login


login
/servlet/login


***

As can be seen, all this is very simple, my very first Tomcat web app.  I
have
followed the instructions in

http://tomcat.apache.org/tomcat-5.5-doc/appdev/index.html

When I go to http://localhost:8180/smsinfo/login.jsp, I get the form, input
some text, then get the following screen from tomcat:

HTTP Status 404 - /smsinfo/WEB-INF/classes/UserConfig.login

Type: Status report

Message: /smsinfo/WEB-INF/classes/UserConfig.login

Description: The requested resource
(/smsinfo/WEB-INF/classes/UserConfig.login) is not available.
Apache Tomcat/5.0
*

I've been screwing around with this for days, reading books and the web
help,
but can't find out what's wrong.  Any help is greatly appreciated.

TIA and regards,
anw


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



  


--
Mladen Adamovic
http://home.blic.net/adamm
http://www.shortopedia.com 
http://www.froola.com 



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



Directory Structure and Can't Find Resources in Tomcat

2006-05-19 Thread Allen Williams

Well, I can't figure out this directory structure and finding stuff at all.
 
Here are my directory listings

docroot= /usr/share/tomcat5/webapps/smsinfo
***
anw-dev:/usr/share/tomcat5/webapps/smsinfo$ ls -laF
total 20
drwxr-xr-x  3 anw     root 4096 2006-05-19 21:14 ./
drwxr-xr-x  9 tomcat5 root 4096 2006-05-13 16:10 ../
-rw-r--r--  1 anw     anw   564 2006-05-19 21:20 login.jsp
drwxr-xr-x  4 anw     anw  4096 2006-05-19 21:15 WEB-INF/
-rw-r--r--  1 anw     anw   241 2006-05-19 21:20 welcome.jsp


anw-dev:/usr/share/tomcat5/webapps/smsinfo/WEB-INF$ ls -laF
total 20
drwxr-xr-x  4 anw anw  4096 2006-05-19 21:15 ./
drwxr-xr-x  3 anw root 4096 2006-05-19 21:14 ../
drwxr-xr-x  3 anw root 4096 2006-05-18 20:27 classes/
drwxr-xr-x  2 anw root 4096 2006-05-13 15:49 lib/
-rw-r--r--  1 anw anw   440 2006-05-19 21:18 web.xml

(lib is empty)
***
anw-dev:/usr/share/tomcat5/webapps/smsinfo/WEB-INF/classes$ ls -laF
total 12
drwxr-xr-x  3 anw root 4096 2006-05-18 20:27 ./
drwxr-xr-x  4 anw anw  4096 2006-05-19 21:15 ../
drwxr-xr-x  2 anw root 4096 2006-05-18 20:27 UserConfig/
*
anw-dev:/usr/share/tomcat5/webapps/smsinfo/WEB-INF/classes/UserConfig$
ls -laF
total 12
drwxr-xr-x  2 anw root 4096 2006-05-18 20:27 ./
drwxr-xr-x  3 anw root 4096 2006-05-18 20:27 ../
-rwxr-xr-x  1 anw root 1322 2006-05-19 21:18 login.class*
*

Here is the source to login.jsp (located in docroot,
/usr/share/tomcat5/webapps/smsinfo):



SMS Information Transfer Login Page






User Name:
Password:





*
Here is the source to login.class:

package UserConfig;

import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;

public class login extends HttpServlet
{
private String target="/welcome.jsp";
private String getUser(String username, String password)
{
return username;
}
public void doGet(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, IOException
{
// If it is a Get request, forward to doPost
doPost(request, response);
}
public void doPost(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, IOException
{
// Get user name and password:
String username= request.getParameter("username");
String password= request.getParameter("password");
String user= getUser(username, password);
// Add fake user to the request
request.setAttribute("USER", user);
ServletContext context= getServletContext();
RequestDispatcher dispatcher= context.getRequestDispatcher(target);
//target defined above
dispatcher.forward(request, response);
}
}
***
Here is the source for my web.xml file:



http://java.sun.com/j2ee/dtds/web-app_2_3.dtd";>



login
UserConfig.login


login
/servlet/login


***

As can be seen, all this is very simple, my very first Tomcat web app.  I
have
followed the instructions in

http://tomcat.apache.org/tomcat-5.5-doc/appdev/index.html

When I go to http://localhost:8180/smsinfo/login.jsp, I get the form, input
some text, then get the following screen from tomcat:

HTTP Status 404 - /smsinfo/WEB-INF/classes/UserConfig.login

Type: Status report

Message: /smsinfo/WEB-INF/classes/UserConfig.login

Description: The requested resource
(/smsinfo/WEB-INF/classes/UserConfig.login) is not available.
Apache Tomcat/5.0
*

I've been screwing around with this for days, reading books and the web
help,
but can't find out what's wrong.  Any help is greatly appreciated.

TIA and regards,
anw


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



Re: Newbie: Help on directory structure

2006-05-18 Thread Hassan Schroeder

On 5/18/06, Williams, Allen <[EMAIL PROTECTED]> wrote:


Tonight I'll try it with all the lines recommended here, and see.  The
book I'm using only had the four lines.  Is this a change between
Tomcat4 and Tomcat5?


Yes. Throw that book away and use the excellent documentation
on the Tomcat web site (in conjunction with the Servlet spec)   :-)

FWIW!
--
Hassan Schroeder  [EMAIL PROTECTED]

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



RE: Newbie: Help on directory structure

2006-05-18 Thread Williams, Allen
Aha!  I'm not sure which pair I did, but I only put top four lines in my
web.xml file (the servlet-name and servlet-class pair, and surrounding
servlet tag).

Tonight I'll try it with all the lines recommended here, and see.  The
book I'm using only had the four lines.  Is this a change between
Tomcat4 and Tomcat5?

Thanks, and Regards,

Allen Williams
[EMAIL PROTECTED]
Office: (321)726-1197
Mobile: (321)258-1272
FAX: (321)727-9607

-Original Message-
From: Hassan Schroeder [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 18, 2006 2:39 PM
To: Tomcat Users List
Subject: Re: Newbie: Help on directory structure

On 5/18/06, Allen Williams <[EMAIL PROTECTED]> wrote:
> I have an Java app called login, in a package called UserConfig.  This
is
> just a very simple app to help me get started.
>
> The directory structure:
>
> app-name|
> |-login.jsp
> |-welcome.jsp
> |-WEB-INF|
> ||-classes|
> |||-UserConfig|
> |||   |-login.class
> |-src/
> |-etc.///
>
> In a form in a (very simple) login.jsp file, I have tried referencing
> "servlets/UserConfig.login",

You need to provide a mapping for your servlets in web.xml, e.g.

  
LoginServlet
UserConfig.login
  
  
LoginServlet
/login
  

HTH,
-- 
Hassan Schroeder  [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: Newbie: Help on directory structure

2006-05-18 Thread Williams, Allen
I tried referencing the class with the name UserConfig.login in the .jsp
file, with a directory structure classes/UserConfig/login.class and
classes/UserConfig.login.class.  Neither worked, but I could have made a
mistake and will try again.

Where should the name UserConfig.login be used?  As the reference in the
.jsp file, or as the actual name of the .class file?

BTW, I also found the online documentation regarding deploying Tomcat
webapps, and I swear I tried the directory structure and naming
conventions it recommends, but will try again tonight.

Thanks, and Regards,

Allen Williams
[EMAIL PROTECTED]
Office: (321)726-1197
Mobile: (321)258-1272
FAX: (321)727-9607

-Original Message-
From: Steve Ochani [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 18, 2006 2:29 PM
To: Allen Williams; Tomcat Users List
Subject: Re: Newbie: Help on directory structure

On 18 May 2006 at 9:10, Allen Williams wrote:

> I have an Java app called login, in a package called UserConfig.  This
> is just a very simple app to help me get started.
> 
> The directory structure:
> 
> app-name|
> |-login.jsp
> |-welcome.jsp
> |-WEB-INF|
> ||-classes|
> |||-UserConfig|
> |||   |-login.class
> |-src/
> |-etc.///
> 
> In a form in a (very simple) login.jsp file, I have tried referencing
> "servlets/UserConfig.login", "classes/UserConfig.login",
> "classes/UserConfig/login", and just about every other permutation.  I
> have also moved classes/UserConfig/login.class to classes/login.class,
> classes/UserConfig.login.class, and
> classes/UserConfig/UserConfig.login.class.

Did you try UserConfig.login   (dot in between package name and class
name)?




-
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: Newbie: Help on directory structure

2006-05-18 Thread Hassan Schroeder

On 5/18/06, Allen Williams <[EMAIL PROTECTED]> wrote:

I have an Java app called login, in a package called UserConfig.  This is
just a very simple app to help me get started.

The directory structure:

app-name|
|-login.jsp
|-welcome.jsp
|-WEB-INF|
||-classes|
|||-UserConfig|
|||   |-login.class
|-src/
|-etc.///

In a form in a (very simple) login.jsp file, I have tried referencing
"servlets/UserConfig.login",


You need to provide a mapping for your servlets in web.xml, e.g.

 
   LoginServlet
   UserConfig.login
 
 
   LoginServlet
   /login
 

HTH,
--
Hassan Schroeder  [EMAIL PROTECTED]

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



Re: Newbie: Help on directory structure

2006-05-18 Thread Steve Ochani
On 18 May 2006 at 9:10, Allen Williams wrote:

> I have an Java app called login, in a package called UserConfig.  This
> is just a very simple app to help me get started.
> 
> The directory structure:
> 
> app-name|
> |-login.jsp
> |-welcome.jsp
> |-WEB-INF|
> ||-classes|
> |||-UserConfig|
> |||   |-login.class
> |-src/
> |-etc.///
> 
> In a form in a (very simple) login.jsp file, I have tried referencing
> "servlets/UserConfig.login", "classes/UserConfig.login",
> "classes/UserConfig/login", and just about every other permutation.  I
> have also moved classes/UserConfig/login.class to classes/login.class,
> classes/UserConfig.login.class, and
> classes/UserConfig/UserConfig.login.class.

Did you try UserConfig.login   (dot in between package name and class name)?




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



Newbie: Help on directory structure

2006-05-18 Thread Allen Williams
I have an Java app called login, in a package called UserConfig.  This is
just a very simple app to help me get started.

The directory structure:

app-name|
|-login.jsp
|-welcome.jsp
|-WEB-INF|
||-classes|
|||-UserConfig|
|||   |-login.class
|-src/
|-etc.///

In a form in a (very simple) login.jsp file, I have tried referencing
"servlets/UserConfig.login",
"classes/UserConfig.login", "classes/UserConfig/login", and just about every
other permutation.  I have also moved classes/UserConfig/login.class to
classes/login.class, classes/UserConfig.login.class, and
classes/UserConfig/UserConfig.login.class.

To each of these combinations and permutations, I get a "resource
unavailable" message referencing whatever I have currently called the .class
file in the
login.jsp file.

Can anyone give me an explanation of what the directory structure is
supposed to be, and what this class is supposed to be called?  Is this
convention documented anywhere?

Thanks,
anw


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