Re: URI mapping

2011-10-23 Thread André Warnier

Mark Eggers wrote:

- Original Message -


From: André Warnier 
To: Tomcat Users List 
Cc: 
Sent: Sunday, October 23, 2011 2:26 PM

Subject: Re: URI mapping

Pid wrote:
...
The jsessionid cookie is set with the server

 name of the Tomcat instance, rather than a domain with variable
 subdomains*, unless you have configured it otherwise (Servlet 3.0 only).


Yes, but what /is/ this server name that this Tomcat will be using ?
I don't think that is as straightforward as it may look.

For example, what will Tomcat put in the cookie if this Tomcat is set up with a 
single 
but it runs on a host whose canonical name is 
"someserver.company.com".


Does it use the hostname received in the "Host:" header of the 
request, even when this hostname does not match any of its  tags ?


And what if there is no Host: header ?



Andre,

Exactly. Those were some of my questions as well. Right now though I'm setting 
up all Apache named virtual hosts to Tomcat virtual hosts so that the names 
match.

Apache HTTPD

  ServerName somehost.somewhere.com
  ServerAlias somehost
# more stuff


Tomcat server.xml

  somehost.somewhere.com
  


I don't map the default host (left at localhost). Based on what I've read so far, the cookies 
should come back in a sane fashion. I may have to flip the Tomcat  name attribute and 
 element around to have a completely clean installation. This will make 
CATALINA_BASE/conf/Catalina/ a bit ugly, but I can live with that.

I should set this up with a test web application with cookies and watch the 
entire mess with Firedebug.


..
By the way, if you are using mod_jk, you can use an alternative way to forward requests 
from Apache httpd to Tomcat.
Look at the bottom of this page : 
http://tomcat.apache.org/connectors-doc/reference/apache.html

the section entitled "Using SetHandler and Environment Variables".

Instead of using "JkMount /tomcat7/* tomcat7", you can use a Location section 
like


  SetHandler jakarta-servlet
  SetEnv JK_WORKER_NAME=tomcat7
  SetEnvIf REQUEST_URI ..(regexp).. no-jk

...


to the same effect.
I personally prefer this kind of configuration over JkMount/JkUnmount, because I find that 
it better "fits" within the Apache httpd configuration style, and it is also easier to 
figure out at what stage of the Apache cycle these directives take place.
And you can also add more "httpd things" in the  section (e.g., authentication 
etc..)


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



Re: URI mapping

2011-10-23 Thread Mark Eggers
- Original Message -

> From: André Warnier 
> To: Tomcat Users List 
> Cc: 
> Sent: Sunday, October 23, 2011 2:26 PM
> Subject: Re: URI mapping
> 
> Pid wrote:
> ...
> The jsessionid cookie is set with the server
>>  name of the Tomcat instance, rather than a domain with variable
>>  subdomains*, unless you have configured it otherwise (Servlet 3.0 only).
>> 
> Yes, but what /is/ this server name that this Tomcat will be using ?
> I don't think that is as straightforward as it may look.
> 
> For example, what will Tomcat put in the cookie if this Tomcat is set up with 
> a 
> single 
> but it runs on a host whose canonical name is 
> "someserver.company.com".
> 
> Does it use the hostname received in the "Host:" header of the 
> request, even when this hostname does not match any of its  tags ?
> 
> And what if there is no Host: header ?


Andre,

Exactly. Those were some of my questions as well. Right now though I'm setting 
up all Apache named virtual hosts to Tomcat virtual hosts so that the names 
match.

Apache HTTPD

  ServerName somehost.somewhere.com
  ServerAlias somehost
# more stuff


Tomcat server.xml

  somehost.somewhere.com
  


I don't map the default host (left at localhost). Based on what I've read so 
far, the cookies should come back in a sane fashion. I may have to flip the 
Tomcat  name attribute and  element around to have a completely 
clean installation. This will make CATALINA_BASE/conf/Catalina/ a bit 
ugly, but I can live with that.

I should set this up with a test web application with cookies and watch the 
entire mess with Firedebug.

Thanks for a great discussion.

. . . . just my (less confused) two cents.
/mde/

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



Re: : tomcat error 404

2011-10-23 Thread Pid
On 24/10/2011 00:18, Dave Filchak wrote:
> I upload the JavaMail and JAF libs to
> /home/##/public_html/WEB-INF/lib/ and added them to my $CLASSPATH I
> now get the following:

How did you add them to the classpath?  Tomcat automatically loads Jars
& resources found in its various lib & classes directories, so don't do
that...


p


> Error initializing sub-systems:
> Please check the following:
> 1. That your machine has a valid connection to 
> jdbc:mysql://localhost:3306/#_exodus Using:
>Username: #_exodus
>Password: #
>Driver: com.mysql.jdbc.Driver
>
> 
> *DETAILS FOLLOW:*
> java.lang.Exception: Unable to Initialize Environment:
> java.lang.NoClassDefFoundError: javax/mail/Address
>   at com.snapmedia.degrassi.base.BroadcastSystem.(Unknown Source)
>   at com.snapmedia.degrassi.base.BroadcastSystem.(Unknown Source)
>   at com.snapmedia.SystemController.init(SystemController.java:86)
>   at com.snapmedia.WebSystemController.init(WebSystemController.java:39)
>   at 
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1139)
>   at 
> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
>   at 
> org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3996)
>   at 
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4266)
>   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
>   at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
>   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
>   at 
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
>   at 
> org.apache.catalina.core.StandardService.start(StandardService.java:448)
>   at 
> org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
>   at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>   at java.lang.reflect.Method.invoke(Method.java:597)
>   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>   at java.lang.reflect.Method.invoke(Method.java:597)
>   at 
> org.apache.commons.daemon.support.DaemonLoader.start(DaemonLoader.java:219)
> Caused by: java.lang.ClassNotFoundException: javax.mail.Address
>   at 
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1438)
>   at 
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1284)
>   ... 25 more
> 
> 
> which is a different error but seemingly still to do with mail?
> 
> Dave
> 
> On 23/10/11 6:34 PM, Pid wrote:
>> On 23/10/2011 23:32, Dave Filchak wrote:
>>> The logs, at least the catalina.err and catalina.out files do not say
>>> anything much, at least as far as an error goes. I cannot find any other
>>> log files specific only to this app so they appear not to be working.
>>>
>>> I only see this in catalina.err in the last while:
>>>
>>> Oct 23, 2011 2:59:10 PM org.apache.catalina.core.StandardWrapperValve
>>> invoke
>>> SEVERE: Servlet.service() for servlet jsp threw exception
>>> org.apache.jasper.JasperException:
>>> /include/../../include/system-checkup.jsp(2,0) The value for the useBean
>>> class attribute com.snapmedia.WebSystemController is invalid.
>> If that class/servlet didn't start because the JavaMail libs are missing
>> that would explain why you can't use it.
>>
>>
>> p
>>
>>> at
>>> org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
>>>
>>> at
>>> org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
>>>
>>> at
>>> org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:148)
>>>
>>> at
>>> org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1204)
>>>
>>> at org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1117)
>>> at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2166)
>>> at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2216)
>>> at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:)
>>> at org.apache.jasper.compiler.Node$Root.accept(Node.java:457)
>>> at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2166)
>>> at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2216)
>>> at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2240)
>>> at
>>> org.apache.jasper.compiler.Node$Includ

RE: : tomcat error 404

2011-10-23 Thread Caldarale, Charles R
> From: Pid [mailto:p...@pidster.com] 
> Subject: Re: : tomcat error 404

> Apparently I'm rusty too...  :s

Time flies when you're having bugs...

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


Re: : tomcat error 404

2011-10-23 Thread Pid
On 24/10/2011 00:07, Caldarale, Charles R wrote:
>> From: Dave Filchak [mailto:sub...@zuka.net] 
>> Subject: Re: Re: : tomcat error 404
> 
>> So where should the Context be?
> 
> Apparently, you haven't read the 5.5 docs.  To quote:

Apparently I'm rusty too...  :s

p

> "For Tomcat 5, unlike Tomcat 4.x, it is NOT recommended to place  
> elements directly in the server.xml file.
> 
> "Context elements may be explicitly defined:
> 
> "In the $CATALINA_HOME/conf/context.xml file: the Context element 
> information will be loaded by all webapps.
> 
> "In the $CATALINA_HOME/conf/[enginename]/[hostname]/context.xml.default 
> file: the Context element information will be loaded by all webapps of that 
> host.
> 
> "In individual files (with a ".xml" extension) in the 
> $CATALINA_HOME/conf/[enginename]/[hostname]/ directory.
>  
> "Only if a context file does not exist for the application in the 
> $CATALINA_HOME/conf/[enginename]/[hostname]/; in an individual file at 
> /META-INF/context.xml inside the application files."
> 
> The META-INF/context.xml location is the usual, when you're packaging a 
> webapp up for distribution.
> 
>  - 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.
> 




signature.asc
Description: OpenPGP digital signature


RE: Re: : tomcat error 404

2011-10-23 Thread Caldarale, Charles R
> From: Dave Filchak [mailto:sub...@zuka.net] 
> Subject: Re: Re: : tomcat error 404

> So where should the Context be?

Apparently, you haven't read the 5.5 docs.  To quote:

"For Tomcat 5, unlike Tomcat 4.x, it is NOT recommended to place  
elements directly in the server.xml file.

"Context elements may be explicitly defined:

"In the $CATALINA_HOME/conf/context.xml file: the Context element 
information will be loaded by all webapps.

"In the $CATALINA_HOME/conf/[enginename]/[hostname]/context.xml.default 
file: the Context element information will be loaded by all webapps of that 
host.

"In individual files (with a ".xml" extension) in the 
$CATALINA_HOME/conf/[enginename]/[hostname]/ directory.
 
"Only if a context file does not exist for the application in the 
$CATALINA_HOME/conf/[enginename]/[hostname]/; in an individual file at 
/META-INF/context.xml inside the application files."

The META-INF/context.xml location is the usual, when you're packaging a webapp 
up for distribution.

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



Re: Re: : tomcat error 404

2011-10-23 Thread Dave Filchak
The logs, at least the catalina.err and catalina.out files do not say 
anything much, at least as far as an error goes. I cannot find any other 
log files specific only to this app so they appear not to be working.


I only see this in catalina.err in the last while:

Oct 23, 2011 2:59:10 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: 
/include/../../include/system-checkup.jsp(2,0) The value for the useBean 
class attribute com.snapmedia.WebSystemController is invalid.
at 
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
at 
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
at 
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:148)
at 
org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1204)

at org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1117)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2166)
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2216)
at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:)
at org.apache.jasper.compiler.Node$Root.accept(Node.java:457)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2166)
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2216)
at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2240)
at 
org.apache.jasper.compiler.Node$IncludeDirective.accept(Node.java:598)

at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2166)
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2216)
at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:)
at org.apache.jasper.compiler.Node$Root.accept(Node.java:457)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2166)
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2216)
at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2240)
at 
org.apache.jasper.compiler.Node$IncludeDirective.accept(Node.java:598)

at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2166)
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2216)
at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:)
at org.apache.jasper.compiler.Node$Root.accept(Node.java:457)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2166)
at org.apache.jasper.compiler.Generator.generate(Generator.java:3384)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:207)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:326)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:307)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
at 
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:565)
at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:309)
at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:308)

at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:259)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at 
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)

at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:775)
at 
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:704)
at 
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:897)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)

at java.lang.Thread.run(Thread.java:662)

Everything looks OK as far as I can tell under catalina.out.

On 22/07/64 2:59 PM, Pid wrote:

On 23/10/2011 19:57, Dave Filchak wrote:

I know this is probably screwed up now so I appreciate the help I have
had so far and would seriously appreciate any input as to how to
straighten this out and get the connection to the database functional. I
really need to get the site up and running today.

Thanks for your consideration and your time.

What do the logs say?  We don't know what's wrong this

Re: Re: : tomcat error 404

2011-10-23 Thread Dave Filchak

Yes ... can't find him.

On 22/07/64 2:59 PM, Pid wrote:

On 23/10/2011 19:57, Dave Filchak wrote:


   Please contact Nick should any questions or issues arise about
this application.


Have you tried contacting 'Nick'?


p



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



Re: Re: : tomcat error 404

2011-10-23 Thread Dave Filchak

So where should the Context be?


On 22/07/64 2:59 PM, Pid wrote:

Don't put a Context in server.xml.  That is a massive can of worms all
on its own.

On 23/10/2011 19:57, Dave Filchak wrote:


 />


The above won't work, it should really stop Tomcat from starting.

Wrong:


  />

Right:


   



p



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



Re: Re: tomcat error 404

2011-10-23 Thread Dave Filchak

Hi Pid,

On 22/07/64 2:59 PM, Pid * wrote:


On 23 Oct 2011, at 17:21, Dave Filchak   wrote:


Ok, perhaps this will be more helpful. To follow is the way the db
connection is set up now, and I am not sure it is correct because, as I
understand it, you are supposed to add a context to the server.xml

... not recommended in the last 2 major versions of Tomcat.

But this is Tomcat 5.5?


file
defining the db connection through jdbc/mysql ( which I am not sure of
the format yet ), either in the main system one or the application
specific one, OR to the META-INF/content.xml file,

You mean 'context.xml' of course.

Yes


which I do not have.
What I do have is this, in my application directory at
/home/XX/public_html/WEB-INF/conf/environment.xml:

That is not a Tomcat file.  Could it be an application specific file?

I guess it must be. I thought it was a tomcat file. So, in the
application, the database was always configured in this environment.xml
file. Is it possible to have a database connection defined in a
application specific file and not in any of the actual tomcat files
under tomcat 5.5?



com.mysql.jdbc.Driver
jdbc:mysql://###.###.###.###:3306/###_exodus
#_exodus
#
10
10
select now()
/home/#/public_html/WEB-INF/logs/pool.txt


Logging inside the api action is generally considered to be A Bad Idea.

OK ... I will take it out as it is not working anyway as far as I can tell.


When I modify the, it does show up in the error that is generated
so the app




Error initializing sub-systems:
Please check the following:
1. That your machine has a valid connection to
jdbc:mysql://localhost/_exodus Using:
 Username: _exodus
 Password: ##
 Driver: com.mysql.jdbc.Driver

The stacktrace below indicates that the JavaMail libs are missing.

They would either be in your apps WEB-INF/lib or tomcat/lib. In an old
Tomcat it might have been in tomcat/common/lib or tomcat/shared/lib.

OK, I will Google for them and try to get them installed

p

*DETAILS FOLLOW:*
java.lang.Exception: Unable to Initialize Environment:
java.lang.NoClassDefFoundError: javax/mail/Address
at com.snapmedia.degrassi.base.BroadcastSystem.(Unknown Source)
at com.snapmedia.degrassi.base.BroadcastSystem.(Unknown Source)
at com.snapmedia.SystemController.init(SystemController.java:86)
at
com.snapmedia.WebSystemController.init(WebSystemController.java:39)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1139)
at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3996)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4266)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at
org.apache.catalina.core.StandardService.start(StandardService.java:448)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.commons.daemon.support.DaemonLoader.start(DaemonLoader.java:219)
Caused by: java.lang.ClassNotFoundException: javax.mail.Address
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1438)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1284)
... 25 more

I have verified that thew username and password are correct by logging
into the MySQL server from the command line. Something with the driver?

Dave



On 22/07/64 2:59 PM, André Warnier wrote:

Hi.

One thing at a time..

1) When you send XML configuration files, please remove everything
that is a comment.
XML files are already being wrapped by the email program, and are
difficult to read as it is. Having plenty of comments in them in
addition makes is really a hassle to figure out what is being used or
not.
(Note: an XML comment is anything between a pair of  )

2) one error message below talks about an invalid XML file.
Inside one of the comments (between a leading), there 

Re: URI mapping

2011-10-23 Thread André Warnier

Pid wrote:
...
 The jsessionid cookie is set with the server

name of the Tomcat instance, rather than a domain with variable
subdomains*, unless you have configured it otherwise (Servlet 3.0 only).


Yes, but what /is/ this server name that this Tomcat will be using ?
I don't think that is as straightforward as it may look.

For example, what will Tomcat put in the cookie if this Tomcat is set up with a single 


but it runs on a host whose canonical name is "someserver.company.com".

Does it use the hostname received in the "Host:" header of the request, even when this 
hostname does not match any of its  tags ?


And what if there is no Host: header ?



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



Re: URI mapping

2011-10-23 Thread André Warnier

Mark Eggers wrote:

- Original Message -


From: André Warnier 
To: Tomcat Users List 
Cc: 
Sent: Sunday, October 23, 2011 5:08 AM

Subject: Re: URI mapping

Let's restart from the beginning.

You have, say, 3 Tomcat servers running, and for the sake of the example 
let's say that these are

- a Tomcat 5.x server
- a Tomcat 6.x server
- a Tomcat 7.x server

You want to run the same applications on all of them (with identical names on 
each server), because for instance these are test servers serving to verify that 
a given application runs fine under each of these Tomcat versions.


You want to be able to choose which Tomcat server you are accessing, by means of 
some URI prefix.

Example :
a request with URI "http://myhost/tomcat7/webapp1"; should be forwarded 
to webapp1 on Tomcat7, while a request with URI 
"http://myhost/tomcat5/webapp1"; should be forwarded to Tomcat5.


Of course, once "inside" the respective Tomcat, you want this prefix 
to have been removed, so that the applications inside this Tomcat look similar 
to the same ones in other Tomcats, name-wise.

Example :
a request with URI "http://myhost/tomcat7/webapp1"; should be forwarded 
to webapp1 on Tomcat7, whith a request URI of "/webapp1" (and not 
"/tomcat7/webapp1").


For this, you set up a front-end proxy Apache httpd, which should forward the 
requests to individual Tomcats in function of the URI prefix, and strip this 
prefix while doing so.


Preferably, you would like to do the proxying via mod_jk.

That is a problem, because the standard proxying instructions of mod_jk (JkMount 
e.g.), do not provide a syntax for forwarding URI's, and modifying these 
URIs at the same time.


That is why Mark originally oriented you to mod_proxy and mod_proxy_ajp, which 
can do that, for example as :


ProxyPass /tomcat7 ajp://tomcat7-host:8017
ProxyPass /tomcat6 ajp://tomcat6-host:8016
ProxyPass /tomcat5 ajp://tomcat7-host:8015
(and have each Tomcat listen on the apropriate port with its AJP Connector)

Using the above, a request with URI "http://myhost/tomcat7/webapp1"; 
will be forwarded to the tomcat7 server with a URI of "/webapp1", 
while a request with URI "http://myhost/tomcat5/webapp1"; will be 
forwarded to the tomcat5 server with a URI (also) of "/webapp1".


As far as I understand, this is what you want to achieve (although it is not via 
mod_jk, but via mod_proxy_ajp instead).


Mark however pointed out the drawbacks of modifying the URI : when one of these 
applications generates a self-referencing URI, it will not by default re-insert 
the stripped host prefix.  For example, if application "/webapp1" on 
tomcat7 creates a page with a link to itself like 
href="/webapp1/something", it will not magically know to make this 
into href="/tomcat7/webapp1/something".  And when this link is clicked 
in the browser, it will generate a request to 
"http://myhost/webapp1/something";, and the above Proxy instructions in 
the front-end won't know what to do with it and will ignore it.


And the same happens with redirects etc..
You can overcome this, but it is likely in the end to create more hassle than 
you really want.


On the other hand, if you do /not/ modify the URI while proxying the call, then 
you end up with a much less easy configuration on the side of the Tomcats, as 
you have seen before.


So maybe let's look at another kind of solution, involving DNS and 
VirtualHosts.


Would a solution whereby you access the different Tomcats as follows be 
acceptable ?
- http://myhost-tomcat7.company.com/webapp1 is forwarded to tomcat7's 
webapp1
- http://myhost-tomcat6.company.com/webapp1 is forwarded to tomcat6's 
webapp1
- http://myhost-tomcat5.company.com/webapp1 is forwarded to tomcat5's 
webapp1


If yes, then do as outlined below.

For a start, I suppose that you want to have an Apache httpd front-end, and that 
the Apache httpd and all tomcats, all run on the same physical host.


Step 1 :
Suppose that the front-end Apache httpd host is currently known via DNS as 
"myhost.company.com".

Define 3 additional DNS aliases for it :
- myhost-tomcat7.company.com
- myhost-tomcat6.company.com
- myhost-tomcat5.company.com

Step 2 :
define 3 new VirtualHost's in the Apache httpd front-end, one each with
- ServerName myhost-tomcat7.company.com
- ServerName myhost-tomcat6.company.com
- ServerName myhost-tomcat5.company.com

(I assume that you know how to do that)

Step 3 :
In each of these VirtualHost configurations, add the following lines :
- in the "myhost-tomcat7.company.com" host, add
   ProxyPass / ajp://myhost-tomcat7.company.com:8017
   ProxyPassReverse / ajp://myhost-tomcat7.company.com:8017
(and similarly for the other VirtualHost's)

Step 4 :
make each of your Tomcats listen on the corresponding AJP port :
- tomcat7 listens on port 8017
- tomcat6 listens on port 8016
- tomcat5 listens on port 8015
(in their respective AJP Connector)

The advantage of this is that you are no longer modifying the request URI's, 
with all the comp

Re: URI mapping

2011-10-23 Thread Pid
On 23/10/2011 20:51, Mark Eggers wrote:
> - Original Message -
> 
>> From: André Warnier 
>> To: Tomcat Users List 
>> Cc: 
>> Sent: Sunday, October 23, 2011 5:08 AM
>> Subject: Re: URI mapping
>>
>> Let's restart from the beginning.
>>
>> You have, say, 3 Tomcat servers running, and for the sake of the example 
>> let's say that these are
>> - a Tomcat 5.x server
>> - a Tomcat 6.x server
>> - a Tomcat 7.x server
>>
>> You want to run the same applications on all of them (with identical names 
>> on 
>> each server), because for instance these are test servers serving to verify 
>> that 
>> a given application runs fine under each of these Tomcat versions.
>>
>> You want to be able to choose which Tomcat server you are accessing, by 
>> means of 
>> some URI prefix.
>> Example :
>> a request with URI "http://myhost/tomcat7/webapp1"; should be forwarded 
>> to webapp1 on Tomcat7, while a request with URI 
>> "http://myhost/tomcat5/webapp1"; should be forwarded to Tomcat5.
>>
>> Of course, once "inside" the respective Tomcat, you want this prefix 
>> to have been removed, so that the applications inside this Tomcat look 
>> similar 
>> to the same ones in other Tomcats, name-wise.
>> Example :
>> a request with URI "http://myhost/tomcat7/webapp1"; should be forwarded 
>> to webapp1 on Tomcat7, whith a request URI of "/webapp1" (and not 
>> "/tomcat7/webapp1").
>>
>> For this, you set up a front-end proxy Apache httpd, which should forward 
>> the 
>> requests to individual Tomcats in function of the URI prefix, and strip this 
>> prefix while doing so.
>>
>> Preferably, you would like to do the proxying via mod_jk.
>>
>> That is a problem, because the standard proxying instructions of mod_jk 
>> (JkMount 
>> e.g.), do not provide a syntax for forwarding URI's, and modifying these 
>> URIs at the same time.
>>
>> That is why Mark originally oriented you to mod_proxy and mod_proxy_ajp, 
>> which 
>> can do that, for example as :
>>
>> ProxyPass /tomcat7 ajp://tomcat7-host:8017
>> ProxyPass /tomcat6 ajp://tomcat6-host:8016
>> ProxyPass /tomcat5 ajp://tomcat7-host:8015
>> (and have each Tomcat listen on the apropriate port with its AJP Connector)
>>
>> Using the above, a request with URI "http://myhost/tomcat7/webapp1"; 
>> will be forwarded to the tomcat7 server with a URI of "/webapp1", 
>> while a request with URI "http://myhost/tomcat5/webapp1"; will be 
>> forwarded to the tomcat5 server with a URI (also) of "/webapp1".
>>
>> As far as I understand, this is what you want to achieve (although it is not 
>> via 
>> mod_jk, but via mod_proxy_ajp instead).
>>
>> Mark however pointed out the drawbacks of modifying the URI : when one of 
>> these 
>> applications generates a self-referencing URI, it will not by default 
>> re-insert 
>> the stripped host prefix.  For example, if application "/webapp1" on 
>> tomcat7 creates a page with a link to itself like 
>> href="/webapp1/something", it will not magically know to make this 
>> into href="/tomcat7/webapp1/something".  And when this link is clicked 
>> in the browser, it will generate a request to 
>> "http://myhost/webapp1/something";, and the above Proxy instructions in 
>> the front-end won't know what to do with it and will ignore it.
>>
>> And the same happens with redirects etc..
>> You can overcome this, but it is likely in the end to create more hassle 
>> than 
>> you really want.
>>
>> On the other hand, if you do /not/ modify the URI while proxying the call, 
>> then 
>> you end up with a much less easy configuration on the side of the Tomcats, 
>> as 
>> you have seen before.
>>
>> So maybe let's look at another kind of solution, involving DNS and 
>> VirtualHosts.
>>
>> Would a solution whereby you access the different Tomcats as follows be 
>> acceptable ?
>> - http://myhost-tomcat7.company.com/webapp1 is forwarded to tomcat7's 
>> webapp1
>> - http://myhost-tomcat6.company.com/webapp1 is forwarded to tomcat6's 
>> webapp1
>> - http://myhost-tomcat5.company.com/webapp1 is forwarded to tomcat5's 
>> webapp1
>>
>> If yes, then do as outlined below.
>>
>> For a start, I suppose that you want to have an Apache httpd front-end, and 
>> that 
>> the Apache httpd and all tomcats, all run on the same physical host.
>>
>> Step 1 :
>> Suppose that the front-end Apache httpd host is currently known via DNS as 
>> "myhost.company.com".
>> Define 3 additional DNS aliases for it :
>> - myhost-tomcat7.company.com
>> - myhost-tomcat6.company.com
>> - myhost-tomcat5.company.com
>>
>> Step 2 :
>> define 3 new VirtualHost's in the Apache httpd front-end, one each with
>> - ServerName myhost-tomcat7.company.com
>> - ServerName myhost-tomcat6.company.com
>> - ServerName myhost-tomcat5.company.com
>>
>> (I assume that you know how to do that)
>>
>> Step 3 :
>> In each of these VirtualHost configurations, add the following lines :
>> - in the "myhost-tomcat7.company.com" host, add
>>ProxyPass / ajp://myhost-tomcat7.company.com:8017
>>ProxyPassReverse / a

Re: URI mapping

2011-10-23 Thread Mark Eggers
- Original Message -

> From: André Warnier 
> To: Tomcat Users List 
> Cc: 
> Sent: Sunday, October 23, 2011 5:08 AM
> Subject: Re: URI mapping
> 
> Let's restart from the beginning.
> 
> You have, say, 3 Tomcat servers running, and for the sake of the example 
> let's say that these are
> - a Tomcat 5.x server
> - a Tomcat 6.x server
> - a Tomcat 7.x server
> 
> You want to run the same applications on all of them (with identical names on 
> each server), because for instance these are test servers serving to verify 
> that 
> a given application runs fine under each of these Tomcat versions.
> 
> You want to be able to choose which Tomcat server you are accessing, by means 
> of 
> some URI prefix.
> Example :
> a request with URI "http://myhost/tomcat7/webapp1"; should be forwarded 
> to webapp1 on Tomcat7, while a request with URI 
> "http://myhost/tomcat5/webapp1"; should be forwarded to Tomcat5.
> 
> Of course, once "inside" the respective Tomcat, you want this prefix 
> to have been removed, so that the applications inside this Tomcat look 
> similar 
> to the same ones in other Tomcats, name-wise.
> Example :
> a request with URI "http://myhost/tomcat7/webapp1"; should be forwarded 
> to webapp1 on Tomcat7, whith a request URI of "/webapp1" (and not 
> "/tomcat7/webapp1").
> 
> For this, you set up a front-end proxy Apache httpd, which should forward the 
> requests to individual Tomcats in function of the URI prefix, and strip this 
> prefix while doing so.
> 
> Preferably, you would like to do the proxying via mod_jk.
> 
> That is a problem, because the standard proxying instructions of mod_jk 
> (JkMount 
> e.g.), do not provide a syntax for forwarding URI's, and modifying these 
> URIs at the same time.
> 
> That is why Mark originally oriented you to mod_proxy and mod_proxy_ajp, 
> which 
> can do that, for example as :
> 
> ProxyPass /tomcat7 ajp://tomcat7-host:8017
> ProxyPass /tomcat6 ajp://tomcat6-host:8016
> ProxyPass /tomcat5 ajp://tomcat7-host:8015
> (and have each Tomcat listen on the apropriate port with its AJP Connector)
> 
> Using the above, a request with URI "http://myhost/tomcat7/webapp1"; 
> will be forwarded to the tomcat7 server with a URI of "/webapp1", 
> while a request with URI "http://myhost/tomcat5/webapp1"; will be 
> forwarded to the tomcat5 server with a URI (also) of "/webapp1".
> 
> As far as I understand, this is what you want to achieve (although it is not 
> via 
> mod_jk, but via mod_proxy_ajp instead).
> 
> Mark however pointed out the drawbacks of modifying the URI : when one of 
> these 
> applications generates a self-referencing URI, it will not by default 
> re-insert 
> the stripped host prefix.  For example, if application "/webapp1" on 
> tomcat7 creates a page with a link to itself like 
> href="/webapp1/something", it will not magically know to make this 
> into href="/tomcat7/webapp1/something".  And when this link is clicked 
> in the browser, it will generate a request to 
> "http://myhost/webapp1/something";, and the above Proxy instructions in 
> the front-end won't know what to do with it and will ignore it.
> 
> And the same happens with redirects etc..
> You can overcome this, but it is likely in the end to create more hassle than 
> you really want.
> 
> On the other hand, if you do /not/ modify the URI while proxying the call, 
> then 
> you end up with a much less easy configuration on the side of the Tomcats, as 
> you have seen before.
> 
> So maybe let's look at another kind of solution, involving DNS and 
> VirtualHosts.
> 
> Would a solution whereby you access the different Tomcats as follows be 
> acceptable ?
> - http://myhost-tomcat7.company.com/webapp1 is forwarded to tomcat7's 
> webapp1
> - http://myhost-tomcat6.company.com/webapp1 is forwarded to tomcat6's 
> webapp1
> - http://myhost-tomcat5.company.com/webapp1 is forwarded to tomcat5's 
> webapp1
> 
> If yes, then do as outlined below.
> 
> For a start, I suppose that you want to have an Apache httpd front-end, and 
> that 
> the Apache httpd and all tomcats, all run on the same physical host.
> 
> Step 1 :
> Suppose that the front-end Apache httpd host is currently known via DNS as 
> "myhost.company.com".
> Define 3 additional DNS aliases for it :
> - myhost-tomcat7.company.com
> - myhost-tomcat6.company.com
> - myhost-tomcat5.company.com
> 
> Step 2 :
> define 3 new VirtualHost's in the Apache httpd front-end, one each with
> - ServerName myhost-tomcat7.company.com
> - ServerName myhost-tomcat6.company.com
> - ServerName myhost-tomcat5.company.com
> 
> (I assume that you know how to do that)
> 
> Step 3 :
> In each of these VirtualHost configurations, add the following lines :
> - in the "myhost-tomcat7.company.com" host, add
>    ProxyPass / ajp://myhost-tomcat7.company.com:8017
>    ProxyPassReverse / ajp://myhost-tomcat7.company.com:8017
> (and similarly for the other VirtualHost's)
> 
> Step 4 :
> make each of your Tomcats listen on the corresponding AJP port 

Re: : tomcat error 404

2011-10-23 Thread Pid
On 23/10/2011 19:57, Dave Filchak wrote:
> I know this is probably screwed up now so I appreciate the help I have
> had so far and would seriously appreciate any input as to how to
> straighten this out and get the connection to the database functional. I
> really need to get the site up and running today.
> 
> Thanks for your consideration and your time.

What do the logs say?  We don't know what's wrong this time.


p




signature.asc
Description: OpenPGP digital signature


Re: : tomcat error 404

2011-10-23 Thread Pid
On 23/10/2011 19:57, Dave Filchak wrote:
> 
>   Please contact Nick should any questions or issues arise about
> this application.
> 

Have you tried contacting 'Nick'?


p



signature.asc
Description: OpenPGP digital signature


Re: : tomcat error 404

2011-10-23 Thread Pid
Don't put a Context in server.xml.  That is a massive can of worms all
on its own.

On 23/10/2011 19:57, Dave Filchak wrote:
>username="#_#"
>  password="#"
>  driverClassName="com.mysql.jdbc.Driver"
> 
> url="jdbc:mysql://localhost:3306/#_#?useUnicode=true&characterEncoding=utf8"
> 
>  maxActive="15"
>  maxIdle="7"
>  defaultTransactionIsolation="READ_COMMITTED"
>  validationQuery="Select 1" />
> />


The above won't work, it should really stop Tomcat from starting.

Wrong:


 />

Right:


  



p



signature.asc
Description: OpenPGP digital signature


Re: : tomcat error 404

2011-10-23 Thread Pid
On 23/10/2011 19:57, Dave Filchak wrote:
> My environment.xml file @ /home/##/public_html/WEB-INF/conf/

Once again: this is not a Tomcat configuration file, it's application
specific.


p




signature.asc
Description: OpenPGP digital signature


Re:: tomcat error 404

2011-10-23 Thread Dave Filchak
Alright well, I am having a hell of a time getting this to work. I am 
adding all my pertinent xml files so that maybe someone has some time to 
help me get this straightened out. I know everyone is busy and it is 
Sunday so I'll let it sit after this but at this point, I have pages 
that work but no database connectivity.


My web.xml file @ /home/##/public_html/WEB-INF/


2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";>



Mushroom

   Snap Media Mushroom Site



webmaster
support@##.com

  Please contact Nick should any questions or issues arise about 
this application.





root
/home/##/public_html

  Path to where the system begins




xmlprops
/home/##/public_html/WEB-INF/conf/environment.xml

  Used to find path to local XML props file.




WebSystemController
com.snapmedia.WebSystemController
1



WebSystemController
/servlet/WebSystemController



30



Connection Pool
jdbc/exodus
javax.sql.DataSource
Container




My environment.xml file @ /home/##/public_html/WEB-INF/conf/





2.0
005523
April 29, 2005
127.0.0.1
174.122.30.18 
it-...@quickplay.com
N. Dingle
true




http://www.exodusdecoded.com
http://www.exodusdecoded.com/tools




/login.jsp
/parentControl.jsp

/home/exodus/public_html/
/data

/home/exodus/public_html/WEB-INF/logs/
/home/exodus/public_html/WEB-INF/logs/archive/
/home/exodus/public_html/WEB-INF/logs/codelog.txt
/home/exodus/public_html/WEB-INF/logs/scheduler.txt
/home/exodus/public_html/WEB-INF/logs/broadcast.txt
/home/exodus/public_html/WEB-INF/logs/memory.txt
/home/exodus/public_html/WEB-INF/logs/security.txt
/home/exodus/public_html/WEB-INF/logs/ipmanifest.txt
/home/exodus/public_html/WEB-INF/logs/forum.txt



false
false
true
false



AEFK67897PI30
AEFK6S897PI50
30
exodusdecoded.com
25
204800
0





true
false
1
10



true
5



true
13



false
15
450
true
sdeb...@snapmedia.com



true
3



false
true
10
1500
4000
10
5
true









My server.xml file at /home/#/public_html/conf/




SSLEngine="on" />



className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />









address="/home/exodus/public_html" />







directory="logs"
   prefix="exodus_access" suffix=".log" pattern="common" 
resolveHosts="false"/>

   directory="logs" prefix="exodus_catalina" suffix=".log" 
timestamp="true" />




 
url="jdbc:mysql://localhost:3306/#_#?useUnicode=true&characterEncoding=utf8"

 maxActive="15"
 maxIdle="7"
 defaultTransactionIsolation="READ_COMMITTED"
 validationQuery="Select 1" />
/>





My context file, which I created while again trying to solve why the 
database connection fails at /home/#/public_html/META-INF/






I know this is probably screwed up now so I appreciate the help I have 
had so far and would seriously appreciate any input as to how to 
straighten this out and get the connection to the database functional. I 
really need to get the site up and running today.


Thanks for your consideration and your time.

Dave

On 22/07/64 2:59 PM, Dave Filchak wrote:

Ok, perhaps this will be more helpful. To follow is the way the db
connection is set up now, and I am not sure it is correct because, as I
understand it, you are supposed to add a context to the server.xml file
defining the db connection through jdbc/mysql ( which I am not sure of
the format yet ), either in the main system one or the application
specific one, OR to the META-INF/content.xml file, which I do not have.
What I do have is this, in my application directory at
/home/XX/public_html/WEB-INF/conf/environment.xml:


com.mysql.jdbc.Driver
jdbc:mysql://###.###.###.###:3306/###_exodus
#_exodus
#
10
10
select now()
/home/#/public_html/WEB-INF/logs/pool.txt


When I modify the, it does show up in the error that is generated
so the app must be reading from this entry while trying to make the
connection to the database. I do not believe there is any other location
where a reference to the database is made.

Apparently, you are also supposed
to add an entry in the/WEB-INF/web.xml and I am not
sure if this is true but in my/home/#/public_html/WEB-INF/web.xml
there is no reference to the database. However, this used to work on the
old server. So, in a nutshell, the only reference to a database
connection is in the environment.xml file.

Dave



On 22/07/64 2:59 PM, Dave Filchak wrote:

Hi André,

Sorry about the comments. Wasn't thinking. So, I did find that one of
the closing comment tags in my web.xml was entered as ==>. Fixing that
gave me some progress in that the site's homepage now comes up. However,
I now get the following error when clicking on a few links, which
obviously refer to a connection to the database:

Error initializing sub-systems:
Please check the following:
1. That your machine has a valid connection to 
jdbc:mysql://localhost/_exodus Using:

Username: _exodus
Password: ##
Dr

Re: tomcat error 404

2011-10-23 Thread Pid *
On 23 Oct 2011, at 17:21, Dave Filchak  wrote:

> Ok, perhaps this will be more helpful. To follow is the way the db
> connection is set up now, and I am not sure it is correct because, as I
> understand it, you are supposed to add a context to the server.xml

... not recommended in the last 2 major versions of Tomcat.

> file
> defining the db connection through jdbc/mysql ( which I am not sure of
> the format yet ), either in the main system one or the application
> specific one, OR to the META-INF/content.xml file,

You mean 'context.xml' of course.


> which I do not have.
> What I do have is this, in my application directory at
> /home/XX/public_html/WEB-INF/conf/environment.xml:

That is not a Tomcat file.  Could it be an application specific file?


> 
> com.mysql.jdbc.Driver
> jdbc:mysql://###.###.###.###:3306/###_exodus
> #_exodus
> #
> 10
> 10
> select now()
> /home/#/public_html/WEB-INF/logs/pool.txt
> 

Logging inside the api action is generally considered to be A Bad Idea.


> When I modify the, it does show up in the error that is generated
> so the app



>> Error initializing sub-systems:
>> Please check the following:
>> 1. That your machine has a valid connection to
>> jdbc:mysql://localhost/_exodus Using:
>>Username: _exodus
>>Password: ##
>>Driver: com.mysql.jdbc.Driver

The stacktrace below indicates that the JavaMail libs are missing.

They would either be in your apps WEB-INF/lib or tomcat/lib. In an old
Tomcat it might have been in tomcat/common/lib or tomcat/shared/lib.


p

>> *DETAILS FOLLOW:*
>> java.lang.Exception: Unable to Initialize Environment:
>> java.lang.NoClassDefFoundError: javax/mail/Address
>>at com.snapmedia.degrassi.base.BroadcastSystem.(Unknown Source)
>>at com.snapmedia.degrassi.base.BroadcastSystem.(Unknown Source)
>>at com.snapmedia.SystemController.init(SystemController.java:86)
>>at
>> com.snapmedia.WebSystemController.init(WebSystemController.java:39)
>>at
>> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1139)
>>at
>> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
>>at
>> org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3996)
>>at
>> org.apache.catalina.core.StandardContext.start(StandardContext.java:4266)
>>at
>> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
>>at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
>>at
>> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
>>at
>> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
>>at
>> org.apache.catalina.core.StandardService.start(StandardService.java:448)
>>at
>> org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
>>at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
>>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>at java.lang.reflect.Method.invoke(Method.java:597)
>>at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
>>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>at java.lang.reflect.Method.invoke(Method.java:597)
>>at
>> org.apache.commons.daemon.support.DaemonLoader.start(DaemonLoader.java:219)
>> Caused by: java.lang.ClassNotFoundException: javax.mail.Address
>>at
>> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1438)
>>at
>> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1284)
>>... 25 more
>>
>> I have verified that thew username and password are correct by logging
>> into the MySQL server from the command line. Something with the driver?
>>
>> Dave
>>
>>
>>
>> On 22/07/64 2:59 PM, André Warnier wrote:
>>> Hi.
>>>
>>> One thing at a time..
>>>
>>> 1) When you send XML configuration files, please remove everything
>>> that is a comment.
>>> XML files are already being wrapped by the email program, and are
>>> difficult to read as it is. Having plenty of comments in them in
>>> addition makes is really a hassle to figure out what is being used or
>>> not.
>>> (Note: an XML comment is anything between a pair of  )
>>>
>>> 2) one error message below talks about an invalid XML file.
>>> Inside one of the comments (between a leading ), there is another pair of -- . That is incorrect and causes the
>>> entire file to be rejected/ignored.
>>> Inspect that file carefully, remove the offending --, and try again.
>>>
>>> (Note: the extra -- may also be due to a previous bad edit of the
>>>

Re: Re: Re: tomcat error 404

2011-10-23 Thread Dave Filchak

Ok, perhaps this will be more helpful. To follow is the way the db
connection is set up now, and I am not sure it is correct because, as I
understand it, you are supposed to add a context to the server.xml file
defining the db connection through jdbc/mysql ( which I am not sure of
the format yet ), either in the main system one or the application
specific one, OR to the META-INF/content.xml file, which I do not have.
What I do have is this, in my application directory at
/home/XX/public_html/WEB-INF/conf/environment.xml:


com.mysql.jdbc.Driver
jdbc:mysql://###.###.###.###:3306/###_exodus
#_exodus
#
10
10
select now()
/home/#/public_html/WEB-INF/logs/pool.txt


When I modify the, it does show up in the error that is generated
so the app must be reading from this entry while trying to make the
connection to the database. I do not believe there is any other location
where a reference to the database is made.

Apparently, you are also supposed
to add an entry in the/WEB-INF/web.xml and I am not
sure if this is true but in my/home/#/public_html/WEB-INF/web.xml
there is no reference to the database. However, this used to work on the
old server. So, in a nutshell, the only reference to a database
connection is in the environment.xml file.

Dave



On 22/07/64 2:59 PM, Dave Filchak wrote:

Hi André,

Sorry about the comments. Wasn't thinking. So, I did find that one of
the closing comment tags in my web.xml was entered as ==>. Fixing that
gave me some progress in that the site's homepage now comes up. However,
I now get the following error when clicking on a few links, which
obviously refer to a connection to the database:

Error initializing sub-systems:
Please check the following:
1. That your machine has a valid connection to 
jdbc:mysql://localhost/_exodus Using:

Username: _exodus
Password: ##
Driver: com.mysql.jdbc.Driver


*DETAILS FOLLOW:*
java.lang.Exception: Unable to Initialize Environment:
java.lang.NoClassDefFoundError: javax/mail/Address
at com.snapmedia.degrassi.base.BroadcastSystem.(Unknown Source)
at com.snapmedia.degrassi.base.BroadcastSystem.(Unknown Source)
at com.snapmedia.SystemController.init(SystemController.java:86)
at 
com.snapmedia.WebSystemController.init(WebSystemController.java:39)
at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1139)
at 
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
at 
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3996)
at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4266)
at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)

at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at 
org.apache.catalina.core.StandardService.start(StandardService.java:448)
at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:700)

at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)
at 
org.apache.commons.daemon.support.DaemonLoader.start(DaemonLoader.java:219)

Caused by: java.lang.ClassNotFoundException: javax.mail.Address
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1438)
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1284)

... 25 more

I have verified that thew username and password are correct by logging
into the MySQL server from the command line. Something with the driver?

Dave



On 22/07/64 2:59 PM, André Warnier wrote:

Hi.

One thing at a time..

1) When you send XML configuration files, please remove everything 
that is a comment.
XML files are already being wrapped by the email program, and are 
difficult to read as it is. Having plenty of comments in them in 
addition makes is really a hassle to figure out what is being used or 
not.

(Note: an XML comment is anything between a pair of  )

2) one error message below talks about an invalid XML file.
Inside one of the comments (between a leading ), there is another pair of -- . That is incorrect and causes the 
entire file to be r

RE: Setting-up Tomcat in Eclipse

2011-10-23 Thread Christopher Lee
On Sunday, October 23, 2011 11:20 AM, Mathieu Seillier 
[mailto:stie...@gmail.com] wrote:

You should use Sysdeo Tomcat Plugin for Eclipse. It's very simple and easy to 
use.
See here : http://www.eclipsetotale.com/tomcatPlugin.html

Mathieu

Thank you for the suggestion. I will give this a try.

Best,

Christopher


2011/10/21 Christopher Lee 

> Version: Apache Tomcat-6.0-33
> Operating System: Windows XP
> Eclipse J2EE: Version: 3.5.2
>
> I am using Eclipse Galileo to develop web applications. I attempted to
> integrate Apache Tomcat as an internal (local) server to develop,
> debug, test, and deploy my application code but I think I am having
> configuration problems. There may be several problems contributing to
> this. If anyone is aware of documentation that explains this process
> then that would be helpful. To set this up I used an IBM tutorial at the 
> following link:
>
>
> http://www.ibm.com/developerworks/opensource/library/os-eclipse-facebo
> ok/index.html
>
> Thank you in advance for your time.
>
> Best,
>
> Christopher
> This message is for the designated recipient only and may contain
> privileged, proprietary, or otherwise private information. If you have
> received it in error, please notify the sender immediately and delete
> the original. Any other use of the email by you is prohibited.
>
This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information. If you have received it in 
error, please notify the sender immediately and delete the original. Any other 
use of the email by you is prohibited.

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



Re: .nfsxxx file created when undeploying applications

2011-10-23 Thread Hassan Schroeder
On Sun, Oct 23, 2011 at 1:56 AM, Nicolas Dordet  wrote:

> I have a Tomcat 5.5.17 run on Solaris. TOMCAT_HOME is on a mounted NFS
> partition. When doing undeploy of an application, some .nfsxx files are
> created et dot no allow suppression of repertories.

> It seems that one process of tomcat still have files opened when trying to
> remove files and that's why .nfsxxx files are created. So in my point of
> view it is a Tomcat bug, all processes should close files before removing it
> on NFS.

Wow, I had a client with the exact same problem and -- oh, wait, it
wasn't Tomcat, it was OC4J  :-)

And IIRC those files are artifacts that appear for reasons having
nothing to do with undeployment; it's only that undeployment fails
and makes those artifacts' presence obvious.

The fix is *not running an app server off an NFS partition*.  Really.

"Doctor, it hurts when I hit myself in the head."

"Don't do that."

YMMV,
-- 
Hassan Schroeder  hassan.schroe...@gmail.com
http://about.me/hassanschroeder
twitter: @hassan

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



Re: Setting-up Tomcat in Eclipse

2011-10-23 Thread Mathieu Seillier
You should use Sysdeo Tomcat Plugin for Eclipse. It's very simple and easy
to use.
See here : http://www.eclipsetotale.com/tomcatPlugin.html

Mathieu

2011/10/21 Christopher Lee 

> Version: Apache Tomcat-6.0-33
> Operating System: Windows XP
> Eclipse J2EE: Version: 3.5.2
>
> I am using Eclipse Galileo to develop web applications. I attempted to
> integrate Apache Tomcat as an internal (local) server to develop, debug,
> test, and deploy my application code but I think I am having configuration
> problems. There may be several problems contributing to this. If anyone is
> aware of documentation that explains this process then that would be
> helpful. To set this up I used an IBM tutorial at the following link:
>
>
> http://www.ibm.com/developerworks/opensource/library/os-eclipse-facebook/index.html
>
> Thank you in advance for your time.
>
> Best,
>
> Christopher
> This message is for the designated recipient only and may contain
> privileged, proprietary, or otherwise private information. If you have
> received it in error, please notify the sender immediately and delete the
> original. Any other use of the email by you is prohibited.
>


Re: URI mapping

2011-10-23 Thread André Warnier

Let's restart from the beginning.

You have, say, 3 Tomcat servers running, and for the sake of the example let's say that 
these are

- a Tomcat 5.x server
- a Tomcat 6.x server
- a Tomcat 7.x server

You want to run the same applications on all of them (with identical names on each 
server), because for instance these are test servers serving to verify that a given 
application runs fine under each of these Tomcat versions.


You want to be able to choose which Tomcat server you are accessing, by means of some URI 
prefix.

Example :
a request with URI "http://myhost/tomcat7/webapp1"; should be forwarded to webapp1 on 
Tomcat7, while a request with URI "http://myhost/tomcat5/webapp1"; should be forwarded to 
Tomcat5.


Of course, once "inside" the respective Tomcat, you want this prefix to have been removed, 
so that the applications inside this Tomcat look similar to the same ones in other 
Tomcats, name-wise.

Example :
a request with URI "http://myhost/tomcat7/webapp1"; should be forwarded to webapp1 on 
Tomcat7, whith a request URI of "/webapp1" (and not "/tomcat7/webapp1").


For this, you set up a front-end proxy Apache httpd, which should forward the requests to 
individual Tomcats in function of the URI prefix, and strip this prefix while doing so.


Preferably, you would like to do the proxying via mod_jk.

That is a problem, because the standard proxying instructions of mod_jk (JkMount e.g.), do 
not provide a syntax for forwarding URI's, and modifying these URIs at the same time.


That is why Mark originally oriented you to mod_proxy and mod_proxy_ajp, which can do 
that, for example as :


ProxyPass /tomcat7 ajp://tomcat7-host:8017
ProxyPass /tomcat6 ajp://tomcat6-host:8016
ProxyPass /tomcat5 ajp://tomcat7-host:8015
(and have each Tomcat listen on the apropriate port with its AJP Connector)

Using the above, a request with URI "http://myhost/tomcat7/webapp1"; will be forwarded to 
the tomcat7 server with a URI of "/webapp1", while a request with URI 
"http://myhost/tomcat5/webapp1"; will be forwarded to the tomcat5 server with a URI (also) 
of "/webapp1".


As far as I understand, this is what you want to achieve (although it is not via mod_jk, 
but via mod_proxy_ajp instead).


Mark however pointed out the drawbacks of modifying the URI : when one of these 
applications generates a self-referencing URI, it will not by default re-insert the 
stripped host prefix.  For example, if application "/webapp1" on tomcat7 creates a page 
with a link to itself like href="/webapp1/something", it will not magically know to make 
this into href="/tomcat7/webapp1/something".  And when this link is clicked in the 
browser, it will generate a request to "http://myhost/webapp1/something";, and the above 
Proxy instructions in the front-end won't know what to do with it and will ignore it.


And the same happens with redirects etc..
You can overcome this, but it is likely in the end to create more hassle than 
you really want.

On the other hand, if you do /not/ modify the URI while proxying the call, then you end up 
with a much less easy configuration on the side of the Tomcats, as you have seen before.


So maybe let's look at another kind of solution, involving DNS and VirtualHosts.

Would a solution whereby you access the different Tomcats as follows be 
acceptable ?
- http://myhost-tomcat7.company.com/webapp1 is forwarded to tomcat7's webapp1
- http://myhost-tomcat6.company.com/webapp1 is forwarded to tomcat6's webapp1
- http://myhost-tomcat5.company.com/webapp1 is forwarded to tomcat5's webapp1

If yes, then do as outlined below.

For a start, I suppose that you want to have an Apache httpd front-end, and that the 
Apache httpd and all tomcats, all run on the same physical host.


Step 1 :
Suppose that the front-end Apache httpd host is currently known via DNS as 
"myhost.company.com".

Define 3 additional DNS aliases for it :
- myhost-tomcat7.company.com
- myhost-tomcat6.company.com
- myhost-tomcat5.company.com

Step 2 :
define 3 new VirtualHost's in the Apache httpd front-end, one each with
- ServerName myhost-tomcat7.company.com
- ServerName myhost-tomcat6.company.com
- ServerName myhost-tomcat5.company.com

(I assume that you know how to do that)

Step 3 :
In each of these VirtualHost configurations, add the following lines :
- in the "myhost-tomcat7.company.com" host, add
   ProxyPass / ajp://myhost-tomcat7.company.com:8017
   ProxyPassReverse / ajp://myhost-tomcat7.company.com:8017
(and similarly for the other VirtualHost's)

Step 4 :
make each of your Tomcats listen on the corresponding AJP port :
- tomcat7 listens on port 8017
- tomcat6 listens on port 8016
- tomcat5 listens on port 8015
(in their respective AJP Connector)

The advantage of this is that you are no longer modifying the request URI's, with all the 
complications that this brings.
All you are doing is modifying the hostname:port part, and that only requires a 
ProxyPassReverse directive in the httpd front-end, to rewrite possible

Re: URI mapping

2011-10-23 Thread Rainer Jung
On 22.10.2011 18:42, Eldon Olmstead wrote:
> Thanks for the response Mark,
> 
> Ok so if I want to keep mod_jk as part of this, ( it is what we use at
> work ), then if I understand right, I have no choice but to make tomcat
> support /tomcat7/ in the path. Do I do this just by moving all the
> webapps under webapps/tomcat7/? Will I have to make other configuration
> changes?
> 
> What is the right way to do this? The way we have it at work is that
> each tomcat worker is pointing to one developer's tomcat installation
> for the developer to do with as they need.

You might also want to have a look at

http://tomcat.apache.org/connectors-doc/generic_howto/proxy.html

Regards,

Rainer


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



Re: .nfsxxx file created when undeploying applications

2011-10-23 Thread Konstantin Kolinko
2011/10/23 Nicolas Dordet :
> Hi,
>
> I have a Tomcat 5.5.17 run on Solaris. TOMCAT_HOME is on a mounted NFS
> partition. When doing undeploy of an application, some .nfsxx files are
> created et dot no allow suppression of repertories.
>
> A similar bug for JARs has been opened but not fixed (
> https://issues.apache.org/bugzilla/show_bug.cgi?id=39616) and It said that
> is not a tomcat bug.
> The workaround (antiResourceLocking set at true) is not acceptable since
> there are obvious side effects (significantly impact startup time of
> applications, the disabling of JSP reloading in a running server,
> applications that are outside the appBase for the Host will cause the
> application to be *deleted* on Tomcat shutdown).
>
> It seems that one process of tomcat still have files opened when trying to
> remove files and that's why .nfsxxx files are created. So in my point of
> view it is a Tomcat bug, all processes should close files before removing it
> on NFS.
>
> Have you got any idea of what can I do to fix this problem? Did I open a new
> bug?

There are a lot of known issues in 5.5.x that will never be fixed. It
is near its end of life.

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



Re: .nfsxxx file created when undeploying applications

2011-10-23 Thread Nicolas Dordet
Hi,

I have a Tomcat 5.5.17 run on Solaris. TOMCAT_HOME is on a mounted NFS
partition. When doing undeploy of an application, some .nfsxx files are
created et dot no allow suppression of repertories.

A similar bug for JARs has been opened but not fixed (
https://issues.apache.org/bugzilla/show_bug.cgi?id=39616) and It said that
is not a tomcat bug.
The workaround (antiResourceLocking set at true) is not acceptable since
there are obvious side effects (significantly impact startup time of
applications, the disabling of JSP reloading in a running server,
applications that are outside the appBase for the Host will cause the
application to be *deleted* on Tomcat shutdown).

It seems that one process of tomcat still have files opened when trying to
remove files and that's why .nfsxxx files are created. So in my point of
view it is a Tomcat bug, all processes should close files before removing it
on NFS.

Have you got any idea of what can I do to fix this problem? Did I open a new
bug?

Regards,
Nico


Re: URI mapping

2011-10-23 Thread Pid
On 22/10/2011 23:37, Eldon Olmstead wrote:
> 
> 
> On 2011-10-22 5:57 PM, Pid wrote:
>> On 22/10/2011 17:42, Eldon Olmstead wrote:
>>> Thanks for the response Mark,
>>>
>>> Ok so if I want to keep mod_jk as part of this, ( it is what we use at
>>> work ), then if I understand right, I have no choice but to make tomcat
>>> support /tomcat7/ in the path. Do I do this just by moving all the
>>> webapps under webapps/tomcat7/?
>> No.  The appBase (the 'webapps' dir in your case) is not a document root
>> like HTTPD, it is the location for your apps - their published paths are
>> based on their names (usually).
>>
>> You would have rename the applications, from:
>>
>>   tomcat/webapps/app1.war - http://host/app1
>>   tomcat/webapps/app2.war - http://host/app2
>>
>> to:
>>
>>   tomcat/webapps/tomcat7#app1.war - http://host/tomcat7/app1
>>   tomcat/webapps/tomcat7#app2.war - http://host/tomcat7/app2
>>
>> The '#' in the name is translated to a '/' in the path.
>
> OK, so what about the folders that come with Tomcat then? Like ROOT,
> manager, and host-manager? Do I jar those up and name them as
> tomcat7#ROOT.war, tomcat7#manager.war, and tomcat7#host-manager.war?

ROOT is the special name for the default application.  Changing it's
name to tomcat7#ROOT would remove the default app & create a new one on
path: /tomcat7/ROOT

Not what you want.

If the apps are exploded .WAR files (ie, directories) just renaming the
directories as above would be enough.


Having said that: you either need to use mod_proxy so you can map URLs
to non-matching app paths, or put a JkMount line in for each web app.
You're making your life unnecessarily difficult.


> I just tried creating wars for the above but that doesn't work.

What doesn't?  Be precise, please.


> Tomcat's access log is showing apache is passing on the request:
> 127.0.0.1 - - [22/Oct/2011:18:27:06 -0300] "GET /tomcat7 HTTP/1.1" 404 -

The above probably doesn't work because you don't have an app called
'tomcat7'.


> 127.0.0.1 - - [22/Oct/2011:18:27:14 -0300] "GET /tomcat7/ROOT HTTP/1.1"
> 404 -  ( tried this just in case )

It's not clear what you've actually done.


> 127.0.0.1 - - [22/Oct/2011:18:27:21 -0300] "GET /tomcat7/manager
> HTTP/1.1" 404 -

That is the expected result: try '/tomcat7/manager/html'


p

> The apps aren't being found.
>>
>>
>> p
>>
>>> Will I have to make other configuration changes?
>>>
>>> What is the right way to do this? The way we have it at work is that
>>> each tomcat worker is pointing to one developer's tomcat installation
>>> for the developer to do with as they need.
>>>
>>> On 2011-10-22 1:17 PM, Mark Thomas wrote:
 On 22/10/2011 17:11, Eldon Olmstead wrote:
> Hello,
>
> I'm using the following
> Apache2.2
> mod_jk 1.2.32
> Tomcat 7.0.21
>
> I am trying to understand how to configure Apache to allow access to
> Tomcat via mod_jk. I have already made some progress, but have got
> stuck
> on one point.
>
> Currently, I can access Apache at http://localhost ( works )
> I can also access tomcats default wepapp and the manager and
> host-manager via
>
> http://localhost:8080/
> http://localhost:8080/manager
> http://localhost:8080/host-manager
>
>
> What I want to do next it to connect Apache to Tomcat via mod_jk such
> that the following URLs work
>
> http://localhost/tomcat7/ ( default tomcat webapp)
> http://localhost/tomcat7/manager
> http://localhost/tomcat7/host-manager
>
>
> I have updated the workers.properties with:
>
>  worker.list=tomcat7
>  worker.tomcat7.type=ajp13
>  worker.tomcat7.host=localhost
>  worker.tomcat7.port=8809
>
> I have added the the following in my http-jk.conf that I include in
> http.conf:
>
>  JkMount  /tomcat7/* tomcat7
>
> When I try to access http://localhost/tomcat7, tomcat is given the URI
> /tomcat7/
>
>  127.0.0.1 - - [22/Oct/2011:11:34:20 -0300] "GET /tomcat7/
> HTTP/1.1"
>  404 979
>
> So from the above log, I know that apache is forwarding the
> requests to
> tomcat via mod_jk ok, but tomcat now thinks that /tomcat7/ is now part
> of the request and since there is no tomcat7 web app, it doesn't match
> the request.
>
> I would like http://localhost/tomcat7/ to map to the root of my
> Tomcat,
> and to be able to access http://localhost/tomcat7/manager,
> http://localhost/tomcat7/host-manager.
>
> What do I do next?
 If you want to modify the URL, you'll need to use mod_proxy. Then you
 can do:

 ProxyPass /tomcat7 http://localhost:8080
 or
 ProxyPass /tomcat7 ajp://localhost:8080

 Note that as soon as you start modifying the URL as part of the
 ProxyPass you open up a world of opportunity for things to go wrong
 (redirects, cookie paths, links). All of these are fixab