RE: Web application directory structure

2005-07-27 Thread Brian Stephens
Are you using the autoDeploy or deployOnStartup feature (usually in the
Host configuration in server.xml)?  If you manually specify a Context
and use one of the automatic deployment features, you're likely to have
issues with your application; at least I did.  Try setting both of those
parameters to false, manually exploding your .war file, then restarting
Tomcat.

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 27, 2005 6:55 AM
To: Tomcat Users List
Subject: Re: Web application directory structure

You're right in that it should work.  I can only guess the most likely
reason this might fail is your web.xml configuration.  Look for servlet
mappings that might catch the data/test1.html url.  Your log files
should have more information.  Also check to be sure the tomcat service
has read privilege on the file and it's directory.

--David

Joe Becknell wrote:

I'm new to Tomcat and having a problem I thought someone could help me
with.
I have an application with servlet installed under webapps. I can run 
the servlet without problems. The servlet creates a page that gets sent

to the browser with some links to some (HTML and XML) data files on it.

When I click on one of the links, I get a 404 (resource not available) 
error, even though the file exists under my web application location. 
My setup is (basically, I'm not at work, so I can't remember it
exactly):
 
webapps\testapp\index.html
webapps\testapp\WEB-INF\web.xml
webapps\testapp\WEB-INF\classes\servlet.class
webapps\testapp\WEB-INF\src\servlet.java
webapps\testapp\data\test1.html
 
in my server.xml config file I have:
 
Context path=/testapp docBase=testapp debug=0 reloadable=true
 
although I don't think I need this since my app is located under the 
webapps directory. Navigating to:
 
http://localhost:8080/testapp/index.html works fine, but navigating to
 
http://localhost:8080/testapp/data/test1.html gives me the 404 error. I

was under the imression that I could place files anywhere under the 
application root (docBase) directory. Am I missing something here. 
Configuration oversight?
 
Thanks for any information.
Joe.
 
 

  



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



Best way to limit applications to specific ports

2005-07-27 Thread Brian Stephens
I'm trying to configure two different apps on the same server - the
Manager app as well as our own.  One of my requirements is to open 2
ports for our app and a third different port for the Manager.  Any users
connecting to the Manager port should not be able to access the other
application and vice versa, though we will want to use the Manager
against our application.

Is there a recommended best practice for doing this?  It seems I could
do it by configuring multiple Services, each pointing to a different
CATALINA_BASE, with exclusive Connectors defined.  Am I on track?  Are
there any other (better) ways to do this?

Thanks in advance.
Brian

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



Tomcat Service isn't reading application specific log4j.properties

2005-07-19 Thread Brian Stephens
Sorry if this is an oft-repeated question.  Digging through old archives
of this list and Google haven't turned up anything directly related.  

I'm trying to run Tomcat 5.5.9 as a windows service (installed it using
service.bat), but for some unknown reason, it does not pick up the
log4j.properties files located in my applications WEB-INF\classes
directory.  As far as I can tell, the java options, classpath and
startup class are identical for both.  Is this a limitation/weakness of
the Windows Service or do I have something mis-configured?

Thank You.
Brian

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



RE: Tomcat Service isn't reading application specific log4j.properties

2005-07-19 Thread Brian Stephens
Sorry, I managed to edit some really pertinent information from my
previous post.  

Logging is working at some level through the service.  However, it
doesn't seem to be picking up anything from log4j.properties, whether
it's in %CATALINA_HOME%\common\classes or MY_WEB_APP\WEB-INF\classes.


When I run tomcat using startup.bat or catalina.bat, the
log4j.properties are read as expected and logging works fine.  It's just
that when I run as a service, the following logs are all I get:
jakarta_service_datestamp.log, stdout_datestamp.log and
stderr_datestamp.log.  There is a certain amount of logging
configuration specified for the service itself in the documentation
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/windows-service-howto.ht
ml, but none of it refers to integrating with log4j.

-Original Message-
From: skausl [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 19, 2005 2:19 PM
To: 'Tomcat Users List'
Subject: RE: Tomcat Service isn't reading application specific
log4j.properties


I have log4j-1.2.11.jar in Tomcat\common\lib and log4j.properties in
Tomcat\common\classes\.

 -Original Message-
 Sorry if this is an oft-repeated question.  Digging through old 
 archives of this list and Google haven't turned up anything directly 
 related.
 
 I'm trying to run Tomcat 5.5.9 as a windows service (installed it 
 using service.bat), but for some unknown reason, it does not pick up 
 the log4j.properties files located in my applications WEB-INF\classes 
 directory.  As far as I can tell, the java options, classpath and 
 startup class are identical for both.  Is this a limitation/weakness 
 of the Windows Service or do I have something mis-configured?
 
 Thank You.
 Brian


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