Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JSP Tag Problem  RSS feed

 
Rashmi Trivedi
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All
I am having problem wiht my jsp page when i try to dispaly values using tag.
I am trying to retrieve values from db2, which is "Rashmi" for instance and in jsp i am assinging that value in value Tag. Take a look at the following code:

Now in above code property="propertyName" is causing problem for me. It has double quote already and what i am retrieveing has double quote also. It gets confused and display nothing on the screen.
When jsp get generated, i looked at the source code which as follow:

u can see the problem which i am having.

How can i display value with double quotes? That is my question. Remember it may not have double quotes so i need to identify that is there are double quote or not than deal with it.
From db point of view, it retrieve information with double quote and insert with double quote. It only happens while displaying.
Any suggestion will be appreciated. Looking forward to hearing from you shortly.
Regards,
Rashmi
 
Carl Trusiak
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Luckily html allows the use of either single quotes or double quotes. I haven't tested this specifically myself but, you could try
value='<jsp:getProperty name="prospectDetails" property="propertyName"/>'
 
matt hooker
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Rashmi,
In actual fact I would suggest that you do not quote the:
jsp:getProperty name="prospectDetails" property="propertyName"/>>
at all ..
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!