Programmers Guide > JOT Views for JSP

JOT Views for JSP

JOT Views custom tags allow JSP pages to render web components with the JOT Views rendering engine. JOT JSP tags are documented by the WEB-INF/jotviews.tld tag library descriptor. JOT JSP tags invoke the JOT Views rendering engine, providing access to the capabilities of JOT Templates, JOT Web Components, and JOT Iterators.

JOT JSP Tags:

The ServiceRequest tag renders a response. The JotResponseBean and JOT Template (contentPath) attributes are optional (see jotviews.tld for details):

    <jot:ServiceRequest
        jotResponseBeanClass="com.example.ExampleJotResponseBean"
        contentPath="/webpages/ExampleJotTemplate.html" />
    

The RenderComponent tag uses a JOT Web Component to render dynamic content into a JSP page. The JotContentBean and JOT Template (contentPath) attributes are optional (see jotviews.tld for details):

    <jot:RenderComponent jotContentBeanClass="com.example.ExampleJotTemplateBean" />

Forwarding to a JOT Servlet:

JSP pages can forward requests to a JOT Servlet as the View component in Struts or other Model-View-Controller applications. The following JSP example does some processing that sets the value of the customer property in Request scope and then forwards the request to a JOT Servlet for response rendering.

    <jsp:useBean id="customer" scope="request" class="com.example.Customer">
        <% customer.setCustomerId(request.getParameter("LoginName")); %>
    </jsp:useBean>
    <jsp:forward page="/ExampleJotServlet"/>
© 2007 JOT Object Technologies