You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Leon Messerschmidt <le...@opticode.co.za> on 2001/04/18 11:36:10 UTC

How to use RawScreen

Hi,

I'm trying to create a RawScreen descendant, but I get the same error
Youngho Cho got a little while back.  Has it been fixed, or am I doing
something wrong?

I'm using the newest CVS and I'm calling <servlet>/screen/MyRawScreen which
gives:

Horrible Exception: java.lang.NullPointerException
	at
org.apache.turbine.services.template.TurbineTemplateService.getTemplateEngin
eService(TurbineTemplateService.java:502)
	at
org.apache.turbine.services.template.TurbineTemplateService.getDefaultModule
Name(TurbineTemplateService.java:525)
	at
org.apache.turbine.services.template.TurbineTemplateService.getDefaultPageNa
me(TurbineTemplateService.java:267)
	at
org.apache.turbine.services.template.TurbineTemplateService.getDefaultPage(T
urbineTemplateService.java:210)
	at
org.apache.turbine.services.template.TurbineTemplateService.getDefaultPageNa
me(TurbineTemplateService.java:341)
	at
org.apache.turbine.services.template.TurbineTemplate.getDefaultPageName(Turb
ineTemplate.java:194)
	at org.apache.turbine.Turbine.doGet(Turbine.java:425)

~ Leon


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: How to use RawScreen

Posted by Youngho Cho <yo...@nannet.co.kr>.
Sorry I missed file name.

Turbine.java

Thanks,

youngho

----- Original Message ----- 
From: Youngho Cho <yo...@nannet.co.kr>
To: <tu...@jakarta.apache.org>
Sent: Wednesday, April 18, 2001 7:19 PM
Subject: Re: How to use RawScreen


> Hi Leon,
> 
> Yes, Still I have same problem too.
> So I made a temporary patch and use it now.
> Because I'm not sure the core developers has not decided the right direction
> to sovle this issue clearly or not.
> 
> My thinking of this issue is that template screen and ECS screen has their own reserved name
> for example "screen" should go ECSscreen and "template" should go Template Service.
> I'm not sure this is good design or not 
> Anyway this patch works well.
> 
> Thanks,
> 
> youngho
> 
> @@ -421,9 +421,9 @@
>              // security purposes.  You should really never need more
>              // than just the default page.  If you do, add logic to
>              // DefaultPage to do what you want.
> -            
> +            if( ! data.hasScreen() ) {
>              String defaultPage = TurbineTemplate.getDefaultPageName(data);
> -            
> +
>              if (defaultPage == null)
>              {
>                  /*
> @@ -440,9 +440,9 @@
>                  defaultPage = TurbineResources.getString(
>                      "page.default", "DefaultPage");
>              }
> -            
> -            PageLoader.getInstance().exec(data, defaultPage);
>  
> +            PageLoader.getInstance().exec(data, defaultPage);
> +   } else { PageLoader.getInstance().exec(data , "DefaultPage"); }
> 
> 
> ----- Original Message ----- 
> From: Leon Messerschmidt <le...@opticode.co.za>
> To: <tu...@jakarta.apache.org>
> Sent: Wednesday, April 18, 2001 6:36 PM
> Subject: How to use RawScreen
> 
> 
> > Hi,
> > 
> > I'm trying to create a RawScreen descendant, but I get the same error
> > Youngho Cho got a little while back.  Has it been fixed, or am I doing
> > something wrong?
> > 
> > I'm using the newest CVS and I'm calling <servlet>/screen/MyRawScreen which
> > gives:
> > 
> > Horrible Exception: java.lang.NullPointerException
> > at
> > org.apache.turbine.services.template.TurbineTemplateService.getTemplateEngin
> > eService(TurbineTemplateService.java:502)
> > at
> > org.apache.turbine.services.template.TurbineTemplateService.getDefaultModule
> > Name(TurbineTemplateService.java:525)
> > at
> > org.apache.turbine.services.template.TurbineTemplateService.getDefaultPageNa
> > me(TurbineTemplateService.java:267)
> > at
> > org.apache.turbine.services.template.TurbineTemplateService.getDefaultPage(T
> > urbineTemplateService.java:210)
> > at
> > org.apache.turbine.services.template.TurbineTemplateService.getDefaultPageNa
> > me(TurbineTemplateService.java:341)
> > at
> > org.apache.turbine.services.template.TurbineTemplate.getDefaultPageName(Turb
> > ineTemplate.java:194)
> > at org.apache.turbine.Turbine.doGet(Turbine.java:425)
> > 
> > ~ Leon
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: turbine-user-help@jakarta.apache.org

Re: How to use RawScreen

Posted by Youngho Cho <yo...@nannet.co.kr>.
Hi Leon,

Yes, Still I have same problem too.
So I made a temporary patch and use it now.
Because I'm not sure the core developers has not decided the right direction
to sovle this issue clearly or not.

My thinking of this issue is that template screen and ECS screen has their own reserved name
for example "screen" should go ECSscreen and "template" should go Template Service.
I'm not sure this is good design or not 
Anyway this patch works well.

Thanks,

youngho

@@ -421,9 +421,9 @@
             // security purposes.  You should really never need more
             // than just the default page.  If you do, add logic to
             // DefaultPage to do what you want.
-            
+            if( ! data.hasScreen() ) {
             String defaultPage = TurbineTemplate.getDefaultPageName(data);
-            
+
             if (defaultPage == null)
             {
                 /*
@@ -440,9 +440,9 @@
                 defaultPage = TurbineResources.getString(
                     "page.default", "DefaultPage");
             }
-            
-            PageLoader.getInstance().exec(data, defaultPage);
 
+            PageLoader.getInstance().exec(data, defaultPage);
+   } else { PageLoader.getInstance().exec(data , "DefaultPage"); }


----- Original Message ----- 
From: Leon Messerschmidt <le...@opticode.co.za>
To: <tu...@jakarta.apache.org>
Sent: Wednesday, April 18, 2001 6:36 PM
Subject: How to use RawScreen


> Hi,
> 
> I'm trying to create a RawScreen descendant, but I get the same error
> Youngho Cho got a little while back.  Has it been fixed, or am I doing
> something wrong?
> 
> I'm using the newest CVS and I'm calling <servlet>/screen/MyRawScreen which
> gives:
> 
> Horrible Exception: java.lang.NullPointerException
> at
> org.apache.turbine.services.template.TurbineTemplateService.getTemplateEngin
> eService(TurbineTemplateService.java:502)
> at
> org.apache.turbine.services.template.TurbineTemplateService.getDefaultModule
> Name(TurbineTemplateService.java:525)
> at
> org.apache.turbine.services.template.TurbineTemplateService.getDefaultPageNa
> me(TurbineTemplateService.java:267)
> at
> org.apache.turbine.services.template.TurbineTemplateService.getDefaultPage(T
> urbineTemplateService.java:210)
> at
> org.apache.turbine.services.template.TurbineTemplateService.getDefaultPageNa
> me(TurbineTemplateService.java:341)
> at
> org.apache.turbine.services.template.TurbineTemplate.getDefaultPageName(Turb
> ineTemplate.java:194)
> at org.apache.turbine.Turbine.doGet(Turbine.java:425)
> 
> ~ Leon
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org

Re: How to use RawScreen

Posted by Sean Legassick <se...@informage.net>.
In message <ne...@informage.demon.co.uk>, Sean Legassick 
<se...@informage.net> writes
>And my RawScreen screen now works. I'll check this again when I get a 
>few moments and see if I can reproduce your error.

having caught up on some more mail I see you found the problem... good 
work :)

-- 
Sean Legassick
sean@informage.net
         Je suis un homme: rien d'humain en m'est étranger

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: How to use RawScreen

Posted by Sean Legassick <se...@informage.net>.
In message <01...@taurus>, Leon Messerschmidt 
<le...@opticode.co.za> writes
>Hi,
>
>I don't really understand what you are saying.  Just adding
>page.default=DefaultPage
>has no effect.

Well as I said, I wasn't sure I remembered correctly. I merely remember 
that on updating to the latest turbine jar I had a problem with my 
RawScreens which I then fixed with a property file change, and I'm 
pretty sure it was the one I mentioned.

And my RawScreen screen now works. I'll check this again when I get a 
few moments and see if I can reproduce your error.

-- 
Sean Legassick
sean@informage.net
         As a person, nothing human can be alien to me

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: How to use RawScreen

Posted by Leon Messerschmidt <le...@opticode.co.za>.
Hi,

I don't really understand what you are saying.  Just adding
page.default=DefaultPage
has no effect.

services.VelocityService.default.page =DefaultPage
gives this:

[Wed Apr 18 16:51:13 GMT+02:00 2001] -- ERROR -- Turbine.handleException:

 Requested Screen not found:
 Turbine looked in the following modules.packages path:
 [za.co.opticode.infoportal, org.apache.turbine.modules,
net.opticode.portlets.modules]

[Wed Apr 18 16:51:13 GMT+02:00 2001] -- ERROR --
 Exception:  java.lang.ClassNotFoundException:

 Requested Screen not found:
 Turbine looked in the following modules.packages path:
 [za.co.opticode.infoportal, org.apache.turbine.modules,
net.opticode.portlets.modules]

 Stack Trace follows:
 java.lang.ClassNotFoundException:

 Requested Screen not found:
 Turbine looked in the following modules.packages path:
 [za.co.opticode.infoportal, org.apache.turbine.modules,
net.opticode.portlets.modules]

 at
org.apache.turbine.modules.ScreenLoader.getInstance(ScreenLoader.java:203)
 at
org.apache.turbine.modules.pages.DefaultPage.doBuild(DefaultPage.java:159)
 at org.apache.turbine.modules.Page.build(Page.java:90)
 at org.apache.turbine.modules.PageLoader.exec(PageLoader.java:123)
 at org.apache.turbine.Turbine.doGet(Turbine.java:444)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
 at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
 at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:160)
 at
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338
)
 at java.lang.Thread.run(Unknown Source)

----- Original Message -----
From: "Sean Legassick" <se...@informage.net>
To: <tu...@jakarta.apache.org>
Sent: Wednesday, April 18, 2001 12:38 PM
Subject: Re: How to use RawScreen


In message <03...@taurus>, Leon Messerschmidt
<le...@opticode.co.za> writes
>Hi,
>
>I'm trying to create a RawScreen descendant, but I get the same error
>Youngho Cho got a little while back.  Has it been fixed, or am I doing
>something wrong?

I think you need to add a line to TR.properties:

page.default=DefaultPage

(if I'm remembering what I did to fix this correctly).

Perhaps this property should still be set by default...


--
Sean Legassick
sean@informage.net
         Je suis un homme: rien d'humain en m'est étranger

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: How to use RawScreen

Posted by Sean Legassick <se...@informage.net>.
In message <03...@taurus>, Leon Messerschmidt 
<le...@opticode.co.za> writes
>Hi,
>
>I'm trying to create a RawScreen descendant, but I get the same error
>Youngho Cho got a little while back.  Has it been fixed, or am I doing
>something wrong?

I think you need to add a line to TR.properties:

page.default=DefaultPage

(if I'm remembering what I did to fix this correctly).

Perhaps this property should still be set by default...


-- 
Sean Legassick
sean@informage.net
         Je suis un homme: rien d'humain en m'est étranger

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org