有哪位懂自定义标签的朋友(我已经最简化了),麻烦指教,正解必给分 程序没有错,可能配置文件有问题,另:你的JSP文件中好像没有用到SA这个标签哦 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <taglib> <tlibversion>1.0</tlibversion> <jspversion>1.1</jspversion> <shortname>db</shortname> <info></info> <tag> <name>iteration</name> <tagclass>com.TagTLD</tagclass> <info></info> </tag><taglib> 好象是缺info<tlibversion>1.0</tlibversion><jspversion>1.1</jspversion><shortname>sp</shortname><info>test info</info>试试 package net.struts.tags;/** * <p>Title: </p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2004</p> * <p>Company: HTJS</p> * @author WWM * @version 1.0 */import javax.servlet.http.*;import javax.servlet.jsp.*;import javax.servlet.jsp.tagext.*;public class TagFoot extends TagSupport{ private String name; public TagFoot() { } public void setName(String newName) { this.name = newName; } public String getName() { return this.name; } public int doStartTag() throws JspException { JspWriter out = pageContext.getOut(); try { HttpServletRequest t_request = (HttpServletRequest) pageContext. getRequest(); Object obj = t_request.getAttribute(this.name); if (obj != null) { out.print(obj.toString()); } else { out.print(""); } } catch (Exception ex) { ex.printStackTrace(); } return Tag.SKIP_BODY; } public int doEndTag() { return EVAL_PAGE; }} 程序完全没有问题,拿到公司什么没改就可以用,后来发现是自己在tomcat配置包的时候出的问题,在学习其它内容的时候乱加包出的问题,后来发现只要用到标签,包括struts的地方都会报同样的错,然后一查,把一个包去掉,就都OK了.谢谢各位移电流 jsp中如何获取当前系统日期 加载/WEB-INF/applicationContext.xml出错 如何修改执行人,请高手赐教! 请使用C3P0的兄弟进来说说~~ 写一个Oracel的存储过程 url重写 古怪的显示... 几个可以研究的问题(200)(来者有分)! 高分收集jsp文档和电子书! 初学jsp问题 网上说法各不统一,谁能总结下jsp怎么连接mysql数据库100相送 请问我想匹配所有字符,正则表达式怎么写
<tlibversion>1.0</tlibversion>
<jspversion>1.1</jspversion>
<shortname>db</shortname>
<info></info> <tag>
<name>iteration</name>
<tagclass>com.TagTLD</tagclass>
<info></info>
</tag>
<taglib>
<jspversion>1.1</jspversion>
<shortname>sp</shortname>
<info>test info</info>试试
* <p>Title: </p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2004</p>
* <p>Company: HTJS</p>
* @author WWM
* @version 1.0
*/
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;public class TagFoot extends TagSupport
{ private String name;
public TagFoot()
{ } public void setName(String newName)
{
this.name = newName;
} public String getName()
{
return this.name;
} public int doStartTag() throws JspException
{
JspWriter out = pageContext.getOut();
try
{
HttpServletRequest t_request = (HttpServletRequest) pageContext.
getRequest();
Object obj = t_request.getAttribute(this.name);
if (obj != null)
{
out.print(obj.toString());
}
else
{
out.print("");
}
}
catch (Exception ex)
{
ex.printStackTrace();
}
return Tag.SKIP_BODY;
} public int doEndTag()
{
return EVAL_PAGE;
}
}