Jsp tag file例子以及说明(2)
DateFormat dateFormat = DateFormat.getDateInstance(DateFormat.LONG);
Date now = new Date(System.currentTimeMillis());
out.println(dateFormat.format(now));
%>
编译后的代码
firstTag_tag.java
[java]
public void doTag() throws javax.servlet.jsp.JspException, java.io.IOException {
javax.servlet.jsp.PageContext _jspx_page_context = (javax.servlet.jsp.PageContext)jspContext;
javax.servlet.http.HttpServletRequest request = (javax.servlet.http.HttpServletRequest) _jspx_page_context.getRequest();
javax.servlet.http.HttpServletResponse response = (javax.servlet.http.HttpServletResponse) _jspx_page_context.getResponse();
javax.servlet.http.HttpSession session = _jspx_page_context.getSession();
javax.servlet.ServletContext application = _jspx_page_context.getServletContext();
javax.servlet.ServletConfig config = _jspx_page_context.getServletConfig();
javax.servlet.jsp.JspWriter out = jspContext.getOut();
_jspInit(config);
jspContext.getELContext().putContext(javax.servlet.jsp.JspContext.class,jspContext);
try {
out.write('\r');
out.write('\n');
DateFormat dateFormat = DateFormat.getDateInstance(DateFormat.LONG);
Date now = new Date(System.currentTimeMillis());
out.println(dateFormat.format(now));
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());
相关新闻>>
- 发表评论
-
- 最新评论 更多>>