JSF Output Encoding

Hi JSF community,
I'm quiet new to JSF and have two questions regardings JSF's output encoding.
Does JSF provide a built-in method for replacing special characters with their corresponding HTML entities, and if this is the case, since when does it support this feature ?
Thank you in advance.
Regards,
Alex

Hi Jean.
When I was using xml and xsl to learn how to create web pages I found an error, the same that you find when including css files (I found the first problem with absolute position to div tags).
The only that I can say you is that your problem is no new. IE 6 works with some problems with combinations like xsl and css (the same happen with jsp and css).
I was searching in forums but no one give me a solution. Be sure that the problem is in IE 6.
Something that you can try is create a version of your css templates to use with IE 6. Usually the same CSS with some changes under conflicting values give you a good format in IE 6.
Then you can create a copy of yours CSS files and use this copy changing conflictives values to show the format that you want in IE 6.
Finally you must to use "something" that help you to find the version of navegator that get the page.
(It sounds stupid but work for me).
Good Luck Jean!

Similar Messages

  • Output encoding in Java mapping ?

    Hello,
    I have written a Java mapping which reads an input document and creates an output document. My problem is, the German special characters are lost in the output document (wrong characters). This is strange, because I am only using regular DOM methods for adding the output nodes and values. Anybody has an idea where I have to explicitly define the output encoding ? XI automatically uses UTF-8, I am using the StandardDOMWriter class of the com.inqmy.lib.xml package from XI, and DocumentBuilder from javax.xml.parsers.
    But the output is wrong nevertheless. I think the encoding is already set in the OutputStream input variable of the execute methods. So no need to be changed (?)
    Code sample below:
    public void execute(InputStream in, OutputStream out)  throws StreamTransformationException {
           DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
           DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();
           Document idoc = documentBuilder.parse(in);   // input document           
           Document odoc = documentBuilder.newDocument();     // output document
           // create some elements and values with helper method below
          // write output document to stream
          odoc.appendChild(oRoot);
          StandardDOMWriter sdw = new StandardDOMWriter();
          sdw.write(odoc, out, null);               
        private Element createElement(String elementName, String value, Element parent, Document doc) {   
          Element element = createElement(elementName, parent, doc);
          // here we put the input content to output value
          element.appendChild(doc.createTextNode(value));     
          // ok, special character still there:
           trace.addInfo("Read back: " + getNodeValue(element));
          return element;
    CSY

    I solved the problem. For some reason, the inqmy parser does not work correctly. If I remember correctly, the SapXMLToolkit (from where it comes), is deprecated anyway.
    Instead I use now standard JAXP transform streaming, and that works fine:
          // commented code does not convert german special characters correctly:
          //StandardDOMWriter sdw = new StandardDOMWriter();     
          //sdw.write(odoc, out, null);
         // Serialisation through Transform.
         DOMSource domSource = new DOMSource(odoc);
         StreamResult streamResult = new StreamResult(out);
         TransformerFactory tf = TransformerFactory.newInstance();
         Transformer serializer = tf.newTransformer();
         serializer.setOutputProperty(OutputKeys.ENCODING,"UTF-8");    
         serializer.setOutputProperty(OutputKeys.INDENT,"yes");
         serializer.transform(domSource, streamResult);                            
    CSY

  • Wher is the place holder option to set output encoding in PI 7.1?

    Hi
    In 7.0 we had an place holder to set the output encoding (i.e. ctrlshftrightclick).
    where is that option in 7.1? please help
    Regards
    Osman Abdul Aziz Jabri

    > I guess runtime debugging ( switch AS java in debug mode and attach NWDS to the AS Java to debug as module is being executed) is not possible with adapter module. Please let me know if this is indeed possible and how to enable it.
    It is possible for adapter modules as well. I know this from our developers
    It should work like this:
    /people/christian.drumm/blog/2008/09/30/debugging-java-mappings-using-sap-netweaver-developer-studio
    > The only option is to send debug information to log file. So in the module code like:
    > audit.addAuditLogEntry(key, status, message);
    > location.debugT(SIGNATURE, message);
    > My next question is how to read the log in audit log and in location. I've read that the audit log can be read in .../MessagingSystem/monitor/monitor.jsp, under which section of the page I can read the audit log?
    In the RWB under Message Monitoring for Adapter, or try the shortcut
    http://server:port/mdt

  • How to assign a layer as a output (Encode) alpha channel

    Hi
    In Adobe Premier or After Effects is there a way to assign a layer to be seen as a alpha channel on outputting (encoding) the completed project?
    for examples.... I have about 6 video files all built up on top of each other (video 1, Video 2... and so on). The final layer (Video 7) I then import a PNG file with alpha to show the videos below where I want exactly. The black area (non transparent) area of my layer 7 I want to be seen as my alpha channel in my 3rd party video software after I have outputted (encoded) my video file.
    Hope that makes thanks
    Thanks
    Craig

    Hi
    In Adobe Premier or After Effects is there a way to assign a layer to be seen as a alpha channel on outputting (encoding) the completed project?
    for examples.... I have about 6 video files all built up on top of each other (video 1, Video 2... and so on). The final layer (Video 7) I then import a PNG file with alpha to show the videos below where I want exactly. The black area (non transparent) area of my layer 7 I want to be seen as my alpha channel in my 3rd party video software after I have outputted (encoded) my video file.
    Hope that makes thanks
    Thanks
    Craig

  • JSF output not displaying properly in IE6

    I've create an application using JSC and developed a few CSS templates to go along. I've notice that the formatting look fine on Firefox and IE7 but not IE6 -
    I saved the generated JSF output page (from the browser), remove the first line: <?xml version="1.0"?> and tried to load it manually into IE6 and it rendered fine. So the culprit (other then IE6 of course) is this line: <?xml version="1.0"?>
    I read somewhere that if IE6 encounters <?xml version="1.0"?>, it switches it rendering engine to 5.5 (not sure if that's true or not).
    Is there any workaround to get my page to display correctly on IE6?
    Desperately,
    Jean

    Hi Jean.
    When I was using xml and xsl to learn how to create web pages I found an error, the same that you find when including css files (I found the first problem with absolute position to div tags).
    The only that I can say you is that your problem is no new. IE 6 works with some problems with combinations like xsl and css (the same happen with jsp and css).
    I was searching in forums but no one give me a solution. Be sure that the problem is in IE 6.
    Something that you can try is create a version of your css templates to use with IE 6. Usually the same CSS with some changes under conflicting values give you a good format in IE 6.
    Then you can create a copy of yours CSS files and use this copy changing conflictives values to show the format that you want in IE 6.
    Finally you must to use "something" that help you to find the version of navegator that get the page.
    (It sounds stupid but work for me).
    Good Luck Jean!

  • Output encoding for StAX writer

    Hi,
    Can handle StAX automatically the output encoding for the XML? Or must I manually define a PrintWriter with a choosen encoding and set the START DOCUMENT to a corresponding value?
    Thanks,
    Karsten

    I solved the problem. For some reason, the inqmy parser does not work correctly. If I remember correctly, the SapXMLToolkit (from where it comes), is deprecated anyway.
    Instead I use now standard JAXP transform streaming, and that works fine:
          // commented code does not convert german special characters correctly:
          //StandardDOMWriter sdw = new StandardDOMWriter();     
          //sdw.write(odoc, out, null);
         // Serialisation through Transform.
         DOMSource domSource = new DOMSource(odoc);
         StreamResult streamResult = new StreamResult(out);
         TransformerFactory tf = TransformerFactory.newInstance();
         Transformer serializer = tf.newTransformer();
         serializer.setOutputProperty(OutputKeys.ENCODING,"UTF-8");    
         serializer.setOutputProperty(OutputKeys.INDENT,"yes");
         serializer.transform(domSource, streamResult);                            
    CSY

  • How to get a global string value to be the value of a JSF output box?

    im useing Jdeveloper 10 i have made a JSF, JSP page i have a backing bean for that page. in there i have made a global value:
    private string test = "TESTING"these codes have been generated:
    public void setTester(HtmlOutputText outputText6) {
    this.tester = outputText6;
    public HtmlOutputText getTester() {
    return tester;
    }now how do i put test as the output text?

    That wouldn't even compile. HtmlOutputText isn't a subclass of String (heck, java.lang.String is a final class).
    Two ways to solve this: 1) use HtmlOutputText#setValue() in the constructor or initialization block of the bean or even by lazy loading in the getter. Just create a String getter and use it in the value attribute of the outputText element in the JSF page.

  • Input and Output encoding do not match

    My input xml file's encoding is "ISO-8859-1".After manipulating the contents using DOM and transforming , the encoding of the Output xml file is changed to "UTF-8".
    Here is the source code:
    public static void main(String args[])
    try {
    InputStream xml_utf = new FileInputStream("C:\\backup\\07_23\\input_1.xml");
    InputSource inputSource = new InputSource(xml_utf);
    DOMParser parser = new DOMParser();
    try {
    parser.parse(inputSource);
    } catch (SAXException e) {
    e.printStackTrace();
    } catch (IOException e) {
    e.printStackTrace();
    Document doc = parser.getDocument();
    Source source = new DOMSource(doc);
    Result result = new StreamResult(new FileWriter("C:\\backup\\07_23\\output_1_input2.xml"));
    Transformer xformer = null;
    try {
    xformer = TransformerFactory.newInstance().newTransformer();
    xformer.transform(source, result);
    } catch (TransformerConfigurationException e) {
    e.printStackTrace();
    catch (TransformerException e) {
    e.printStackTrace();
    How can I set the encoding of the output back to "ISO-8859-1"?
    Thanks.

    transformer.setOutputProperty("encoding","ISO-8859-1")
    did the job...

  • JSF output truncated when integrating with OpenCms

    Hi all!
    I'm quite new to JSF and am trying to integrate it with OpenCms, a JSP based content management system. In OpenCms all files reside in a virtual filesystem (VFS) and are accessed through the opencms-servlet which is mapped to "/opencms/*".
    While trying to integrate JSF with OpenCms I added another prefix servlet mapping for the faces servlet: "/faces/*". When I now try to access a JSF-page I have to use a URL like this:
    http://myserver:8080/mywebapp/faces/opencms/page1.jsp
    For my understanding the faces servlet now tries to read a file /opencms/page1.jsp from the real filesystem, which does not exist. Is this correct? How could I get faces-servlet to obtain page1.jsp from the VFS? However, I do not get an exception or a message telling me that the resource page1.jsp is missing.
    Instead the faces-servlet seems to do it's work and forwards to the opencms-servlet which in turn forwards to the JSP-servlet and processes the JSP. I'm sure the whole JSP is processed as I added log-statements from the beginning to the end, of which all are executed. However, the output of the JSP is truncated whenever there exists at least one JSF tag in the page.
    Any ideas what's going wrong here?
    Is my understanding of the executing order correct?
    many thanks in advance for your help,
    - martin

    Hi!
    Working with JSF 1.1 works, but now I want to switch to JSF 1.2, which does not work :-(
    I have a simple demo application (webapp 2.4 and webapp 2.5) without OpenCms which works. OpenCms 7.0.2 without JSF works as a 2.4 and as a 2.5 webapp. As soon as I want to access a JSF-page with an URL like http://localhost:8080/opencms-7.0.24/faces/opencms/mypage.jsp I get only truncated output like the following:
    <form id="j_id_jsp_2033902881_1" name="j_id_
    {code}
    Any Ideas what could cause the truncation?
    There are now log messages and no exceptions in any logfile :-(
    tia,
    - martin                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • JSF: output textfield rendered problem

    Hi!
    In JSF 1.1, in my page when I click the radio button with valuechangelistener brings to the page a text field (rendered = true / false).
    When I give a value to the text field the value doesn�t go the backing bean field when I go to the next page.
    How I can get the value from the output textfield to bean?
    Thanks!
    SpalGuru

    I am not surprised by this behavior. During the Restore View phase, the rendered attribute is re-resolved and may be false when before it was true. When this happens the event for the button is not registered.
    I can't speak to whether or not this is a bug, but it appears to be the as designed behavior. If you think it is a bug, pursue it with the vendor of the JSF implementation you are using.

  • Can I connect a 15V output Encoder directly to the UMI-7764(PXI-7344)

    Is it safe to attempt the above.?
    Would additional circuitry be necessary ?

    In case you use a simple voltage divider you should clamp the line which goes into the 7344 encoder inputs with 4.7v zener diodes. In case the 'lower' resistor of the divider gets open the input circuitry of the 7344 might be damaged due to excess voltage.
    Also, when using any level converters (with voltage dividers or active circuitry) it is essential to provide a fail safe overvoltage protection to protect the 7344 inputs - and also your computer. The best method is galvanic isolation via optocouplers, but usually these need extra circutry to drive their inputs (they require several mA to drive the LED) and to re-shape their output signals since most optocouplers have rather long rise and fall times.

  • JSF Renderer encoding html link to call bean

    I have custom renderer. I would like to write out links in the same that when clicked will call a backing mean method.
    For example, suppose the backing bean method has a method foo(), I would like to be able to call that in my decode method and make it forward to a jsp. How can I accomplish this?
    Thanks in advance

    Thank you for reply, after making few chages by taking your suggestion i am still struggling to get the desired result in my jsp. please into the code below
    public class Database {
            public List calToDatabase;
         public static void initialCalToList()
              System.out.println("Contents in the List#########");
              List al=new ArrayList();
              al.add("JAya");
              al.add("chandra");
              al.add("raheem");
              al.add("balu");
              System.out.println("Contents in the List"+al);
              Database db= new Database();
              db.setCalToDatabase(al);  // calling the setter with list as an argument
    public List getCalToDatabase() {
              return calToDatabase;
         public void setCalToDatabase(List calToDatabase) {
              this.calToDatabase = calToDatabase;
         }I have also made changes in success.jsp
    <%@ page contentType="text/html"%>
    <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    Login Successful
    <html>
    <f:view>
       <h:form id="result">
         <p>
               <c:forEach var="x" items="#{Database.getCalToDatabase}" >
                     ${x}
                   </c:forEach>
         </p>
       </h:form>
    </f:view>
    </html>

  • Simple transformation tt: utf-16 to utf-8 encoding

    Hi,
    (reposting here as no response in the ABAP General forum)
    I have a simple transformation the results of which are written to a file using open dataset. The XML in the file is appearing with encoding utf-16 but I need utf-8. I tried placing the following line in the transformation but it did not work:
    <xsl:output encoding="utf-8"/>
    The only way it works is if I use type xstring for the result of the transformation and not string. I then have to convert the xml from xstring to string before writing to the file. This works but I was wondering if there was an easier way to change the encoding of a simple transformation (tt:) ?????????
    Che

    Hi All,
    Reopening this old post, as I found that the same transformation and same program call results in an XML with utf-8 in a NW 7.30 system, while utf-16 in a NW 7.01 system!
    Any ideas why would it happen like this? And if there's anything that can be done to make sure the encoding remains same in both the systems?

  • UTF-8 encoding in XSLT transformation

    Hello,
    I have a problem with a transformation of an ABAP structure into XML. I use the XSLT transformation for this.
    My XSLT starts like this:
    <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
      <xsl:strip-space elements="*"/>
      <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
        <asx:values>
    I tried many settings I could find posted on the internet, but I did not find one that would allow encoding to UTF-8.
    It always encodes to iso-8859-1 which my interface partner cannot read.
    Does anyone know a way to force encoding to UTF-8?
    Adding a command like <xsl:output encoding="utf-8"/> did not help.
    Thanks a lot!
           J. Euler

    Hello!
    I think I just solved the problem taking a different approach.
    In a note here on SDN, a guy from SAP wrote, that the SAP XSLT processor is not able to code anything but the system's default to a string, BUT that it is able to code it to an xstring.
    All I did now is add the tag  
    <xsl:output encoding="utf-8" indent="yes" method="xml"/>
    to my xslt program and change the coding in the program accordingly.
    The program code is now:
      DATA: tempxstring TYPE xstring,
            temp_length TYPE i,
            conv      TYPE REF TO cl_abap_conv_in_ce.
      CLEAR tempxstring.
      TRY.
          CALL TRANSFORMATION
              zxxje_tst_xslt
            SOURCE omsregdatawebservice = wa_data
            RESULT XML tempxstring.
        CATCH cx_sy_conversion_base64.
        CATCH cx_sy_conv_illegal_date_time.
      ENDTRY.
      IF tempxstring IS NOT INITIAL.
        CLEAR: conv, temp_length, string_xml_result.
        conv = cl_abap_conv_in_ce=>create( input = tempxstring ).
        conv->read( IMPORTING data = string_xml_result len = temp_length ).
      ENDIF.
    Thanks anyways for all your help!
    regards,
          Johannes Euler

  • Encoding Technique converting in XSLT Mapping.

    Hi,
    I have a scenarion File->XI->File. the incoming file has the encoding technique UTF-8. i have to convert it to ISO-8859-1. i'm using an XSLT mapping to do that after which my java mapping gets executed. when i tested this mapping with the source file in the Design, it works fine, but when i execute the whole scenario end to end,it is throwing some exception with Unsupported Charecter. the code of the XSLT looks as given under:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
         <xsl:output encoding="ISO-8859-1"/>
         <xsl:template match="/">
              <xsl:copy-of select="*"/>
         </xsl:template>
    </xsl:stylesheet>
    Can any one tell me how to resolve this.
    Any help wud b gr8ly appreciated.
    Thnx in Advance
    Anil

    HI Anil,
    Check these links, it might help you.
    Ampersand ('&')  dumps XI Mapping. JDBC to BIW
    /people/pooja.pandey/blog/2005/06/27/xslt-mapping-with-java-enhancement-for-beginners
    /people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping
    /people/prasadbabu.nemalikanti3/blog/2006/03/30/xpath-functions-in-xslt-mapping
    Best regards
    Mahesh.M

Maybe you are looking for

  • IMac G4 flat panel 700 GHz firewire connection to MiniMac 1.42 GHz Power PC

    Is it possible to connect firewire my iMac to my MiniMac and designate the MiniMac as the startup disk?I would like to use the iMac for a monitor, primarily, but would like to be able to use it for old applications.

  • USB Bose Audio Doesn't Work & DVD/CD Ejects during startup 10.6.1

    Anyone having this problem on the Mac Pro 8 Core USB Bose Audio Doesn't Work, have to pull USB plug out and put it back in for audio to be recognised & DVD/CD Ejects during startup >>> 10.6.1

  • Stereo 3D Revelator

    Hy, is it possible to use my old 3d Stereo Glasses with my new graphics card MSI G4Ti4200-8x 128MB DDR. (I have MSI k7N2 Delta Board and AMD Athlon XP 2600 CPU, two 512MB Ram, WinXP) The glasses worked with Elsa Erazor III (Riva TNT2) a long time ago

  • Batch clean up LP recording

    I've used Syntrilium and Audition for its great sound cleaning abilities, but have been stymied by its inability to create batch process for anything but the most simple tasks.  I have even tried to use other automation apps such as MacroScheduler to

  • Adobe form link in all line items

    Hi, I have a tipical requirement in WDA Adobe forms. In a list of material line items, when ever click on any one of the items it should have link to the another adobe form depends on material type. In this case we have 3 types of material types.So,