• Post Reply Bookmark Topic Watch Topic
  • New Topic

send params to servlet  RSS feed

 
Miran Cvenkel
Ranch Hand
Posts: 208
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this pulls image to client

in order to get each time differentz image I could do

instead:


1. create object
2.store it in session
3.give it rnd name
4. send that rnd name as parameter like <img src='../mcChart?rnd = rnd_name"


in servlet I get that object from session.

Ok, need suggestions how to do that different, better .....
 
Ramen Chatterjee
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

What is it you are trying to achieve?

Assuming you have a fixed set of images. Then you would be better storing these on the file system, and have your (caching) web-server/application server serve them based on a dynamically generated path - it'll be quicker and more efficient. So your jsp, or something similar will build up the img tag path to point to the image required at that time.

Even if you are generating images that only exist for a user's session, it is still probably a bad idea to store them in the session as it will make your session graphs potentially big, could cause problems with synchronised sessions in a clustered environment, performance issues where sessions are written to and from file, etc. It would be better to store them on the file system in a temporary file. Dont forget to clean-up if they become invalid.

Hope this helps

Ramen
 
Miran Cvenkel
Ranch Hand
Posts: 208
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
just putted something together:
webpage

This is a list of wegetables and stuff and there prices in time period. Select the wegetables you want to see on graph, to the left, and time period at the bottom of table.
So tehre are 'countles' posibilities.

in servlet I do:


I guess os.close clears everything.

my upper post is just about that there could be very long,confusing querystring calling servlet, to pass all parameters Instead I save all in nice session object, which I then pull in at servlet. Probably wouldn't need rnd there, but just in case.
 
Vikas Aggarwal
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are trying to do a Captcha sort of thing, there is a ready made provided by Google which you can plugin into your page. Try searching it on google labs or google code.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!