|
View:
New views
17 Messages
—
Rating Filter:
Alert me
|
|
|
PostbackHi, Is
this a legitimate way of checking postback request?
public static boolean isPostBack() { return
FacesUtil.getFacesContext().getRenderKit().getResponseStateManager().isPostback(getFacesContext()); } Thanks, Guy. |
|
|
Re: PostbackGuy Bashan schrieb:
> > Hi, > > > > Is this a legitimate way of checking postback request? > > > > public static boolean isPostBack() > > { > > return > FacesUtil.getFacesContext().getRenderKit().getResponseStateManager().isPostback(getFacesContext()); > > } > Yep, that's the correct public API as far as I know (btw, it is JSF1.2 or later). |
|
|
RE: PostbackI am currently using 1.2.3.
It seems like there may be a problem when using hidden field binding and trying to get postback indication. Example code: ------------- <html> <head><title>Simple jsp page</title></head> <body> <f:view> <h:form> <h:inputHidden value="#{testBean.xx}" binding="#{testBean.htmlInputHidden}"/> <h:commandButton value="Ok" action="#{testBean.someAction}" /> </h:form> </f:view> </body> </html> Bean code: ---------- public class TestBean { private String xx; public TestBean() { xx = "5"; System.out.println(FacesUtil.isPostBack()); } public String someAction() { return null; } public String getXx() { return xx; } public void setXx(String xx) { this.xx = xx; } private HtmlInputHidden htmlInputHidden; public HtmlInputHidden getHtmlInputHidden() { return htmlInputHidden; } public void setHtmlInputHidden(HtmlInputHidden htmlInputHidden) { this.htmlInputHidden = htmlInputHidden; } } Page loads ok. After pressing the "Ok" button, there is a null pointer exception, because: FacesUtil.getFacesContext().getRenderKit() returns "null". When binding is removed, all works ok. Guy. -----Original Message----- From: simon.kitching@... [mailto:simon.kitching@...] Sent: Tuesday, May 06, 2008 12:01 PM To: MyFaces Discussion Subject: Re: Postback Guy Bashan schrieb: > > Hi, > > > > Is this a legitimate way of checking postback request? > > > > public static boolean isPostBack() > > { > > return > ack(getFacesContext()); > > } > Yep, that's the correct public API as far as I know (btw, it is JSF1.2 or later). |
|
|
Re: PostbackWhere are you calling getRenderKit from? You don't show it anywhere in
this piece of code. It might not work when called from a bean constructor, because that is being implicitly called when processing the component bindings. Component bindings are initialized very early in a request cycle, and I would guess that at that time no renderKit has yet been selected to handle this request. The renderKit might be the html renderkit, the xhtml renderkit, the pdf render kit, etc. And that is specified (in JSF1.2) as a property of the UIViewRoot - which only exists *after* the restore-view process has completed. But bindings are processed during restore-view. Solution: don't call it from a backing bean constructor. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Yes Q: Is top-posting bad Guy Bashan schrieb: > I am currently using 1.2.3. > > It seems like there may be a problem when using hidden field binding and > trying to get postback indication. > Example code: > ------------- > <html> > <head><title>Simple jsp page</title></head> > <body> > <f:view> > <h:form> > <h:inputHidden value="#{testBean.xx}" > binding="#{testBean.htmlInputHidden}"/> > <h:commandButton value="Ok" action="#{testBean.someAction}" /> > </h:form> > </f:view> > </body> > </html> > > Bean code: > ---------- > public class TestBean > { > private String xx; > > public TestBean() > { > xx = "5"; > > System.out.println(FacesUtil.isPostBack()); > } > > public String someAction() > { > return null; > } > > public String getXx() > { > return xx; > } > > public void setXx(String xx) > { > this.xx = xx; > } > > private HtmlInputHidden htmlInputHidden; > > public HtmlInputHidden getHtmlInputHidden() > { > return htmlInputHidden; > } > > public void setHtmlInputHidden(HtmlInputHidden htmlInputHidden) > { > this.htmlInputHidden = htmlInputHidden; > } > } > > Page loads ok. After pressing the "Ok" button, there is a null pointer > exception, because: > FacesUtil.getFacesContext().getRenderKit() returns "null". > When binding is removed, all works ok. > > Guy. > > > > -----Original Message----- > From: simon.kitching@... [mailto:simon.kitching@...] > Sent: Tuesday, May 06, 2008 12:01 PM > To: MyFaces Discussion > Subject: Re: Postback > > Guy Bashan schrieb: > >> Hi, >> >> >> >> Is this a legitimate way of checking postback request? >> >> >> >> public static boolean isPostBack() >> >> { >> >> return >> >> > FacesUtil.getFacesContext().getRenderKit().getResponseStateManager().isPostb > ack(getFacesContext()); > >> } >> >> > > Yep, that's the correct public API as far as I know (btw, it is JSF1.2 > or later). > > > |
|
|
RE: PostbackHi Simon,
I was trying Andrew's "on-load" phase listener and it seems to be working fine. Thanks. -----Original Message----- From: simon.kitching@... [mailto:simon.kitching@...] Sent: Tuesday, May 06, 2008 2:30 PM To: MyFaces Discussion Subject: Re: Postback Where are you calling getRenderKit from? You don't show it anywhere in this piece of code. It might not work when called from a bean constructor, because that is being implicitly called when processing the component bindings. Component bindings are initialized very early in a request cycle, and I would guess that at that time no renderKit has yet been selected to handle this request. The renderKit might be the html renderkit, the xhtml renderkit, the pdf render kit, etc. And that is specified (in JSF1.2) as a property of the UIViewRoot - which only exists *after* the restore-view process has completed. But bindings are processed during restore-view. Solution: don't call it from a backing bean constructor. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Yes Q: Is top-posting bad Guy Bashan schrieb: > I am currently using 1.2.3. > > It seems like there may be a problem when using hidden field binding and > trying to get postback indication. > Example code: > ------------- > <html> > <head><title>Simple jsp page</title></head> > <body> > <f:view> > <h:form> > <h:inputHidden value="#{testBean.xx}" > binding="#{testBean.htmlInputHidden}"/> > <h:commandButton value="Ok" action="#{testBean.someAction}" /> > </h:form> > </f:view> > </body> > </html> > > Bean code: > ---------- > public class TestBean > { > private String xx; > > public TestBean() > { > xx = "5"; > > System.out.println(FacesUtil.isPostBack()); > } > > public String someAction() > { > return null; > } > > public String getXx() > { > return xx; > } > > public void setXx(String xx) > { > this.xx = xx; > } > > private HtmlInputHidden htmlInputHidden; > > public HtmlInputHidden getHtmlInputHidden() > { > return htmlInputHidden; > } > > public void setHtmlInputHidden(HtmlInputHidden htmlInputHidden) > { > this.htmlInputHidden = htmlInputHidden; > } > } > > Page loads ok. After pressing the "Ok" button, there is a null pointer > exception, because: > FacesUtil.getFacesContext().getRenderKit() returns "null". > When binding is removed, all works ok. > > Guy. > > > > -----Original Message----- > From: simon.kitching@... [mailto:simon.kitching@...] > Sent: Tuesday, May 06, 2008 12:01 PM > To: MyFaces Discussion > Subject: Re: Postback > > Guy Bashan schrieb: > >> Hi, >> >> >> >> Is this a legitimate way of checking postback request? >> >> >> >> public static boolean isPostBack() >> >> { >> >> return >> >> > > ack(getFacesContext()); > >> } >> >> > > Yep, that's the correct public API as far as I know (btw, it is JSF1.2 > or later). > > > |
|
|
Re: Postbackhi,
could you post your solution? i'm struggling with a similar problem. thx On Tue, 06 May 2008 18:54:42 +0200, Guy Bashan <guy.bashan@...> wrote: > Hi Simon, > > I was trying Andrew's "on-load" phase listener and it seems to be working > fine. > > Thanks. > > -----Original Message----- > From: simon.kitching@... [mailto:simon.kitching@...] > Sent: Tuesday, May 06, 2008 2:30 PM > To: MyFaces Discussion > Subject: Re: Postback > > Where are you calling getRenderKit from? You don't show it anywhere in > this piece of code. > > It might not work when called from a bean constructor, because that is > being implicitly called when processing the component bindings. > Component bindings are initialized very early in a request cycle, and I > would guess that at that time no renderKit has yet been selected to > handle this request. > > The renderKit might be the html renderkit, the xhtml renderkit, the pdf > render kit, etc. And that is specified (in JSF1.2) as a property of the > UIViewRoot - which only exists *after* the restore-view process has > completed. But bindings are processed during restore-view. > > Solution: don't call it from a backing bean constructor. > > A: Because it messes up the order in which people normally read text. > Q: Why is top-posting such a bad thing? > A: Yes > Q: Is top-posting bad > > > Guy Bashan schrieb: >> I am currently using 1.2.3. >> >> It seems like there may be a problem when using hidden field binding and >> trying to get postback indication. >> Example code: >> ------------- >> <html> >> <head><title>Simple jsp page</title></head> >> <body> >> <f:view> >> <h:form> >> <h:inputHidden value="#{testBean.xx}" >> binding="#{testBean.htmlInputHidden}"/> >> <h:commandButton value="Ok" action="#{testBean.someAction}" /> >> </h:form> >> </f:view> >> </body> >> </html> >> >> Bean code: >> ---------- >> public class TestBean >> { >> private String xx; >> >> public TestBean() >> { >> xx = "5"; >> >> System.out.println(FacesUtil.isPostBack()); >> } >> >> public String someAction() >> { >> return null; >> } >> >> public String getXx() >> { >> return xx; >> } >> >> public void setXx(String xx) >> { >> this.xx = xx; >> } >> >> private HtmlInputHidden htmlInputHidden; >> >> public HtmlInputHidden getHtmlInputHidden() >> { >> return htmlInputHidden; >> } >> >> public void setHtmlInputHidden(HtmlInputHidden htmlInputHidden) >> { >> this.htmlInputHidden = htmlInputHidden; >> } >> } >> >> Page loads ok. After pressing the "Ok" button, there is a null pointer >> exception, because: >> FacesUtil.getFacesContext().getRenderKit() returns "null". >> When binding is removed, all works ok. >> >> Guy. >> >> >> >> -----Original Message----- >> From: simon.kitching@... [mailto:simon.kitching@...] >> Sent: Tuesday, May 06, 2008 12:01 PM >> To: MyFaces Discussion >> Subject: Re: Postback >> >> Guy Bashan schrieb: >> >>> Hi, >>> >>> >>> >>> Is this a legitimate way of checking postback request? >>> >>> >>> >>> public static boolean isPostBack() >>> >>> { >>> >>> return >>> >>> >> > FacesUtil.getFacesContext().getRenderKit().getResponseStateManager().isPostb >> ack(getFacesContext()); >> >>> } >>> >>> >> >> Yep, that's the correct public API as far as I know (btw, it is JSF1.2 >> or later). >> >> >> > |
|
|
RE: PostbackHi Arne,
Take a look at this url: http://jsf-comp.sourceforge.net/components/onload/index.html Follow the simple installation instructions. After installation you can simply add to your bean a method that does the initialization. The isPostback should work there fine. Guy. -----Original Message----- From: arne anka [mailto:dojo@...] Sent: Tuesday, May 06, 2008 8:03 PM To: MyFaces Discussion Subject: Re: Postback hi, could you post your solution? i'm struggling with a similar problem. thx On Tue, 06 May 2008 18:54:42 +0200, Guy Bashan <guy.bashan@...> wrote: > Hi Simon, > > I was trying Andrew's "on-load" phase listener and it seems to be working > fine. > > Thanks. > > -----Original Message----- > From: simon.kitching@... [mailto:simon.kitching@...] > Sent: Tuesday, May 06, 2008 2:30 PM > To: MyFaces Discussion > Subject: Re: Postback > > Where are you calling getRenderKit from? You don't show it anywhere in > this piece of code. > > It might not work when called from a bean constructor, because that is > being implicitly called when processing the component bindings. > Component bindings are initialized very early in a request cycle, and I > would guess that at that time no renderKit has yet been selected to > handle this request. > > The renderKit might be the html renderkit, the xhtml renderkit, the pdf > render kit, etc. And that is specified (in JSF1.2) as a property of the > UIViewRoot - which only exists *after* the restore-view process has > completed. But bindings are processed during restore-view. > > Solution: don't call it from a backing bean constructor. > > A: Because it messes up the order in which people normally read text. > Q: Why is top-posting such a bad thing? > A: Yes > Q: Is top-posting bad > > > Guy Bashan schrieb: >> I am currently using 1.2.3. >> >> It seems like there may be a problem when using hidden field binding and >> trying to get postback indication. >> Example code: >> ------------- >> <html> >> <head><title>Simple jsp page</title></head> >> <body> >> <f:view> >> <h:form> >> <h:inputHidden value="#{testBean.xx}" >> binding="#{testBean.htmlInputHidden}"/> >> <h:commandButton value="Ok" action="#{testBean.someAction}" /> >> </h:form> >> </f:view> >> </body> >> </html> >> >> Bean code: >> ---------- >> public class TestBean >> { >> private String xx; >> >> public TestBean() >> { >> xx = "5"; >> >> System.out.println(FacesUtil.isPostBack()); >> } >> >> public String someAction() >> { >> return null; >> } >> >> public String getXx() >> { >> return xx; >> } >> >> public void setXx(String xx) >> { >> this.xx = xx; >> } >> >> private HtmlInputHidden htmlInputHidden; >> >> public HtmlInputHidden getHtmlInputHidden() >> { >> return htmlInputHidden; >> } >> >> public void setHtmlInputHidden(HtmlInputHidden htmlInputHidden) >> { >> this.htmlInputHidden = htmlInputHidden; >> } >> } >> >> Page loads ok. After pressing the "Ok" button, there is a null pointer >> exception, because: >> FacesUtil.getFacesContext().getRenderKit() returns "null". >> When binding is removed, all works ok. >> >> Guy. >> >> >> >> -----Original Message----- >> From: simon.kitching@... [mailto:simon.kitching@...] >> Sent: Tuesday, May 06, 2008 12:01 PM >> To: MyFaces Discussion >> Subject: Re: Postback >> >> Guy Bashan schrieb: >> >>> Hi, >>> >>> >>> >>> Is this a legitimate way of checking postback request? >>> >>> >>> >>> public static boolean isPostBack() >>> >>> { >>> >>> return >>> >>> >> > >> ack(getFacesContext()); >> >>> } >>> >>> >> >> Yep, that's the correct public API as far as I know (btw, it is JSF1.2 >> or later). >> >> >> > |
|
|
Re: PostbackHi Guy,
thanks. maybe i am too stupid -- but i still don't see how you realize your bookmarkable urls ... |
|
|
RE: PostbackHi Arne,
Sorry for replying a bit late... It seems like I didn't get you right. The "on-load" was meant to solve the "postback" problem. I was getting a "null" renderer kit while querying the postback indication in the bean constructor. The "onload" solution solves this null problem. Regarding the fact that url query parameters are "getting lost" after the first posback (which I believe is your real problem) of a page. Well... This is a bit harder... As far as I understand "Seam" framework gives an elegant solution to this problem, but I have never had the chance of trying it: http://tinyurl.com/4qfr26 Another solution is to use the "pretty urls" which overcomes this problem by allowing you to define parameters as part of the url path. I do not know a direct link to the "pretty url" solution. Hope it helps, Guy. -----Original Message----- From: arne anka [mailto:dojo@...] Sent: Wednesday, May 07, 2008 5:21 PM To: MyFaces Discussion Subject: Re: Postback Hi Guy, thanks. maybe i am too stupid -- but i still don't see how you realize your bookmarkable urls ... |
|
|
tobago problems with Websphere 6.1Hi all,
I'm trying to use the tobago example in a Websphere 6.1 But I having troubles with the followings tags <layout:overview> <jsp:body> That ones are not recognized by the server Generating the following error. Error Stack: java.lang.NullPointerException at com.ibm.ws.jsp.translator.visitor.validator.ValidateVisitor.visitJspBody Start(ValidateVisitor.java:810) at com.ibm.ws.jsp.translator.visitor.JspVisitor.processJspElement(JspVisito r.java:243) at com.ibm.ws.jsp.translator.visitor.JspVisitor.processChildren(JspVisitor. java:309) at com.ibm.ws.jsp.translator.visitor.JspVisitor.processJspElement(JspVisito r.java:268) at com.ibm.ws.jsp.translator.visitor.JspVisitor.processChildren(JspVisitor. java:309) at com.ibm.ws.jsp.translator.visitor.JspVisitor.processJspElement(JspVisito r.java:139) at com.ibm.ws.jsp.translator.visitor.JspVisitor.visit(JspVisitor.java:121) at com.ibm.ws.jsp.translator.JspTranslator.processVisitors(JspTranslator.ja va:121) at com.ibm.ws.jsp.translator.utils.JspTranslatorUtil.translateJsp(JspTransl atorUtil.java:181) at com.ibm.ws.jsp.translator.utils.JspTranslatorUtil.translateJspAndCompile (JspTranslatorUtil.java:83) at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.transl ateJsp(AbstractJSPExtensionServletWrapper.java:349) at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper._check ForTranslation(AbstractJSPExtensionServletWrapper.java:317) at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.checkF orTranslation(AbstractJSPExtensionServletWrapper.java:226) at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handle Request(AbstractJSPExtensionServletWrapper.java:131) at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionProcessor.handleReque st(AbstractJSPExtensionProcessor.java:270) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppReq uestDispatcher.java:308) at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(S ervletExternalContextImpl.java:419) at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspView HandlerImpl.java:211) at org.apache.myfaces.tobago.application.ViewHandlerImpl.renderView(ViewHan dlerImpl.java:98) at org.apache.myfaces.tobago.lifecycle.RenderResponseExecutor.execute(Rende rResponseExecutor.java:56) at org.apache.myfaces.tobago.lifecycle.TobagoLifecycle.render(TobagoLifecyc le.java:141) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:140) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.ja va:966) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.ja va:907) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterCh ain.java:118) at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterC hain.java:87) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilter Manager.java:701) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilter Manager.java:646) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrap per.java:475) at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWr apper.java:463) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppReq uestDispatcher.java:308) at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:5 18) at com.ibm._jsp._index._jspService(_index.java:65) at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:85) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.ja va:966) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.ja va:907) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterCh ain.java:118) at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterC hain.java:87) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilter Manager.java:701) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilter Manager.java:646) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrap per.java:475) at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWr apper.java:463) at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(G enericServletWrapper.java:115) at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handle Request(AbstractJSPExtensionServletWrapper.java:168) at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionProcessor.handleReque st(AbstractJSPExtensionProcessor.java:270) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppReq uestDispatcher.java:308) at com.ibm.ws.webcontainer.servlet.FilterProxyServlet.dispatch(FilterProxyS ervlet.java:61) at com.ibm.ws.webcontainer.servlet.FilterProxyServlet.service(FilterProxySe rvlet.java:41) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.ja va:966) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.ja va:907) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterCh ain.java:118) at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterC hain.java:87) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilter Manager.java:701) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilter Manager.java:646) at com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.invokeFilter s(DefaultExtensionProcessor.java:628) at com.ibm.ws.wswebcontainer.extension.DefaultExtensionProcessor.invokeFilt ers(DefaultExtensionProcessor.java:145) at com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleReques t(DefaultExtensionProcessor.java:467) at com.ibm.ws.wswebcontainer.extension.DefaultExtensionProcessor.handleRequ est(DefaultExtensionProcessor.java:111) at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3129) at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:238) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811 ) at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1 433) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:9 3) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscriminatio n(HttpInboundLink.java:465) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformatio n(HttpInboundLink.java:394) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLi nk.java:274) at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscr iminators(NewConnectionInitialReadCallback.java:214) at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(Ne wConnectionInitialReadCallback.java:113) at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(Ai oReadCompletionListener.java:152) at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture. java:213) at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsync Future.java:195) at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136) at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194) at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java :741) at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1510) |
|
|
Re: tobago problems with Websphere 6.1Hello
I know of 2 productive Tobago applications running on WebSphere 6.1. WebSphere 6.1 provides its own JSF implementation -- a variant of the Sun RI. Can you check if the WAR you are deploying contains a JSF implementation (myfaces-impl + myfaces-api or jsf-impl + jsf-api) and remove it? If this doesn't work we will try reproduce the problem -- but our current download of WebSphere will last at least 60 more minutes. Best regards Arvid Bravo Villegas Salvador Francisco wrote: > Hi all, > > I'm trying to use the tobago example in a Websphere 6.1 > But I having troubles with the followings tags > <layout:overview> > <jsp:body> > > That ones are not recognized by the server > Generating the following error. > Error Stack: > java.lang.NullPointerException > at > com.ibm.ws.jsp.translator.visitor.validator.ValidateVisitor.visitJspBody > Start(ValidateVisitor.java:810) > at > com.ibm.ws.jsp.translator.visitor.JspVisitor.processJspElement(JspVisito > r.java:243) > at > com.ibm.ws.jsp.translator.visitor.JspVisitor.processChildren(JspVisitor. > java:309) > at > com.ibm.ws.jsp.translator.visitor.JspVisitor.processJspElement(JspVisito > r.java:268) > at > com.ibm.ws.jsp.translator.visitor.JspVisitor.processChildren(JspVisitor. > java:309) > at > com.ibm.ws.jsp.translator.visitor.JspVisitor.processJspElement(JspVisito > r.java:139) > at > com.ibm.ws.jsp.translator.visitor.JspVisitor.visit(JspVisitor.java:121) > at > com.ibm.ws.jsp.translator.JspTranslator.processVisitors(JspTranslator.ja > va:121) > at > com.ibm.ws.jsp.translator.utils.JspTranslatorUtil.translateJsp(JspTransl > atorUtil.java:181) > at > com.ibm.ws.jsp.translator.utils.JspTranslatorUtil.translateJspAndCompile > (JspTranslatorUtil.java:83) > at > com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.transl > ateJsp(AbstractJSPExtensionServletWrapper.java:349) > at > com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper._check > ForTranslation(AbstractJSPExtensionServletWrapper.java:317) > at > com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.checkF > orTranslation(AbstractJSPExtensionServletWrapper.java:226) > at > com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handle > Request(AbstractJSPExtensionServletWrapper.java:131) > at > com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionProcessor.handleReque > st(AbstractJSPExtensionProcessor.java:270) > at > com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppReq > uestDispatcher.java:308) > at > org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(S > ervletExternalContextImpl.java:419) > at > org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspView > HandlerImpl.java:211) > at > org.apache.myfaces.tobago.application.ViewHandlerImpl.renderView(ViewHan > dlerImpl.java:98) > at > org.apache.myfaces.tobago.lifecycle.RenderResponseExecutor.execute(Rende > rResponseExecutor.java:56) > at > org.apache.myfaces.tobago.lifecycle.TobagoLifecycle.render(TobagoLifecyc > le.java:141) > at javax.faces.webapp.FacesServlet.service(FacesServlet.java:140) > at > com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.ja > va:966) > at > com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.ja > va:907) > at > com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterCh > ain.java:118) > at > com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterC > hain.java:87) > at > com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilter > Manager.java:701) > at > com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilter > Manager.java:646) > at > com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrap > per.java:475) > at > com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWr > apper.java:463) > at > com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppReq > uestDispatcher.java:308) > at > org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:5 > 18) > at com.ibm._jsp._index._jspService(_index.java:65) > at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:85) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) > at > com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.ja > va:966) > at > com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.ja > va:907) > at > com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterCh > ain.java:118) > at > com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterC > hain.java:87) > at > com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilter > Manager.java:701) > at > com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilter > Manager.java:646) > at > com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrap > per.java:475) > at > com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWr > apper.java:463) > at > com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(G > enericServletWrapper.java:115) > at > com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handle > Request(AbstractJSPExtensionServletWrapper.java:168) > at > com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionProcessor.handleReque > st(AbstractJSPExtensionProcessor.java:270) > at > com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppReq > uestDispatcher.java:308) > at > com.ibm.ws.webcontainer.servlet.FilterProxyServlet.dispatch(FilterProxyS > ervlet.java:61) > at > com.ibm.ws.webcontainer.servlet.FilterProxyServlet.service(FilterProxySe > rvlet.java:41) > at > com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.ja > va:966) > at > com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.ja > va:907) > at > com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterCh > ain.java:118) > at > com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterC > hain.java:87) > at > com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilter > Manager.java:701) > at > com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilter > Manager.java:646) > at > com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.invokeFilter > s(DefaultExtensionProcessor.java:628) > at > com.ibm.ws.wswebcontainer.extension.DefaultExtensionProcessor.invokeFilt > ers(DefaultExtensionProcessor.java:145) > at > com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleReques > t(DefaultExtensionProcessor.java:467) > at > com.ibm.ws.wswebcontainer.extension.DefaultExtensionProcessor.handleRequ > est(DefaultExtensionProcessor.java:111) > at > com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3129) > at > com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:238) > > at > com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811 > ) > at > com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1 > 433) > at > com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:9 > 3) > at > com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscriminatio > n(HttpInboundLink.java:465) > at > com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformatio > n(HttpInboundLink.java:394) > at > com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLi > nk.java:274) > at > com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscr > iminators(NewConnectionInitialReadCallback.java:214) > at > com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(Ne > wConnectionInitialReadCallback.java:113) > at > com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(Ai > oReadCompletionListener.java:152) > at > com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture. > java:213) > at > com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsync > Future.java:195) > at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136) > at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194) > at > com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java > :741) > at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863) > at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1510) > > |
|
|
Re: Postbackhi guy,
oh well, then i did get it completely wrong -- i automatically connected your "pretty url"-problem with "postback" ... On Thu, 08 May 2008 01:48:38 +0200, Guy Bashan <guy.bashan@...> wrote: > Hi Arne, > > Sorry for replying a bit late... > It seems like I didn't get you right. The "on-load" was meant to solve > the > "postback" problem. > I was getting a "null" renderer kit while querying the postback > indication > in the bean constructor. > The "onload" solution solves this null problem. > > Regarding the fact that url query parameters are "getting lost" after the > first posback (which I believe is your real problem) of a page. Well... > This > is a bit harder... As far as I understand "Seam" framework gives an > elegant > solution to this problem, but I have never had the chance of trying it: > http://tinyurl.com/4qfr26 > Another solution is to use the "pretty urls" which overcomes this > problem by > allowing you to define parameters as part of the url path. I do not know > a > direct link to the "pretty url" solution. > > Hope it helps, > Guy. > > > -----Original Message----- > From: arne anka [mailto:dojo@...] > Sent: Wednesday, May 07, 2008 5:21 PM > To: MyFaces Discussion > Subject: Re: Postback > > Hi Guy, > > thanks. maybe i am too stupid -- but i still don't see how you realize > your bookmarkable urls ... > |
|
|
RE: tobago problems with Websphere 6.1Hi,
I check the WAR and take it off the myfaces-impl and myfaces-api from it, and send the same errors. What else can I do? Regards, Salvador B. -----Mensaje original----- De: Arvid Hülsebus [mailto:arvid.huelsebus@...] Enviado el: Jueves, 08 de Mayo de 2008 02:42 a.m. Para: MyFaces Discussion Asunto: Re: tobago problems with Websphere 6.1 Hello I know of 2 productive Tobago applications running on WebSphere 6.1. WebSphere 6.1 provides its own JSF implementation -- a variant of the Sun RI. Can you check if the WAR you are deploying contains a JSF implementation (myfaces-impl + myfaces-api or jsf-impl + jsf-api) and remove it? If this doesn't work we will try reproduce the problem -- but our current download of WebSphere will last at least 60 more minutes. Best regards Arvid Bravo Villegas Salvador Francisco wrote: > Hi all, > > I'm trying to use the tobago example in a Websphere 6.1 > But I having troubles with the followings tags > <layout:overview> > <jsp:body> > > That ones are not recognized by the server > Generating the following error. > Error Stack: > java.lang.NullPointerException > at > com.ibm.ws.jsp.translator.visitor.validator.ValidateVisitor.visitJspBody > Start(ValidateVisitor.java:810) > at > com.ibm.ws.jsp.translator.visitor.JspVisitor.processJspElement(JspVisito > r.java:243) > at > com.ibm.ws.jsp.translator.visitor.JspVisitor.processChildren(JspVisitor. > java:309) > at > com.ibm.ws.jsp.translator.visitor.JspVisitor.processJspElement(JspVisito > r.java:268) > at > com.ibm.ws.jsp.translator.visitor.JspVisitor.processChildren(JspVisitor. > java:309) > at > com.ibm.ws.jsp.translator.visitor.JspVisitor.processJspElement(JspVisito > r.java:139) > at > com.ibm.ws.jsp.translator.visitor.JspVisitor.visit(JspVisitor.java:121) > at > com.ibm.ws.jsp.translator.JspTranslator.processVisitors(JspTranslator.ja > va:121) > at > com.ibm.ws.jsp.translator.utils.JspTranslatorUtil.translateJsp(JspTransl > atorUtil.java:181) > at > com.ibm.ws.jsp.translator.utils.JspTranslatorUtil.translateJspAndCompile > (JspTranslatorUtil.java:83) > at > com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.transl > ateJsp(AbstractJSPExtensionServletWrapper.java:349) > at > com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper._check > ForTranslation(AbstractJSPExtensionServletWrapper.java:317) > at > com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.checkF > orTranslation(AbstractJSPExtensionServletWrapper.java:226) > at > com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handle > Request(AbstractJSPExtensionServletWrapper.java:131) > at > com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionProcessor.handleReque > st(AbstractJSPExtensionProcessor.java:270) > at > com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppReq > uestDispatcher.java:308) > at > org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(S > ervletExternalContextImpl.java:419) > at > org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspView > HandlerImpl.java:211) > at > org.apache.myfaces.tobago.application.ViewHandlerImpl.renderView(ViewHan > dlerImpl.java:98) > at > org.apache.myfaces.tobago.lifecycle.RenderResponseExecutor.execute(Rende > rResponseExecutor.java:56) > at > org.apache.myfaces.tobago.lifecycle.TobagoLifecycle.render(TobagoLifecyc > le.java:141) > at javax.faces.webapp.FacesServlet.service(FacesServlet.java:140) > at > com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.ja > va:966) > at > com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.ja > va:907) > at > com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterCh > ain.java:118) > at > com.ibm. |