Re: JSP not forwarded to Tomcat

2003-01-28 Thread Pascal Robert
I think it's a context problem, but I don't know how to fix it.

I have this directory:

/Library/WebServer/Documents/clic-agent.com

Inside this directory, I have a mix of HTML and JSP files, and one WEB-INF
directory (with the default 'lib' and 'classes' directories).  I DON'T have
a ROOT directory, so '/Library/.../clic-agent.com' is the appBase.

Inside server.xml, I have this Host directive:

--
Service name=Tomcat-Apache-modjk
Listener className=org.apache.ajp.tomcat4.config.ApacheConfig
modJk=/usr/libexec/httpd/mod_jk.so
jkDebug=info
workersConfig=/usr/local/tomcat-4/conf/jk/workers.properties
jkLog=/usr/local/tomcat-4/logs/mod_jk.log
noRoot=true
forwardAll=false/

Host name=test.clic-agent.com debug=4
appBase=/Library/WebServer/Documents/clic-agent.com
   unpackWARs=true autoDeploy=true

Listener className=org.apache.ajp.tomcat4.config.ApacheConfig
   append=true /
--

Inside httpd.conf, I have this VirtualHost:

--
VirtualHost *
ServerName test.clic-agent.com
JkMount /*.jsp ajp13
JkMount /servlet/* ajp13
DocumentRoot /Library/WebServer/Documents/clic-agent.com
/VirtualHost
--

Now, I have a JSP file called 'liste.jsp' inside, so the URL should be:

http://test.clic-agent.com/liste.jsp

I get an good old 'Internal Server Error' when I try this URL.  In
mod_jk.log, I get:

--
[jk_uri_worker_map.c (460)]: Into jk_uri_worker_map_t::map_uri_to_worker
[jk_uri_worker_map.c (477)]: Attempting to map URI '/liste.jsp'
[jk_uri_worker_map.c (558)]: jk_uri_worker_map_t::map_uri_to_worker, Found a
suffix match ajp13 - *.jsp
[jk_worker.c (132)]: Into wc_get_worker_for_name ajp13
[jk_worker.c (136)]: wc_get_worker_for_name, done did not found a worker
--
 
I try to add:

[uri:/*.jsp]

To my workers.properties file, same error in the log file.

 This is a bug with either Tomcat or the Jk (or Jk2) connector.  I also had
 this problem and I have reported it as a bug to the Tomcat-Developers group.
 
 In order to work around this fix ... do NOT rely upon the httpd.conf file in
 order to make your vhosts/web-apps work.
 
 Instead ... make sure you create uri's in the workers2.properties file (if
 you are using Jk2).  Look at how they declare the /examples and do this
 for your own vhosts.
 
 The /test is the location of where you have your files.
 
 If you need any more information, please let me know.Thanks.
 
 [uri:/test]
 info=Example webapp in the default context.
 context=/test
 debug=0
 
 [uri:/test/*.jsp]
 info=Extension mapping
 
 [uri:/test/*]
 info=Map the whole webapp
 
 - Original Message -
 From: Pascal Robert [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, January 27, 2003 10:57 AM
 Subject: JSP not forwarded to Tomcat
 
 
 Hi list,
 
 First, the setup:
 
 - Mac OS X 10.2
 - Tomcat/4.1.18
 - Apache/1.3.27
 - mod_jk-1.3.27.so (build from OS X from Jakarta's site), renamed to
 mod_jk.so
 
 I tried to get some Virtual Host to work with Tomcat (the webapps for each
 VirtualHost are outside Tomcat's directory).  Instead of getting the
 generated JSP, I get the source, just like if the JSP was sent as
 text/plain
 and was not parsed by Tomcat.  If I look at the 'mod_jk.log' log, I see
 requests for static HTML files, but I don't see any log information for my
 JSP files, so it look like mod_jk don't handle them, even if they should.
 
 Apache's config:
 
 
 LoadModule jk_modulelibexec/httpd/mod_jk.so
 AddModule mod_jk.c
 
 JkLogFile /usr/local/tomcat-4/logs/mod_jk.log
 JkLogLevel debug
 JkWorkersFile /usr/local/tomcat-4/conf/jk/workers.properties
 
 VirtualHost *
 ServerName my.host
 JkMount /*.jsp ajp13
 JkMount /servlet/* ajp13
 DocumentRoot /path/to/the/web/app
 /VirtualHost
 
 
 Tomcat's config (server.xml):
 
 Host name=my.host debug=1
 appBase=/path/to/the/web
 unpackWARs=true autoDeploy=true
 
 Listener className=org.apache.ajp.tomcat4.config.ApacheConfig
 append=true /
 
 Valve className=org.apache.catalina.valves.AccessLogValve
 directory=logs
 prefix=clic_agent_log.
 suffix=.txt
 pattern=common/
 
 Logger className=org.apache.catalina.logger.FileLogger
 directory=logs
 prefix=clic_agent_catalina_log.
 suffix=.txt
 timestamp=true/
 
 Context path= docBase=app debug=1/
 /Host
 
 
 
 
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 


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




Re: JSP not forwarded to Tomcat

2003-01-28 Thread Pascal Robert
Ok, I got it to work with:

- workers.properties :
---
worker.list=test
worker.test.port=8009
worker.test.host=test.clic-agent.com
worker.test.type=ajp13
---

- httpd.conf:
---
ServerName test.clic-agent.com
JkMount /*.jsp test
JkMount /servlet/* test
---

- server.xml
---
...
Connector className=org.apache.ajp.tomcat4.Ajp13Connector
   port=8009 minProcessors=5 maxProcessors=75
   acceptCount=10 debug=0 /
...
Host name=test.clic-agent.com debug=4
appBase=/Library/WebServer/Documents/clic-agent.com
   unpackWARs=true autoDeploy=true
...
Context path= docBase= debug=4/
...
---

Thanks to all!


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




JSP not forwarded to Tomcat

2003-01-27 Thread Pascal Robert
Hi list,

First, the setup:

- Mac OS X 10.2
- Tomcat/4.1.18
- Apache/1.3.27
- mod_jk-1.3.27.so (build from OS X from Jakarta's site), renamed to
mod_jk.so

I tried to get some Virtual Host to work with Tomcat (the webapps for each
VirtualHost are outside Tomcat's directory).  Instead of getting the
generated JSP, I get the source, just like if the JSP was sent as text/plain
and was not parsed by Tomcat.  If I look at the 'mod_jk.log' log, I see
requests for static HTML files, but I don't see any log information for my
JSP files, so it look like mod_jk don't handle them, even if they should.

Apache's config:


LoadModule jk_modulelibexec/httpd/mod_jk.so
AddModule mod_jk.c

JkLogFile /usr/local/tomcat-4/logs/mod_jk.log
JkLogLevel debug
JkWorkersFile /usr/local/tomcat-4/conf/jk/workers.properties

VirtualHost *
ServerName my.host
JkMount /*.jsp ajp13
JkMount /servlet/* ajp13
DocumentRoot /path/to/the/web/app
/VirtualHost 


Tomcat's config (server.xml):

Host name=my.host debug=1
appBase=/path/to/the/web
unpackWARs=true autoDeploy=true
   
Listener className=org.apache.ajp.tomcat4.config.ApacheConfig
append=true /

Valve className=org.apache.catalina.valves.AccessLogValve
directory=logs
prefix=clic_agent_log.
suffix=.txt
pattern=common/

Logger className=org.apache.catalina.logger.FileLogger
directory=logs
prefix=clic_agent_catalina_log.
suffix=.txt
timestamp=true/

Context path= docBase=app debug=1/
/Host

   



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




Help with VirtualHost and multiple webapps

2003-01-17 Thread Pascal Robert
Hi list,

I'm trying to deploy multiple webapps inside one virtual host with the WARP
connector (mod_webapp, Tomcat 4.06, Apache 1.3.27, OS X 10.2.3 Server).

I have one directory (outside Tomcat's tree) with 3 apps:

- ROOT
- mobile
- utilitaires

The only app I can reach is ROOT, I get 404's (from Tomcat) for the two
other apps.  I don't see errors in the application's log, and catalina.out
displays 'WarpEngine[Apache]: Mapping request' at every access I try.  So it
looks line a URL mapping problem but I don't see why.

Apache's conf:

---
IfModule mod_webapp.c
WebAppConnection tomcat_warp warp localhost:8008
/IfModule

WebAppDeploy mobile tomcat_warp /mobile
WebAppDeploy ROOT tomcat_warp /
WebAppDeploy utilitaires tomcat_warp /utilitaires
Alias /mobile /path/to/webapps/mobile
Alias /utilitaires /path/to/webapps/utilitaires
---


Tomcat's conf/server.xml:

---
Host name=jsp.acaiq.com debug=3
appBase=/path/to/webapps
unpackWARs=true

Context path= docBase=ROOT debug=0 /
Context path=/mobile docBase=mobile debug=3 /
Context path=/utilitaires docBase=utilitaires debug=0 /

---


Filesystem:

---
% ls -l /path/to/webapps

total 0
drwxr-xr-x  3 root  admin  102 Jan 17 08:59 ROOT
drwxr-xr-x  4 root  admin  136 Jan 17 07:46 mobile
drwxr-xr-x  3 root  admin  102 Jan 17 07:50 utilitaires
---


Last lines of the log file:

---
2003-01-17 09:00:40 StandardContext[/mobile]: Posting standard context
attributes
2003-01-17 09:00:40 StandardWrapper[/mobile:default]: Loading container
servlet default
2003-01-17 09:00:40 StandardWrapper[/mobile:invoker]: Loading container
servlet invoker
2003-01-17 09:00:40 StandardContext[/mobile]: Starting completed
---

When I make a request for /mobile, this is the last line in catalina.out.






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