Nelson, I'm not sure I understand your point. Please keep in mind that ServletInfo is not "my" class - it is part of the TDK examples. I still don't know what to do.
Dan Gregorio, Nelson wrote: >Package definiton for your Screen class "ServletInfo" > >public class ServletInfo extends SecureScreen > >... > > >and What to do SecureScreen?? > >return true or false for current user. > > > >-----Mensaje original----- >De: Dan Robinson [mailto:[EMAIL PROTECTED]] >Enviado el: martes 9 de julio de 2002 16:28 >Para: Turbine Users List >Asunto: Re: HELP I'M DROWNING!!! > > >Gregorio, > >changed TR.properties to add screens: > >module.packages=vstreet.turbine.myapp.modules.screens,vstreet.turbine.myapp. >modules,vstreet.turbine.tools,org.apache.turbine.flux.modules >=================================^^^^^^^ > >restarted catalina and got same result as in earlier post. > > >Thanks, > >Dan > >Gregorio, Nelson wrote: > >>Your package is >> >>package vstreet.turbine.myapp.modules.screens; >> >> >>and your modules=vstreet.turbine.myapp.modules, .... in TR.properties >> >>Check it that. >> >>-----Mensaje original----- >>De: Dan Robinson [mailto:[EMAIL PROTECTED]] >>Enviado el: martes 9 de julio de 2002 16:03 >>Para: Turbine Users List >>Asunto: Re: HELP I'M DROWNING!!! >> >> >>Maik, >> >>No luck (frustrated gurgling noise #(*&#&(#@ ). >> >>My java files is: >> >>public class ServletInfo extends SecureScreen >>{ >> /** >> * Place all the data object in the context >> * for use in the template. >> */ >> public void doBuildTemplate( RunData data, Context context ) >> { >> context.put("fooValue", "a Fool"); >> context.put("serverName", data.getRequest().getServerName()); >>// context.put("serverName", TurbineServlet.getServerName()); >> } >>} >> >>My ServletInfo.vm is: >> >>Servlet Info: >> >>$serverName >> >><p>Foo Info: $fooValue </p> >> >>Output is: >> >>Servlet Info: $serverName >>Foo Info: $fooValue >> >>Velocity log shows: >> >>Tue Jul 09 12:58:20 PDT 2002 [warn] >>org.apache.velocity.runtime.exception.ReferenceException: reference : >>template = screens/ServletInfo.vm [line 3,column 1] : $serverName is not >>a valid reference. >>Tue Jul 09 12:58:20 PDT 2002 [warn] >>org.apache.velocity.runtime.exception.ReferenceException: reference : >>template = screens/ServletInfo.vm [line 5,column 14] : $fooValue is not >>a valid reference. >> >>Dan >> >> >>[EMAIL PROTECTED] wrote: >> >>>Hi Dan, >>> >>>your setup is ok, I experience the same problem. Seems like the >>>ServletService is not being initialized correctly (allthough it claims >>>initialization in the log). >>> >>>If you change ServletInfo.java to use data.getRequest().getServerName() >>>instead of TurbineServlet.getServerName() it works. It is really the >>>same if you look at the Turbine 2.1 sources... >>> >>>Take care, >>>-Maik >>>Dan Robinson <[EMAIL PROTECTED]> schrieb am 09.07.2002, 20:25:10: >>> >>>>Maik, >>>> >>>> >>>>Currently I've got: >>>> >>>>myapp\templates\app\screens\ServletInfo.vm >>>>myapp\WEB-INF\classes\vstreet\turbine\myapp\modules\screens\ServletInfo.c >>>> >l > >>ass >> >>>>myapp\WEB-INF\src\java\vstreet\turbine\myapp\modules\screens\ServletInfo. >>>> >j > >>ava >> >>>>I have no idea what the "appropriate location" would be - this seems to >>>>be the standard explained in the doco. >>>> >>>>Thanks for your assistance, >>>> >>>>Dan >>>> >>>>[EMAIL PROTECTED] wrote: >>>> >>>>>Hi Dan, >>>>> >>>>>>In 2.1 flavor of TDK the ServletInfo.vm outputs: >>>>>> >>>>>>Servlet Info: $serverName >>>>>> >>>>>The corresponding ServletInfo.java is not being found--it puts the >>>>>variable "serverName" in the template's context. >>>>> >>>>>Copy the .java file to the appropriate location and modify the package >>>>>name accordingly. >>>>> >>>>>HTH, >>>>>-Maik >>>>> >>>>>-- >>>>>To unsubscribe, e-mail: >>>>>For additional commands, e-mail: >>>>> >>>>> >>>>> >>>>-- >>>>To unsubscribe, e-mail: >>>>For additional commands, e-mail: >>>> >>>-- >>>To unsubscribe, e-mail: >>> >><mailto:[EMAIL PROTECTED]> >> >>>For additional commands, e-mail: >>> >><mailto:[EMAIL PROTECTED]> >> >>> >> >> >>-- >>To unsubscribe, e-mail: >><mailto:[EMAIL PROTECTED]> >>For additional commands, e-mail: >><mailto:[EMAIL PROTECTED]> >> >>-- >>To unsubscribe, e-mail: >> ><mailto:[EMAIL PROTECTED]> > >>For additional commands, e-mail: >> ><mailto:[EMAIL PROTECTED]> > >> >> > > > >-- >To unsubscribe, e-mail: ><mailto:[EMAIL PROTECTED]> >For additional commands, e-mail: ><mailto:[EMAIL PROTECTED]> > >-- >To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> >For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
