Frank,

> Interesting... there is of course no reason you can't use 
> ActionForms with AJAX, was it a conscious decision that you 
> didn't need them?  How 
> are you getting around not using them?   Your Actions pull parameters 
> directly from request I assume?

Right.  My struts-config.xml file is basically divided into three sections,
as follows.

Setup actions:

        <action path="/Home" type="app.HomeSetupAction">
                <forward name="success" path="/HomeView.do"/>
        </action>

File mappings:

        <action path="/HomeView" forward="/pages/Home.jsp"></action>

AJAX actions (all handled by one Action):

        <action path="/GetWordInfo"     type="app.CommandAction"/>
        <action path="/Login"           type="app.CommandAction"/>
        <action path="/Logout"          type="app.CommandAction"/>

To send AJAX commands, I use JavaScript to construct an appropriate
URL/query string, then send using the standard XMLHttpRequest code.  Inside
the CommandAction class, I figure out which command was called
(request.getServletPath()), call the matching function, and use
request.getParameter() to get the parameters specific to the command.

> > Any thoughts on JSTL?  Must have?  Nice but not necessary?
> 
> I just started using JSTL fairly recently, but I would highly 
> recommend doing so.  I guess I'd say VERY nice, but not 
> necessary.  However, I will say this... if you are thinking 
> of using the Struts taglibs, aside from HTML, I think the 
> better option by far is using JSTL.  The HTML taglib still 
> has a place, but the others I consider deprecated in favor of JSTL.
> 
> Then again, if your building RIAs with Struts, my opinion is 
> that the HTML taglib will get in your way far more than it 
> will help anyway... 
> That's another thread though :)

Very interesting - now that I'm not using ActionForms (to repeat - not a
conscious decision, but the way things seem to be turning out), I find
myself only using tiles, logic, and bean tags.  So, everything *but* html.
I'll definitely give JSTL a hard look.

Oh, and I use sslext.  Is this still necessary in 1.2.8?  In 1.3?

Daniel



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

Reply via email to