tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deepak C S <Deepa...@planetasia.com>
Subject RE: Includes
Date Mon, 18 Dec 2000 14:33:50 GMT
hi Friends,

	1) Can anybody suggest How to create a Web Application structure i.e

             root/WEB-INF/web.xml
             root/WEB-INF/classes
	   root/lib
	   ..............

          Is there a tool to develop this structure Or shd I do everything
manually i.e creating all directories??

          2) Problems in Tomcat-apache.conf

            How to change the default parameters that are created when
tomcat starts?

            eg: the Paths
         ApJServMount  /examples/servlet  /examples      is added by
default. 


                 But what if I want to change above line 
           ApJServMount  /examples  /examples 

          without modifying directly in tomcat-apache.conf.


       3) Where to put Java Beans and how does Tomcat manage Life cycle of
bean?? How do I call Destroy() methods say for eg. to Release a Database
Connection handle which was created in a constructor??

  Thanx in Advance,
  Deepu

Thanks and Regards,

Deepak C. S.
Planetasia Ltd,
A Microland Group Company,
Bangalore,India
Contact: 5522252 54 57 58 58 Extn 544
Email: deepakCS@planetasia.com

> ----------
> From: 	Kitching Simon[SMTP:Simon.Kitching@orange.ch]
> Reply To: 	tomcat-user@jakarta.apache.org
> Sent: 	Monday, December 18, 2000 7:33 PM
> To: 	'tomcat-user@jakarta.apache.org'
> Subject: 	RE: Includes
> 
> Hmm..seems like it should work fine. I do this sort of stuff
> right now, and there are no problems.
> 
> One note: I set path to an *empty string*, not to "/"..don't
> know if this makes a difference or not.
> 
> server.xml:
>         <Context path=""
>                 docBase="/home/ola3dev/webserver/docroot"
>                  debug="0"
>                  reloadable="false" >
>         </Context>
> 
> directory "/home/ola3dev/webserver/docroot" is layed out like:
> 
> WEB-INF
> directory1
>   file1.jsp
>   file2.jsp
> directory2
>   file3.jsp
>   file4.jsp
> 
> and files in one directory can include files in another
> directory without problem.
> 
> One question: what happens if you put plain html
> files directly into the docBase directory. Can you
> access them from tomcat??
> 
> > -----Original Message-----
> > From:	Bruce Cota [SMTP:bruce@vivi.com]
> > Sent:	Monday, December 18, 2000 2:46 PM
> > To:	tomcat-user@jakarta.apache.org
> > Subject:	Re: Includes
> > 
> > Thanks for the reply
> > 
> > The problem I have is that I cannot get a context with the
> > path "/" to work -- I just get 404's.  The site I'm trying
> > to work on (which already exists) uses url's like
> > "www.company.com/app1/index.jsp" and
> > "www.company.com/app2/index.jsp", where both
> > index1.jsp and index.2.jsp include urls like
> > "/include/setup.jsp".   I can't seem to make this
> > work in tomcat 3.2.  In tomcat 3.1 I did it by
> > setting up a Context with path="/" and
> > a docBase set to the parent directory which
> > includes "app1", "app2", and "include".
> > But in 3.2 when I do this I get 404's.
> > 
> > Kitching Simon wrote:
> > 
> > > Hi Bruce,
> > >
> > > I'm not entirely sure what your problem is.
> > >
> > > I'm almost certain you cannot include files "across contexts"
> > > using <jsp:include> (ie run-time include). That would involve
> > > invoking a servlet in one context from a servlet in another
> > > context.
> > >
> > > I'm almost certain that <%@ include url> (ie compile-time include)
> > > would not work across contexts either. The JSP specification
> > > (I used jsp1.2b1) states that the url *must* be a relative URL. It
> > > also states that the included page is "subject to access control",
> > > ie only files accessable from the webapp are includable; this seems
> > > to rule out including any file that is not under the webapp-specific
> > > document root, ie nothing stored in another webapp(context) can
> > > be included.
> > >
> > > Why can't you have all your files in a single context?? And
> > > what is the relevance of the context path? Including of files
> > > should work regardless of what prefix the webapp(context) has
> > > been given.
> > >
> > > Regards,
> > >
> > > Simon
> > >
> > > > -----Original Message-----
> > > > From: Bruce Cota [SMTP:bruce@vivi.com]
> > > > Sent: Monday, December 18, 2000 9:23 AM
> > > > To:   tomcat-user@jakarta.apache.org
> > > > Subject:      Includes
> > > >
> > > > Hi, I'm a newcomer to Tomcat and recently upgraded from
> > > > 3.1 to 3.2.   I have been working on a site in which one
> > > > directory holds files included in several sibling directories.
> > > >
> > > > With 3.1, I was able to use a Context with path="/", but
> > > > with 3.2 this  does not seem to work -- I get 404's from
> > > > tomcat in 3.2.
> > > >
> > > > I tried breaking up my directories into different contexts, but
> > > > I can't seem to get includes to work across contexts -- I get
> > > > "Bad file argument to include" when I try to include a jsp
> > > > from the "include context"  in a file in one of the other
> > > > contexts.  For that matter, I seem to have the same problem
> > > > when I use anything but a relative url in an include.
> > > >
> > > > Am I doing something wrong?  Is there a way to  use
> > > > a path="/" in a 3.2 context, or can I include files across
> > > > contexts?
> > > >
> > > > Thanks for any advice,
> > > > -Bruce
> 

Mime
View raw message