You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Shun-Luoi Daniel Fong <sd...@engineering.uiowa.edu> on 2001/04/04 22:51:59 UTC

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.
-----------------------


tomcat 3.3-M2 /admin/contextAdmin/contextList.jsp failure

Posted by "Peter B. West" <pb...@powerup.com.au>.
I have been trying to set up a JBDCRealm using postgresql 7.0.2 under redhat
linux with tomcat 3.3-M2.  I got the authentication to work, but ran into the
following problem when trying to access the Context List.

Error: 500
Location: /admin/contextAdmin/contextList.jsp
Internal Servlet Error:

java.lang.NoClassDefFoundError: org/apache/tomcat/util/log/Logger
	at contextAdmin.contextList_1._jspService(contextList_1.java:67)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java)
	at org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:500)
	at org.apache.tomcat.core.Handler.service(Handler.java:223)
	at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:448)
	at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:788)
	at org.apache.tomcat.core.ContextManager.service(ContextManager.java:701)
	at
org.apache.tomcat.modules.server.Ajp13Interceptor.processConnection(Ajp13Interceptor.java:162)
	at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:424)
	at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:497)
	at java.lang.Thread.run(Thread.java:498)

Looking in container/tomcat_util.jar, I see
org/apache/tomcat/util/qlog/Logger.class, but no log/Logger.class.  Is this the
problem?  If so, how do I fix it (being new to java)?

Peter
-- 
Peter B. West  pbwest@powerup.com.au  http://powerup.com.au/~pbwest
"Lord, to whom shall we go?"

Re: context problem?

Posted by Shun-Luoi Daniel Fong <sd...@engineering.uiowa.edu>.
Thanks Jeff,
Your information really helped me work through some of the problems I was
having. I'll keep working with it and see what I can get accomplished.

Thanks,
Luoi

On Wed, 4 Apr 2001, Jeff Kilbride wrote:

> 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" <sd...@engineering.uiowa.edu>
> To: <to...@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" <sd...@engineering.uiowa.edu>
> > > > To: <to...@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.
> > -----------------------
> >
> 
> 

-- 
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.
-----------------------


Re: context problem?

Posted by Jeff Kilbride <je...@kilbride.com>.
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" <sd...@engineering.uiowa.edu>
To: <to...@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" <sd...@engineering.uiowa.edu>
> > > To: <to...@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.
> -----------------------
>


Re: context problem?

Posted by Shun-Luoi Daniel Fong <sd...@engineering.uiowa.edu>.
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" <sd...@engineering.uiowa.edu>
> > To: <to...@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.
-----------------------


Re: context problem?

Posted by Shun-Luoi Daniel Fong <sd...@engineering.uiowa.edu>.
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" <sd...@engineering.uiowa.edu>
> To: <to...@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.
-----------------------


Re: context problem?

Posted by Jeff Kilbride <je...@kilbride.com>.
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" <sd...@engineering.uiowa.edu>
To: <to...@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.
> -----------------------
>