• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to stop my return string from being encoded?

 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The < and > symbols are being changed to < and > in my return string.
So on my HTML page I am literally seeing on the page:

<script language='javascript1.2' src='/webstore/newshop/coremetrics/v40/eluminate.js'></script><script language='javascript1.2' src='/webstore/newshop/coremetrics/cmdatatagutils.js'></script><script language='javascript1.2'>cmSetClientId('90313131',true,newshop.com); </script>

Instead of it being part of the HTML like I want.

How can I prevent this in my java class?

 
Bartender
Posts: 2700
IntelliJ IDE Opera
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Your java code is not converting the html entities and you're not providing us with the type of application so we'll have to guess. In case of JSF you could use
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Dan Acuff wrote:How can I prevent this in my java class?


You can't, because it's not happening in the Java class.

As Wouter pointed out, without showing us how the returned result is being used, all we can do is guess. My guess is improper use of <c:out>.
 
Dan Acuff
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry about not showing how I am using it in the application.

I am using JSF.

I tried but I am still getting a conversion and it is actually displaying the string in my web browser.

UPDATE:

I got it to work:


Thanks for the help!
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moved to the JSF forum.
 
reply
    Bookmark Topic Watch Topic
  • New Topic