GeeCON Prague 2014*
The moose likes Struts and the fly likes Struts: adding an Aplett to a JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts: adding an Aplett to a JSP" Watch "Struts: adding an Aplett to a JSP" New topic
Author

Struts: adding an Aplett to a JSP

Javoso Torso
Ranch Hand

Joined: Aug 15, 2003
Posts: 88
Hello all,
I�m trying to put an applet to handle a form
because the amount of date is huge and the page is
very slow (and the data is growing and growing).
At the beginning was ok I didn�t have so many records to
manage but now the html-page is about 8000 lines long!!
I don�t want to reload the page after a selection. This could be a solution: after a selection to send a query to the database and reload the page (instead of having all the data in the page) but it doesn�t look good to reload the page after any new selection (the user makes at least 5 selections before submitting the form).
So now I am trying to move all the data to an applet, where
I can handle all dynamically and without performance problems (beside all the nice view-features an applet has, comparing it with HTML). I don�t have problems with compatibility or such (applet, JVM, JRE, etc.) so no problems using applets.
Any idea on how can I insert an applet in the struts model?
Thank you!


I hate 'trial and error'<br />and I am doing it all the time
Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 4474
    
    6

Struts is mainly for flow control and form processing. I don't think there's anything in Struts that's specific to applets. Just use the same HTML tag.
Try breaking up the data and allow the user to page through it. There are a number of opportunities to improve performance if you do this. Have a look at this Java Blueprint for some ideas for improving performance when handling large lists.


Junilu - [How to Ask Questions] [How to Answer Questions]
Javoso Torso
Ranch Hand

Joined: Aug 15, 2003
Posts: 88
thank you Junilu,
I was already thinking in dividing the page in two (which is the maximum for my impacient users).
Returning to applets:
I could I pass the data from the Action to the applet and applet to Action?
Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 4474
    
    6

Originally posted by Javoso Torso:
Returning to applets:
I could I pass the data from the Action to the applet and applet to Action?

I don't think so. Applets run on the client while the Action is running on the server. You might be able to get the two communicating via a component like HttpClient within your applet so that it can communicate with the server.
Again, I would try to convince the user that it would be easier if you just break the data up into multiple pages.
 
GeeCON Prague 2014
 
subject: Struts: adding an Aplett to a JSP