Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

loading dynamic data

 
liliya woland
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64629
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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".
 
liliya woland
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64629
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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??
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic