• Post Reply Bookmark Topic Watch Topic
  • New Topic

Is it possible to update the list in jsp?  RSS feed

 
hariharan jayaprakash
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have arraylist which is already set in controller side.

I need to update the same list(removing few elements in the list) in jsp based on few conditions like, the selected values in dropdown kind off.

How to update the list in jsp?. Is there any way to handle this using JSTL?.

Instead of using scriptlets, can i do this?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66207
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, you are misunderstanding what JSP is and how JSP works. The JSP executes to generate an HTML page and send it to the browser. Once it sends the page, its work is done. Please read this article to understand how JSP operates and why what you are asking makes no sense.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66207
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Once you understand how JSP works, what you want to accomplish will need to be done my making request back to the server when page events (like selecting from a drop down) occur. You can either submit a form, make a redirect, or, if you don't want to unload the page, use Ajax.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!