4 Replies Latest reply: Nov 29, 2011 1:16 PM by Ken Finnigan RSS

    problem lauching mainpage.jsp

    Junio Pereira Newbie

      mainpage.jsp

      <%@page pageEncoding="UTF-8"%>
      <%@taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
      <%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
      <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
      <%@taglib uri="http://richfaces.org/rich" prefix="rich" %>
      <f:view>
      <html>
      <head>
      <LINK href="../style/faceStyle.css" rel="stylesheet" type="text/css">
      <title>Login eWorkFlow</title>
      </head>
      <body>
      <h:form id="loginForm">
      <center>
      <h:graphicImage value=""/>
      <P/>
      <rich:panel style="width:547px;text-align:left;background-color:Black;">
      <h:outputLabel value=": : LOGIN (TESTING) : :" style="font-family:Arial Black;font-size:15px;color:FloralWhite;" />
      </rich:panel>

       


      <rich:panel style="width:547px;text-align:center">
      <p/>
      <h:outputLabel value="Please enter your username and password"/>
      <rich:panel style="border-style:dotted;">
          <h:panelGrid border="0" columns="2">
           <h:outputText value="User Name:" styleClass="label_normal"></h:outputText>
           <h:inputText id="userid" value="#{loginReq.userId}"/>
           <h:outputText value="Password: " styleClass="label_normal"></h:outputText>
           <h:inputSecret id="pwd" value="#{loginReq.password}"/>
          </h:panelGrid>
         
        <p>
       
        <a4j:commandButton value="Login" type="submit" action="#{loginReq.login}"/>
        <br/>
        <h:outputLabel value="#{loginReq.message}" rendered="true" id="msg" styleClass="label_bold_red"/>

      </rich:panel>
      </rich:panel>
      <rich:panel style="width:547px;height:30px;text-align:right;background-color:Black;">
      <h:outputLabel value="CTM ScanForm eWorkflow System" style="font-family:Arial Black;font-size:12px;color:FloralWhite;" />
      </rich:panel>
      <br>

      </center>

        <a4j:status onstart="#{rich:component('wait')}.show()"
         onstop="#{rich:component('wait')}.hide()" />
        <rich:modalPanel id="wait" autosized="true" width="200" height="120"
         moveable="false" resizeable="false">
         <f:facet name="header">
          <h:outputText value="Authentication Processing" />
         </f:facet>
         <h:panelGroup>
          <center><h:outputText value="Wait Please..." /> <br />
          <h:graphicImage value="../image/ajax-loader.gif" /></center>
         </h:panelGroup>
        </rich:modalPanel>


      </h:form>
      </body>
      </html>
      </f:view>

       

       

      web.xml

       

      <?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/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">

        <display-name>eWorkFlow</display-name>

        <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>

        <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>

        <context-param>

          <description>State saving method: 'client' or 'server' (=default). See JSF Specification 2.5.2</description>

          <param-name>javax.faces.STATE_SAVING_METHOD</param-name>

          <param-value>client</param-value>

        </context-param>

        <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>

        <servlet-mapping>

          <servlet-name>Faces Servlet</servlet-name>

          <url-pattern>*.jsf</url-pattern>

        </servlet-mapping>

        <servlet-mapping>

          <servlet-name>Faces Servlet</servlet-name>

          <url-pattern>*.faces</url-pattern>

        </servlet-mapping>

        <context-param>

      <param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>

      <param-value>true</param-value>

      </context-param>

      </web-app>

       

      plz help, im a noob!

        • 1. Re: problem lauching mainpage.jsp
          Junio Pereira Newbie

          im trying to make a login page, but i cant get my head around how you make one, i was wonedring if anyone can give me some help, or a sample of some sort. thanks in advance.

           

          This is the error i've been getting.

          16:27:36,967 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
          javax.faces.FacesException: Resources framework is not initialised, check web.xml for Filter configuration
          at org.ajax4jsf.resource.ResourceBuilderImpl.getWebXml(ResourceBuilderImpl.java:117)
          at org.ajax4jsf.resource.ResourceBuilderImpl.getUri(ResourceBuilderImpl.java:306)
          at org.ajax4jsf.resource.InternetResourceBase.getUri(InternetResourceBase.java:218)
          at org.ajax4jsf.resource.BaseResourceRenderer.encodeBegin(BaseResourceRenderer.java:64)
          at org.ajax4jsf.resource.OneTimeRenderer.encodeBegin(OneTimeRenderer.java:49)
          at org.ajax4jsf.resource.BaseResourceRenderer.encode(BaseResourceRenderer.java:47)
          at org.ajax4jsf.resource.InternetResourceBase.encode(InternetResourceBase.java:313)
          at org.ajax4jsf.renderkit.HeaderResourcesRendererBase.encodeResourcesArray(HeaderResourcesRendererBase.java:145)
          at org.ajax4jsf.renderkit.HeaderResourcesRendererBase.preEncodeBegin(HeaderResourcesRendererBase.java:129)
          at org.ajax4jsf.renderkit.RendererBase.encodeBegin(RendererBase.java:98)
          at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:802)
          at javax.faces.component.UIComponent.encodeAll(UIComponent.java:934)
          at javax.faces.render.Renderer.encodeChildren(Renderer.java:148)
          at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:826)
          at javax.faces.component.UIComponent.encodeAll(UIComponent.java:936)
          at javax.faces.component.UIComponent.encodeAll(UIComponent.java:942)
          at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:273)
          at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:204)
          at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
          at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:189)
          at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
          at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
          at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
          at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
          at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
          at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
          at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
          at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
          at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
          at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
          at java.lang.Thread.run(Thread.java:619)
          • 2. Re: problem lauching mainpage.jsp
            Ken Finnigan Master

            Do you have a portlet.xml file defined?

             

            Please take a look at this link for information about setting up a WAR to use as a portlet.

            • 3. Re: problem lauching mainpage.jsp
              Junio Pereira Newbie

              no i havent, so should i create a portlet.xml file? thanks

              • 4. Re: problem lauching mainpage.jsp
                Ken Finnigan Master

                If the web application is to be deployed as a portlet, then yes it will need a portlet.xml file.

                 

                Please follow the documentation on the required configuration.