Basically when the user goes to example.com I want to serve it the same content I would have, if it went to example.com/news. Below is the code snippet.
Current COnfig
<action name="" class="action.public.news">
<result>/jsp/labs/listLabs.jsp</result>
</action>
<action name="news" class="action.public.news">
<result>/jsp/labs/listLabs.jsp</result>
</action>
Desried COnfig
<action name="" class="action.public.news">
Use Action Named "news" instead
</action>
<action name="news" class="action.public.news">
<result>/jsp/labs/listLabs.jsp</result>
</action>
If i understand it right you want that when user hit the base domain
example.comit should fetch the content of the actionnewsone way to do this is.create an empty file name welcome in your web-content folder.Add following entry to your web.xml
replace your welcome list file in web.xml as
and finally in your strus.xml do something like
what we are trying to do is that when we hit
example.cominstead of showing the welcome jsp file we are hitting the action and using its result