struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fabio Perfetti <perfabi...@gmail.com>
Subject Linking page
Date Fri, 21 May 2010 11:59:20 GMT
Hi all,
i am wondering what is the best way for link a page to other.
Imagine this scenario:

Index Page with a menu:
- Search
- Insert

if i click on search, must show a form.
so I use
<a href="<s:url action='searchForm' />">Search</a>

in my struts.xml i have an action
<action name="searchForm">
  <result>formSearch.jsp</result>
</action>

now i fill the form and on submit, i call the action doSearch

<action name="doSearch" class="it.tesina.action.Search">
  <result>listSearch.jsp</result>
</action>

So i have 2 actions. one for show the form and one for the true search.
and the same for the Insert.

is it correct? is there any other method more efficient?

Thanks all
Fabio

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message