org.apache.jasper.JasperException after deploying project on glassfish4
after deploying my JSP application on glassfish4 on Eclipse 4.16.0 (using jdk1.8.0_251) and publish it locally the server response is that: jasper exception
my web.xml file is:
<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:jsp="http://java.sun.com/xml/ns/javaee/jsp" xmlns:web="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd http://xmlns.jcp.org/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.4"> <display-name>mydocuweb</display-name> <welcome-file-list> <welcome-file>index.jsp</welcome-file> <welcome-file>index.html</welcome-file> <welcome-file>index.xhtml</welcome-file> </welcome-file-list> <context-param> <param-name>javax.faces.STATE_SAVING_METHOD</param-name> <param-value>client</param-value> </context-param> <servlet> <servlet-name>FacesServlet</servlet-name> <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>FacesServlet</servlet-name> <url-pattern>*.faces</url-pattern> </servlet-mapping> <context-param> <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name> <param-value>resources.application</param-value> </context-param> <listener> <listener-class>com.sun.faces.config.ConfigureListener</listener-class> </listener> </web-app>
my faces-config.xml file is:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN" "http://java.sun.com/dtd/web-facesconfig_1_1.dtd"> <faces-config> <application> <locale-config> <default-locale>en_US</default-locale> </locale-config> <message-bundle>jsfdb.view.res.Messages</message-bundle> </application> <managed-bean> <managed-bean-name>loginInfo</managed-bean-name> <managed-bean-class>jsfdb.view.LoginInfoBean</managed-bean-class> <managed-bean-scope>request</managed-bean-scope> </managed-bean> <managed-bean> <managed-bean-name>subscriber</managed-bean-name> <managed-bean-class>jsfdb.view.SubscriberBean</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> <managed-property> <property-name>email</property-name> <null-value/> </managed-property> <managed-property> <property-name>password</property-name> <null-value/> </managed-property> <managed-property> <property-name>name</property-name> <null-value/> </managed-property> <managed-property> <property-name>manager</property-name> <value>true</value> </managed-property> <managed-property> <property-name>developer</property-name> <value>true</value> </managed-property> <managed-property> <property-name>administrator</property-name> <value>true</value> </managed-property> <managed-property> <property-name>subscriptionType</property-name> <value>1</value> </managed-property> </managed-bean> <navigation-rule> <from-view-id>/subscribe.jsp</from-view-id> <navigation-case> <from-outcome>subscribed</from-outcome> <to-view-id>/subscribed.jsp</to-view-id> </navigation-case> </navigation-rule> <navigation-rule> <from-view-id>/login.jsp</from-view-id> <navigation-case> <from-outcome>profile</from-outcome> <to-view-id>/profile.jsp</to-view-id> </navigation-case> <navigation-case> <from-outcome>list</from-outcome> <to-view-id>/list.jsp</to-view-id> </navigation-case> </navigation-rule> <navigation-rule> <from-view-id>/profile.jsp</from-view-id> <navigation-case> <from-outcome>login</from-outcome> <to-view-id>/login.jsp</to-view-id> </navigation-case> </navigation-rule> <navigation-rule> <from-view-id>/unsubscribe.jsp</from-view-id> <navigation-case> <from-outcome>login</from-outcome> <to-view-id>/login.jsp</to-view-id> </navigation-case> <navigation-case> <from-outcome>unsubscribed</from-outcome> <to-view-id>/unsubscribed.jsp</to-view-id> </navigation-case> <navigation-case> <from-outcome>cancel</from-outcome> <to-view-id>/profile.jsp</to-view-id> </navigation-case> </navigation-rule>
the file that i would to connect is login.jsp:
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %> <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %> <!-- --> <c:remove var="subscriber" scope="session"/> <f:view> <f:loadBundle var="labels" basename="jsfdb.view.res.Labels"/> <c:set var="stylesheet" value="${pageContext.request.contextPath}/stylesheet.css"/> <html> <head> <title><h:outputText value="#{labels.login}"/></title> <link rel="stylesheet" type="text/css" href="<c:out value='${stylesheet}'/>"> </head> <body> <h1><h:outputText value="#{labels.login}"/></h1> <h:outputLink value="subscribe.faces"> <h:outputText value="#{labels.subscribe}"/> </h:outputLink> <h:form id="login"> <h:messages globalOnly="true" styleClass="message"/> <p><h:outputLabel for="email" value="#{labels.email}"/> <h:message for="email" styleClass="message"/><br> <h:inputText id="email" required="true" value="#{loginInfo.email}" size="40" maxlength="80"> <f:validateLength minimum="1" maximum="80"/> </h:inputText> <p><h:outputLabel for="password" value="#{labels.password}"/> <h:message for="password" styleClass="message"/><br> <h:inputSecret id="password" required="true" value="#{loginInfo.password}" size="10" maxlength="20"> <f:validateLength minimum="6" maximum="20"/> </h:inputSecret> <p><h:commandButton id="command" value="#{labels.login}" action="#{loginInfo.loginAction}"/> </h:form> </body> </html> </f:view>
finally the error is
[2020-07-15T11:37:03.696+0200] [glassfish 4.1] [WARNING] [] [javax.enterprise.web] [tid: _ThreadID=27 _ThreadName=http-listener-1(3)] [timeMillis: 1594805823696] [levelValue: 900] [[ StandardWrapperValve[FacesServlet]: Servlet.service() for servlet FacesServlet threw exception org.apache.jasper.JasperException: /pages/login.jsp(12,0) PWC6236: According to TLD or attribute directive in tag file, attribute value does not accept any expressions at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:81) at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:376) at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:204) at org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:1190) at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:859) at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1502) at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2297) at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2347) at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:879) at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1502) at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2297) at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2347) at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2353) at org.apache.jasper.compiler.Node$Root.accept(Node.java:499) at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2297) at org.apache.jasper.compiler.Validator.validate(Validator.java:1890) at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:223) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:451) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:625) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682) at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:875) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:739) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:575) at org.apache.catalina.core.ApplicationDispatcher.doDispatch(ApplicationDispatcher.java:546) at org.apache.catalina.core.ApplicationDispatcher.dispatch(ApplicationDispatcher.java:428) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:378) at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:643) at com.sun.faces.application.view.JspViewHandlingStrategy.executePageToBuildView(JspViewHandlingStrategy.java:363) at com.sun.faces.application.view.JspViewHandlingStrategy.buildView(JspViewHandlingStrategy.java:153) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:99) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:659) at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682) at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:875) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:739) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:575) at org.apache.catalina.core.ApplicationDispatcher.doDispatch(ApplicationDispatcher.java:546) at org.apache.catalina.core.ApplicationDispatcher.dispatch(ApplicationDispatcher.java:428) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:378) at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:792) at org.apache.jsp.pages.index_jsp._jspService(index_jsp.java:48) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:411) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682) at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:875) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:739) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:575) at org.apache.catalina.core.ApplicationDispatcher.doDispatch(ApplicationDispatcher.java:546) at org.apache.catalina.core.ApplicationDispatcher.dispatch(ApplicationDispatcher.java:428) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:378) at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:643) at com.sun.faces.application.view.JspViewHandlingStrategy.executePageToBuildView(JspViewHandlingStrategy.java:363) at com.sun.faces.application.view.JspViewHandlingStrategy.buildView(JspViewHandlingStrategy.java:153) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:99) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:659) at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:318) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174) at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:416) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:283) at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167) at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:206) at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180) at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235) at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:283) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200) at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132) at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111) at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:536) at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571) at java.lang.Thread.run(Thread.java:748) ]]
copied from server.log.
anyone has an idea? the scope of this application is to create a simple login webapp using jsp/jsf that connect with a database mysql. for the moment i did not provide the connection to the db, but i wish to verify the correct implementation of java and jsp implementation.
thanks to all