tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Kilbride" <j...@kilbride.com>
Subject Re: context problem?
Date Thu, 05 Apr 2001 05:26:45 GMT
Hi Luoi,

That would be the only difference between your config and mine. I am not
trying to set them up in a user's public_html directory. That's probably
what the culprit is -- the ~ translation is messing up the JkMount
directives.

You could always alias /rubyfong to a different directory outside the
public_html directory:
Alias /rubyfong "/home/sdfong/rubyfong"  OR
Alias /rubyfong "/home/sdfong/webapps/rubyfong"

And adjust your context docBase accordingly. This would keep your webapps
inside your users home directory and allow you to access them via
http://agent.eng.uiowa.edu/rubyfong/thetest.jsp

You could actually use many different combinations to acheive something
similar to what you are trying to do. Unfortunately, I don't think the
/public_html directory is going to work -- unless somebody else has a
solution for it.

Thanks,
--jeff

----- Original Message -----
From: "Shun-Luoi Daniel Fong" <sdfong@engineering.uiowa.edu>
To: <tomcat-user@jakarta.apache.org>
Sent: Wednesday, April 04, 2001 6:17 PM
Subject: Re: context problem?


> Ok,
> I finally got a context working outside of webapps directory.
> So now I can have a context and type
> http://agent.eng.uiowa.edu/gamezone/thetest.jsp
> and it works!
>
> But I'm still having trouble with setting up a context in a user's
> directory, i.e. http://agent.eng.uiowa.edu/~sdfong/rubyfong/thetest.jsp
>
> In server.xml, I set the path as "/rubyfong" and the docBase as
> "/home/sdfong/public_html/rubyfong"
> In mod_jk.conf I add the following lines:
>
> Alias /rubyfong "/home/sdfong/public_html/rubyfong"
> <Directory "/home/sdfong/public_html/rubyfong">
>    Options Indexes FollowSymLinks
> </Directory>
>
> JkMount /rubyfong/servlet/* ajp12
> JkMount /rubyfong/*.jsp ajp12
>
> <Location "/rubyfong/WEB-INF/">
>    AllowOverride None
>    deny from all
> </Location>
>
> <Location "/rubyfong/META-INF/">
>    AllowOverride None
>    deny from all
> </Location>
>
> I wonder if it has to do with the path as I specifiy it and then in the
> browser I have a ~sdfong/rubyfong/thetest.jsp  rather than
> /home/sdfong/public_html/rubyfong/thetest.jsp
>
> I'll keep working on it, but if anyone can see what I am doing wrong or
> has any ideas, please let me know.
>
> Thanks,
> Luoi
>
>
> On Wed, 4 Apr 2001, Shun-Luoi Daniel Fong wrote:
>
> > Well, I tried first removing the JkMount directives for ajp12 and that
> > didn't work. So I tried adding those back in and removing JkMount for
> > ajp13. That didn't work either.
> >
> > So far the only ways I can get .jsp files to be found are if they are in
> > /usr/java/jakarta-tomcat-3.2.1/webapps (or a subdirectory of webapps,
with
> > JkMount added to mod_jk.conf).
> >
> > In my jasper.log file, it seems to be indicating that when I type in the
> > path to a .jsp file in my home
> > directory(i.e.
http://agent.eng.uiowa.edu/~sdfong/rubyfong/gamezone/testex.jsp),
> > it is looking in webapps/ROOT for that directory structure and file,
> > i.e.
> >
> > RealPath:
/usr/java/jakarta-tomcat-3.2.1/webapps/ROOT/~sdfong/rubyfong/gamezone/testex
.jsp
> >
> >
> > I'm not sure what to do to fix this. Jeff, could I take a look at your
> > config files(server.xml, mod_jk.conf, httpd.conf) to see how you did
yours
> > and if I'm missing something in mine?
> > Or if anybody has any other ideas I'd love to hear them, b/c I'm pretty
> > stuck.
> > btw, in case you need to know, I'm using Tomcat 3.2.1/Apache/Linux
> >
> >
> > Thanks,
> > Luoi
> >
> >
> > On Wed, 4 Apr 2001, Jeff Kilbride wrote:
> >
> > > It's probably not good that you are mounting both ajp12 and ajp13
connectors
> > > for the same directories. The first thing I would try is removing
either the
> > > JkMount directives for ajp12 or ajp13, then restart both Tomcat and
Apache.
> > >
> > > Everything else looks okay. I run my contexts outside of the
> > > $TOMCAT_HOME/webapps directory also, and I haven't had any problems.
> > >
> > > Thanks,
> > > --jeff
> > >
> > > ----- Original Message -----
> > > From: "Shun-Luoi Daniel Fong" <sdfong@engineering.uiowa.edu>
> > > To: <tomcat-user@jakarta.apache.org>
> > > Sent: Wednesday, April 04, 2001 1:51 PM
> > > Subject: context problem?
> > >
> > >
> > > > Hi,
> > > >
> > > > 1. I created a context in server.xml as follows
> > > >
> > > >         <Context path="/gamezone"
> > > >
docBase="/home/sdfong/public_html/rubyfong/gamezone"
> > > >                  crossContext="false"
> > > >                  debug="0"
> > > >                  reloadable="true" >
> > > >         </Context>
> > > >
> > > > 2. I also added the following in mod_jk.conf that is included in
> > > > httpd.conf
> > > >
> > > > Alias /gamezone "/home/sdfong/public_html/rubyfong/gamezone"
> > > > <Directory "/home/sdfong/public_html/rubyfong/gamezone">
> > > >    Options Indexes FollowSymLinks
> > > > </Directory>
> > > >
> > > > JkMount /gamezone/servlet/* ajp12
> > > > JkMount /gamezone/*.jsp ajp12
> > > >
> > > > JkMount /gamezone/servlet/* ajp13
> > > > JkMount /gamezone/*.jsp ajp13
> > > >
> > > > <Location "/gamezone/WEB-INF/">
> > > >     AllowOverride None
> > > >     deny from all
> > > > </Location>
> > > >
> > > > <Location "/gamezone/META-INF/">
> > > >    AllowOverride None
> > > >    deny from all
> > > > </Location>
> > > >
> > > > 3. But when I try access a page at
> > > > http://agent.eng.uiowa.edu/~sdfong/rubyfong/gamezone/testex.jsp
> > > >
> > > > I got a 404 jsp not found error in the browser and I got the
following
> > > > message in jasper.log
> > > >
> > > > 2001-04-04 03:49:40 - Scratch dir for the JSP engine is:
> > > /usr/java/jakarta-tomcat-3.2.1/work/localhost_8080%2Fexamples
> > > > 2001-04-04 03:49:40 - IMPORTANT: Do not modify the generated
servlets
> > > > 2001-04-04 03:50:26 - JspEngine -->
/~sdfong/rubyfong/gamezone/testex.jsp
> > > > 2001-04-04 03:50:26 -        ServletPath:
> > > /~sdfong/rubyfong/gamezone/testex.jsp
> > > > 2001-04-04 03:50:26 -           PathInfo: null
> > > > 2001-04-04 03:50:26 -           RealPath:
> > >
/usr/java/jakarta-tomcat-3.2.1/webapps/ROOT/~sdfong/rubyfong/gamezone/testex
> > > .jsp
> > > > 2001-04-04 03:50:26 -         RequestURI:
> > > /~sdfong/rubyfong/gamezone/testex.jsp
> > > > 2001-04-04 03:50:26 -        QueryString: null
> > > > 2001-04-04 03:50:26 -     Request Params:
> > > > 2001-04-04 03:50:26 - Classpath according to the Servlet Engine is:
> > > /usr/java/jakarta-tomcat-3.2.1/webapps/ROOT/WEB-INF/classes
> > > >
> > > >
> > > > The RealPath says it is looking in
/usr/java/jakarta-tomcat-3.2.1/webapps
> > > > for my directories and file.
> > > > Could someone explain why it is doing this and how I could fix it.
I've
> > > > been struggling with this problem for almost a month now and am at
my wits
> > > > end.
> > > >
> > > > Thanks,
> > > > Luoi
> > > >
> > > >
> > > >
> > > > --
> > > > D. Shun-Luoi Fong
> > > > 821 Melrose Avenue
> > > > Iowa City, IA 52246
> > > > email: sdfong@engineering.uiowa.edu
> > > >
> > > > -----------------------
> > > > Colossions 2:8 See to it that no one takes you captive through
philosophy
> > > > or empty deception, according to the traditions of men, according to
the
> > > > elementary principles of the world, rather than according to Christ.
> > > > -----------------------
> > > >
> > >
> > >
> >
> >
>
> --
> D. Shun-Luoi Fong
> 821 Melrose Avenue
> Iowa City, IA 52246
> email: sdfong@engineering.uiowa.edu
>
> -----------------------
> Colossions 2:8 See to it that no one takes you captive through philosophy
> or empty deception, according to the traditions of men, according to the
> elementary principles of the world, rather than according to Christ.
> -----------------------
>


Mime
View raw message