Hi all...

Thanx Dim for a step forward...

You're right... Apache redirected the request. :-))) I was looked only at 
terminal (thinking that debug=9 is enough) - but in fact, just in mod_jk.log 
there is two lines for every request to my servlet:

[jk_uri_worker_map.c (344)]: Into jk_uri_worker_map_t::map_uri_to_worker
[jk_uri_worker_map.c (434)]: jk_uri_worker_map_t::map_uri_to_worker, done withou
t a match

Here (you wrote similar advice "Re: Servlet configuration" to somebody else) I 
looked to web.xml, which contains:

    <servlet>
        <servlet-name>Hello</servlet-name>
        <servlet-class>Hello</servlet-class>
    </servlet>

    <servlet>
        <servlet-name>HelloServlet</servlet-name>
        <servlet-class>Hello</servlet-class>
    </servlet>

    <servlet-mapping>
        <servlet-name>HelloServlet</servlet-name>
        <url-pattern>/hello</url-pattern>
    </servlet-mapping>

Maybe there is some redundancy or missing... but where? Because Hello.class is 
in webapps/intranet/WEB-INF/classes (with all classes generated from jsps) and 
web.xml is in WEB-INF... that's right I hope. URI is still the same:

host:port/intranet/servlet/hello

But I tried also Hello HelloServlet, all without servlet... etc. (Despair. :-))

Is it possible to let log mapping from URI to absolut path? With JSP this is 
done, but with servlets I have no additional information from where it tries 
load it. As fast I was done with JSP - I'm now stuck in this problem. I except 
that solution is easy, but I can't see it.

Thanks for anything

Richard "Virgo" Richter

> From: Dmitri Colebatch <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED], Richard Richter <[EMAIL PROTECTED]>
> Subject: Re: JkMount in httpd.conf
> Date: Tue, 26 Jun 2001 15:37:04 +1000
> MIME-Version: 1.0
> Content-Transfer-Encoding: 8bit
> 
> Not sure if anyone responded to this - our mailserver's been down (or more 
> accurately our ISP) for the last couple of days...
> 
> On Mon, 25 Jun 2001 19:28, Richard Richter wrote:
> > virtual host and your question is about server.xml (I have no experience
> > with that kind of virtual host).
> Tomcat also supports virtual hosts - although as I said, I haven't been able 
> to get it to work on a port-based virtual.
> 
> > Strange for me is that one JkMount works and another doesn't. I read
> > "Working with mod_jk" papers, but there are more examples than formal
> > definitions. So I can ask:
> >
> > Is this path "/intranet/WEB-INF/classes/Hello" covered with these JkMounts?
> >     1.      JkMount /intranet/* worker
> >     2.      JkMount /*classes/* worker
> >     3.      JkMount /classes/* worker
> > Is second parameter used as a needed substring or what?
> What happens in your tomcat logs when the request comes in?  My guess is that 
> apache gets the request for /intranet/servletname and correctly forwards it 
> to tomcat, which then looks for a file called intranet/servletname 'cause 
> (I'm guessing) its not matching the servlet.
> 
> What servletmapping are you using?
> 
> hope this helps
> cheers
> dim
> 
> >
> > And when talking about redirection from Apache to Tomcat... One another
> > question:
> >
> > I have a picture x.jpg in Tomcat project and so it is deployed as
> > webapps/payportal/x.jpg among another jsps. Now when browser loads this jsp
> > (in fact on client side it is only html) it finds out that there is an
> > image and sends a reqest for it, doesn't it?
> > Now - how can Apache know, that this image is not in my
> > web-data/payportal/x.jpg (which doesn't exist in fact) and that this
> > request has to be redirected to Tomcat. JPG is not JSP! I have no JkMount
> > for this case?
> > Is there any implicit redirection?
> >
> > These mechanisms are not transparent for me (or "I don't understend them").
> > ;-)
> >
> > Richard "Virgo" Richter
> >
> > > On Fri, 22 Jun 2001 23:22, Richard Richter wrote:
> > > > Hello...
> > > >
> > > > I'm using Apache with mod_jk and Tomcat for jsps and servlets. JSP is
> > > > without problem, but servlet don't want to run. Because informations
> > > > about absolute path of requested document is written to terminal, where
> > > > Tomcat was started, I found out that servlet (URI:
> > > > http://poseidon.bgs.sk:4444/intranet/WEB-INF/classes/Hello) is not
> > > > translated from relative to absolute path - nothing apears on terminal.
> > > >
> > > > I think, that Apache don't redirect this request to Tomcat (or
> > > > appropriate worker)... my httpd.conf has this section:
> > > >
> > > > <VirtualHost poseidon.bgs.sk:4444>
> > > >         ServerAdmin [EMAIL PROTECTED]
> > > >         DocumentRoot /export/home/virgo/web-data
> > > >         <Location /export/home/virgo/web-data>
> > > >                 Options Indexes FollowSymLinks
> > > >                 AllowOverride None
> > > >                 SetHandler default-handler
> > > >                 Order allow,deny
> > > >                 Allow from all
> > > >         </Location>
> > > >         ServerName poseidon.bgs.sk
> > > >         JkMount /*.jsp virgo
> > > >         JkMount /intranet/* virgo
> > > >         ErrorLog
> > > > /opt/oracle/ias/product/8.1.7/Apache/Apache/logs/error4444_log
> > > > TransferLog
> > > > /opt/oracle/ias/product/8.1.7/Apache/Apache/logs/access4444_ log
> > > > </VirtualHost>
> > > >
> > > > *.jsp works good, but second JkMount not... I tried many versions of
> > > > second field of that line - but nothing. Always 404 Forbidden (Apache
> > > > signed on the bottom of page ;-))... How I have to force Apache to
> > > > redirect requests for servlets (eg. for URI specified upper) to Tomcat
> > > > (or worker called virgo in my case)???
> > > >
> > > > Thanks for any suggestion

Richard Richter ([EMAIL PROTECTED])
Application Programmer, Business Global Systems a. s.

Reply via email to