wood burning stoves
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

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
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 www.google.som) . 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: http://aspose.com/file-tools
subject: IllegalStateException : Not allowed inside a portlet
It's not a secret anymore!