DispatchAction Functionality in Struts 2?

前端 未结 2 1996
猫巷女王i
猫巷女王i 2021-01-03 00:04

I have a .jsp page in which i have four buttons named submit,add,update and delete as:

<%@ page language=\"java\" contentType=\"text/html; charset=ISO-885         


        
相关标签:
2条回答
  • 2021-01-03 00:41

    you can also specify this in the properties file : struts.properties

    struts.mapper.action.prefix.enabled=true

    For more info : http://struts.apache.org/development/2.x/docs/constant-configuration.html

    0 讨论(0)
  • 2021-01-03 01:00

    Assuming you are using Struts2 version 2.3.15.3 or above you need to set struts.mapper.action.prefix.enabled constant to true in order to enable support for action: prefix.

    Put that in your struts.xml file:

    <constant name="struts.mapper.action.prefix.enabled" value="true" />
    
    0 讨论(0)
提交回复
热议问题