You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Mon Cab <fu...@yahoo.com> on 2005/11/08 05:18:19 UTC
barfs if it's parameter is null
Hi all...
I.e any way of using the <logic:match> tag less
strictly, so that <logic:match parameter="var"
value="bla"> will not cause an exception if var is
null. At the moment I am getting:
javax.servlet.ServletException: Cannot compare null
variable to value signup
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
org.apache.jsp.DatingSignupFrame_jsp._jspService(DatingSignupFrame_jsp.java:1365)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1063)
org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:386)
org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:318)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:229)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
__________________________________
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: barfs if it's parameter is null
Posted by Mon Cab <fu...@yahoo.com>.
Nice one. Thanks Rahul.
I ended up wrapping in <logic:present> tags...
--- Rahul Akolkar <ra...@gmail.com> wrote:
> On 11/7/05, Mon Cab <fu...@yahoo.com> wrote:
> > Hi all...
> >
> > I.e any way of using the <logic:match> tag less
> > strictly, so that <logic:match parameter="var"
> > value="bla"> will not cause an exception if var is
> > null. At the moment I am getting:
> <snip/>
>
> Which is as advertised here [
>
http://struts.apache.org/struts-taglib/tagreference-struts-logic.html
> ]. Wrap in <logic:present> or use JSTL <c:if> with
> JSTL fn:substring
> in the test.
>
> -Rahul
>
>
> >
> >
> > javax.servlet.ServletException: Cannot compare
> null
> > variable to value signup
> >
> >
>
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
> <snap/>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> For additional commands, e-mail:
> user-help@struts.apache.org
>
>
__________________________________
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: barfs if it's parameter is null
Posted by Rahul Akolkar <ra...@gmail.com>.
On 11/7/05, Mon Cab <fu...@yahoo.com> wrote:
> Hi all...
>
> I.e any way of using the <logic:match> tag less
> strictly, so that <logic:match parameter="var"
> value="bla"> will not cause an exception if var is
> null. At the moment I am getting:
<snip/>
Which is as advertised here [
http://struts.apache.org/struts-taglib/tagreference-struts-logic.html
]. Wrap in <logic:present> or use JSTL <c:if> with JSTL fn:substring
in the test.
-Rahul
>
>
> javax.servlet.ServletException: Cannot compare null
> variable to value signup
>
> org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
<snap/>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: barfs if it's parameter is null
Posted by Paul Benedict <pa...@yahoo.com>.
Have you tried JSTL?
--- Mon Cab <fu...@yahoo.com> wrote:
> Hi all...
>
> I.e any way of using the <logic:match> tag less
> strictly, so that <logic:match parameter="var"
> value="bla"> will not cause an exception if var is
> null. At the moment I am getting:
>
>
> javax.servlet.ServletException: Cannot compare null
> variable to value signup
>
> org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
>
> org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
>
> org.apache.jsp.DatingSignupFrame_jsp._jspService(DatingSignupFrame_jsp.java:1365)
>
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
>
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
>
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
>
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
>
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>
> org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1063)
>
> org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)
>
> org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:386)
>
>
org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:318)
>
> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:229)
>
> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
>
> org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
>
> javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>
>
>
> __________________________________
> Yahoo! FareChase: Search multiple travel sites in one click.
> http://farechase.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
__________________________________
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org