I want to make an action running by default when users access my web site.
This is a classic Java EE project that is developed with Struts2 and Tomcat. I know how to do this in web.xml:
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
But, I want to do this through Struts2’s action.
Try this code and see if this works.
And you can also try this.
another way is in your index jsp is you do something like this
but I don’t believe that this an appropriate approach