Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Dynamic variable name in JSTL  RSS feed

 
sammeta Phanikumar
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,

I am working on JSTL in jsp file. My requirement is , in a jsp I have to form some links by iterating a collection. When I form the link i get some values, these values to be sent to next component when corresponding link is clicked.

Condotion is values are not be sent in URL.

So I thought to place values in the request scope with a dynamic variable Vi [here i is loop counter and V is constant], so thta in the link I place the counter ie i value. When link is clicked i value is sent to next component and can read correspont value with the key[Vi] from request.

so please tell me how to form that key dynamically ie V+i value.

Help me solve this or any better solution. I just want it to be developed in the JSTL.



PHani
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65826
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That won't work. Remember, JSP is just a templating engine that runs on the server to format an HTML page to send to the browser. Once the page is sent to the browser, the request and everything that goes along with it is gone.

Why the requirement to hide the submission values? If the data is sensitive, you should encrypt it. If it's not sensitive, who cares?
 
sammeta Phanikumar
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bear,

Thanks for your reply. I under stand that JSTL is used only to display the content in the GUI. But I want to know is there any work around for this.

Phani
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65826
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You haven't answered my questions regarding why this is necessary.
 
sammeta Phanikumar
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bear

Sorry for the late reply.

Actually it is a client requirement tht no parameters are shown in URL. And the applicaiont is already developed using jstl. So now there is no other option to use other technologies.

Phani
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65826
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How silly.

In any case, if you don't want the parameters on the URL, use a POST.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!