You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by br...@homepoint.com on 2000/08/21 21:25:28 UTC

Re: Document Root JSP (and includes)

Actually - the tomcat users guide I got (which came with the Tomcat 3.1
build) really doesnt
mention getting it to work from the document root directory (in other words
getting http://www.myhost.com/index.jsp).

I did manage to figure it out by modifying the server.xml file and changing
the
<Context path=""....> to point to a docBase of where I had my document root
for
Apache.  The guide does mention the Context XML tag - but really doesnt
say much more than the arguments for it.

It's running great and I've got our JSP code running under iPlanet, JRun,
JSWDK,
and now Tomcat... but I've found Tomcat to bthe most "finicky".  Has anyone
else had a problem getting multiple <%@ include file="..." %> JSP tags
(which include the same file) working?  None of the other app servers
I've tried have had this problem.

Here's some example code that will fail...
if (action.equals(""))
  {
    // print some default info but not the include
    ....
  }
else if (action.equals("modify"))
  {
    // show a modify screen
    ...
    <%@ include file="modifyScreen.jsp" %>
  }
else if (action.equals("new"))
  {
    // do some stuff for a new entry
    ...
    <%@ include file="modifyScreen.jsp" %>
  }

Granted, I could not do the separate includes then do an if statement
for "new" or "modify" to do the include once.. still seems strange.

Also, does anyone have any idea if when "include" files change, then
the parent file gets reloaded?  I tested it and it didnt seem to work,
I still had to touch the parent file (JRun tests the timestamps on the
included files also).

- Brent



                                                                                                                                                 
                    "David M.                                                                                                                    
                    Holmes"                 To:     tomcat-user@jakarta.apache.org                                                               
                    <david_m_holmes@        cc:     (bcc: Brent Johnson/HPC)                                                                     
                    yahoo.com>              Subject:     Re: Document Root JSP                                                                   
                                                                                                                                                 
                    08/21/00 02:41                                                                                                               
                    PM                                                                                                                           
                    Please respond                                                                                                               
                    to tomcat-user                                                                                                               
                                                                                                                                                 
                                                                                                                                                 



Its in the Tomcat user's guide...

<Dave/>

--- brent.johnson@homepoint.com wrote:
> I searched the mailing list archives and found a couple of questions
> regarding this - but I didn't see any real answer.  By default, the
> configuration
> for tomcat has /examples set as the path to use with tomcat (Im using
> Tomcat
> and Apache under Solaris).  Is there a way to have Apache forward only
> *.jsp requests to the Tomcat engine, and do this for all *.jsp files
under
> the document root directory of apache?
>
> I would assume this could be done by modifying the server.xml file and
> the tomcat.conf file - but I haven't had any luck getting this to work.
>
> Any help would be appreciated... thanks,
>
> - Brent
>


__________________________________________________
Do You Yahoo!?
Yahoo! Mail ? Free email you can access from anywhere!
http://mail.yahoo.com/