On Wednesday 16 August 2006 08:16, David Smith wrote:
> aladdin wrote:
> 
> >On Wednesday 16 August 2006 07:42, David Smith wrote:
> >  
> >
> >>aladdin wrote:
> >>
> >>    
> >>
> >>>I have an apache-http tomcat configuration set up that works just
> >>>fine, with static htm's, jsp's, and servlets, except for one thing.  It
> >>>finds all my .htm static content, and, when serving that, uses the
> >>>referenced .css style sheets.  However, when it goes to tomcat and
> >>>serves .jsp files, it doesn't process them with the .css style sheet.
> >>>
> >>>I thought that the page went to the browser, the browser "sees" the
> >>>reference to the .css file, then goes back and requests it to determine
> >>>how to render the page.
> >>>
> >>>Is this right?  If so, why doesn't apache give the .css file out of its 
> >>>directory
> >>>like it does for the .htm pages?  BTW, I've also tried putting a copy of 
> >>>the
> >>>.css file in the same directory as the .jsp pages, to no avail, and, in 
> >>>the .jsp
> >>>file, have tried several combinations and permutations of referencing the
> >>>.css file using various url's including and not including the webapp 
> >>>directory
> >>>name.
> >>>
> >>>Here's the directory structure:
> >>>
> >>>apache's stuff:
> >>>
> >>>/var/www/MyWebSite/                         <- All .htm's and .css's
> >>>/var/webapps/MyWebSite/                 <- All .jsp's and .tld's
> >>>/var/webapps/MyWebSite/WEB-INF  <- Exactly what you think it is- all 
> >>>servlets and tag libraries
> >>>
> >>>Thanks.
> >>>anw
> >>>
> >>>---------------------------------------------------------------------
> >>>To start a new topic, e-mail: users@tomcat.apache.org
> >>>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>>For additional commands, e-mail: [EMAIL PROTECTED]
> >>>
> >>> 
> >>>
> >>>      
> >>>
> >>Your assumption is correct that the client browser makes a separate 
> >>request to retrieve css files just like images or any other page resource.
> >>
> >>I would think your apache access log would offer some insight into why 
> >>the css files aren't being delivered and what the status code is.  You 
> >>can also attempt to access them directly and see what kind of response 
> >>you get.
> >>
> >>--David
> >>
> >>    
> >>
> >
> >Thanks!  I'll check out those logs as soon as I get into work,  Meantime,
> >what do you mean by "attempt to access them directly"?
> >
> >anw
> >
> >  
> >
> >  
> >
> Type the url of the css file in your favorite browser: 
> http://www.myserver.com/path/to/css/cssfile.css
> 
> --David
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

Ahh!  Late breaking experiment- thanks for the "how to check directly". 

When I type http://my.addr.whatever/style.css, I get it.  However, when
go to https://my.addr.whatever/style.css, I don't get it.  Note the http vs.
https.  However when I put the same document root into the virtual host
associated with the secure socket (port 443), and then try, I do
https://my.addr.whatever/style.css, now I do get it.

Sorry, that was kind of convoluted.  In other words, I can get
it by typing directly, both with http and https (after fixing my virtual host 
in the
apache.conf file), but the JSPs are not seeing it, and it's
still attempting to be mapped as indicated below, in the mod_jk.log file.

I've looked in the apache log files, and found this in the JK log file:

[Tue Aug 15 21:08:37 2006][23449:1728] 
[debug]map_uri_to_worker::jk_uri_worker_map.c (449): Attempting to map URI 
'/smsinfo.css' from 6 maps
[Tue Aug 15 21:08:37 2006][23449:1728] 
[debug]map_uri_to_worker::jk_uri_worker_map.c (461): Attempting to map context 
URI '/smsinfo/TopicsAdmin'
[Tue Aug 15 21:08:37 2006][23449:1728] 
[debug]map_uri_to_worker::jk_uri_worker_map.c (461): Attempting to map context 
URI '/smsinfo/register'
[Tue Aug 15 21:08:37 2006][23449:1728] 
[debug]map_uri_to_worker::jk_uri_worker_map.c (461): Attempting to map context 
URI '/smsinfo/login'
[Tue Aug 15 21:08:37 2006][23449:1728] 
[debug]map_uri_to_worker::jk_uri_worker_map.c (461): Attempting to map context 
URI '/*/servlet/*'
[Tue Aug 15 21:08:37 2006][23449:1728] 
[debug]map_uri_to_worker::jk_uri_worker_map.c (461): Attempting to map context 
URI '/servlet/*'
[Tue Aug 15 21:08:37 2006][23449:1728] 
[debug]map_uri_to_worker::jk_uri_worker_map.c (461): Attempting to map context 
URI '/*.jsp'

Here is my mod_jk configuration file, so why is it trying to map the 
'/smsinfo.css' to mod_jk for tomcat processing?


 LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so
# AddModule  mod_jk.c->  Is this deprecated?
JkWorkersFile /usr/local/tomcat/conf/workers.properties
JkLogFile     /var/log/apache2/mod_jk.log
JkLogLevel    debug
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"

# These assign URLs to the Tomcat worker
# Notes: I *think* the name (ajp13_worker) must be the same
#        as in the workers.properties file
#        The JkMount directive can also be located within
#        VirtualHost sections of apache2.conf

# JkMount /login ajp13_worker

# Java Server Pages
JkMount /*.jsp ajp13_worker

# Servlets
# JkMount /smsinfo/login ajp13_worker
JkMount /smsinfo/register ajp13_worker
JkMount /smsinfo/TopicsAdmin ajp13_worker
JkMount /servlet/* ajp13_worker
JkMount /*/servlet/* ajp13_worker



Thanks, and Regards,
anw

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to