ognl.ExpressionSyntaxException
i am finding ognl.ExpressionSyntaxException: Malformed OGNL expression: Add Customer [ognl.ParseExce开发者_StackOverflowption: Encountered " "Customer "" at line 1, column 5.
Was expecting one of:<EOF>
"," ...
"=" ...
"?" ...
"||" ...
"or" ...
"&&" ...
"and" ...
"|" ...
"bor"
i am using the code in jsp like
<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
<title>titlePager</title>
</head>
<body>
<s:form action="addsome">
<s:textfield label="Customer ID:" name="customerID" size="15" maxlength="10" />
</s:form>
</body>
</html>
I think your code example is incomplete. First, I don't see a submit button in your form and the exception indicates that the malformed OGNL exception is "Add Customer", which seems like what you would put as the label on a submit button.
Make sure that you specified that for the correct attribute on the submit button.
精彩评论