(Struts2 - JEE) I used extends of an action class and in the class call my execute() does not run

Asked

Viewed 14 times

1

So guys, I never had a problem with running the project’s action classes, but this time I wanted to reuse code from another class and when using extends in the call, it just runs prepare() and validate().

I was wondering if anyone has a solution to this kind of problem, the code of the call part of the action is just below:

public class AutorizarContratos extends GerarContrato{

    public void prepare() throws Exception {
        ...     
    }

    public void validate() {
        ...
    }

    public String execute(){        
        return "ok";
    }

And in action, it’s just:

    <action name="autorizarcontratos_*" class="teste.model.action.AutorizarContratos" method="{1}">
        <result name="ok">/view/autorizarcontratosconsulta.jsp</result>
    </action>
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.