aspose file tools*
The moose likes JSP and the fly likes loading dynamic data Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "loading dynamic data" Watch "loading dynamic data" New topic
Author

loading dynamic data

liliya woland
Ranch Hand

Joined: Apr 11, 2006
Posts: 134
Hello everyone,
I'm writing jsp pages that communicate with a database. At this point I have several independant select boxes with data from database and naw I have to make a call to database to get a separate array of data based on user selection from select boxes. I do know how to post user data to server with javascript and here are my conserns:
1.I'd rathere use jsp to communicate with the server and not javascript - is it possible in this situation?
2. After server takes posted data and needs to send back a response, how do I get this dynamic data into the web?
Thanks in advance.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61063
    
  66

Originally posted by liliya woland:

1.I'd rathere use jsp to communicate with the server and not javascript - is it possible in this situation?


Then you will need to submit the whole page and repaint it next time around with the new data.


2. After server takes posted data and needs to send back a response, how do I get this dynamic data into the web?


I have no idea what you mean by "getting it into the web".


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
liliya woland
Ranch Hand

Joined: Apr 11, 2006
Posts: 134
Sorry, I wanted to say "web page" - I'm not sure what I need to do on the client side once the server is ready to respond back with an array of data.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61063
    
  66

I guess I'm not sure why you are confused. Once you have the data, you would just use all the normal JSP mechanisms to struture the HTML inthe way you want.
liliya woland
Ranch Hand

Joined: Apr 11, 2006
Posts: 134
I'm not sure what would be the best way to send the data back to the page after processing the request. I'm trying to use form at this point for storing data as type hidden and then do form.submit(). Is there a better way of doing this?
Balaji Sampath
Ranch Hand

Joined: Sep 30, 2005
Posts: 63
I'm trying to use form at this point for storing data as type hidden and then do form.submit(). Is there a better way of doing this?



IM not sure if you have come acros the new technology "AJAX"..
http://www.adaptivepath.com/publications/essays/archives/000385.php

Just have a look and let me know if that was of any help??
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: loading dynamic data