struts2.1.8 can not be used to access static methods of the reasons for ognl

2009-04-21  来源:本站原创  分类:Java  人气:250 

The use of struts, in the jsp page, you can access through the ognl class static methods.
The format of the expression @ [type the full name (including the package path)] @ [method name | value name], for example: @ java.lang.Math @ max (7,8). The output page is: 8
In the current project, we use the struts version 2.1.8, when I was in the jsp page using the ognl access class static methods, we found that does not work. Have no error from, can not find the reasons. Online search a bit,
Have found the reason, if you want to access through the ognl static methods, you must set struts.properties or struts.xml

<constant name="struts.ognl.allowStaticMethodAccess" value="true"></constant>
相关文章
  • struts2.1.8 can not be used to access static methods of the reasons for ognl 2009-04-21

    The use of struts, in the jsp page, you can access through the ognl class static methods. The format of the expression @ [type the full name (including the package path)] @ [method name | value name], for example: @ java.lang.Math @ max (7,8). The ou

  • struts2.1.2 can not be used to access static methods ognl 2009-04-07

    Time :2009-11-30 12:17 Source: 114java Technology Network hit: 35 times [to QQ bookmark collections] [collection to the local favorites] The use of struts, in the jsp page, you can access through the ognl class static methods. The format of the expre

  • Struts2 OGNL OGNL access static members sum up - turn 2010-07-04

    Has been written blog, but always copy and paste, now find that there are some things that still need to sum up their own. Recent project development framework used in struts2, struts2, but many people do not know the specific use of the label, in or

  • struts2.x the jsp page into the web-inf access to protected mode 2010-07-24

    JSP: <% @ Page language = "java" import = "java.util .*" pageEncoding = "ISO-8859-1"%> <% String path = request.getContextPath (); String basePath = request.getScheme ()+"://"+ request.getServerName ()+&quo

  • Some summary Struts2 2010-05-06

    jar package: commons-logging-1.1.jar freemarker-2.3.13.jar ognl-2.6.11.jar struts2-core-2.1.6.jar xwork-2.1.2.jar commons-fileupload-1.2.1.jar commons-io-1.3.2.jar src directory into struts.xml <constant name="struts.devMode" value="true

  • Proficient in the ognl expression struts2 2010-09-29

    Proficient in the ognl expression struts2 Struts2 OGNL expressions in the built-in support , Made with more than Struts2 Struts1 More powerful data access features. This article explains OGNL To use, and the principle of not going to explain some thi

  • January 29 2010-03-29

    Extraction Interface alt + shift + t cvs2.5 only need to set up storage path installed ---------------------------------- experience of today's point of struts2 Struts2 action where to obtain access to web element request session application of the m

  • Struts 2 of the OGNL expression 2010-03-30

    Struts 2 of the OGNL expression Will set a standard OGNL root object (root object). Assumptions using standard OGNL expressions to seek value (not using Struts 2 in OGNL expressions), if OGNL context (OgnlContext Map type) has two objects: foo object

  • Beijing Shang Xuetang OGNL Notes 2010-06-02

    First of all, explain: OGNL full name: Object Graph Notation Language, that is the object graph navigation language. In the following code in, value of that short is OGNL, a struts tag. Therefore, an object graph navigation language, this means you c

  • Struts2 + Spring + iBatis on the web application of best practices Series 2 (Access Control chapter I) 2010-03-29

    Access control for a web applications is almost indispensable. When the web application to access certain resources which, if you are not logged in then, it will be redirected to the login page, and only after the login will only be allowed to visit.

  • Struts2 + Spring + iBatis on the web application of best practices Series 3 (Access Control chapter below) 2010-03-29

    The last one in this series, we introduced a cookie-based access control methods, the careful reader will find that the realization of this approach is ultimately based on Struts2 interceptors mechanism, which means it can only protect web applicatio

  • struts2 general process 2010-04-06

    After form submission to struts.xml, in the struts.xml search and form action in the same action name, and go to the corresponding class, and then according to the form textfield, etc., name, call the corresponding set, in the call the set time, if t

  • Struts2 tag library [Tablib] Continued 2010-04-19

    Data Label @ TODO complete the following data tag data tag including a action bean date debug i18n include param push set text url property 4.2 UI label UI label associated mainly refers to the Form tag, UI label is divided into two parts: form tag a

  • Hibernate + Spring + Struts2 integrated development program in a page display 2009-03-09

    1, DAO-layer interface design, MemberDao interface defines the following two methods: public interface MemberDao ( / / Other code omitted / ** *//** * * @ Param hql Query page query conditions * @ param offset start recording * @ param length a query

  • Struts2 OGNL based on the enhanced (reproduced) 2009-09-10

    1, the value of the stack (ValueStack) Struts2 OGNL context is set to Struts2 in ActionContext (internal use is still OgnlContext), and the value of the stack set Struts2 OGNL root object. We know that, Struts2 OGNL root object in the context of dire

  • Struts2 page called class static method 2010-03-23

    java struts ognl static method Using struts2, in the jsp page, you can access through the ognl class static methods. The format of the expression @ [type the full name (including the package path)] @ [method name | value name], for example: @ java.la

  • Struts2 Tag Frequently Asked Questions (continually updated) 2010-03-25

    1.Struts2 tab to access a static variable or method: For example: <s:proptery value="@[email protected]C_NAME"/> <s:if test="#[email protected]

  • Hibernate + Spring + Struts2 integration and development of a page indicates that the program 2010-03-06

    1, DAO layer interface design, in MemberDao interface defines the following two methods: public interface MemberDao ( / / Other code omitted / ** *//** * * @ Param hql Query page query conditions * @ param offset * @ param length began to record a fe

  • Struts2.1 ONGL Expression Study Notes 2010-04-18

    Struts2.1 ONGL Expression Study Notes <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <%@page import="com.rao.struts2.bean.Sex"%> <%@ taglib prefix="s" uri="/struts

  • struts2 OGNL expression 2010-06-04

    OGNL is the Object Graph Navigation Language of short, detailed information can be related to: http://www.ognl.org . Here we are concerned only Struts2 framework of the basic support for OGNL. Struts 2 default expression language is OGNL, because it