I know this is probably not the answer you're looking for, but have you
thought about "paging" the results? It would be easy with JSTL. The
forEach tag has "begin" and "end" attributes which facilitates this quite
nicely.
-----Original Message-----
From: Brian Engel [mailto:Brian.Engel@xxxxxxxxxxxx]
Sent: Tuesday, October 05, 2004 1:58 PM
To: users@xxxxxxxxxx
Subject: RE: [cinjug-users] Struts Logic Tag Question
I just switched over to the jakarta implementation of JSTL (using
forEach) and it didn't seem to make much difference.It made it a little
futher in the processing of the page with JSTL -vs- Struts
taglib(iterate).
I did look at "view source", it literally just stops sending the page.
i.e. The text I have after this forEach statement does not appear. I
tried running it on Tomcat 5.x with the same result. Similar thing with
the Firefox browser.
The code is very straight forward unless I am missing something, I am
totally baffled. There are 4466 rows that trying to be displayed.
<TBODY>
<c:forEach var="userData" items="${UserDataForm.names}">
<tr>
<td><c:out value="${userData.lastName}" /></td>
<td><c:out
value="${userData.firstInitial}"/></td>
<td><c:out value="${userData.city}"/></td>
<td><c:out value="${userData.state}"/></td>
<td><c:out value="${userData.winDate}"/></td>
</tr>
</c:forEach>
</TBODY>
-----Original Message-----
From: Brian K Bonner [mailto:brian.bonner@xxxxxxxxxxxx]
Sent: Monday, October 04, 2004 10:04 AM
To: users@xxxxxxxxxx
Subject: RE: [cinjug-users] Struts Logic Tag Question
Hmm...
How do you know the file being rendered is only 400 K if the browser
stops rendering it? Are you able to do a file->Save as and view the
source?
Does the source have errors?
Try bringing up the source (that the browser is seeing - 400 KB) in an
HTML editor and check to make sure you're not having any html errors
that are causing the browser to stumble on rendering.
I can't imagine the server would choke on 5K objects, unless it is
woefully short on memory. I don't think GZIP will help you in this
scenario.
HTH,
Brian
"Brian Engel" <Brian.Engel@xxxxxxxxxxxx> wrote on 09/30/2004 09:16:44
AM:
> This may have something to do with the problem. I used Mozilla and it
> seems to get much further in loading the page (although it stops too).
>
> It is a little on the big side, 400KB, but I don't understand why the
> browser would simply stop loading it.
>
> The Vector has 4466 objects in it, the iterate tag tags up the user
> info to display in a HTML table.
>
> I have tried the suggestion(s) on setting different response headers
> with no success.
>
> Anyway to make struts use a GZIP output stream to send back the page?
> Maybe that will help?
>
>
>
> -----Original Message-----
> From: Brian K Bonner [mailto:brian.bonner@xxxxxxxxxxxx]
> Sent: Wednesday, September 29, 2004 8:35 PM
> To: users@xxxxxxxxxx
> Subject: RE: [cinjug-users] Struts Logic Tag Question
>
> Brian, it could be a local problem on your client. Is 4466 the size
> of your vector???
>
> We had a scenario where the page worked on a development environment
> but did not work on a test system. The dev environment had 1 GB
> memory w/ Win 2K and IE 6.0. The test environment had IE 5.0 running
> Win 98 and
> 64 MB.
> It turned out there was a bug in the code causing it to generate an
> excessively large page that IE 5.x on Win 98 couldn't handle.
>
> We ended up saving the failing page locally (on our dev machine) and
> tried to bring it up in the browser and we saw it was a local client
> problem and quickly identified the bug.
>
> HTH,
>
> Brian
>
> "Brian Engel" <Brian.Engel@xxxxxxxxxxxx> wrote on 09/29/2004 03:31:43
> PM:
>
> > It appears to be something going on with the size of the page. If I
> > removed text from the top of the page, it is able to process further
> > into the page.
> >
> > The size is 4466.
> >
> > I am getting the feeling that this isn't the fault of the logic
> > tablib
>
> > but something going on with Tomcat.
> >
> > If I were to use JSTL I suppose I would use a forEach tag to iterate
> > over the collection?
> >
> >
> > -----Original Message-----
> > From: James Carman [mailto:james@xxxxxxxxxxxxxxxxxxxx]
> > Sent: Wednesday, September 29, 2004 3:25 PM
> > To: users@xxxxxxxxxx
> > Subject: RE: [cinjug-users] Struts Logic Tag Question
> >
> > Hey, the advice was free! :-) I can put you on my Premium Support
> > Plan if you want a different answer than that. Just kidding. I
> > just love JSTL and I think it would save a lot of people a LOT of
> > headaches
>
> > when trying to use the Struts logic libraries. Also, the logic
> > libraries in Struts are somewhat "deprecated."
> >
> > Anyway, I would need to see some printouts of what's going on here.
> > Maybe print out the value of UserDataForm.getNames().size() in your
> > Struts action?
> > That might be one starting point.
> >
> > -----Original Message-----
> > From: Robert Casto [mailto:robert@xxxxxxxxxxxxx]
> > Sent: Wednesday, September 29, 2004 3:25 PM
> > To: users@xxxxxxxxxx
> > Subject: RE: [cinjug-users] Struts Logic Tag Question
> >
> > -->
> > James,
> >
> > I understand the suggestion to switch, but most of the time people
> > can
>
> > not do that. It would introduce something new to the server
> > environment and thus would be rejected as a possible solution.
> >
> > I think the better option is to help Brian do what it is he is
> > trying and then recommend another way of doing it.s
> >
> > Robert Casto
> > Phone: 513-755-2221
> > Mobile: 614-406-7979
> > robert@xxxxxxxxxxxxx
> >
> >
> >
> > From: James Carman [mailto:james@xxxxxxxxxxxxxxxxxxxx]
> > Sent: Wednesday, September 29, 2004 3:13 PM
> > To: users@xxxxxxxxxx
> > Subject: RE: [cinjug-users] Struts Logic Tag Question
> >
> > Switch to JSTL for logic/iterating. It's much cleaner and more
> robust.
> >
> > -----Original Message-----
> > From: Brian Engel [mailto:Brian.Engel@xxxxxxxxxxxx]
> > Sent: Wednesday, September 29, 2004 3:09 PM
> > To: users@xxxxxxxxxx
> > Subject: [cinjug-users] Struts Logic Tag Question
> >
> > I am having a strange problem I can't seem to get to the bottom
of...
> >
> > Basically I have a bean that contains a Vector of "UserData"
> > objects. I am simply trying to iterate thru them and display all of
> > the
> data.
> >
> > The problem is the page just seems to quit processing when it makes
> > it
>
> > about 10 names from the bottom. It doesn't seem to matter how many
> > objects (users) are in the Vector.
> >
> > i.e. my JSP looks like this.
> >
> > <logic:iterate id="userData" name="UserDataForm" property="names" >
> > <tr> <td> <jsp:getProperty name="userData" property="lastName" />
> > </td> <td> <jsp:getProperty name="userData" property="firstInitial"
> > /> </td> <td> <jsp:getProperty name="userData" property="city" />
> > </td> <td> <jsp:getProperty name="userData" property="state" />
> > </td> <td> <jsp:getProperty name="userData" property="winDate" />
> > </td> </tr> </logic:iterate>
> >
> > The page just quits processing towards the very end of the user
list.
> > It doesn't seem to matter if there are 4000 or 250 names (objects)
> > that it iterates over - it just stops and returns the page
incomplete.
> >
> > Hope this makes sense - BTW I am using Tomcat as the app server.
> >
> > I'd appreciate any help you can offer.
> >
> >
> >
> >
> >
> > ---------
> > You may unsubscribe from this mailing list by sending a blank email
> > addressed to:
> > users-unsubscribe@xxxxxxxxxx
> >
> > --
> > Find additional help by sending a blank email addressed to:
> > users-help@xxxxxxxxxx
> >
> >
> >
> > ---------
> > You may unsubscribe from this mailing list by sending a blank email
> > addressed to:
> > users-unsubscribe@xxxxxxxxxx
> >
> > --
> > Find additional help by sending a blank email addressed to:
> > users-help@xxxxxxxxxx
> >
>
>
> ---------
> You may unsubscribe from this mailing list by sending a blank email
> addressed to:
> users-unsubscribe@xxxxxxxxxx
>
> --
> Find additional help by sending a blank email addressed to:
> users-help@xxxxxxxxxx
>
>
>
> ---------
> You may unsubscribe from this mailing list by sending a blank email
> addressed to:
> users-unsubscribe@xxxxxxxxxx
>
> --
> Find additional help by sending a blank email addressed to:
> users-help@xxxxxxxxxx
>
---------
You may unsubscribe from this mailing list by sending a blank email
addressed to:
users-unsubscribe@xxxxxxxxxx
--
Find additional help by sending a blank email addressed to:
users-help@xxxxxxxxxx
---------
You may unsubscribe from this mailing list
by sending a blank email addressed to:
users-unsubscribe@xxxxxxxxxx
--
Find additional help by sending a blank email
addressed to:
users-help@xxxxxxxxxx
|