Jsp tag file例子以及说明(16)
来源:未知 责任编辑:责任编辑 发表时间:2015-03-01 01:35 点击:次
out.write("\r\n");
out.write("\r\n");
<span style="white-space:pre"> </span>//设置属性包含的变量
jspContext.setAttribute("productName", "Pelesonic DVD Player");
jspContext.setAttribute("description",
"Dolby Digital output through coaxial digital-audio jack," +
" 500 lines horizontal resolution-image digest viewing");
jspContext.setAttribute("price", "65");
out.write('\r');
out.write('\n');
((org.apache.jasper.runtime.JspContextWrapper) this.jspContext).syncBeforeInvoke();
_jspx_sout = null;
if (getProductDetails() != null) {
getProductDetails().invoke(_jspx_sout);//在dotag中回调invoke方法
}
jspContext.getELContext().putContext(javax.servlet.jsp.JspContext.class,getJspContext());
out.write('\r');
out.write('\n');
} catch( java.lang.Throwable t ) {
if( t instanceof javax.servlet.jsp.SkipPageException )
throw (javax.servlet.jsp.SkipPageException) t;
if( t instanceof java.io.IOException )
throw (java.io.IOException) t;
if( t instanceof java.lang.IllegalStateException )
throw (java.lang.IllegalStateException) t;
if( t instanceof javax.servlet.jsp.JspException )
throw (javax.servlet.jsp.JspException) t;
throw new javax.servlet.jsp.JspException(t);
} finally {
jspContext.getELContext().putContext(javax.servlet.jsp.JspContext.class,super.getJspContext());
((org.apache.jasper.runtime.JspContextWrapper) jspContext).syncEndTagFile();
}
}
例子5 将页面内容传入tag file 的作为参数.
searchEngine.html
[html]
Please click <a href="main.jsp">here</a>\\访问此页面生成header.referer
main.jsp
相关新闻>>
最新推荐更多>>>
- 发表评论
-
- 最新评论 更多>>