This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Portals and Portlets and the fly likes IllegalStateException : Not allowed inside a portlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Portals and Portlets
Bookmark "IllegalStateException : Not allowed inside a portlet" Watch "IllegalStateException : Not allowed inside a portlet" New topic

IllegalStateException : Not allowed inside a portlet

Anup Nadahalli

Joined: Oct 16, 2013
Posts: 4
Hi all.. I don't know whether I am posting in the right forum or not. From whatever I searched in net I thought I have a problem related to portlets , hence posting here. I have a portal where Struts and Portlets are being used. I have a requirement in which there is a button in the page clicking on which I should redirect to another sever(For ex . After clicking on the button I call an action which inturn call various methods. In one of the methods I need to check for some conditions and based on that I need to redirect to another server. Here for redirection I am using the following code.

But after this line I am getting an exception as below.

When I tried to search in net I found out that sendRedirect cannot be called after invoking methods like

etc etc..

So I want to know whether this is the cause of the exception or not. If yes then how to overcome it.

PS : Because of violations I can neither post the code nor the complete logs over here.
I agree. Here's the link:
subject: IllegalStateException : Not allowed inside a portlet