This page describes the current status of the WebLogic JSP implementation. Our implementation for the 4.1 b1 release is based on the Public Draft #1 JSP specification (i.e., the one dated April 27, 1999). It intends to describe where we deviate from that SPEC and what isn't implemented, as well as any other caveats or things to note. Unless otherwise noted, the intention is to honor all optional and mandatory features of JSP. Features of the spec that will currently not work are denoted in red. Note that, in this document, the phrases not supported and not implemented are used interchangeably and mean essentially the same thing (i.e., feature XXX won't work).
<% out.println("Hello World!"); %>is equivalent to:
<jsp:scriptlet> out.println("Hello World!"); </jsp:scriptlet>
<%! public void f() { /* java method */ } %>is equivalent to:
<jsp:decl> public void f() { /* java method */ } </jsp:decl>
<%@ page language="java" %>is equivalent to:
<jsp:directive.page language="java" >
<%= new Date() %>is equivalent to:
<jsp:expr> new Date() </jsp:expr>
<% /* a code comment */ %>are handled correctly. An HTML/JSP comment like:
<!-- don't run this JSP: <%= ..expression.. %> -->are not handled correctly! the ..expression.. will be evaluated.
<%@ include file="/relative/url.jsp" %>where the content is parsed by the JSP compiler, not implemented.
Request-time inclusion:
<jsp:include file="/relative/url.html" >where the content is not parsed, but is included, as-is, is supported.
<jsp:useBean id="mybean" scope="request" class="weblogic.servlet.jsp.FooBean"> <jsp:setProperty title="This is a boring Title"/> <jsp:setProperty count="66"/> </jsp:useBean>Results in the following code in the
service()
method of
the generated servlet:
. . HttpSession session = request.getSession(false); weblogic.servlet.jsp.FooBean mybean = null; boolean _mybeanCreated = false; if (session == null) session = request.getSession(true); mybean = (weblogic.servlet.jsp.FooBean)session.getValue("mybean"); if (mybean == null) { mybean = new weblogic.servlet.jsp.FooBean(); session.putValue("mybean", mybean); _mybeanCreated = true; } if (_mybeanCreated) { try { // begin bean set params block mybean.setTitle("This is a boring Title"); mybean.setCount(66); } catch (RuntimeException _re) { throw _re; } catch (Exception _ee) { throw new weblogic.servlet.internal.NestedServletException("bean initialization fail ed", _ee); } } . . .Bugs in the current implementation are that, for
scope=request
, the
scope is treated instead as scope=page
, and that scope=application
is not implemented.
count
property of mybean
,
and if mybean
has a getCount() method,
then:
<jsp:getProperty name="mybean" property="count" />will not work, but:
<jsp:getProperty name="mybean" property="Count" />will.
forward
or include
)
tags like:
<jsp:request include="/relative/url.html" /> ~or~ <jsp:request forward="/relative/url.html" />
are currently implemented.