Re: Weird problem: Two apparent copies of app started

2007-09-29 Thread Ken Bowen

Sorry about thatsome kind of sloppiness on my part.

I've realize the problem must lie in the relationship between my app's 
META-INF/context.xml and what is configured in Tomcat's conf/server.xml.

IIn the latter,  found there was an old Context entry in the Host element:

Host appBase=webapps name=strong-brain.com unpackWARs=true 
autoDeploy=true


 Aliaswww.strong-brain.com/Alias
 Alias216.154.215.173/Alias
Context path= docBase=strongbrain debug=10 
reloadable=true cookies=true/ 
 Context path=/manager 
docBase=/opt/tomcat5/server/webapps/manager privileged=true debug=0/
 Context path=/admin 
docBase=/opt/tomcat5/server/webapps/admin privileged=true debug=0/
 Logger className=org.apache.catalina.logger.FileLogger 
prefix=strong-brain.com. suffix=.txt timestamp=true/

 /Host

So what I'm confused about is this:  Exactly what should appear in Host 
and what in META-INF/context.xml??
The A Word on Contexts in 
http://tomcat.apache.org/tomcat-5.5-doc/deployer-howto.html doesn't give 
any details.


Thanks,
Ken

Caldarale, Charles R wrote:
From: Ken Bowen [mailto:[EMAIL PROTECTED] 
Subject: Weird problem: Two apparent copies of app started


strongbrain/WEB-INF/lib/servlet-api.jar



One obvious error: you must not put the servlet-api.jar inside your
webapp - the container supplies that.  Remove it and see if it helps.

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


  


-
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: Weird problem: Two apparent copies of app started

2007-09-29 Thread Pid
Ken Bowen wrote:
 Sorry about thatsome kind of sloppiness on my part.
 
 I've realize the problem must lie in the relationship between my app's
 META-INF/context.xml and what is configured in Tomcat's conf/server.xml.
 IIn the latter,  found there was an old Context entry in the Host element:
 
 Host appBase=webapps name=strong-brain.com unpackWARs=true
 autoDeploy=true
 
  Aliaswww.strong-brain.com/Alias
  Alias216.154.215.173/Alias
 Context path= docBase=strongbrain debug=10
 reloadable=true cookies=true/  Context path=/manager
 docBase=/opt/tomcat5/server/webapps/manager privileged=true debug=0/
  Context path=/admin
 docBase=/opt/tomcat5/server/webapps/admin privileged=true debug=0/
  Logger className=org.apache.catalina.logger.FileLogger
 prefix=strong-brain.com. suffix=.txt timestamp=true/
  /Host
 
 So what I'm confused about is this:  Exactly what should appear in Host
 and what in META-INF/context.xml??
 The A Word on Contexts in
 http://tomcat.apache.org/tomcat-5.5-doc/deployer-howto.html doesn't give
 any details.

http://tomcat.apache.org/tomcat-5.5-doc/config/context.html

Context definitions in server.xml are strongly discouraged in recent
releases of Tomcat.  Remove the definition with the empty path
attribute. (We'll address the admin/manager apps later).

DO NOT use the path or docBase attribute in a Context defined outside of
server.xml.  (The path is determined from the WAR or deployed
application directory.)

The default Context for a Host is known as the ROOT Context, this is a
special name and the capitalisation is important.  If you're deploying
your app as the default, you should rename the WAR (or the directory if
it's unpacked/deployed) accordingly.

your/webapps/ROOT.war
your/webapps/ROOT/   unpacked files

If you want to store the files outside of the tomcat directory, just
alter the appBase attribute of the host.  The following illustrates this:

/my/sites/www.domain.com/webapps/ROOT
/my/sites/www.domain.com/webapps/ROOT/META-INF/context.xml

Host appBase=/my/sites/www.domain.com/webapps name=domain.com ...


p




 Thanks,
 Ken
 
 Caldarale, Charles R wrote:
 From: Ken Bowen [mailto:[EMAIL PROTECTED] Subject: Weird problem: Two
 apparent copies of app started

 strongbrain/WEB-INF/lib/servlet-api.jar
 

 One obvious error: you must not put the servlet-api.jar inside your
 webapp - the container supplies that.  Remove it and see if it helps.

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


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



RE: Weird problem: Two apparent copies of app started

2007-09-29 Thread Caldarale, Charles R
 From: Pid [mailto:[EMAIL PROTECTED] 
 Subject: Re: Weird problem: Two apparent copies of app started
 
 DO NOT use the path or docBase attribute in a Context defined 
 outside of server.xml.

One exception to that: if the webapp is placed outside of the Host
appBase directory, your Context entry must be placed in
conf/Catalina/[host]/[appname].xml, and it must contain a docBase
attribute that points to the location of the webapp directory or .war
file.

 If you want to store the files outside of the tomcat directory, just
 alter the appBase attribute of the host.

The problem with that is you lose the built-in apps that come with
Tomcat, which may or may not be a concern.  I'd recommend leaving the
Host appBase setting alone, and use the method I described above for
any webapps to be located outside of the appBase directory.

 - 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: Weird problem: Two apparent copies of app started

2007-09-29 Thread Caldarale, Charles R
 From: Ken Bowen [mailto:[EMAIL PROTECTED] 
 Subject: Re: Weird problem: Two apparent copies of app started
 
 So what I'm confused about is this:  Exactly what should 
 appear in Host and what in META-INF/context.xml??
 The A Word on Contexts in 
 http://tomcat.apache.org/tomcat-5.5-doc/deployer-howto.html 
 doesn't give any details.

Unfortunately, not all of the Tomcat doc has been updated to reflect the
current recommended usage of placing Context elements in your webapp's
META-INF/context.xml file.  As Pid pointed out, the most accurate
description is here:
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html

Even that has some discrepancies (e.g., use of the path attribute in the
Access Logs and Request Filters examples).

To summarize the rules:

1) Never put Context entries in server.xml.

2) Never use a path attribute in a Context element.

3) Only use a docBase attribute when the Context element is in
conf/Catalina/[host]/[appname].xml and the webapp is stored outside of
the Host's appBase directory.

4) Use the name ROOT for the default webapp of each Host.

 - 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: java.net.MalformedURLException: no protocol: Files/thirdparty/TOMCAT/common/classes/

2007-09-29 Thread Jeffrey Nguyen \(jeffrngu\)
Hi Chris,

Sorry for the late reply. We implemented the workaround mentioned at the
bottom of http://issues.apache.org/bugzilla/show_bug.cgi?id=4543 for
now.  This fixed our problem.

At the same time, we also consider reinstalling tomcat under another
directory without space and see if that fixes our problem.

At this point, it seems none of the non-invasive work-arounds fixes this
issue we're having.

Thanks again for all your help.


- Jeffrey Nguyen

-Original Message-
From: Christopher Schultz [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 26, 2007 3:18 PM
To: Tomcat Users List
Subject: Re: java.net.MalformedURLException: no protocol:
Files/thirdparty/TOMCAT/common/classes/

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jeffrey,

Jeffrey Nguyen (jeffrngu) wrote:
 I can cd to all 4 paths w/o any problem (see below).
 
 C:\echo %CATALINA_HOME%
 C:\Program Files\thirdparty\TOMCAT

Your CATALINA_HOME still has a space in it, jst like it has all along.
You need to actually change the value of this environment variable so
that it does not contain any spaces.

 At this point, I'm considering reinstalling Tomcat in a different 
 directory as the last resort because it's involved a lot of work. I am

 looking for a workaround.

There is a very good likelihood that this will fix your problem. It
would be easier IMO to just change the environment variable's value.

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG+tp69CaO5/Lv0PARAj2YAKCfXMNLona4343ctiNfNHBUksWnuQCfcfUl
MZ5FvjTvA/7x6XwPP0ngWZE=
=LUlT
-END PGP SIGNATURE-

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



Re: Weird problem: Two apparent copies of app started

2007-09-29 Thread Ken Bowen

Chuck, PID:

Thanks for the replies and pointers -- they're a real help.
Now, I'm sure the following is going to turn out to be a DUH! moment for 
me, BUT:


If I put my context element in META-INF/context.xml, how is it 
associated with a

particular virtual HOST?

It's obvious how this happens if one utilizes:

   in individual files (with a .xml extension) in the
 $CATALINA_HOME/conf/[enginename]/[hostname]/ directory.  
 
But if:


   conf/server.xml  defines two virtual hosts:  Host1 and Host2

   webapps/myapp is *any* webapp (with or without META-INF/context.xml )

how does one ensure (if one can?) that myapp is an application running 
in Host2,

but not in Host1 ??

Thanks,
Ken





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



RE: Weird problem: Two apparent copies of app started

2007-09-29 Thread Caldarale, Charles R
 From: Ken Bowen [mailto:[EMAIL PROTECTED] 
 Subject: Re: Weird problem: Two apparent copies of app started
 
 If I put my context element in META-INF/context.xml, how is it 
 associated with a particular virtual HOST?
   
  But if:
 conf/server.xml  defines two virtual hosts:  Host1 and Host2

Each Host should have a unique setting for its appBase attribute, and
the appropriate webapps should be placed in the corresponding appBase
directory.  If multiple Host elements use the same appBase setting,
all webapps under that directory will be deployed in each Host.

 - 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: Weird problem: Two apparent copies of app started

2007-09-29 Thread Mark Thomas
Ken Bowen wrote:
 how does one ensure (if one can?) that myapp is an application running
 in Host2,
 but not in Host1 ??

Each host has its own appBase.

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: Weird problem: Two apparent copies of app started

2007-09-29 Thread Ken Bowen

Well,  I said it would be DUH!, didn't I.
Thanks a lot guys.
Have a good weekend,
Ken

Caldarale, Charles R wrote:
From: Ken Bowen [mailto:[EMAIL PROTECTED] 
Subject: Re: Weird problem: Two apparent copies of app started


If I put my context element in META-INF/context.xml, how is it 
associated with a particular virtual HOST?
  
 But if:

conf/server.xml  defines two virtual hosts:  Host1 and Host2



Each Host should have a unique setting for its appBase attribute, and
the appropriate webapps should be placed in the corresponding appBase
directory.  If multiple Host elements use the same appBase setting,
all webapps under that directory will be deployed in each Host.

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


  


-
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: Variable Resolver Error

2007-09-29 Thread Clifford Bryant
This has been resolved.  The JSTL jars in the client application were
updated to version 1.1.  And, the jasper-compile.jar and
jasper-runtime.jar jar files were deleted from the client WEB-INF/lib
directory.

The following post was helpful.

http://mail-archives.apache.org/mod_mbox/tomcat-users/200411.mbox/%3C41A
[EMAIL PROTECTED]


-Original Message-
From: Clifford Bryant [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 28, 2007 7:01 PM
To: users@tomcat.apache.org
Subject: Variable Resolver Error

I am getting a JSTL variable resolver error running CAS 3.0.7 on Tomcat
5.5 with Java 1.4.2 and the Java compatibility JAR.

 

java.lang.AbstractMethodError:
javax.servlet.jsp.PageContext.getVariableResolver()Ljavax/servlet/jsp/el
/VariableResolver;

 

The JSTL jars are in the CAS /lib directory.  The JSTL page is listed
below.

 

I converted the page to a scriptlet, but am still getting the variable
resolver error whenever I try to use the expression language, e.g.,
reference $(flowExecutionKey} from CAS.

 

%@ page session=false %

%@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core; %

%@ page import=com.rs.cas.util.RSCasUtil %

 

c:set var=site
value='%=RSCasUtil.getWebsite(request.getParameter(service))%'/

 

c:choose

  c:when test=${site == 'terms'}

jsp:include page=casiTimeLoginView.jsp/

  /c:when

  c:otherwise

c:set var=app
value='%=RSCasUtil.getApplication(request.getParameter(service))%'/

c:choose

  c:when test=${app == 'hmm'}

jsp:include page=casiHireLoginView.jsp/

  /c:when

  c:when test=${app == 'populus'}

jsp:include page=casiTrackLoginView.jsp/

  /c:when

  c:when test=${app == 'iris'}

jsp:include page=casiRisLoginView.jsp/

  /c:when

/c:choose

  /c:otherwise

/c:choose

 

Cliff Bryant 

 

 



This e-mail and any files transmitted with it are confidential and are
intended solely for the use of the individual or entity to whom they are
addressed.  This communication may contain information that is protected
from disclosure by applicable law.  If you are not the intended
recipient, or the employee or agent responsible for delivering this
communication to the intended recipient, be advised that you have
received this e-mail in error and any use, dissemination, forwarding,
printing or copying of this e-mail is strictly prohibited.  If you
believe that you have received this e-mail in error, please immediately
notify Edgewater Technology by telephone at (781) 246-3343 and delete
the communication from all e-mail files.



This e-mail and any files transmitted with it are confidential and are intended 
solely for the use of the individual or entity to whom they are addressed.  
This communication may contain information that is protected from disclosure by 
applicable law.  If you are not the intended recipient, or the employee or 
agent responsible for delivering this communication to the intended recipient, 
be advised that you have received this e-mail in error and any use, 
dissemination, forwarding, printing or copying of this e-mail is strictly 
prohibited.  If you believe that you have received this e-mail in error, please 
immediately notify Edgewater Technology by telephone at (781) 246-3343 and 
delete the communication from all e-mail files.


-
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 a default context?

2007-09-29 Thread Ken Bowen

Hi all,

When no contexts for a Host are specified in server.xml, but all are 
placed in the META-INF of their respective apps,

how does one specify one of them as the default Context for that Host?

http://tomcat.apache.org/tomcat-5.5-doc/config/context.html doesn't seem 
to say what to do:


   path:...If you specify a context path of an empty string
   (), you are defining the /default/ web application for this Host,
   which will process all requests not assigned to other Contexts. The
   value of this field must not be set except when statically defining
   a Context in server.xml, as it will be inferred from the filenames
   used for either the .xml context file or the docBase.

Using the simple Tomcat sample 
(http://tomcat.apache.org/tomcat-5.5-doc/appdev/sample/sample.war),  I 
set up a test setting:


Host definition from server.xml:

 Host appBase=webapps name=strong-brain.com unpackWARs=true
   autoDeploy=true
 Aliaswww.strong-brain.com/Alias
 Context path=/manager
   docBase=/opt/tomcat5/server/webapps/manager privileged=true
   debug=0/
 Context path=/admin
   docBase=/opt/tomcat5/server/webapps/admin privileged=true
   debug=0/
 Logger className=org.apache.catalina.logger.FileLogger
   prefix=strong-brain.com. suffix=.txt timestamp=true/
 /Host

Applications in tomcat5/webapps:

   ROOT  sample  sample.war  sample2

[sample2 is just a slightly edited copy of sample]
Out of the box, neither has a context.xml in META-INF. 
Connecting to http://strong-brain.com/sample or 
http://strong-brain.com/sample2 gives the expected result, and connecting
tohttp://strong-brain.com/   yields the Tomcat manager (Is that 
because it is the first context listed in Host??)


Despite the prohibition on using 'path=...' in Contexts in META-INF, I 
tried putting this in webapps/sample/META-INF/context.xml:


Context path= debug=10 reloadable=true cookies=true/

It didn't have any effect.  In particular, connecting to 
http://strong-brain.com/  still yielded the manager.


So how can I make sample or sample2 the default webapp for this Host, 
running when the connection to http://strong-brain.com/  is made???


Thanks,
Ken Bowen




-
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: How to specify a default context?

2007-09-29 Thread Hassan Schroeder
On 9/29/07, Ken Bowen [EMAIL PROTECTED] wrote:

 When no contexts for a Host are specified in server.xml, but all are
 placed in the META-INF of their respective apps,
 how does one specify one of them as the default Context for that Host?

Name it ROOT (directory) or ROOT.war, as appropriate.

HTH,
-- 
Hassan Schroeder  [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]