tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Jones" <kev...@develop.com>
Subject RE: Non-context paths
Date Thu, 25 May 2000 17:41:21 GMT
I was being really dumb - I had a .jsp with a <%@include - I moved the .jsp
to another directory but did't move the files I was including. A quick look
at the logs would have told me this, but I'd forgotten I could be that
idiotic :-)

Kevin Jones
DevelopMentor
www.develop.com

> -----Original Message-----
> From: Kevin Jones [mailto:kevinj@develop.com]
> Sent: 25 May 2000 16:00
> To: tomcat-user@jakarta.apache.org
> Subject: RE: Non-context paths
>
>
> OK - I've just realised what I was doing wrong and I've been an idiot :-)
>
> It does work OK!
>
> Kevin Jones
> DevelopMentor
> www.develop.com
>
> > -----Original Message-----
> > From: Craig R. McClanahan [mailto:Craig.McClanahan@eng.sun.com]
> > Sent: 24 May 2000 23:03
> > To: tomcat-user@jakarta.apache.org
> > Subject: Re: Non-context paths
> >
> >
> > Kevin Jones wrote:
> >
> > > I'm assuming that it's being treated as a context, I don't know
> > for sure.
> > >
> > > I've moved the ROOT context to point at my own web app. Within that
> > > directory I've created a docs directory and put a file called
> > index.jsp in
> > > there. If I browse to that directory
> > (http://localhost/docs/index.jsp) then
> > > I see nothing. If I create a docs (or any other directory)
> > off-of another
> > > 'context' I can browse to that OK.
> > >
> > > Actually on retesting it can't think it's a context - if I browse to
> > > http://localhost/fred I get a 404. Also, if I put back the
> > original ROOT and
> > > remove my context from server.xml then I can get to /docs/api.
> > >
> > > OK - I've narrowed the problem down - if I put a static page
> in the sub
> > > directory it works fine, however if I put a JSP in there, it
> gets parsed
> > > into a .java file of size 0, doesn't get compiled and so
> > doesn't produce any
> > > output!
> > >
> > > This is true for all applications (contexts) - the file gets
> > parsed to this
> > >
> > > _0002fdocs_0002findex_0002ejspindex_jsp_0.java
> > >
> > > where docs is the sub-directory and index.jsp is the name of
> > the file, so
> > > JSPs in anything other that the context root directory don't
> > get compiled
> > > properly.
> > >
> > > A bug methinks?
> > >
> >
> > Cannot compile JSP pages at all?  That would be bad :-)
> >
> > Do the example JSP pages that come with Tomcat work?  They are
> > also nested in
> > subdirectories, and have to be compiled the first time you call
> > them.  If they
> > compile and run OK, there's something specific about your context
> > configuration
> > that is causing this.  If the examples do not work, I would
> > suspect your install
> > got corrupted somehow.
> >
> > Please also check the log files to see if there are any error
> tracebacks.
> >
> > >
> > > Kevin Jones
> > > DevelopMentor
> > > www.develop.com
> > >
> >
> > Craig McClanahan
> >
> >
> > >
> > > > -----Original Message-----
> > > > From: Craig R. McClanahan [mailto:Craig.McClanahan@eng.sun.com]
> > > > Sent: 24 May 2000 17:12
> > > > To: tomcat-user@jakarta.apache.org
> > > > Subject: Re: Non-context paths
> > > >
> > > >
> > > >
> > > >
> > > > Kevin Jones wrote:
> > > >
> > > > > In Tomcat I can create a new 'application' by adding a context
> > > > entry to the
> > > > > server.xml file and creating a sub-directory that contains
> > my resources.
> > > > > Within that application I can have further sub-directories that
> > > > contain .jsp
> > > > > files or html files. So if I have an application called
> foo, I have
> > > > > c:\tomcat\webapps\foo and I can browse to
> > > > http://localhost/foo/default.htm.
> > > > > Within foo I can create a sub-directory called bar (so I have
> > > > > c:\tomcat\webapps\foo\bar) and I can browse to
> > > > > http://localhost/foo/bar/quux.htm This is good.
> > > > >
> > > > > My question is - how do I do this for the root context?
> > > > >
> > > > > My root context is in c:\tomcat\webapps\ROOT and I browse
> > to it by going
> > > > > http://localhost/defalt.htm I'd like to be able to organise
> > my root into
> > > > > several sub-directories so have c:\tomcat\webapps\ROOT\xml and
> > > > > c:\tomcat\webapps\ROOT\java and be able to browse to
> > > > > http://localhost/java/javahome.jsp but Tomcat treats /java as a
> > > > context not
> > > > > as a sub directory!
> > > > >
> > > > > Is there anyway to tell Tomcat that a 'path' isn't a context?
> > > > >
> > > >
> > > > How are you determining that Tomcat is treating this as a
> > > > context?  It only
> > > > would if you defined a webapp attached to context path "/xml"
> > or "/java".
> > > >
> > > > In the default configuration that ships with Tomcat, the ROOT
> > > > context has a
> > > > subdirectory named "docs" that contains (among other things) the API
> > > > documentation.  In this case Tomcat knows that "/docs" is a
> > > > subdirectory because
> > > > there is no matching context path, so it works the way you
> > are describing.
> > > >
> > > > >
> > > > > Kevin Jones
> > > > > DevelopMentor
> > > > > www.develop.com
> > > > >
> > > >
> > > > Craig McClanahan
> > > >
> > > >
> > > >
> > > >
> >
> --------------------------------------------------------------------------
> > > > To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> > > > For additional commmands, email: tomcat-user-help@jakarta.apache.org
> > >
> > >
> >
> --------------------------------------------------------------------------
> > > To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> > > For additional commmands, email: tomcat-user-help@jakarta.apache.org
> >
> >
> >
> --------------------------------------------------------------------------
> > To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commmands, email: tomcat-user-help@jakarta.apache.org
>
>
> --------------------------------------------------------------------------
> To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email: tomcat-user-help@jakarta.apache.org


Mime
View raw message