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

<s:property value="#request.firstName" escape=" " default=" "/> problen in Struts2

 
Hrishikesh Maluskar
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the following code i want to display a blank space by default , but in this case it is displaying "/".

Also i want to know the significance of escape attribute.

 
Ahmed M. Omar
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try


regards
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To answer the escape question:

http://struts.apache.org/2.x/docs/property.html

It will display whatever is in firstName; there's no way it would display a "/" unless either there's a "/" in the firstName or there's something else wrong with the page. Although I'm not sure what an empty string for the "escape" attribute would do--I agree that it should be removed.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic