Win a copy of Microservices Testing (Live Project) this week in the Spring 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

Need some Thinking(JSP and XML)

 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Let me brief quickly about the need for my question:
I have a xml file with key has the output from the database and property has the value that needs to be printed in a jsp page.
Say for example the following code: when db output is "M" it prints Male.



Now in my jsp (i dont think u need the program to get this xml property..) when i display the coresponding output for key ="S" i get the output: Student?s

I really dont know why how the "'" in xml gets converted to "?" in jsp..

Thanks in advance..

So need some suggestions and expertise views..
 
Marshal
Posts: 27278
87
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Probably because the character isn't really an apostrophe, but some other character that looks a lot like it. Common culprits for this problem are Microsoft Word "smart quotes" that are pasted into XML documents. Those characters can't be represented in most charsets so they get converted into question marks.
 
Balaji Sampath
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I try to replace the code with ' wherever i need an apostrophe and got it solved.

Regards
Balaji.S
 
reply
    Bookmark Topic Watch Topic
  • New Topic