Question

Good afternoon in my timezone.

I am developing a web application using struts framework, in this moment i am developing a screen where when the user press a button will appear a modal window and inside this i use an iframe, something like this :

<iframe src="actionX?data=value" ../>

Now the questions , is it possible in struts to forward a request directly from a ActionForm to a jsp ? Something like this in struts-config.xml

<action path="/actionX"
           -> type="com.galpenergia.sgt.accoes.ProgramarRutasAction"
            if i do not put nothing in the type attribute , will the actionFormX forward this request directly to jsp in the input attribute ?
            name="actionFormX"
        validate="true"
        input="/programarRutas.jsp">  
    </action>

If the answer is "No" to the above question , how can i do it ? I do not want create a Action object where inside the execute method i just forward the request to the JSP.By otherside i can not call directly the jsp from the iframe because i need to validate if the query string sent(data=value) is correct .

I am really stuck :(

Thanks in advance

Was it helpful?

Solution

Use a ForwardAction, provided in the struts-extras library.

I don't understand the reluctance to create an Action, although one is already provided out-of-the-box. If you want to take advantage of Struts, you need to use Struts.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top