Hi All,
        I cannot understand why I get an error from Tomcat, when
trying to forwarding from an initial JSP with JSF to another one when
the application starts and I noticed the same problem during the
homework examples.
I'm on the very 1st excercise of the course about JSF (#4104).

My application starts with welcomeJSF.jsp below:
---------------------------------------------------------------------------
<%...@page contentType="text/html"%>
<%...@page pageEncoding="UTF-8"%>

<%...@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%...@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd";>

<%--
    This file is an entry point for JavaServer Faces application.
--%>
<f:view>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <h1><h:outputText value="JavaServer Faces" /></h1>
        <jsp:forward page="/faces/Address.jsp" />
    </body>
</html>
</f:view>
---------------------------------------------------------------------------

This file calls /faces/Address.jsp, which is reported below:

---------------------------------------------------------------------------
<%...@page contentType="text/html" pageEncoding="UTF-8"%>
<%...@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%...@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd";>

<f:view>
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
            <title>JSP Page</title>
        </head>
        <body>
            <h1>Address.jsp</h1>
            <h:outputText value="h:outputText tag" />
        </body>
    </html>
</f:view>
---------------------------------------------------------------------------

I receive the following error:

---------------------------------------------------------------------------
type Exception report

message

description The server encountered an internal error () that prevented
it from fulfilling this request.

exception

org.apache.jasper.JasperException: An exception occurred processing
JSP page /welcomeJSF.jsp at line 21

18:     </head>
19:     <body>
20:         <h1><h:outputText value="JavaServer Faces" /></h1>
21:         <jsp:forward page="/faces/Address.jsp" />
22:     </body>
23: </html>
24: </f:view>


Stacktrace:
        org.apache.jasper.servlet.JspServletWrapper.handleJspException
(JspServletWrapper.java:505)
        org.apache.jasper.servlet.JspServletWrapper.service
(JspServletWrapper.java:398)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:
342)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter
(MonitorFilter.java:390)
        com.sun.faces.context.ExternalContextImpl.dispatch
(ExternalContextImpl.java:408)
        com.sun.faces.application.ViewHandlerImpl.executePageToBuildView
(ViewHandlerImpl.java:442)
        com.sun.faces.application.ViewHandlerImpl.renderView
(ViewHandlerImpl.java:115)
        com.sun.faces.lifecycle.RenderResponsePhase.execute
(RenderResponsePhase.java:106)
        com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
        com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
        javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
        org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter
(MonitorFilter.java:390)

root cause

org.apache.jasper.JasperException: An exception occurred processing
JSP page /Address.jsp at line 8

5: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
6: "http://www.w3.org/TR/html4/loose.dtd";>
7:
8: <f:view>
9:     <html>
10:         <head>
11:             <meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
[...]
---------------------------------------------------------------------------

All works with plain JSP files, but when adding JSF tags, this problem
occurs.
Could you please help?
Thanks a lot!!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Java 
EE (J2EE) Programming with Passion!" group.
To post to this group, send email to 
java-ee-j2ee-programming-with-passion@googlegroups.com
To unsubscribe from this group, send email to 
java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to