在tomcat+jbuilder下使用Struts,出错!

javafriend javafriend 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
在工程目录下新建一个jsp1.jsp页面(选上Struts1.0中的Struts-bean,Struts-html)
jsp1的代码为:
<%@ page contentType="text/html; charset=gb2312"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>
<html:html locale="true">
<head>
<html:base/>
<title>
<bean:message key="index.title"/></title>
</head>
<h1>创建一个用户</h1>
<html:errors/>
<html:form action="jsp1.do" method="get">
username:<html:test property="username" /><br/>
userpass:<html:test property="userpass" /><br/>
<html:submit property="submit" />
</html:form>
</body>
</html:html>

其中struts-config的配置为:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.0//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd">
<struts-config>
<global-forwards>
<forward name="jsp1" path="/jsp1.jsp"/>
</global-forwards>
<action-mappings>
<action path="/jsp1"
input="/jsp1.jsp">
</action>
</action-mappings>
</struts-config>

运行jsp1.jsp,但出现“"jsp2.jsp": org.apache.jasper.JasperException: No such tag test in the tag library imported with prefix html”,请问,怎么解决?????
...全文
评论 8
收藏 已收藏
分享
返回顶部
javafriend
Java EE 67,535 成员 225,843 内容