Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Banafshe Bamdad
java.lang.IllegalStateException: Set render parameter has already been call
November 17, 2008 10:08 PM
Answer

Banafshe Bamdad

Rank: Junior Member

Posts: 58

Join Date: November 6, 2007

Recent Posts

Hi,
I set render parameter before sendRedirect in action class like this :

res.setRenderParameter(WebKeys.CHECKED_RESOURCES, listOfUsersIdStr);
sendRedirect(req, res);


but I got the following error :

java.lang.IllegalStateException: Set render parameter has already been called


please help me
Edit/Delete Message
Heba El Ayoty
RE: java.lang.IllegalStateException: Set render parameter has already been
March 28, 2011 3:29 AM
Answer

Heba El Ayoty

Rank: New Member

Posts: 12

Join Date: October 20, 2010

Recent Posts

Please read the solution here

http://www.liferay.com/community/forums/-/message_boards/message/7827362

http://forum.springsource.org/showthread.php?t=60113
delang j
RE: java.lang.IllegalStateException: Set render parameter has already been
May 26, 2016 8:20 PM
Answer

delang j

Rank: Regular Member

Posts: 249

Join Date: July 13, 2008

Recent Posts

hi guys,
i came across to this page after i got the same error
1java.lang.IllegalStateException: Set render parameter has already been called

if happen after 2nd time form submission after doing some validation.
first i key in duplicate ic
second i key in new ic. then error occur.

if i start again, it happen after 1st submission but wont happen if i press 'ctrl+f5' to refresh the page.
below is my snippet code.
 1                // Send redirect
 2                String redirect = PortalUtil.escapeRedirect(ParamUtil.getString(
 3                        req, "redirect"));
 4
 5                if (Validator.isNotNull(redirect) && SessionErrors.isEmpty(req)) {
 6                    res.sendRedirect(ParamUtil.getString(req, "redirect"));
 7                }
 8               
 9            } catch (Exception e) {
10                if (e instanceof DuplicateUserEmailAddressException) {
11                    SessionErrors.add(req, "duplicate-emel");
12                } else if (e instanceof DuplicateUserScreenNameException) {
13                    SessionErrors.add(req, "duplicate-ic");
14                }
15                PortalUtil.copyRequestParameters(req, res);
16                res.setRenderParameter("mvcPath", "/html/registration/form.jsp");
17            }


thanks