简体   繁体   中英

Forward to JSP in Struts-config

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM