1、搭建环境:参考MVC框架Struts2学习笔记(1)

2、配置struts.xml:

 

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
    "http://struts.apache.org/dtds/struts-2.0.dtd"
>

<struts>
    
<package name="papaya" namespace="/test" extends="struts-default">
        
<action name="hello" class="com.papaya.action.HelloAction" method="execute">
            
<result name="success">/WEB-INF/page/hello.jsp</result>
        
</action>
    
</package>
</struts>

相关文章:

  • 2021-11-22
  • 2022-02-20
  • 2021-05-16
  • 2021-06-17
  • 2022-12-23
  • 2021-06-24
  • 2021-09-05
猜你喜欢
  • 2021-07-25
  • 2021-12-02
  • 2021-11-09
  • 2022-12-23
  • 2021-05-29
  • 2022-02-01
相关资源
相似解决方案