?? bodytagdemo.java
字號(hào):
package org.it315;
import java.io.IOException;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.tagext.BodyTagSupport;
public class BodyTagDemo extends BodyTagSupport
{
public int doEndTag() throws JspException
{
String content = bodyContent.getString();//得到標(biāo)簽體內(nèi)容
String newContent = "<a href='http://" + content + "'>" + content + "</a>";
//得到BodyContent中關(guān)聯(lián)的JspWriter對(duì)象
JspWriter out = bodyContent.getEnclosingWriter();
/*try
{
out.write(newContent);
}
catch (IOException e)
{
e.printStackTrace();
}*/
return EVAL_PAGE;
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -