Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSTL

 
jagadeesh indukuri
Greenhorn
Posts: 28
Java MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is there any alternative to store object in jstl

for ex:

<c:set var='name1' value='MapObject/> --->>ok fine

but i want like this name1 coming from request scope so i want store like this

<c:set var='${name1}' value=''MapObject' /> --->>not fine

i want store object in dynamic var name to value(Map Object)

tell me the solution if you know
 
John Jai
Rancher
Posts: 1776
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch, Jagadeesh.

Please CarefullyChooseOneForum(<--click) while posting. I have moved the post to an appropriate forum.
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I do suggest you to set an object in a scope on servlet or java classes instead in jsp.

coming to your question. set map object in scope before reaching jsp and then set the object in
another scoped variable which ever you want as in below
 
jagadeesh indukuri
Greenhorn
Posts: 28
Java MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Seetharaman Venkatasamy wrote:I do suggest you to set an object in a scope on servlet or java classes instead in jsp.

coming to your question. set map object in scope before reaching jsp and then set the object in
another scoped variable which ever you want as in below


sorry to say that scenario comes in loop and then prepare appropriate fileobject set to session object then while sending request of appropriate file object then getting only seleted file map object from session scope in java
 
Stefan Evans
Bartender
Posts: 1691
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds like this code belongs in a Servlet rather than a JSP to me.

However, you might consider the alternate use case of the set tag:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic