Sorry, it is automatically formatted; here is it again:
<html:form method="POST" action="/someaction.do">
<p>
<p>
<html:rewrite page= " target="_blank">get PDF doc here
</p>
<br />
<html:submit property="__action__backButton">lastPage</html:submit>
</html:form>
regards,
ujulu
ujulu wrote:
>
> Hi All,
>
> I am new to Struts, and need your help!
>
> I am experiencing the following problem:
>
> 1. I have a simple JSP page similar to the following:
> <html:form method="POST" action="/someaction.do">
> <p>
> <html:rewrite page= " target="_blank">get PDF doc here
> </p>
> <br />
> <html:submit property="__action__backButton">lastPage</html:submit>
> </html:form>
>
> 2. The corresponding struts-config.xml entry:
> <action path="/someaction"
> type="test.SomeAction"
> name="beanName"
> scope="session"
> validate="false"
> parameter="backButton">
> <forward name="success" path="/backPage.jsp"/>
> </action>
> 3. Everything works fine until the user is directed to the above JSP page.
> When the user is in this page
> and clicks on the submit button the user will be taken to the last page
> without any problem. But if
> the link is clicked first a new popup window will be opened where a PDF
> document will be generated and
> displayed to the user. Till now everything is OK! Now comes the
> problem:
> Now I close the popup window and click the submit button that is
> pointing to the page in the
> <forward> tag, the previously generated PDF document is displayed
> without even consulting the
> ActionServlet (I set breakpoints on both the doGet() and doPost()
> methods, and they are not reached)
>
> If I click on the submit button, I thought that the form will be submitted
> and the action will be intercepted by the ActionServlet and finally by the
> corresponding Action object which is supposed to forward the response to
> the "/backPage.jsp". This problem happens only if I first click on the
> link, and then on the submit button. I have even defined a <forward> in
> the <global-forwards> area as well as an <action> for the link and used
> the 'action' and 'forward' attributes of the <html:link> tag. The same
> effect.
>
> Any hint will be very appreciated!
>
> Ujulu
>
--
View this message in context:
http://www.nabble.com/Struts-1.2.8%3A-Submit-Button-and-HTML-Link-on-the-same-page-problem-tp19812419p19812512.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]