Re: How to serve just JSP (was: Re: JSP on RHEL4 with Apache httpd RPM?

2005-09-16 Thread Peter Flynn
On Wed, 2005-09-14 at 14:04, Michael Lai wrote:
 KEREM ERKAN wrote:
 
 OK, start with downloading and installing a binary version of Tomcat for
 your OS and also download the 1.2.10 version of mod_jk. I think we should
 handle the rest off list not to bother the list anymore.
 
 
 Just to give you another option if you like.  I don't even use mod_jd.  
 I make use of Apache's reverse proxy feature.  In my httpd.conf, I add 
 the following lines in my virtual host:

[snip]

That's extremely useful, thanks.

But I don't want to serve a single whole directory Tomcat,
I need to server about a dozen isolated JSP files.

Can ProxyPass hand off *.jsp to Tomcat rather than a whole 
directory?

///Peter



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



How to serve just JSP (was: Re: JSP on RHEL4 with Apache httpd RPM?

2005-09-14 Thread Peter Flynn
[Sorry for the repost but I still don't have an answer to this one]

On Fri, 2005-09-09 at 15:50, Steve Dodge wrote:

 1. VirtualHostis an apache http server directive.

Right, but it was put there by Tomcat's auto-config. What I was trying 
to find out was, by localhost did Tomcat mean my (Tomcat's) 
localhost -- the server on 8080 -- or Apache's localhost, which is 
the server on port 80, which responds to many Virtual Hosts already
in the httpd.conf file.

 2. With JkMount you're not actually mapping a physical directory, it's a 
 url pattern.  

Yes, but all the ones that Tomcat auto-config'd into mod_jk.conf are 
relative to the Tomcat webapps directory. How do I write a url pattern
that can be interpreted as relative to Apache's document root, so that
JSP files in there will be passed to Tomcat for serving?

 If you have a tomcat webapp that serves jsp's such as 
 http://localhost:8080/mywebapp, then you can map jsp requests to that 
 webapp using JkMount /mywebapp/*.jsp

Ah...this exposes the gap in my understanding.
Where do I get a tomcat webapp that serves jsp's? 
This is what I need. I thought one was built into Tomcat -- in fact I
thought JSP serving was the original purpose of Tomcat.

If Tomcat doesn't have any such webapp, where do I get one?
I certainly can't write one, as I'm not a Java programmer.

///Peter



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



Re: How to serve just JSP (was: Re: JSP on RHEL4 with Apache httpd RPM?

2005-09-14 Thread Michael Lai

Peter Flynn wrote:

If you have a tomcat webapp that serves jsp's such as 
http://localhost:8080/mywebapp, then you can map jsp requests to that 
webapp using JkMount /mywebapp/*.jsp
   



Ah...this exposes the gap in my understanding.
Where do I get a tomcat webapp that serves jsp's? 
This is what I need. I thought one was built into Tomcat -- in fact I

thought JSP serving was the original purpose of Tomcat.

If Tomcat doesn't have any such webapp, where do I get one?
I certainly can't write one, as I'm not a Java programmer.



I am limited in my knowledge of tomcat but from my understanding, tomcat 
can be ran either as a standalone server or behind a webserver.  In your 
case, it seems like you don't actually need a webserver in front so you 
should be able to connect to tomcat using the url:


http://localhost:8080/

Just make sure in your server.xml that you have this line:

Connector port=8080 /

or whatever port you want to connect to.  In fact, I don't think you 
even need mod_jk if you are using tomcat as a standalone.


Hope that helps.

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



Re: How to serve just JSP (was: Re: JSP on RHEL4 with Apache httpd RPM?

2005-09-14 Thread Peter Flynn
On Wed, 2005-09-14 at 10:17, Michael Lai wrote:
 Peter Flynn wrote:
 If Tomcat doesn't have any such webapp, where do I get one?
 I certainly can't write one, as I'm not a Java programmer.
 
 
 I am limited in my knowledge of tomcat but from my understanding, tomcat 
 can be ran either as a standalone server or behind a webserver.  In your 
 case, it seems like you don't actually need a webserver in front so you 
 should be able to connect to tomcat using the url:

Unfortunately I have to keep the main port 80 httpd, as it's
serving 20Gb of other material (the entire campus web site).

All I need is the trick to make Apache httpd hand off any .jsp
files to Tomcat.

///Peter


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



Re: How to serve just JSP (was: Re: JSP on RHEL4 with Apache httpd RPM?

2005-09-14 Thread Michael Lai

KEREM ERKAN wrote:


OK, start with downloading and installing a binary version of Tomcat for
your OS and also download the 1.2.10 version of mod_jk. I think we should
handle the rest off list not to bother the list anymore.



Just to give you another option if you like.  I don't even use mod_jd.  
I make use of Apache's reverse proxy feature.  In my httpd.conf, I add 
the following lines in my virtual host:


ProxyPass /app http://localhost:8081/
ProxyPassReverse /app http://localhost:8081/

Just make sure you have loaded the following modules:

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so

What the above does is when Apache sees an url like:

http://www.myhost.com/app

It passes all traffic to tomcat which is listening to port 8081 (on the 
same machine).  The beauty of this is that you can put this in your 
ssl.conf too and Apache will handle all encrypted traffic and passes it 
on to tomcat.  The only advantage I see from mod_jk is if you are using 
it for load balancing too.



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