[opencms-dev] Howto avoid inclusion loop while using <jsp:forward> (OCMS Alpha 1)
Sebastian Himberger
sebastian.himberger at gmx.de
Sun Oct 10 17:37:25 CEST 2004
Hi list,
i'm trying to process some formdata using some <jsp:forward> actions but
always get an inclusion-loop error if redirecting back to the form-page
(because of the template includes).
Does anybody know a proper solution to work around this, keeping the
file structure clean?
here is my sourcecode:
-------------------------------------------------------------
report_outdated.jsp:
<%@page session="false" %>
<%@taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %>
<%@page import="org.opencms.jsp.*,
org.opencms.file.*" %>
<cms:include property="template" element="head" />
<jsp:useBean id="outdated" class="de.test.OutdatedContentBean"
scope="request" />
<form method="post" action="validate_outdated.jsp">
Absender: <input type="text" name="senderName" size="30" value="<%=
outdated.getSenderName() %>"><br>
E-Mail: <input type="text" name="senderEmail" size="20" value="<%=
outdated.getSenderEmail() %>"><br>
Nachricht: <textarea cols="20" name="message" rows="20"><%=
outdated.getMessage() %></textarea><br>
<input type="submit" value="Abschicken">
</form>
<cms:include property="template" element="foot" />
----------------------------------------------------------
validate_outdated.jsp:
<%@page session="false" %>
<jsp:useBean id="outdated" class="de.test.OutdatedContentBean"
scope="request" />
<jsp:setProperty name="outdated" property="*" />
<% if (outdated.isValid()) { %>
<jsp:forward page="report_success.jsp" />
<% } else { %>
<jsp:forward page="report_outdated.jsp" />
<% } %>
Thanks very much
Sebastian
More information about the opencms-dev
mailing list