Re: parse directive in velocity template failing

2008-01-22 Thread James McLaughlin
On Jan 21, 2008 11:45 PM, fattymelt [EMAIL PROTECTED] wrote:

 Just to be sure...

 In the Wicket section of web.xml I am going to add the two init-params. One
 of which defines the folder in which to find my properties file, and the
 other is the actual filename. Then I can use that properties file to specify
 what my TEMPLATE_ROOT is.

Yes, that should do it.


 The only I don't get, is that I have working templates now that are in
 WEB-IN/templates. So, it isn't like velocity-contrib isn't finding them. So
 I'm not sure why the parse directive isn't looking there, too?

For some reason, the velocity.properties that comes with
wicket-velocity specifies the root as . . It probably would have
been better left as the default, which behaves as you would expect.
Maybe if you provide the full path to the template you are parsing,
the classpath loader will pick it up. Hope this helps, fattymelt.



 James McLaughlin-3 wrote:
 
  fattymelt,
  It used to work that you could jar up your templates and put them
  under WEB-INF/lib. If that doesn't work, create your own
  velocity.properties file and define the init-params
  velocityPropertiesFolder and velocity.properties in your web.xml. You
  can define there which loaders to use and what root the
  FileResourceLoader should use. Best of luck, fattymelt!
 

 --
 View this message in context: 
 http://www.nabble.com/%22parse%22-directive-in-velocity-template-failing-tp14999823p15013060.html

 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: parse directive in velocity template failing

2008-01-22 Thread fattymelt

Thanks for the help, James. I tried adding the following to my web.xml (and
putting the velocity.properties file in that location). Does this look right
to you?

servlet
servlet-nameClientApplication/servlet-name
servlet-classwicket.protocol.http.WicketServlet/servlet-class
init-param
  param-nameapplicationClassName/param-name
  param-valuecom.foo.bar.client.ClientApplication/param-value
/init-param
init-param
param-nameconfiguration/param-name
param-valuedevelopment/param-value
/init-param
init-param
param-namevelocityPropertiesFolder/param-name
param-valueWEB-INF/classes/param-value
/init-param
init-param
param-namevelocity.properties/param-name
param-valuevelocity.properties/param-value
/init-param
load-on-startup2/load-on-startup
/servlet


James McLaughlin-3 wrote:
 
 On Jan 21, 2008 11:45 PM, fattymelt [EMAIL PROTECTED] wrote:

 Just to be sure...

 In the Wicket section of web.xml I am going to add the two init-params.
 One
 of which defines the folder in which to find my properties file, and the
 other is the actual filename. Then I can use that properties file to
 specify
 what my TEMPLATE_ROOT is.
 
 Yes, that should do it.
 

 The only I don't get, is that I have working templates now that are in
 WEB-IN/templates. So, it isn't like velocity-contrib isn't finding them.
 So
 I'm not sure why the parse directive isn't looking there, too?
 
 For some reason, the velocity.properties that comes with
 wicket-velocity specifies the root as . . It probably would have
 been better left as the default, which behaves as you would expect.
 Maybe if you provide the full path to the template you are parsing,
 the classpath loader will pick it up. Hope this helps, fattymelt.
 


 James McLaughlin-3 wrote:
 
  fattymelt,
  It used to work that you could jar up your templates and put them
  under WEB-INF/lib. If that doesn't work, create your own
  velocity.properties file and define the init-params
  velocityPropertiesFolder and velocity.properties in your web.xml. You
  can define there which loaders to use and what root the
  FileResourceLoader should use. Best of luck, fattymelt!
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/%22parse%22-directive-in-velocity-template-failing-tp14999823p15019014.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: parse directive in velocity template failing

2008-01-22 Thread James McLaughlin
fattymelt,
yes that looks right. This used to work. I will try to get some time
later today to see what is going on. There should be a velocity.log
somewhere that could be helpful. wicket-velocity has an Initializer
that searches for and loads the properties file, so set a breakpoint
in init to see what is going on.

best,
jim

On Jan 22, 2008 7:56 AM, fattymelt [EMAIL PROTECTED] wrote:

 Thanks for the help, James. I tried adding the following to my web.xml (and
 putting the velocity.properties file in that location). Does this look right
 to you?

 servlet
 servlet-nameClientApplication/servlet-name
 servlet-classwicket.protocol.http.WicketServlet/servlet-class
 init-param
   param-nameapplicationClassName/param-name
   param-valuecom.foo.bar.client.ClientApplication/param-value
 /init-param
 init-param
 param-nameconfiguration/param-name
 param-valuedevelopment/param-value
 /init-param
 init-param
 param-namevelocityPropertiesFolder/param-name
 param-valueWEB-INF/classes/param-value
 /init-param
 init-param
 param-namevelocity.properties/param-name
 param-valuevelocity.properties/param-value
 /init-param
 load-on-startup2/load-on-startup
 /servlet



 James McLaughlin-3 wrote:
 
  On Jan 21, 2008 11:45 PM, fattymelt [EMAIL PROTECTED] wrote:
 
  Just to be sure...
 
  In the Wicket section of web.xml I am going to add the two init-params.
  One
  of which defines the folder in which to find my properties file, and the
  other is the actual filename. Then I can use that properties file to
  specify
  what my TEMPLATE_ROOT is.
 
  Yes, that should do it.
 
 
  The only I don't get, is that I have working templates now that are in
  WEB-IN/templates. So, it isn't like velocity-contrib isn't finding them.
  So
  I'm not sure why the parse directive isn't looking there, too?
 
  For some reason, the velocity.properties that comes with
  wicket-velocity specifies the root as . . It probably would have
  been better left as the default, which behaves as you would expect.
  Maybe if you provide the full path to the template you are parsing,
  the classpath loader will pick it up. Hope this helps, fattymelt.
 
 
 
  James McLaughlin-3 wrote:
  
   fattymelt,
   It used to work that you could jar up your templates and put them
   under WEB-INF/lib. If that doesn't work, create your own
   velocity.properties file and define the init-params
   velocityPropertiesFolder and velocity.properties in your web.xml. You
   can define there which loaders to use and what root the
   FileResourceLoader should use. Best of luck, fattymelt!
  
 
 
 

 --
 View this message in context: 
 http://www.nabble.com/%22parse%22-directive-in-velocity-template-failing-tp14999823p15019014.html

 Sent from the Wicket - User mailing list archive at Nabble.com.


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





-- 
Jim McLaughlin
Director, Software Engineering
Stonewater Control Systems
(o) 847.864.1060 x107
(c) 773.416.0994

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



Re: parse directive in velocity template failing

2008-01-21 Thread James McLaughlin
fattymelt,
It used to work that you could jar up your templates and put them
under WEB-INF/lib. If that doesn't work, create your own
velocity.properties file and define the init-params
velocityPropertiesFolder and velocity.properties in your web.xml. You
can define there which loaders to use and what root the
FileResourceLoader should use. Best of luck, fattymelt!

On Jan 21, 2008 9:27 AM, fattymelt [EMAIL PROTECTED] wrote:

 I am using a velocity template, and within it would like to use velocity's
 parse directive (to include another template within the current template)
 but it complains that it can not find the template in velocity's
 TEMPLATE_ROOT.  I have triple-checked that the template is in the same
 directory as all of my other working templates. Anyone know why velocity
 can't find a template when using parse ?

 Does Wicket specify its own template location? If so, does anyone know where
 the default Velocity TEMPLATE_ROOT would be?

 http://velocity.apache.org/engine/devel/user-guide.html#parse Velocity's
 Parse Directive

 TIA
 --
 View this message in context: 
 http://www.nabble.com/%22parse%22-directive-in-velocity-template-failing-tp14999823p14999823.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: parse directive in velocity template failing

2008-01-21 Thread fattymelt

Just to be sure...

In the Wicket section of web.xml I am going to add the two init-params. One
of which defines the folder in which to find my properties file, and the
other is the actual filename. Then I can use that properties file to specify
what my TEMPLATE_ROOT is.

The only I don't get, is that I have working templates now that are in
WEB-IN/templates. So, it isn't like velocity-contrib isn't finding them. So
I'm not sure why the parse directive isn't looking there, too?


James McLaughlin-3 wrote:
 
 fattymelt,
 It used to work that you could jar up your templates and put them
 under WEB-INF/lib. If that doesn't work, create your own
 velocity.properties file and define the init-params
 velocityPropertiesFolder and velocity.properties in your web.xml. You
 can define there which loaders to use and what root the
 FileResourceLoader should use. Best of luck, fattymelt!
 

-- 
View this message in context: 
http://www.nabble.com/%22parse%22-directive-in-velocity-template-failing-tp14999823p15013060.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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