Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

ApplicationResources.properties, and the browser is rendering my <br> tags

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,

I'm running into a confusing issue. I have a Struts 1.1 application.

I cannot seem to get line breaks to appear on the page after putting them into my ApplicationResources.properties.

For example, I am using ActionMessages to display the dynamic messages on the page. Here is a property that is getting read:


code from my JSP:


Instead of the page rendering:


Search yielded no results.
Please CONTINUE.



it is rendering:


Search yielded no results.<br>Please CONTINUE.



Note, no line return, and the page is actually showing the <br> tag, and not recognizing it as HTML.

So, now my text values in ApplicationResources.properties are very ugly, and all strung out in one huge line with no line breaks. I'm not sure what I might be doing wrong.

Any ideas on what I might try? Any workarounds?

-Nathan
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The "workaround" is to read the tag docs and use the "filter" attribute.

http://struts.apache.org/1.1/userGuide/struts-bean.html#write
 
    Bookmark Topic Watch Topic
  • New Topic