?? testtag.java
字號:
import java.io.IOException;
import java.util.Date;
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;
//Implementing the tag generates the HTML
public class TestTag extends TagSupport
{
//This is the start of the tag
public int doStartTag() throws JspTagException
{
return EVAL_BODY_INCLUDE;
}
//This is the end of the tag
public int doEndTag() throws JspTagException
{
String dateString=new Date().toString();
try
{
pageContext.getOut().write("Hello everybody</br>");
pageContext.getOut().write("Date: " + dateString + "<p/>");
}
catch(IOException ee)
{
throw new JspTagException("Error encountered");
}
//This return value evaluates the rest of the page
return EVAL_PAGE;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -