Reputation: 2393
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>
The exception I am getting is:
org.apache.jasper.JasperException: /helloWorld.jsp (line: 4, column: 54)
The JSP specification requires that an attribute name is preceded by whitespace
I am unable to understand why the exception is coming.
Upvotes: 2
Views: 3793
Reputation: 11
Add the following line in catalina.properties file located at TOMCAT INSTALLED DIRECTORY OR FILES
GOTO Apache Software Foundation\Tomcat 7.0\conf\catalina.properties
JUST ADD SPECIFIED LINE BELOW IN CATALINA.PROPERTIES FILE
org.apache.jasper.compiler.Parser.STRICT_WHITESPACE=false
After Adding This just Restart the Server
THIS WORKS FOR ME
Upvotes: 1
Reputation: 1
Try Removing the below tag Duplications.
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
It will remove that error.
Upvotes: 0
Reputation: 629
Whenever the jasperException is came it is related to jsp page only. Mainly it is occuered by the jsp syntax problems
Upvotes: 0
Reputation: 160191
Try putting a space before the word "prefix", like the error message indicates.
Upvotes: 1