我下载了tomcat、eclipse、Struts框架。 Tomcat 正在工作。 eclipse和Struts放在哪里?我将 eclipse 和 Struts 放在 tomcat 文件夹之外。所需的 jar 文件存储在 eclipse 当前文件夹中。我遇到错误。
<%@taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Hello World</title>
</head>
<body>
<bean:write name="helloWorldForm" property="message"/>
</body>
</html>
unknown tag:bean.write
最佳答案
Eclipse 是一个 IDE。它用于开发 Java 应用程序。不只是一个应用程序,而是多个应用程序。您不应将任何特定于应用程序的 jar 放入 eclipse 文件夹中。
Struts(而不是 strut 或 struct)是一个网络框架。它的 jars 必须放在已部署应用程序的 WEB-INF/lib 文件夹中。在 Eclipse Web 项目中,它们的位置(通常)是 <yourProjectDirectory>/WebContent/WEB-INF/lib
.
关于eclipse - Struts 框架设置错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10393206/