• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

argh! any java coders out there?

GeneValgene

Diamond Member
argh...this is so annoying. i'm a java newbie, and i'm trying to output html using java. i want to make a character bold, so i using this code

throw new ComFailException("Sorry, We are currently out of stock of <B>" + ProdQuant.productDescription + "</B>. Please try again later.");

the problem is, when i use the <B> </B> tags in java, when it is outputted to html source code, it translates it to "& l t ; / b & g t" (i added spaces since when i type it in here it translates it again!)

basically, it keeps it from becoming an html tag, which is exactly i don't want. anyone know how i can make java not translate it when converting to html?


thanks in advance!
 
My guess is you'll have to find the appropriate character and insert that in your output string instead of the actual brackets. For instance, in VB if you wanted to put out a $, in a string you could put a $ but if that was causing you problems you could instead use chr(56) [assuming that 56 corresponds to a dollar sign]. So,

"We are currently out of stock of chr(98)Bchr(99)"

I can't say the specifics of java code though, or even what the right number would be for brackets 🙂
 
Back
Top