Hi everybody,
I've got a portlet which is a java class. I want that portlet to do some 
calculations and to return the result via a JSP. I understood that the 
EcsServletElement is the way to do that. So I wrote the following code:

        public ConcreteElement getContent(RunData runData) {
                HttpServletRequest req = runData.getRequest();
                String spec = req.getParameter("spectrum");
                //Here the calculations
                StringElement base=new StringElement();
                base.addElement(new EcsServletElement(runData,"result.jsp"));
                return(base);
        }

I did it the way it's described in the Portlet Howto. It seems jetspeed can't 
find the jsp. The log is as follows:


[Tue Feb 12 12:13:04 CET 2002] -- ERROR -- EcsServletElement: Could not 
include the following URL: result.jsp : null
        Exception:  java.lang.NullPointerException
        Stack Trace follows:
        java.lang.NullPointerException
        at 
org.apache.jetspeed.util.servlet.EcsServletElement.output(EcsServletElement.java:127)
        at 
org.apache.jetspeed.util.servlet.EcsServletElement.output(EcsServletElement.java:110)
        at org.apache.ecs.ConcreteElement.output(ConcreteElement.java:322)
        at org.apache.ecs.GenericElement.toString(GenericElement.java:723)
        at 
org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java)
        at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java)

and so on.
I tried to give the absolute URL (I copied it from my browser where I get a 
result), but it isn't working. I understood, that if I give no path the JSP 
is looked for in the directory given in the TurbineResources.properties with

services.JspService.templates =/WEB-INF/templates/jsp

But it's working in no way.
Help would be much appreciated. Thanks a lot!

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to