struts-config.xml
<action-mappings>
<action input="/index.jsp" name="HelloWorldActionForm"
path="/HelloWorld" scope="session" type="com.vaannila.HelloWorldAction">
<forward name="success" path="/helloWorld.jsp"/>
</action>
<action path="/Welcome" forward="/welcomeStruts.jsp"/>
</action-mappings>
helloWorld.jsp
<%@taglib uri= "/WEB-INF/struts-bean.tld"prefix="bean" %>
<html>
<body>
<bean:write name="HelloWorldActionForm" property="message" />
</body>
</html>
我得到的异常(exception)是:
org.apache.jasper.JasperException: /helloWorld.jsp (line: 4, column: 54)
The JSP specification requires that an attribute name is preceded by whitespace
我无法理解为什么会出现异常。
最佳答案
尝试在“前缀”一词前添加一个空格,如错误消息所示。
关于struts - struts1 中的 org.apache.jasper.JasperException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9468792/