S
Scott Ellsworth
Hi, all.
I would like my webapp to pull images from the war/exploded deployment
directory, rather than having Apache try to snag them from the
filesystem. I have not figured out what to put in web.xml to make that
happen, and I have been experimenting, reading docs, and googling all
day. Anyone want to loan me a clue?
The webapp is to go under Tomcat 4.1.29/Apache 1.3.?. On both the
XServe and the Solaris machines that are going to be the hosts for this,
Apache is set to use mod_jk to forward requests to Tomcat.
When I tried the following web.xml, images appeared happily in if I
connected directly to Tomcat on port 9006. No images appeared if I
connected to Apache on port 80. The compiled jsps did appear.
<?xml version="1.0"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>MyMonomer</display-name>
<description>mymonomer</description>
<servlet>
<servlet-name>mymonomer</servlet-name>
<jsp-file>/index.jsp</jsp-file>
</servlet>
<servlet-mapping>
<servlet-name>mymonomer</servlet-name>
<url-pattern>/*.gif</url-pattern>
</servlet-mapping>
</web-app>
I would have thought my url-pattern would have given me all gifs.
I tried the following servlet mapping, but no images were displayed even
in Tomcat on 9006.
<servlet-mapping>
<servlet-name>mymonomer</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
when I tried an url pattern of
<servlet-mapping>
<servlet-name>mymonomer</servlet-name>
<url-pattern>*</url-pattern>
</servlet-mapping>
Tomcat 4.1.29 started throwing exceptions.
NB: httpd.conf contains
<IfModule mod_jk.c>
JKWorkersFile /etc/httpd/workers.properties
JKLogFile /var/log/httpd/mod_jk.log
JKLogLevel error
JKMount /*.jsp JBoss1
JKMount /servlet/* JBoss1
JKMount /examples/* JBoss1
</IfModule>
in httpd.conf. jk.properties contains no content. server.xml contains
the usual defaults.
Scott
I would like my webapp to pull images from the war/exploded deployment
directory, rather than having Apache try to snag them from the
filesystem. I have not figured out what to put in web.xml to make that
happen, and I have been experimenting, reading docs, and googling all
day. Anyone want to loan me a clue?
The webapp is to go under Tomcat 4.1.29/Apache 1.3.?. On both the
XServe and the Solaris machines that are going to be the hosts for this,
Apache is set to use mod_jk to forward requests to Tomcat.
When I tried the following web.xml, images appeared happily in if I
connected directly to Tomcat on port 9006. No images appeared if I
connected to Apache on port 80. The compiled jsps did appear.
<?xml version="1.0"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>MyMonomer</display-name>
<description>mymonomer</description>
<servlet>
<servlet-name>mymonomer</servlet-name>
<jsp-file>/index.jsp</jsp-file>
</servlet>
<servlet-mapping>
<servlet-name>mymonomer</servlet-name>
<url-pattern>/*.gif</url-pattern>
</servlet-mapping>
</web-app>
I would have thought my url-pattern would have given me all gifs.
I tried the following servlet mapping, but no images were displayed even
in Tomcat on 9006.
<servlet-mapping>
<servlet-name>mymonomer</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
when I tried an url pattern of
<servlet-mapping>
<servlet-name>mymonomer</servlet-name>
<url-pattern>*</url-pattern>
</servlet-mapping>
Tomcat 4.1.29 started throwing exceptions.
NB: httpd.conf contains
<IfModule mod_jk.c>
JKWorkersFile /etc/httpd/workers.properties
JKLogFile /var/log/httpd/mod_jk.log
JKLogLevel error
JKMount /*.jsp JBoss1
JKMount /servlet/* JBoss1
JKMount /examples/* JBoss1
</IfModule>
in httpd.conf. jk.properties contains no content. server.xml contains
the usual defaults.
Scott