[jboss-user] [JBoss Portal] - Re: Restricting link & form actions within the same portlet

girishramagiri do-not-reply at jboss.com
Thu Nov 16 11:53:54 EST 2006


Hi Thomas,

Thanks for your input.

Inorder to use PortletURL, I need to extend PortalJSP & use portlet taglib in the jsp which has the buttons.

After extending the PortalJSP & incorporating portlet taglib, the existing jsp along with the existing tags looks as below:
<%@ page language="java" extends="org.jboss.portal.core.servlet.jsp.PortalJsp" %>
  | <%@ page language="java" pageEncoding="UTF-8"%>
  | 
  | <%@ page import="com.myapp.web.user.bean.User" %>
  | <%@ page import="com.myapp.web.utility.apputils.component.AppConstants" %>
  | <%@ page import="com.myapp.web.utility.apputils.component.ActionConstants"%>
  | <%@ page import="com.myapp.web.resources.ApplicationProperties;"%>
  | 
  | <%@ taglib uri="http://java.sun.com/portlet" prefix="portlet" %>
  | <%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
  | <%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
  | <%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
  | <%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>
  | <%@ taglib uri="/WEB-INF/struts/tld/struts-nested.tld"	prefix="nested" %>

As soon as the jsp loads, NullPointerException is thrown as follows:

2006-11-16 22:06:20,677 DEBUG [org.apache.catalina.loader.WebappClassLoader]   Loading class from local repository
  | 
  | 2006-11-16 22:06:20,677 INFO  [STDOUT] ERROR [jsp].error:119 - Servlet.service() for servlet jsp threw exception
  | 
  | java.lang.NullPointerException
  | 
  | 	at org.jboss.portal.core.servlet.jsp.PortalJsp.service(PortalJsp.java:140)
  | 
  | 	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
  | 
  | 	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
  | 
  | 	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
  | 
  | 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
  | 
  | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
  | 
  | 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  | 
  | 	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
  | 
  | 	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
  | 
  | 	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
  | 
  | 	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
  | 
  | 	at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
  | 
  | 	at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:398)
  | 
  | 	at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:241)
  | 
  | 	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
  | 
  | 	at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
  | 
  | 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
  | 
  | 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
  | 

Is this because the portlet tags will not work if the jsp contains other functionality tags?

However I noticed that when I remove PortalJSP & portlet taglib code, the jsp compiles without any error & also loads the contents.

Many Thanks in Advance,
Girish

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3986619#3986619

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3986619



More information about the jboss-user mailing list