voyent
popupPanel error after login  XML
Forum Index -> General Help
Author Message
tom.verdeyen

Joined: 16/Nov/2007 00:00:00
Messages: 19
Offline


Hi,

I'm facing an error and I am unable to figure out what my problem is.
The situation is as follows: I have a Start.jsp that redirects to Login.jsp,
there I'm submitting my credentials (which are currently still hard coded in the backing bean, for testing purposes) and then it redirects me to a page with a popupPanel. Again this is a test page for testing popupPanel, so the popup immediately is visible. When I want to close it however, it fails and gives me an error in my serverlog. When I skip the Login page and I go directly to the Test page with popup, everything works fine.

Could somebody help me pls? It obviously must be something in the Login page. I'll post everything below.

Login.jspx:
Code:
 <html>
 <f:view xmlns:f="http://java.sun.com/jsf/core"
 		xmlns:h="http://java.sun.com/jsf/html"
 		xmlns:corejsf="http://corejsf.localvalidation.xplanation.com/pager"
 		xmlns:ice="http://www.icesoft.com/icefaces/component">
 	<f:loadBundle basename="resources.localvalidation" var="msgs"/>
 	<f:loadBundle basename="resources.wfweb" var="wf"/>
 	<head>
 		<title><ice:outputText value=""/></title>
 		<link href="#{facesContext.externalContext.request.contextPath}/resources/wf.css" rel="stylesheet" type="text/css"/>
 		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
 		<script type="text/javascript" language="JavaScript">
 			<!--
 			function focus() {
 				if(this.document.forms[0]!=null)
 					this.document.forms[0].elements[0].focus();
 			}
 			try {
 				loadFrame('LeftFrame.html','leftFrame');
 			} catch (error) {}
 			// -->
 		</script>
 	</head>
 
 	<body>
 	<ice:form>
 		<ice:panelGrid columns="2">
 			<ice:outputText value="#{msgs.LoginItemLogin}"/>
 			<ice:panelGroup>
 				<ice:inputText id="login" required="true" value="#{credentials.login}">
 					<!-- todo: Check why the validation tag below doesn't work -->
 					<!--<f:validateLength maximum="#{wf.UsernameLength}"/>-->
 				</ice:inputText>
 				<ice:message for="login"/>
 			</ice:panelGroup>
 
 			<ice:outputText value="#{msgs.LoginItemPassword}"/>
 			<ice:panelGroup>
 				<ice:inputSecret id="password" required="true" value="#{credentials.password}">
 					<!--<f:validateLength maximum="#{wf.PasswordLength}" minimum="#{wf.MinPasswordLength}"/>-->
 				</ice:inputSecret>
 				<ice:message for="password"/>
 			</ice:panelGroup>
 		</ice:panelGrid>
 		<ice:commandButton value="#{msgs.LoginItemButtonText}" action="#{credentials.verifyUser}"/>
 	</ice:form>
 	</body>
 </f:view>
 </html>
 


CredentialBean:
Code:
 public class CredentialBean {
 	private static final String LOGIN_SUCCES = "loginSucces";
 
 	private String login;
 	private String password;
 
 	public CredentialBean() {
 		
 	}
 
 	public void setLogin(String login) {
 		this.login = login;
 	}
 
 	public String getLogin() {
 		return this.login;
 	}
 
 	public void setPassword(String password) {
 		this.password = password;
 	}
 
 	public String getPassword() {
 		return this.password;
 	}
 
 	public String verifyUser() {
 		if(login.equals("tom") && password.equals("s3cr3t"))
 			return LOGIN_SUCCES;
 		return null;
 	}
 }
 


Faces-config:
Code:
 <?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>
 		<message-bundle>resources.localvalidation</message-bundle>
 		<message-bundle>resources.localvalidation-errormsg</message-bundle>
 		<locale-config>
 			<default-locale>en</default-locale>
 			<supported-locale>nl</supported-locale>
 			<supported-locale>fr</supported-locale>
 			<supported-locale>de</supported-locale>
 		</locale-config>
 	</application>
 
 	<navigation-rule>
 		<from-view-id>/Login.iface</from-view-id>
 		<navigation-case>
 			<from-outcome>loginSucces</from-outcome>
 			<to-view-id>/Test.jspx</to-view-id>
 		</navigation-case>
 	</navigation-rule>
 
 	<managed-bean>
 		<managed-bean-name>credentials</managed-bean-name>
 		<managed-bean-class>com.xplanation.localvalidation.CredentialBean</managed-bean-class>
 		<managed-bean-scope>session</managed-bean-scope>
 	</managed-bean>
 
 	<managed-bean>
 		<managed-bean-name>popup</managed-bean-name>
 		<managed-bean-class>com.xplanation.localvalidation.util.PopupBean</managed-bean-class>
 		<managed-bean-scope>session</managed-bean-scope>
 	</managed-bean>
 
 	<render-kit>
       <renderer>
          <component-family>javax.faces.Output</component-family>
          <renderer-type>com.xplanation.localvalidation.corejsf.Pager</renderer-type>
          <renderer-class>com.xplanation.localvalidation.corejsf.PagerRenderer</renderer-class>
       </renderer>
    </render-kit>
 
 	<!--<lifecycle>
 		<phase-listener>com.xplanation.localvalidation.util.PostRedirectGetListener</phase-listener>
 	</lifecycle>-->
 
 </faces-config>
 


the error I'm getting:
Code:
 java.lang.NullPointerException 
     at com.icesoft.faces.context.DOMResponseWriter.enhanceAndFixDocument(DOMResponseWriter.java:267) 
     at com.icesoft.faces.context.DOMResponseWriter.endDocument(DOMResponseWriter.java:178) 
     at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:542) 
     at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:153) 
     at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87) 
     at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
     at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117) 
     at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.renderCyclePartial(ReceiveSendUpdates.java:69) 
     at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.service(ReceiveSendUpdates.java:43) 
     at com.icesoft.faces.webapp.http.core.IDVerifier.service(IDVerifier.java:25) 
     at com.icesoft.faces.webapp.http.core.ViewBoundServer.service(ViewBoundServer.java:52) 
     at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer$Matcher.serviceOnMatch(PathDispatcherServer.java:50) 
     at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:19) 
     at com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet.service(ThreadBlockingAdaptingServlet.java:19) 
     at com.icesoft.faces.webapp.http.servlet.EnvironmentAdaptingServlet.service(EnvironmentAdaptingServlet.java:29) 
     at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:109) 
     at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:35) 
     at com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52) 
     at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29) 
     at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:98) 
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) 
     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher
     .java:711) 
     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher
     .java:368) 
     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher.unprivileged_forward(ServletRequestDispatcher
     .java:259) 
     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher.access$100(ServletRequestDispatcher
     .java:50) 
     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher$2.oc4jRun(ServletRequestDispatcher
     .java:193) 
     at oracle.oc4j.security.OC4JSecurity.doPrivileged(OC4JSecurity.java:283) 
     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher
     .java:198) 
     at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:54) 
     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher
     .java:711) 
     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher
     .java:368) 
     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler
     .java:866) 
     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler
     .java:448) 
     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler
     .java:216) 
     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:117) 
     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:110) 
     at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260) 
     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor
     .java:303) 
      at java.lang.Thread.run(Thread.java:595) 
 
tom.verdeyen

Joined: 16/Nov/2007 00:00:00
Messages: 19
Offline


Ok, nevermind, solved the problem myself.

Just added <redirect/> to my navigation rule and I didn't get any errors
anymore.

Anyone has an explanation why this is happening?
Maybe this is a bug?

Anyway, I hope people with the same problem can find help here.

Greets,

Tom.
 
Forum Index -> General Help
Go to:   
Powered by JForum 2.1.7ice © JForum Team