`

ognl.ParseException: Encountered "<EOF>" at line 1, column 0.

阅读更多

在GAE上用Struts2传输信息时,出现如下错误,是ognl的解析错误

Initializing AppEngine server
2010-10-12 12:15:26 com.google.apphosting.utils.jetty.JettyLogger info
信息: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger
2010-10-12 12:15:28 com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
信息: Successfully processed C:\Documents and Settings\Xredman\workspace\neil-blog\war\WEB-INF/appengine-web.xml
2010-10-12 12:15:28 com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml
信息: Successfully processed C:\Documents and Settings\Xredman\workspace\neil-blog\war\WEB-INF/web.xml
2010-10-12 20:15:49 com.google.appengine.tools.development.DevAppServerImpl start
信息: The server is running at http://localhost:8888/
2010-10-12 20:16:28 com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
警告: Error setting expression '' with value '[Ljava.lang.String;@12cd949'
ognl.ExpressionSyntaxException: Malformed OGNL expression:  [ognl.ParseException: Encountered "<EOF>" at line 1, column 0.
Was expecting one of:
    ":" ...
    "not" ...
    "+" ...
    "-" ...
    "~" ...
    "!" ...
    "(" ...
    "true" ...
    "false" ...
    "null" ...
    "#this" ...
    "#root" ...
    "#" ...
    "[" ...
    "{" ...
    "@" ...
    "new" ...
    <IDENT> ...
    <DYNAMIC_SUBSCRIPT> ...
    "\'" ...
    "`" ...
    "\"" ...
    <INT_LITERAL> ...
    <FLT_LITERAL> ...
    ]
	at ognl.Ognl.parseExpression(Ognl.java:112)
	at com.opensymphony.xwork2.ognl.OgnlUtil.compile(OgnlUtil.java:214)
	at com.opensymphony.xwork2.ognl.OgnlUtil.setValue(OgnlUtil.java:198)
	at com.opensymphony.xwork2.ognl.OgnlValueStack.setValue(OgnlValueStack.java:161)
	at com.opensymphony.xwork2.ognl.OgnlValueStack.setValue(OgnlValueStack.java:149)
	at com.opensymphony.xwork2.interceptor.ParametersInterceptor.setParameters(ParametersInterceptor.java:276)
	at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:187)
	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
	at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)
	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
	at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:179)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
	at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
	at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
	at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:235)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
	at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:89)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
	at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:130)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
	at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
	at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:126)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
	at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:138)
	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
	at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:165)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
	at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
	at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:179)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
	at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
	at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
	at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:488)
	at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
	at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
	at com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:58)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
	at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
	at com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:122)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
	at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:70)
	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
	at com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:349)
	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
	at org.mortbay.jetty.Server.handle(Server.java:326)
	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
Caused by: ognl.ParseException: Encountered "<EOF>" at line 1, column 0.
Was expecting one of:
    ":" ...
    "not" ...
    "+" ...
    "-" ...
    "~" ...
    "!" ...
    "(" ...
    "true" ...
    "false" ...
    "null" ...
    "#this" ...
    "#root" ...
    "#" ...
    "[" ...
    "{" ...
    "@" ...
    "new" ...
    <IDENT> ...
    <DYNAMIC_SUBSCRIPT> ...
    "\'" ...
    "`" ...
    "\"" ...
    <INT_LITERAL> ...
    <FLT_LITERAL> ...
    
	at ognl.OgnlParser.generateParseException(OgnlParser.java:3172)
	at ognl.OgnlParser.jj_consume_token(OgnlParser.java:3051)
	at ognl.OgnlParser.unaryExpression(OgnlParser.java:1236)
	at ognl.OgnlParser.multiplicativeExpression(OgnlParser.java:971)
	at ognl.OgnlParser.additiveExpression(OgnlParser.java:894)
	at ognl.OgnlParser.shiftExpression(OgnlParser.java:750)
	at ognl.OgnlParser.relationalExpression(OgnlParser.java:508)
	at ognl.OgnlParser.equalityExpression(OgnlParser.java:405)
	at ognl.OgnlParser.andExpression(OgnlParser.java:352)
	at ognl.OgnlParser.exclusiveOrExpression(OgnlParser.java:299)
	at ognl.OgnlParser.inclusiveOrExpression(OgnlParser.java:246)
	at ognl.OgnlParser.logicalAndExpression(OgnlParser.java:193)
	at ognl.OgnlParser.logicalOrExpression(OgnlParser.java:140)
	at ognl.OgnlParser.conditionalTestExpression(OgnlParser.java:101)
	at ognl.OgnlParser.assignmentExpression(OgnlParser.java:64)
	at ognl.OgnlParser.expression(OgnlParser.java:23)
	at ognl.OgnlParser.topLevelExpression(OgnlParser.java:15)
	at ognl.Ognl.parseExpression(Ognl.java:110)
	... 66 more
/-- Encapsulated exception ------------\
ognl.ParseException: Encountered "<EOF>" at line 1, column 0.
Was expecting one of:
    ":" ...
    "not" ...
    "+" ...
    "-" ...
    "~" ...
    "!" ...
    "(" ...
    "true" ...
    "false" ...
    "null" ...
    "#this" ...
    "#root" ...
    "#" ...
    "[" ...
    "{" ...
    "@" ...
    "new" ...
    <IDENT> ...
    <DYNAMIC_SUBSCRIPT> ...
    "\'" ...
    "`" ...
    "\"" ...
    <INT_LITERAL> ...
    <FLT_LITERAL> ...
    
	at ognl.OgnlParser.generateParseException(OgnlParser.java:3172)
	at ognl.OgnlParser.jj_consume_token(OgnlParser.java:3051)
	at ognl.OgnlParser.unaryExpression(OgnlParser.java:1236)
	at ognl.OgnlParser.multiplicativeExpression(OgnlParser.java:971)
	at ognl.OgnlParser.additiveExpression(OgnlParser.java:894)
	at ognl.OgnlParser.shiftExpression(OgnlParser.java:750)
	at ognl.OgnlParser.relationalExpression(OgnlParser.java:508)
	at ognl.OgnlParser.equalityExpression(OgnlParser.java:405)
	at ognl.OgnlParser.andExpression(OgnlParser.java:352)
	at ognl.OgnlParser.exclusiveOrExpression(OgnlParser.java:299)
	at ognl.OgnlParser.inclusiveOrExpression(OgnlParser.java:246)
	at ognl.OgnlParser.logicalAndExpression(OgnlParser.java:193)
	at ognl.OgnlParser.logicalOrExpression(OgnlParser.java:140)
	at ognl.OgnlParser.conditionalTestExpression(OgnlParser.java:101)
	at ognl.OgnlParser.assignmentExpression(OgnlParser.java:64)
	at ognl.OgnlParser.expression(OgnlParser.java:23)
	at ognl.OgnlParser.topLevelExpression(OgnlParser.java:15)
	at ognl.Ognl.parseExpression(Ognl.java:110)
	at com.opensymphony.xwork2.ognl.OgnlUtil.compile(OgnlUtil.java:214)
	at com.opensymphony.xwork2.ognl.OgnlUtil.setValue(OgnlUtil.java:198)
	at com.opensymphony.xwork2.ognl.OgnlValueStack.setValue(OgnlValueStack.java:161)
	at com.opensymphony.xwork2.ognl.OgnlValueStack.setValue(OgnlValueStack.java:149)
	at com.opensymphony.xwork2.interceptor.ParametersInterceptor.setParameters(ParametersInterceptor.java:276)
	at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:187)
	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
	at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)
	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
	at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:179)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
	at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
	at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
	at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:235)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
	at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:89)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
	at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:130)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
	at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
	at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:126)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
	at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:138)
	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
	at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:165)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
	at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
	at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:179)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
	at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
	at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
	at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:488)
	at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
	at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
	at com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:58)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
	at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
	at com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:122)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
	at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:70)
	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
	at com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:349)
	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
	at org.mortbay.jetty.Server.handle(Server.java:326)
	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
\--------------------------------------/

 发现必定是OGNL的解析错误,查原因,结果使用JQuery美化button时将button的name设置为空了

分享到:
评论

相关推荐

    struts2整合spring2的配置

    1. 导入的包&lt;br&gt;&lt;br&gt;l struts2的五个基础包:commons-logging-1.1.jar;&lt;br&gt;&lt;br&gt;freemarker-2.3.8.jar;&lt;br&gt;&lt;br&gt;ognl-2.6.9.jar;&lt;br&gt;&lt;br&gt;struts-core-2.0.6.jar;&lt;br&gt;&lt;br&gt;xwork-2.0.0.jar.&lt;br&gt;&lt;br&gt;l spring的核心包:...

    ognl.MethodFailedException

    标题 "ognl.MethodFailedException" 指的是在使用OGNL(Object-Graph Navigation Language)表达式语言时遇到的方法执行失败异常。OGNL是一种强大的表达式语言,常用于Java应用程序,特别是Spring MVC和Struts 2框架...

    (2.0版本)自己写的struts2+hibernate+spring实例

    直接配置即可.&lt;br&gt;&lt;br&gt;以下是一些相关说明.&lt;br&gt;&lt;br&gt;&lt;br&gt;数据库脚本&lt;br&gt;create table HUBO_USER&lt;br&gt;(&lt;br&gt; ID VARCHAR2(32) not null,&lt;br&gt; NAME VARCHAR2(100),&lt;br&gt; BIRTHDAY DATE,&lt;br&gt; PASSWORD VARCHAR2(100),&lt;br&gt; ...

    struts2标签详细讲解

    1. `&lt;s:if&gt;`, `&lt;s:elseif&gt;`, `&lt;s:else&gt;`:提供条件判断,与Java的if-else语句类似,可以基于表达式测试条件。 F. 错误处理: 1. `&lt;s:fielderror&gt;`:显示字段级的错误信息,如果表单字段有错误,此标签会显示出来。 ...

    struts_tag

    - `&lt;s:optgroup&gt;` 用于组织下拉框的选项,例如:`&lt;s:select list="myOptions"&gt;&lt;s:optgroup label="Group1"&gt;...&lt;/s:optgroup&gt;&lt;/s:optgroup&gt;&lt;/s:select&gt;`。 N. `&lt;s:optiontransferselect&gt;` 左右选择框,允许用户在两...

    ognl.jar资源包

    camel-ognl-1.6.4.jar, camel-ognl-2.8.1.jar, com.springsource.org.ognl-2.6.9.jar, com.springsource.org.ognl-sources-2.6.9.jar, ognl-2.5.1.jar, ognl-2.6.11.jar, ognl-2.6.3.jar, ognl-2.6.5.jar, ognl-...

    struts2标签介绍

    1. `&lt;s:bean&gt;` - 类似于Struts1中的JavaBean操作,但在Struts2中使用较少,因为Struts2更倾向于使用OGNL表达式来访问对象。 **C组标签:** 1. `&lt;s:checkbox&gt;` - 创建复选框,可以绑定到Action的属性。 2. `&lt;s:...

    Strust2的if-else <tr></tr>用法

    在这个例子中,`&lt;s:iterator&gt;`标签遍历一个名为`listOfObjects`的集合,`&lt;s:if&gt;`和`&lt;s:else&gt;`标签则根据`displayRow`变量的值决定是否渲染`&lt;tr&gt;`标签。`&lt;s:property&gt;`标签用于输出对象的属性值。 需要注意的是,`...

    使用的ognl的chm

    1. **动态属性访问**:除了静态字段和方法,OGNL还可以访问动态属性,如`list[0]`或`map['key']`。 2. **方法调用**:可以直接调用对象的方法,如`object.method()`。 3. **运算符支持**:包括算术运算、比较运算、...

    struts标签 <write><logic>

    Struts 2中,`&lt;s:property&gt;`标签替代了`&lt;write&gt;`,提供了更丰富的功能,而逻辑控制则更多地通过Java EL(Expression Language)和OGNL(Object-Graph Navigation Language)来实现。 总的来说,`&lt;write&gt;`和`&lt;logic&gt;...

    IDEA中使用Struct2 + OGNL实现简单的注册功能

    &lt;li&gt;&lt;s:property value="key" /&gt;: &lt;s:property value="value[0]" /&gt;&lt;/li&gt; &lt;/s:iterator&gt; &lt;/ul&gt; &lt;/s:if&gt; &lt;/body&gt; &lt;/html&gt; ``` 在这个例子中,`s:textfield`标签通过OGNL自动将表单字段与`RegistrationAction`中...

    struts2 OGNL表达式使用

    1. 访问值栈中action的普通属性:&lt;s:property value="username"/&gt; 2. 访问值栈中对象的普通属性:&lt;s:property value="student.age"/&gt; 3. 访问值栈中对象(对象包含对象)的普通属性:&lt;s:property value="cat.friend....

    ognl.jar ognl.jar

    ognl.jar ognl.jar

    struts2_标签使用方法.doc

    在Struts2中,不再像Struts1.x那样将标签库分为html、bean、logic和tiles等类别,而是统一使用一个`&lt;s&gt;`前缀的标签库,只需在JSP页面头部引入`&lt;%@ taglib prefix="s" uri="/struts-tags" %&gt;`即可使用所有标签。...

    struts2 标签使用

    ### Struts2 `&lt;s:if&gt;` 标签使用详解 #### 概述 Struts2 是一款基于 Java 的企业级 Web 应用框架,它利用了 MVC(Model-View-Controller)架构模式来帮助开发者构建可扩展、易于维护的 Web 应用程序。在 Struts2 中...

    Struts2标签使用.docx

    13. `&lt;s:if&gt;`, `&lt;s:elseif&gt;`, `&lt;s:else&gt;`:条件判断标签,基于OGNL表达式进行条件检查。例如,检查某个变量是否为真或假。 14. `&lt;s:div&gt;`:类似于HTML的`&lt;div&gt;`标签,用于组织和布局页面内容。 15. `&lt;s:generator&gt;...

    struts2标签库详解参考模板.docx

    15. `&lt;s:generator&gt;` 和 `&lt;s:iterator&gt;`:这两个标签常一起使用,`&lt;s:generator&gt;`生成一个序列,`&lt;s:iterator&gt;`遍历这个序列并显示每个元素。`separator`属性定义元素间的分隔符,`val`属性设置序列的值,`&lt;s:...

    ognl.jar(ognl-2.6.11.jar)

    标题中的“ognl.jar(ognl-2.6.11.jar)”指的是OGNL(Object-Graph Navigation Language)的特定版本,这是一个开源表达式语言,主要用于Java应用程序,它允许程序动态地访问和修改对象的属性。这个版本是2.6.11,表明...

    Struts2 OGNL示例(Maven项目)

    &lt;artifactId&gt;ognl&lt;/artifactId&gt; &lt;version&gt;版本号&lt;/version&gt; &lt;/dependency&gt; &lt;/dependencies&gt; ``` 接着,创建一个简单的Action类,该类包含一些公开的属性,这些属性可以通过OGNL表达式在JSP页面上直接访问。例如...

    Struts2--5.OGNL

    &lt;result name="error"&gt;/error.jsp&lt;/result&gt; &lt;/action&gt; ``` 在这个例子中,OGNL使得我们能够轻松地在Action和视图之间传递和展示数据。了解和熟练掌握OGNL是深入理解并有效使用Struts2的关键步骤之一。通过以上内容...

Global site tag (gtag.js) - Google Analytics