AnsweredAssumed Answered

Problem in adding links to menu in WSF

Question asked by joeu on Jan 12, 2008
I am using WSF 1.5 for website development nad it is working fine.
Now i trying to add a new page say onLine.jsp to Services > Training > On Line. So that once clicking on On Line menu onLine.jsp page should appear.

For this purpose, I have edited NavigationTree.xml file and added there the link to Online tab and then in site configuration page submitted the updated NavigationTree.xml.
But now clicking on On Line menu it is throwing exceptions as:

org.apache.jasper.JasperException: Exception in JSP: /views/pages/sub-sub-channel.jsp:77

74:                 <jsp:include page="/views/components/bread-crumb.jsp">
75:                    <jsp:param name="channel" value="${channel}" />
76:                 </jsp:include>
77:                 <jsp:include page="/views/components/feature-items.jsp">
78:                    <jsp:param name="channel" value="${channel}" />
79:                 </jsp:include>
80:             </td>

org.apache.jasper.JasperException: Exception in JSP: /views/components/feature-items.jsp:61

58:      </tr>
59:      <tr>
60:        <td colspan="3" class="portletBody">
61:      <c:forEach items="${ds:getItemsWithTypes(pageContext,channel,'Feature')}" var="item"  varStatus="status">
62:       <!–
63:       <p><c:out value="${fn:replace(item.key,'-',' ')}"/></p>
64:       –>

javax.servlet.ServletException: javax.servlet.jsp.el.ELException: An error occurred while evaluating function "ds:getItemsWithTypes"
   org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:842)
   org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)
   org.apache.jsp.views.components.feature_002ditems_jsp._jspService(feature_002ditems_jsp.java:112)
   org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
   org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
   org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
   org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:965)
   org.apache.jsp.views.pages.sub_002dsub_002dchannel_jsp._jspService(sub_002dsub_002dchannel_jsp.java:126)
   org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
   org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
   org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
   org.apache.catalina.ssi.SSIFilter.doFilter(SSIFilter.java:125)
   org.alfresco.filter.CacheControlFilter.doFilter(CacheControlFilter.java:187)

root cause

java.lang.NullPointerException
   org.alfresco.web.content.NavigationBean.getItemsWithTypes(NavigationBean.java:207)
   sun.reflect.GeneratedMethodAccessor71.invoke(Unknown Source)
   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   java.lang.reflect.Method.invoke(Method.java:585)
   org.apache.commons.el.FunctionInvocation.evaluate(FunctionInvocation.java:172)
   org.apache.commons.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:263)
   org.apache.commons.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:190)
   org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:929)
   org.apache.jsp.views.components.feature_002ditems_jsp._jspx_meth_c_005fforEach_005f0(feature_002ditems_jsp.java:279)
   org.apache.jsp.views.components.feature_002ditems_jsp._jspService(feature_002ditems_jsp.java:97)
   org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
   org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
   org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
   org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:965)
   org.apache.jsp.views.pages.sub_002dsub_002dchannel_jsp._jspService(sub_002dsub_002dchannel_jsp.java:126)
   org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
   org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
   org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
   org.apache.catalina.ssi.SSIFilter.doFilter(SSIFilter.java:125)
   org.alfresco.filter.CacheControlFilter.doFilter(CacheControlFilter.java:187)

Can anyone tell me where I went wrong?

Outcomes