Jeff Thorne wrote:
I am seeing slow performance with a few initial pages of my struts app.

Here is the flow of the app.

1.      Index.html forwards to index.jsp.
2.      index.jsp loads user cookies into session.
3.      if member cookie found forward to load member page struts action.
4.      if no member cookie found forward to load generic welcome page
struts action.

Is this the most efficient way to handle this in struts. If so is there a
way I can show some

sort of spinner or progress indicator while the jsp page forwards to the
struts action?

I'm not sure why checking a cookie and doing a forward would be slow enough to justify a progress indicator, but I'd suggest simplifying things slightly by combining 2/3/4 into a single action with two outcomes:

  <action path="/index" ...>
    <forward name="member" path="/member.jsp"/>
    <forward name="nonmember" path="/nonmember.jsp"/>
  </action>

Have index.html forward to the action (/index.do) instead of an intermediate JSP, and in the action return the appropriate result mapping:

  if (hasMemberCookie()) {
    return mapping.findForward("member");
  else {
    return mapping.findForward("nonmember");
  }

It might be a good idea to start by determining why you're seeing such slow perfomance in the first place, though, since the flow you describe is hardly complex.

L.


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

Reply via email to