not sure if you can use it for this, but there is a GWT plugin for struts:

http://cwiki.apache.org/S2PLUGINS/gwt-plugin.html

musachy

On 10/31/07, Miguel Ping <[EMAIL PROTECTED]> wrote:
> Hi, thanks for the answer. Yes you are correct, GWT makes special requests
> that update a part of a page. I am reading the Portlet spec and I didn't
> knew that portlets had custom urls, thanks for the pointer :)
>
> So I guess in order to have access to portlet preferences / principal info /
> etc, the best is to store them in the http session.
> Is it an option to write a custom GWT request that passes as a regular
> portlet url, so the dispatcher can process it? I understand that this is not
> directly related to struts, I just want to be sure that the
> Jsr168RequestDispatcher works by inspecting urls...
>
>
> On 10/31/07, Nils-Helge Garli Hegvik <[EMAIL PROTECTED]> wrote:
> >
> > Hi!
> >
> > The Jsr168Dispatcher only handles requests created as Portlet URLs.
> > I'm not familiar with GWT so apoligies if my assumptions are
> > incorrect, but I assume that you're referring to some sort of "partial
> > request" that updates a section of the page? In that case, it's
> > correct that it should be invoked as a servlet request, since invoking
> > it through a portlet url will change the state and corrupt your entire
> > portlet (you would get the contents of the entire portal page from the
> > request). So I would recommend that you build your application so that
> > the AJAX part is working as a servlet.
> >
> > The Portlet 2.0 specification has better support for this kind of
> > stuff, so it will improve in the future :)
> >
> > Nils-H
> >
> > On 10/31/07, Miguel Ping <[EMAIL PROTECTED]> wrote:
> > > Hi all, this is my first post to struts2 mailing list :)
> > >
> > > I'm using Struts2 and the gwt plugin by Musachy Barroso, in a portlet
> > > project, and for the front end I'm using Google Web Toolkit (gwt). So
> > I'm
> > > using struts only for the actions, except for the 'default' action,
> > which is
> > > a jsp with struts taglibs.
> > >
> > > In my portlet project, I have an action that implements the
> > PrincipalAware
> > > interface, that is the default action for my portlet. This action calls
> > the
> > > jsp. When I debug this action, I can see that the PrincipalProxy object
> > is a
> > > portlet proxy object; however all gwt calls to struts2 actions that
> > > implement the PrincipalAware interface gives me only Serlver proxy
> > objects.
> > > I think that this happens because GWT calls the action directly,
> > bypassing
> > > the Jsr168Dispatcher. The action then 'thinks' that the request is a
> > servlet
> > > request instead of a portlet request.
> > >
> > > My question is: how can I force all requests to pass by the Jsr168
> > request
> > > dispatcher? I want to have access of portlet data in my actions, through
> > GWT
> > > calls.
> > >
> > > Thanks In advance,
> > > Miguel Ping
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>


-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to