You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Zamek <za...@vili.pmmf.hu> on 2003/06/19 21:21:52 UTC

Re: I'm crazy with Default error: step ahead

Hello All,

Thanks to Henning P. Schmiedehausen, I step ahead:
I _have to_ make a Default class in my modules.pages which is inherits from 
VelocityPage. It seems my Index.vm, but there aren't any pull tools ($page, 
$contents, $ui and $link).

My TR.properties settings is (from Wiki's upgrading docs):
services.PullService.tools.per.request.refresh=true
tool.request.link=org.apache.turbine.services.pull.tool.TemplateLink
tool.request.page=org.apache.turbine.util.template.HtmlPageAttributes
tool.request.content=org.apache.turbine.services.pull.tool.ContentTool
tool.request.l10n=org.apache.turbine.services.localization.LocalizationTool
tool.request.om=org.apache.turbine.om.OMTool
tool.request.intake=org.apache.turbine.services.intake.IntakeTool
tool.global.ui=org.apache.turbine.services.pull.util.UIManager

and my Velocity settings:

services.VelocityService.template.extension=vm
services.VelocityService.default.page = VelocityPage
services.VelocityService.default.screen=VelocityScreen
services.VelocityService.default.layout = VelocityOnlyLayout
services.VelocityService.default.navigation=VelocityNavigation
services.VelocityService.default.error.screen = VelocityErrorScreen
services.VelocityService.default.layout.template = Default.vm
services.VelocityService.runtime.log=/logs/velocity.log
services.VelocityService.input.encoding=iso-8859-2
services.VelocityService.output.encoding=iso-8859-2
services.VelocityService.velocimacro.library = GlobalMacros.vm
#   debug only!!!!!!!!!
services.VelocityService.velocimacro.library.autoreload = true
services.VelocityService.resource.loader = file
services.VelocityService.file.resource.loader.description = Velocity File 
Resource Loader
services.VelocityService.file.resource.loader.class = 
org.apache.velocity.runtime.resource.loader.FileResourceLoader
services.VelocityService.file.resource.loader.path = /templates/app, 
/templates/email
services.VelocityService.file.resource.loader.cache = false
services.VelocityService.file.resource.loader.modificationCheckInterval = 2
services.VelocityService.resource.loader = classpath
services.VelocityService.classpath.resource.loader.description = Velocity 
Classpath Resource Loader
services.VelocityService.classpath.resource.loader.class = 
org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader

I use Turbine from cvs, torque-3.0, and velocity-1.3. jvm is 1.4, and I use 
Linux Debian 3.0.


Eric Emminger wrote:
>I tried sending this message twice to you, but I don't think you got it.

Thanks, I will see my server email configuration, it may be blackholed :-(

>Did you start using 2.3 with a fresh source tree or did you use the
> source tree of your 2.2 application?
No I simple replaced turbine.jar in my WEB-INF/lib, and make changes in my 
TR.properties based on Wiki's upgrading from T2.2. to T2.3.
Are there any other differences?

Henning P. Schmiedehausen wrote:
> If you have a Default _PAGE_, you must extend Velocity_Page_, not 
> VelocityScreen

Yes, that was the problem.

>If you want to render your page with VelocityPage and
>VelocityOnlyLayout, you must _not_ have classes in your packages for
>this. The TemplateService will use its search pathes to match your
>Template (Default.vm) with the necessary screen class (VelocityScreen,
>from services.VelocityService.default.screen=VelocityScreen), page
>(VelocityPage, from services.VelocityService.default.page =
>VelocityPage) and Layout (from services.VelocityService.default.layout
>= VelocityOnlyLayout).

Sorry, If I haven't Default page in my packages, it doesn't works. In 
turbine.log:
2003-06-19 18:43:09,592 [HttpProcessor[8080][4]] DEBUG 
org.apache.turbine.services.assemblerbroker.ut
il.java.JavaBaseFactory- Trying org.apache.turbine.modules.pages.Default
2003-06-19 18:43:09,600 [HttpProcessor[8080][4]] DEBUG 
org.apache.turbine.services.assemblerbroker.ut
il.java.JavaBaseFactory- org.apache.turbine.modules.pages.Default: Not found
2003-06-19 18:43:09,600 [HttpProcessor[8080][4]] DEBUG 
org.apache.turbine.services.assemblerbroker.ut
il.java.JavaBaseFactory- Trying com.zamek.portal.modules.pages.Default
2003-06-19 18:43:09,623 [HttpProcessor[8080][4]] DEBUG 
org.apache.turbine.services.assemblerbroker.ut
il.java.JavaBaseFactory- com.zamek.portal.modules.pages.Default: Not found
2003-06-19 18:43:09,624 [HttpProcessor[8080][4]] DEBUG 
org.apache.turbine.services.assemblerbroker.ut
il.java.JavaBaseFactory- Trying com.zamek.forum.modules.pages.Default
2003-06-19 18:43:09,631 [HttpProcessor[8080][4]] DEBUG 
org.apache.turbine.services.assemblerbroker.ut
il.java.JavaBaseFactory- com.zamek.forum.modules.pages.Default: Not found
2003-06-19 18:43:09,632 [HttpProcessor[8080][4]] DEBUG 
org.apache.turbine.services.assemblerbroker.ut
il.java.JavaBaseFactory- Trying com.zamek.turbine.modules.pages.Default
2003-06-19 18:43:09,714 [HttpProcessor[8080][4]] DEBUG 
org.apache.turbine.services.assemblerbroker.ut
il.java.JavaBaseFactory- Returning: 
com.zamek.turbine.modules.pages.Default@b301f2

It seems to be, there must be an existing  Default class in *.modules.pages. 
Turbine doesn't has Default.java only DefaultPage.java, or there is an 
unknown (by me) TR.properties setting.

> One day, I will shoot the guy who put the flux sh*t into the
> default TurbineResources.properties.

>Folks, you can remove _any_ reference to flux from your application
>templates, unless you're actually using the 'flux' application from
>the TDK (which as far as I know doesn't work out of the box. :-( )

Ok I didn't use flux, and I deleted it. 

-- 
thanks,
Zoltan Zidarics programmer
PTE University Pecs, Hungary
icq: 43288694


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


Re: I'm crazy with Default error: solved, thanks to Henning

Posted by Zamek <za...@vili.pmmf.hu>.
Hello All
> >
> I'm really sure that you _don't_ need a Default class. If you don't
> supply any java classes at all, then these are used. I never create a
> custom page class and Turbine always uses VelocityPage.
>
> >services.VelocityService.default.page = VelocityPage
> >services.VelocityService.default.screen=VelocityScreen
> >services.VelocityService.default.layout = VelocityOnlyLayout
> >services.VelocityService.default.navigation=VelocityNavigation
>
> Trust me. It works. :-) You need only Templates.

Oh, I trust you!

> If you want more information, set the debug level for your turbine log
> to DEBUG and you should get some messages if Turbine cannot
> instantiate your tools.
>
> For a working example you're welcome to fetch
>
> ftp://ftp.hometree.net/pub/java/multitemplate/multitemplate-1.0.tar.gz
Yes, that is the solve. With these setting is working good. 

-- 
thanks,
----------------------------------------------------
Zoltan Zidarics programmer
PTE University Pecs, Hungary
icq: 43288694


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


Re: I'm crazy with Default error: step ahead

Posted by "Henning P. Schmiedehausen" <hp...@intermeta.de>.
Zamek <za...@vili.pmmf.hu> writes:

>Hello All,

>I _have to_ make a Default class in my modules.pages which is inherits from 
>VelocityPage. It seems my Index.vm, but there aren't any pull tools ($page, 
>$contents, $ui and $link).

These settings are for 2.3-dev. You don't have these classes in 2.2

I'm really sure that you _don't_ need a Default class. If you don't
supply any java classes at all, then these are used. I never create a
custom page class and Turbine always uses VelocityPage.

>services.VelocityService.default.page = VelocityPage
>services.VelocityService.default.screen=VelocityScreen
>services.VelocityService.default.layout = VelocityOnlyLayout
>services.VelocityService.default.navigation=VelocityNavigation

Trust me. It works. :-) You need only Templates.

If you want more information, set the debug level for your turbine log
to DEBUG and you should get some messages if Turbine cannot
instantiate your tools.

For a working example you're welcome to fetch 

ftp://ftp.hometree.net/pub/java/multitemplate/multitemplate-1.0.tar.gz

A ready-to-deploy .war is in the same directory.

	Regards
		Henning

-- 
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen          INTERMETA GmbH
hps@intermeta.de        +49 9131 50 654 0   http://www.intermeta.de/

Java, perl, Solaris, Linux, xSP Consulting, Web Services 
freelance consultant -- Jakarta Turbine Development  -- hero for hire

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