Output The JavaScript dialog box in the Action, and call pageContext on the jsp page

Source: Internet
Author: User
Today, my friend asked me a question: in the action, if the operation is successful, I want to give the user a javascript dialog box to prompt that the operation is successful.

I thought about it and said that it would not be enough to output a javascript dialog box using the out object. She told me that I tried it. This is not the case. I thought about it again. That's a different method, save the Script script to pagecontext, and then call the script code that outputs pagecontext on the success page.

Although I have never tried it, the second method should be acceptable, but she told me that I couldn't do it, so I couldn't understand it, and I was too lazy to try it, however, the findforword () method in the action will jump to other JSP pages or servlet pages. You may not be able to output the out object in the current action.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.