Multiplos botoes submit

Boa tarde mocada!!!

Minhas duvida é:

como ficaria minha pagina jsp com multiplos botoes submit usando o framework struts?

Se alguem souber, por favor, responda!!!

Obrigado

donatinho

8O

<input type="submit" value="1" />
<input type="submit" value="2" />
<input type="submit" value="3" />

Isso que você quer saber?

vide abaixo

Galera, beleza?

Depois de muita pesquisa, consegui a resposta usando LookupDispatchAction. Veja a resposta

struts-config

		<action 
			path="/Submit"
			name="baseForm"
			type="app.CepAction"
			scope="request"
			parameter="method">

			<forward 
				name="update"  
				path="/pages/atualizarCep.jsp"
				redirect="false"/>

			<forward 
				name="delete"  
				path="/pages/deletarCep.html"
				redirect="false"/>
						
			<forward 
				name="insert"  
				path="/pages/incluirCep.html"
				redirect="false"/>
		</action>

baseAction.java

public class CepAction extends LookupDispatchAction {
	@Override
	protected Map getKeyMethodMap() {
        Map map = new HashMap();
        map.put("button.add", "add");
        map.put("button.delete", "delete");
        map.put("button.update", "update");
        return map;
    }

    public ActionForward add(ActionMapping map, ActionForm form, HttpServletRequest request, HttpServletResponse res) throws Exception {
    	System.out.println("inclui");
    	
    	return map.findForward("update");
    }

    public ActionForward delete(ActionMapping map, ActionForm form, HttpServletRequest request, HttpServletResponse res) throws Exception {
    	System.out.println("deleta");
    	
    	return map.findForward("sucesso");
    }
    
    public ActionForward update(ActionMapping map, ActionForm form, HttpServletRequest request, HttpServletResponse res) throws Exception {
    	System.out.println("update");
    	
    	return map.findForward("sucesso");
    }
}

consulta.jsp


   		<html:form action="/Submit">
			<html:submit property="method">
		    	<bean:message key="button.add"/>
		    </html:submit>
		    <html:submit property="method">
			    <bean:message key="button.delete"/>
		    </html:submit>
		    <html:submit property="method">
			    <bean:message key="button.update"/>
		    </html:submit>		    
		</html:form>

Até mais…

donatinho :roll: