简体   繁体   中英

ognl.ExpressionSyntaxException

i am finding ognl.ExpressionSyntaxException: Malformed OGNL expression: Add Customer [ognl.ParseException: Encountered " "Customer "" at line 1, column 5. Was expecting one of: <EOF> "," ... "=" ... "?" ... "||" ... "or" ... "&&" ... "and" ... "|" ... "bor" <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>
<%@ 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM