You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Hans Brattberg <ha...@crisp.se> on 2006/07/12 22:36:14 UTC

Caching resluts in portlets?

Hi!

(WebWork 2.2.2, Jetspeed 2)

 

I get a strange error when trying to use WebWork  in jetspeed.

I have a hello world form that takes two fields, and the submit button 
post an action and the resultpage gets displayed.

If I run the jsp pages outside the portlet everything works fine.

 

But when I put the pages inside a portlet It seems to get some result 
cached.

I get the result page displayed even when I try to surf to the form page.

 

Here's the relevant part from the xwork.xml file:

<xwork>

            <include file="webwork-default.xml" />

            <include file="webwork-portlet-default.xml" />

            <package

                        name="hello"

                        extends="webwork-portlet-default"

                        namespace="/hello">

                        <default-action-ref name="index" />

                        <action

                                    name="index"

                                    
class="com.ericsson.pii.web.webwork.HomeAction">

                                    <result name="success">

                                                
/WEB-INF/pages/hello/helloForm.jsp

                                    </result>

                        </action>

                        <action

                                    name="helloWorld"

                                    
class="com.opensymphony.webwork.portlet.tutorial.HelloWorldAction">

                                    <result name="success">

                                                
/WEB-INF/pages/hello/helloWorld.jsp

                                    </result>

                        </action>

            </package>

</xwork>

 

And the part of the portlet.xml look like this:

            <portlet id="HelloWorld">

                        <expiration-cache>-1</expiration-cache>

                        <portlet-name>HelloWorld</portlet-name>

                        <display-name>HelloWorld Display Name</display-name>

                        <portlet-class>

                                    
com.opensymphony.webwork.portlet.dispatcher.Jsr168Dispatcher

                        </portlet-class>

                        <init-param>

                                    <!-- The view mode namespace. Maps 
to a namespace in the xwork config file -->

                                    <name>viewNamespace</name>

                                    <value>/hello</value>

                        </init-param>

                        <init-param>

                                    <!-- The default action to invoke in 
view mode -->

                                    <name>defaultViewAction</name>

                                    <value>index</value>

                        </init-param>

                        <supports>

                                    <mime-type>text/html</mime-type>

                        </supports>

                        <supported-locale>en</supported-locale>

                        <portlet-info>

                                    <title>HelloWorld</title>

                                    <short-title>HelloWorld</short-title>

                        </portlet-info>

            </portlet>

 

Are there any obvious errors?

I get the feeling that the portlet environment caches the result and 
when I try to reload I get the cached result.

Any ideas on a solution for this?
 

/Hans

 

 

 


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: Caching resluts in portlets?

Posted by David Sean Taylor <da...@bluesunrise.com>.
We arent caching any JSP content.
Never used WebWork with a portlet, but I assume that you have to 
configure it somehow so that the URLs for your actions are rewritten 
properly

Sorry really cant help much unless I actually try it out myself

Hans Brattberg wrote:
> Hi!
> 
> (WebWork 2.2.2, Jetspeed 2)
> 
> 
> 
> I get a strange error when trying to use WebWork  in jetspeed.
> 
> I have a hello world form that takes two fields, and the submit button 
> post an action and the resultpage gets displayed.
> 
> If I run the jsp pages outside the portlet everything works fine.
> 
> 
> 
> But when I put the pages inside a portlet It seems to get some result 
> cached.
> 
> I get the result page displayed even when I try to surf to the form page.
> 
> 
> 
> Here's the relevant part from the xwork.xml file:
> 
> <xwork>
> 
>            <include file="webwork-default.xml" />
> 
>            <include file="webwork-portlet-default.xml" />
> 
>            <package
> 
>                        name="hello"
> 
>                        extends="webwork-portlet-default"
> 
>                        namespace="/hello">
> 
>                        <default-action-ref name="index" />
> 
>                        <action
> 
>                                    name="index"
> 
>                                    
> class="com.ericsson.pii.web.webwork.HomeAction">
> 
>                                    <result name="success">
> 
>                                                
> /WEB-INF/pages/hello/helloForm.jsp
> 
>                                    </result>
> 
>                        </action>
> 
>                        <action
> 
>                                    name="helloWorld"
> 
>                                    
> class="com.opensymphony.webwork.portlet.tutorial.HelloWorldAction">
> 
>                                    <result name="success">
> 
>                                                
> /WEB-INF/pages/hello/helloWorld.jsp
> 
>                                    </result>
> 
>                        </action>
> 
>            </package>
> 
> </xwork>
> 
> 
> 
> And the part of the portlet.xml look like this:
> 
>            <portlet id="HelloWorld">
> 
>                        <expiration-cache>-1</expiration-cache>
> 
>                        <portlet-name>HelloWorld</portlet-name>
> 
>                        <display-name>HelloWorld Display Name</display-name>
> 
>                        <portlet-class>
> 
>                                    
> com.opensymphony.webwork.portlet.dispatcher.Jsr168Dispatcher
> 
>                        </portlet-class>
> 
>                        <init-param>
> 
>                                    <!-- The view mode namespace. Maps to 
> a namespace in the xwork config file -->
> 
>                                    <name>viewNamespace</name>
> 
>                                    <value>/hello</value>
> 
>                        </init-param>
> 
>                        <init-param>
> 
>                                    <!-- The default action to invoke in 
> view mode -->
> 
>                                    <name>defaultViewAction</name>
> 
>                                    <value>index</value>
> 
>                        </init-param>
> 
>                        <supports>
> 
>                                    <mime-type>text/html</mime-type>
> 
>                        </supports>
> 
>                        <supported-locale>en</supported-locale>
> 
>                        <portlet-info>
> 
>                                    <title>HelloWorld</title>
> 
>                                    <short-title>HelloWorld</short-title>
> 
>                        </portlet-info>
> 
>            </portlet>
> 
> 
> 
> Are there any obvious errors?
> 
> I get the feeling that the portlet environment caches the result and 
> when I try to reload I get the cached result.
> 
> Any ideas on a solution for this?
> 
> 
> /Hans
> 
> 
> 
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
> 
> 
> 


-- 
David Sean Taylor
Bluesunrise Software
david@bluesunrise.com
[office] +01 707 773-4646
[mobile] +01 707 529 9194

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org