[opencms-dev] Problem with JSP's

Christian Steinert christian_steinert at web.de
Mon Sep 18 17:32:52 CEST 2006


Do you use the same file for the 
  template
and the 
  template-elements
property?

The template property decides which JSP is used to run the Page.
The template-elements property is used by that template to include further building blocks into your page as it's assembled.

If these properties have identical values then your JSP tries to include itself, which cannot work and is therefore blocked by opencms.

chrisitan



> -----Ursprüngliche Nachricht-----
> Von: The OpenCms mailing list <opencms-dev at opencms.org>
> Gesendet: 18.09.06 17:27:30
> An: "The OpenCms mailing list" <opencms-dev at opencms.org>
> Betreff: Re: [opencms-dev] Problem with JSP's


> Well, I will copy and paste my code here, it comes straight from the
> documentation included with OpenCMS.  It's obvious to me that I don't
> understand how it serves JSP's.  Here is the code:
> 
> <%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %>
> 
> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
> <html>
> <head>
> <title><cms:property name="Title" escapeHtml="true" /></title>
> 
> <meta HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html;
> CHARSET=<cms:property name="content-encoding" default="ISO-8859-1"
> />">
> 
> <link type= "text/css" href="<cms:link>../resources/mystyle.css</cms:link>">
> </head>
> <body>
> 
> <h2>My first template head</h2>
> 
> <!-- Main pagebody starts here -->
> 
> <cms:include element= "body"/>
> 
> <!--Main pagebody ends here -->
> 
> <h2>My first template foot</h2>
> 
> </body>
> </html>
> 
> Which I put in sites/default/ and call with the address
> localhost:8080/opencms/opencms/simpletemplate.jsp
> 
> On 9/18/06, Christian Steinert <christian_steinert at web.de> wrote:
> >
> > > -----Ursprüngliche Nachricht-----
> > > Von: The OpenCms mailing list <opencms-dev at opencms.org>
> > > Gesendet: 18.09.06 16:21:37
> > > An: opencms-dev at opencms.org
> > > Betreff: [opencms-dev] Problem with JSP's
> >
> > It may be my limited knowledge of JSP's or limited knowledge of OpenCMS, I can't tell, but when I try to use one of the JSP's in the example documentation (tried a couple), I get this error:
> > >
> > > javax.servlet.ServletException
> > > : javax.servlet.jsp.JspException: VFS target "/simpletemplate.jsp" was already included earlier.
> > >
> > > Can someone tell me what I'm doing wrong?
> > >
> > >
> >
> > One of your JSPs (more specifically the JPS simpletemplate.jsp) is including itself.
> > You have to check your inclusions very carefully (also those inclusions that are based on properties, like the 'template' - property, not just hard-coded inclusion targets) to make sure that recursive inclusion does not happen.
> >
> >
> > christian
> > _______________________________________________________________________
> > Viren-Scan für Ihren PC! Jetzt für jeden. Sofort, online und kostenlos.
> > Gleich testen! http://www.pc-sicherheit.web.de/freescan/?mc=022222
> >
> >
> > _______________________________________________
> > This mail is sent to you from the opencms-dev mailing list
> > To change your list options, or to unsubscribe from the list, please visit
> > http://lists.opencms.org/mailman/listinfo/opencms-dev
> >
> 
> 
> 
> -- 
> Aaron Green
> Web Content Coordinator
> University of Southern Mississippi
> 
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev


__________________________________________________________________________
Erweitern Sie FreeMail zu einem noch leistungsstärkeren E-Mail-Postfach!		
Mehr Infos unter http://freemail.web.de/home/landingpad/?mc=021131




More information about the opencms-dev mailing list