This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Struts and the fly likes display a value in jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "display a value in jsp" Watch "display a value in jsp" New topic

display a value in jsp

sarvani kasturi

Joined: Oct 17, 2006
Posts: 4

User enters a value in textbox. I need to display it as it is.

For this, in, I use

value entered by user is {0}

Eg: if value is xyz : output is xyz
'xyz': output is 'xyz'

But if value is "xyz" : output I am getting is "xyz"

Can I know how to print "xyz"?
Please help.
Thanks in advance.
Anubhav Anand
Ranch Hand

Joined: May 18, 2007
Posts: 341

Originally posted by sarvani kasturi:

But if value is "xyz" : output I am getting is "xyz"

Can I know how to print "xyz"?

What are you looking at here?
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
Confused here as well. It sounds like you are using the validator framework. The messages there are not designed to display the value that the user entered (the user can look at the screen and see the value they entered) but instead to show messages that contain the name of the field that is invalid. Like this:

Hours Worked is required
Hours Worked must be a valid number
Hours Worked must be less than 24

- Brent
I agree. Here's the link:
subject: display a value in jsp
It's not a secret anymore!