tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Josué Alcalde González <jalca...@csa.es>
Subject Tomcat and JSF. Internet Explorer prompts for download
Date Wed, 08 Nov 2006 09:11:24 GMT
I am developing a JSF application using tomcat 5.5.20 and myfaces 1.1.4.

It works perfect in Firefox but IE doesn't show the faces pages, but it
prompts to download.

This is my web.xml file:

---------------------------------------------------------------------------

<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
  <display-name>paninfo-web</display-name>

  <context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>client</param-value>
  </context-param>

  <context-param>
    <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
    <param-value>true</param-value>
  </context-param>

  <context-param>
    <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
    <param-value>false</param-value>
  </context-param>

  <context-param>
    <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
    <param-value>true</param-value>
  </context-param>

  <context-param>
    <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
    <param-value>true</param-value>
  </context-param>

  <filter>
    <filter-name>MyFacesExtensionsFilter</filter-name>

<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
    <init-param>
      <param-name>maxFileSize</param-name>
      <param-value>20m</param-value>
    </init-param>
  </filter>

  <!-- extension mapping for adding <script/>, <link/>, and other
resource tags to JSF-pages  -->
  <filter-mapping>
    <filter-name>MyFacesExtensionsFilter</filter-name>
    <!-- servlet-name must match the name of your
javax.faces.webapp.FacesServlet entry -->
    <servlet-name>Faces Servlet</servlet-name>
  </filter-mapping>

  <!-- extension mapping for serving page-independent resources
(javascript, stylesheets, images, etc.)  -->
  <filter-mapping>
    <filter-name>MyFacesExtensionsFilter</filter-name>
    <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
  </filter-mapping>
  <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
  </servlet>
  <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.faces</url-pattern>
  </servlet-mapping>
  <welcome-file-list>
    <welcome-file>index.html</welcome-file>
    <welcome-file>index.htm</welcome-file>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>default.html</welcome-file>
    <welcome-file>default.htm</welcome-file>
    <welcome-file>default.jsp</welcome-file>
  </welcome-file-list>

</web-app>

---------------------------------------------------------------------------

and this is how it looks my first a .faces file:

---------------------------------------------------------------------------
<%@ page language="java" contentType="text/html charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<c:if test="${loginSessionBean != null}">
  <c:redirect url="usuarios.faces" />
</c:if>
<html>

<%@include file="inc/htmlhead.inc.html"%>

<body>

<f:view>

  <%@include file="inc/cabecera.inc.jsp"%>

  <h:form id="frLogin">
    <t:div styleClass="cont_login" id="cont_login">
      <t:div styleClass="login_izqda" id="login_izqda">
        <t:graphicImage id="giIcoAcceso" url="images/ico_acceso.gif"
          alt="Imagen de acceso" />
      </t:div>
      <t:div styleClass="login_dcha" id="login_dcha">
        <f:verbatim>
          <h2>Bienvenido</h2>
          <span class="mensajes">Por favor, introduzca sus datos para
proceder a la
          validación</span>
        </f:verbatim>
        <h:panelGrid columns="2" cellpadding="0" cellspacing="0"
          style="margin:5px 0 5px 0;">
          <h:outputLabel id="olLogin" for="itLogin" value="Usuario"
            style="margin-right:10px;" />
          <h:outputLabel id="olPassword" for="isPassword"
value="Contraseña" />
          <h:inputText id="itLogin" required="true" tabindex="0"
            style="margin-right:10px;" />
          <h:inputSecret id="isPassword" required="true">
            <f:validator
validatorId="es.csa.ubu.paninfo.web.validators.LoginValidator" />
          </h:inputSecret>
        </h:panelGrid>
        <h:commandButton value="Aceptar"
action="#{loginSessionBean.autenticacion}"
          styleClass="botones" />
      </t:div>

    </t:div>

    <t:div styleClass="errores" id="errores"
      rendered="#{! empty facesContext.maximumSeverity}">
      <h:panelGrid columns="1">
        <t:message id="mesLogin" for="itLogin" />
        <t:message id="mesPassword" for="isPassword" />
      </h:panelGrid>
    </t:div>
  </h:form>
</f:view>

</body>

</html>

---------------------------------------------------------------------------

What could be the problem? I have no ideas.



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message