Home : OpenEdit SDK : Programming OpenEdit : J S P Pages
J S P Pages
OpenEdit allows you to use JSP pages for rendering content with. JSP can be used with layouts, includes or anyplace. Or you can turn off [layouts] and use straight JSP pages.Example
You can find an example here: /jsp/snoop.jspSource:
<%@ page import="java.io.PrintWriter" %>
<%@ page import="java.io.IOException" %>
<%@ page import="javax.servlet.*" %>
<%@ page import="javax.servlet.http.*" %>
<%@ page import="java.util.*" %>
<p>The purpose of this page is to help you learn about HTTP requests,
sessions, and cookies, and how to work with them in a JSP.</p>
<h1>Your request</h1>
<table border="1" cellspacing="0" cellpadding="3">
<tr><td>Method</td><td><%= request.getMethod() %></td></tr>
<tr><td>Request URI</td><td><%= request.getRequestURI() %></td></tr>
Configuration
To enable JSP pages you just need to specify the jsp generator:/jsp/_site.xconf
<page>
<generator name="jsp" accepts="*.jsp" />
</page>
You can also stack [Generators] so that JSP is feed with other generators such as Velocity.
