Topic
4 replies Latest Post - ‏2012-05-08T22:55:16Z by esteban80
esteban80
esteban80
3 Posts
ACCEPTED ANSWER

Pinned topic Browser showing only XHTML code

‏2012-05-08T00:20:39Z |
hi! i hope i can get help here, this is the situation.

Im trying to deploy a JSF web application on Integrated Web Application Server for i on an iSeries V7.1, im using JSF 2.1
When i deploy it to my Apache Tomcat 7 in development machine everything goes ok.
When i deploy to IAS, when i open the index.xhtml page on the browser i only see the xhtml code. I ve tried Firefox, Chrome and IE.
am I missing something on the code? maybe force the content-type?

If this is not the right forum to ask my question could you please point me the right one?

thanks in advance guys!

P.D: If i change the web page file extension from xhtml to html i get the application displayed correctly, but textfields and buttons are gone.
Updated on 2012-05-08T22:55:16Z at 2012-05-08T22:55:16Z by esteban80
  • gloriay
    gloriay
    5 Posts
    ACCEPTED ANSWER

    Re: Browser showing only XHTML code

    ‏2012-05-08T13:16:33Z  in response to esteban80
    Hi,

    Could you confirm that you are using the following context-param in your web.xml file?

    <context-param>
    <description>
    The default suffix for extension-mapped resources that contain JSF components.
    Default is '.jsp'.</description>
    <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
    <param-value>.xhtml</param-value>
    </context-param>
    • esteban80
      esteban80
      3 Posts
      ACCEPTED ANSWER

      Re: Browser showing only XHTML code

      ‏2012-05-08T14:35:10Z  in response to gloriay
      Hi! this is the context-param im using:

      <context-param>
      <param-name>javax.faces.PROJECT_STAGE</param-name>
      <param-value>Development</param-value>
      </context-param>
  • gloriay
    gloriay
    5 Posts
    ACCEPTED ANSWER

    Re: Browser showing only XHTML code

    ‏2012-05-08T18:41:40Z  in response to esteban80
    Hi, try adding the javax.faces.DEFAULT_SUFFIX param, in this way you are configuring the Faces Servlet to to attend certain kind of files, in this case .xhtml files.

    <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
    <param-value>.xhtml</param-value>
    • esteban80
      esteban80
      3 Posts
      ACCEPTED ANSWER

      Re: Browser showing only XHTML code

      ‏2012-05-08T22:55:16Z  in response to gloriay
      Done! i added the param-name and param-value code but no results. it was the same resulta as before.
      On HTTP Server configuration there's a configuration option to associate file extensions to content-type.
      I added .xhtml extension with content type application/xhtml+xml but still, the result is the same.