Re: tomcat context with /

2015-10-06 Thread Mark Thomas
On 06/10/2015 22:56, Harish Kulkarni wrote:
> Hi
> 
> We are migrating a WebSphere app to tomcat.
> In Websphere the context is defined as /secure/admin and we have hardcode
> redirects with /secure/admin/*

Whoops. Applications are meant to be independent of the context path at
which they are deployed.

> Our war is admin.war.
> Tomcat is not allowing /secure/admin as context.
> Is there a way using tomcat rewrite or apache config to achieve this.

Rename the WAR to secure#admin.war

Mark


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



Re: tomcat context with /

2015-10-06 Thread Harish Kulkarni
Hi

We are migrating a WebSphere app to tomcat.
In Websphere the context is defined as /secure/admin and we have hardcode
redirects with /secure/admin/*
Our war is admin.war.
Tomcat is not allowing /secure/admin as context.
Is there a way using tomcat rewrite or apache config to achieve this.

Thanks
Harish


Re: Tomcat context startup failed

2010-02-17 Thread André Warnier

Hadole, Nishant IN BOM SISL wrote:

Dear Simone,

The obvious error displayed from log is  java.lang.NoClassDefFoundError: 
org/apache/xerces/util/EncodingMap. First check whether the xerces jar containing 
mentioned class is in place. Try downloading new jar and again restart the tomcat 
services.



I am no great Java or Eclipse expert, but sometimes one wonders how 
explicit an error log message must be, that one would notice.


In the submitted logfile, these two errors happen first :

 16-feb-2010 16.48.14 org.apache.catalina.loader.WebappClassLoader 
validateJarFile
 INFO: validateJarFile(C:\Program 
Files\Apache\Tomcat55\webapps\Calzedonia2007\WEB-INF\lib\j2ee.jar) - jar 
not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: 
javax/servlet/Servlet.class
 16-feb-2010 16.48.14 org.apache.catalina.loader.WebappClassLoader 
validateJarFile
 INFO: validateJarFile(C:\Program 
Files\Apache\Tomcat55\webapps\Calzedonia2007\WEB-INF\lib\javaee.jar) - 
jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: 
javax/servlet/Servlet.class


In section 9.7.2 of the servlet spec, it says :

SRV.9.7.2 Web Application Class Loader

...
As described in the J2EE license agreement, servlet containers that are 
not part of a J2EE product should not allow the application to override 
J2SE platform classes, such as those in the java.*
and javax.* namespaces, that J2SE does not allow to be modified. Also, 
servlet containers that are part of a J2EE product should not allow the 
application to override J2SE or J2EE platform classes, such as those in 
java.* and javax.* namespaces, that either J2SE or J2EE do not allow to 
be modified. The container should not allow applications to override or 
access the container’s implementation...


I would tend to interpret this as :
- this web application tries to load jar files containing classes which 
would redefine classes of the JVM. The log message also indicates which 
jar's that is.
- the container (Tomcat) thus - rightly according to the spec - rejects 
the loading of these jar's.
- and then, later on, something else fails, maybe because another class 
(which may also have been in these rejected jar's) is missing.


Should not the first two errors above be attended to first ?




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



Re: Tomcat context startup failed

2010-02-17 Thread Bob Hall
Andre,

--- On Wed, 2/17/10 at 1:06 AM, André Warnier a...@ice-sa.com wrote:

  The obvious error displayed from log is 
 java.lang.NoClassDefFoundError:
 org/apache/xerces/util/EncodingMap. First check whether the
 xerces jar containing mentioned class is in place. Try
 downloading new jar and again restart the tomcat services.
  

The NoClassDefFoundError can also be caused by having more than one
copy of a given class available due to its having been loaded by
separate class loaders.

The OP should check his Tomcat installation for multiple .jars that
contain the missing class.

 I am no great Java or Eclipse expert, but sometimes one
 wonders how explicit an error log message must be, that one
 would notice.
 
 In the submitted logfile, these two errors happen first :
 
  16-feb-2010 16.48.14
 org.apache.catalina.loader.WebappClassLoader
 validateJarFile
  INFO: validateJarFile(C:\Program
 Files\Apache\Tomcat55\webapps\Calzedonia2007\WEB-INF\lib\j2ee.jar)
 - jar not loaded. See Servlet Spec 2.3, section 9.7.2.
 Offending class: javax/servlet/Servlet.class
  16-feb-2010 16.48.14
 org.apache.catalina.loader.WebappClassLoader
 validateJarFile
  INFO: validateJarFile(C:\Program
 Files\Apache\Tomcat55\webapps\Calzedonia2007\WEB-INF\lib\javaee.jar)
 - jar not loaded. See Servlet Spec 2.3, section 9.7.2.
 Offending class: javax/servlet/Servlet.class
 
 Should not the first two errors above be attended to first
 ?
 

The offending .jar files were not loaded and can't contribute to any problems.

- Bob




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



RE: Tomcat context startup failed

2010-02-17 Thread Caldarale, Charles R
 From: Bob Hall [mailto:rfha...@yahoo.com]
 Subject: Re: Tomcat context startup failed
 
 The offending .jar files were not loaded and can't contribute to any
 problems.

Don't bet on it: if the app has its own ClassLoader, it may well ignore the 
finer points of the servlet spec.  Regardless, the invalid jars should be 
removed, since it's illegal to have them there.  As André said, clean up the 
obvious errors before chasing down the more difficult ones.

 - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Tomcat context issue

2007-05-03 Thread Caldarale, Charles R
 From: tb323 [mailto:[EMAIL PROTECTED] 
 Subject: Tomcat context issue
 
 In server.xml I have this:
 
 Host name=localhost 
 appBase=/home/tb323/projects/www/public_html/webapps
 unpackWARs=true autoDeploy=true
 xmlValidation=false xmlNamespaceAware=false
 
 This way I want to be able to start an app by going to
 http://www.domain.com/webapps/appName

Normally, you wouldn't put webapps in the URL, since it's already part
of the appBase.  However, since you want to use that to route requests
from httpd to Tomcat, you'll need something to strip it out along the
way.  A valve in Tomcat could do the job; there's probably something in
httpd that will do it as well.

 JkMount /*.war ajp13_worker

The *.war setting is useless, since there won't be any direct requests
with a .war extension.

 - 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: Tomcat context issue

2007-05-03 Thread tb323

Thanks for the extremely quick reply. :)
I'll check this out after work.

/Tommy


Caldarale, Charles R wrote:
 
 From: tb323 [mailto:[EMAIL PROTECTED] 
 Subject: Tomcat context issue
 
 In server.xml I have this:
 
 Host name=localhost 
 appBase=/home/tb323/projects/www/public_html/webapps
 unpackWARs=true autoDeploy=true
 xmlValidation=false xmlNamespaceAware=false
 
 This way I want to be able to start an app by going to
 http://www.domain.com/webapps/appName
 
 Normally, you wouldn't put webapps in the URL, since it's already part
 of the appBase.  However, since you want to use that to route requests
 from httpd to Tomcat, you'll need something to strip it out along the
 way.  A valve in Tomcat could do the job; there's probably something in
 httpd that will do it as well.
 
 JkMount /*.war ajp13_worker
 
 The *.war setting is useless, since there won't be any direct requests
 with a .war extension.
 
  - 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]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Tomcat-context-issue-tf3686346.html#a10305254
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: tomcat context

2007-04-19 Thread Orlando Reis

Just deploy the context to anywhere you want it...
jar xvf potatos.war

Then as Andoni said:
context path=bananas
docBase=/path_contexts_directory/directory_where_you_extrated_the_war_file ...
  !-- Other stuff if necessary! --
/context

Is that it?

Orlando




On 4/17/07, José Perdigão [EMAIL PROTECTED] wrote:


OConchubhair, Andoni wrote:
 Hi,

 What do you mean by 'context path'?

 Basically, what you have is:

 context path=last_bit_of_URL docBase=name_of_war_or_folder ...
   !-- Other stuff if necessary! --
 /context

 -Original Message-
 From: José Perdigão [mailto:[EMAIL PROTECTED]
 Sent: 17 April 2007 15:37
 To: users@tomcat.apache.org
 Subject: tomcat context

 Hi,
 I'm using Apache Tomcat Version 5.5.23 and I would how is it possible to
 use a context path different to the name of the
 war file?
 Thanks

I want to deploy war files where the context name is not the same as the
original war file name, e.g. deploying potatoes.war and the context name
is /banana instead of /potatoes.

--
José Miguel Perdigão
homepage: zeperdi.pt.vu zeperdi.pt.vu

-
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: tomcat context

2007-04-17 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

José,

José Perdigão wrote:
 I'm using Apache Tomcat Version 5.5.23 and I would how is it possible to
 use a context path different to the name of the war file?

Most people will suggest that you use the proper WAR file name for your
context and leave it at that.

An alternative is to specify a Context element in your server.xml file
and specify the name of the context as well as the location of the WAR
file. Note that in this case I think it's a big mistake to put the WAR
file into the server's webapps directory... you're better off putting
it somewhere else or things will act funny.

- -chris

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

iD8DBQFGJOOB9CaO5/Lv0PARAqC7AJ0R3yTWejoMqeztvcC8lPSQi4JgrwCggZ+D
/+qkBthCq9fQEfiiNqVWo14=
=WxhQ
-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]



RE: tomcat context

2007-04-17 Thread Caldarale, Charles R
 From: Christopher Schultz [mailto:[EMAIL PROTECTED] 
 Subject: Re: tomcat context
 
 An alternative is to specify a Context element in your 
 server.xml file and specify the name of the context as well
 as the location of the WAR file.

Gotta get you out of the 4.1 mindset, Chris :-)

Do NOT put Context elements in server.xml; any changes to them require
a restart of Tomcat.  Rather, put the Context element in
conf/Catalina/[host]/[appname].xml, where appname is the desired name of
the application - it need not match the name of the .war file.  Use a
docBase attribute for Context that points to the .war file, which MUST
be placed outside of the Host appBase directory - otherwise you will
get the application deployed twice, once under the desired name, once
under the .war name.

 - 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: tomcat context

2007-04-17 Thread OConchubhair, Andoni
Hi,

What do you mean by 'context path'?

Basically, what you have is:

context path=last_bit_of_URL docBase=name_of_war_or_folder ...
!-- Other stuff if necessary! --
/context

-Original Message-
From: José Perdigão [mailto:[EMAIL PROTECTED] 
Sent: 17 April 2007 15:37
To: users@tomcat.apache.org
Subject: tomcat context

Hi,
I'm using Apache Tomcat Version 5.5.23 and I would how is it possible to 
use a context path different to the name of the
war file?
Thanks
-- 
José Miguel Perdigão
homepage: zeperdi.pt.vu zeperdi.pt.vu

-
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: tomcat context

2007-04-17 Thread Caldarale, Charles R
 From: OConchubhair, Andoni [mailto:[EMAIL PROTECTED] 
 Subject: RE: tomcat context
 
 context path=last_bit_of_URL 
 docBase=name_of_war_or_folder ...
   !-- Other stuff if necessary! --
 /context

Several problems with the above:

1) It's Context, not context - this is case sensitive.

2) The path attribute is ignored unless the Context element is in
server.xml, which is strongly discouraged for Tomcat 5 and above.

3) The docBase attribute is ignored unless the Context element is in
server.xml or in conf/Catalina/[host]/[appname].xml, and even then must
not be specified unless the webapp is placed outside of the Host
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: tomcat context

2007-04-17 Thread José Perdigão

OConchubhair, Andoni wrote:

Hi,

What do you mean by 'context path'?

Basically, what you have is:

context path=last_bit_of_URL docBase=name_of_war_or_folder ...
!-- Other stuff if necessary! --
/context

-Original Message-
From: José Perdigão [mailto:[EMAIL PROTECTED] 
Sent: 17 April 2007 15:37

To: users@tomcat.apache.org
Subject: tomcat context

Hi,
I'm using Apache Tomcat Version 5.5.23 and I would how is it possible to 
use a context path different to the name of the

war file?
Thanks
  
I want to deploy war files where the context name is not the same as the 
original war file name, e.g. deploying potatoes.war and the context name 
is /banana instead of /potatoes.


--
José Miguel Perdigão
homepage: zeperdi.pt.vu zeperdi.pt.vu

-
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: tomcat context

2007-04-17 Thread Johnny Kewl

I think the answer is you dont
Have a look at this thread

http://mail-archives.apache.org/mod_mbox/tomcat-users/200704.mbox/thread?2

== Multilevel context path problem ==
Date Tue, 10 Apr 2007



- Original Message - 
From: José Perdigão [EMAIL PROTECTED]

To: users@tomcat.apache.org
Sent: Tuesday, April 17, 2007 4:36 PM
Subject: tomcat context



Hi,
I'm using Apache Tomcat Version 5.5.23 and I would how is it possible to 
use a context path different to the name of the

war file?
Thanks
--
José Miguel Perdigão
homepage: zeperdi.pt.vu zeperdi.pt.vu

-
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: Tomcat Context

2006-08-18 Thread Bala Paranj
Thank you. The problem was that JBoss installation cannot have spaces in
the installed path. 

I did have the context defined below the host tag in server.xml. Hope
this helps someone.

-Original Message-
From: Dhiraj Ramakrishnan [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 15, 2006 10:33 PM
To: Tomcat Users List
Subject: Re: Tomcat Context

Hi ,

  How is the url mapping for the servlet in the web.xml? it should
not
include /myContext in the url mapping.

  The servlet url mapping in the web.xml should only be for
/somePath/MyServlet

  What do you get when you just type in
https://localhost:8443/myContextPath ?

Hope that helps ..

bye

Dhiraj

On 8/16/06, Bala Paranj [EMAIL PROTECTED] wrote:

 I changed the context to :

 Context path=/myContextPath appBase= docBase=C:\Program
 Files\jboss-4.0.4.GA\server\default\deploy debug=99
 reloadable=false
 /Context

 When I run the client, I get:

 Marking servlet MySeiServlet as unavailable? in the JBoss console. The
 client gets the error message:

 Server returned HTTP response code: 500 for URL:
 https://localhost:8443/myContextPath/somePath/MyServlet

 Does anyone know how to get this working? TIA.





-
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: Tomcat Context

2006-08-15 Thread Dhiraj Ramakrishnan

Hi ,

 How is the url mapping for the servlet in the web.xml? it should not
include /myContext in the url mapping.

 The servlet url mapping in the web.xml should only be for
/somePath/MyServlet

 What do you get when you just type in
https://localhost:8443/myContextPath ?

Hope that helps ..

bye

Dhiraj

On 8/16/06, Bala Paranj [EMAIL PROTECTED] wrote:


I changed the context to :

Context path=/myContextPath appBase= docBase=C:\Program
Files\jboss-4.0.4.GA\server\default\deploy debug=99
reloadable=false
/Context

When I run the client, I get:

Marking servlet MySeiServlet as unavailable? in the JBoss console. The
client gets the error message:

Server returned HTTP response code: 500 for URL:
https://localhost:8443/myContextPath/somePath/MyServlet

Does anyone know how to get this working? TIA.