开发者

How to map home url (/) to Struts 2 REST Action

开发者 https://www.devze.com 2023-03-31 11:23 出处:网络
I am developing a web application using Struts 2 and REST plugin. I already developed all the basic functionality of the application in REST style: myapp.org/login, myapp开发者_Python百科.org/register

I am developing a web application using Struts 2 and REST plugin. I already developed all the basic functionality of the application in REST style: myapp.org/login, myapp开发者_Python百科.org/register, myapp.org/profile, etc. Now I have to make the home page and get everything together. My question is: Is there any way to map the home (base) URL of the application to any Action class in REST style. I mean for example myapp.org to map to Home action class, insted of myapp.org/home to map to the Home action class? Thank you in advance. Best regards, Rashid


Set the welcome file in web.xml

<web-app /*stuff*/ >    
/*stuff*/
    <welcome-file-list>
       <welcome-file>home.action</welcome-file>
    </welcome-file-list>
</web-app>
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号