6 Replies Latest reply on Aug 24, 2006 9:36 AM by dudududu

    JSP insted XHTMLS (DVD store example)

    dudududu Novice

      I am trying to change and work with the DVD store example

      I would like to work with JSPs instead os XHTMLs , is it possible with seam?
      in the web.xml
      I removed/changed:

      removed -->
       <security-constraint>
       <display-name>Restrict XHTML Documents</display-name>
       <web-resource-collection>
       <web-resource-name>XHTML</web-resource-name>
       <url-pattern>*.xhtml</url-pattern>
       </web-resource-collection>
       <auth-constraint>
       <role-name>NONE</role-name>
       </auth-constraint>
       </security-constraint>
      
      changed-->
       <context-param>
       <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
       <param-value>.xhtml</param-value> <-- I changed to .jsp
       </context-param>
      
      
      


      I changed all the xhtml pages to jsp and also the links inside the pages

      while loading JSP file:

      <%@ page contentType="text/html; charset=Cp1255" %>
      <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
      <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
      
      <html>
       <head>
       <meta http-equiv="Content-Type" content="text/html; charset=Cp1255"/>
       <title></title>
       </head>
       <body>
       <f:view>
       <h:form>
       hello world
       </h:form>
       </f:view>
       </body>
      </html>
      


      I am getting exception:
      com.sun.facelets.FaceletException: Error Parsing /newfile.jsp: Error Traced[line: 1] The markup in the document preceding the root element must be well-formed.
       com.sun.facelets.compiler.SAXCompiler.doCompile(SAXCompiler.java:234)
       com.sun.facelets.compiler.Compiler.compile(Compiler.java:104)
       com.sun.facelets.impl.DefaultFaceletFactory.createFacelet(DefaultFaceletFactory.java:192)
       com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:141)
       com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:93)
       com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:503)
       com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:553)
       org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
       javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
       org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:97)
       org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
       org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:45)
       org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)


      is there anything else I need to change?

      Thanks