it's not clear to me from your code snippets just how the servlet is
supposed to know which template to load and merge.  how are you
telling the servlet what resource to load?  did you override the
handleRequest(...) and/or getTemplate(...) methods?  if so, what are
they doing?

On 7/27/05, Withers John Z <[EMAIL PROTECTED]> wrote:
>  
> Hello all. 
>   
> I know I've asked for help before and I know I've already asked this
> question before.  I would, normally, search through the message archive, but
> my employer has seen fit to configure our firewall to 'block' that site...
> IMHO, its because the word 'mail' appears in the host name and we're not
> supposed to visit any site that allows us to post 'webmail'. 
>   
> I'm converting an existing web application that uses Velocity to use the
> VelocityViewServlet.  In the original application, I created a base class
> that performed many of the the velocity-specific housekeeping functions that
> the various servlet in the application required.  While this works well
> enough, it doesn't support the concept of a toolbox and I think a toolbox
> would be handy.  Instead of reinventing the wheel (yet again), I'm trying to
> use VelocityViewServlet to replace the base class that I developed. 
>   
> This is what my velocity.properties file looks like: 
>   
> webapp.resource.loader.path = /WEB-INF/templates 
> velocimacro.library = Macros3.0.vm 
>   
> This is what part of my web.xml file looks like.  I've trimmed out most of
> the servlet definitions to save space: 
>   
> <web-app> 
>   <context-param> 
>    <param-name>org.apache.velocity.properties</param-name> 
>    <param-value>/WEB-INF/velocity.properties</param-value> 
>   </context-param> 
>   
>   <!-- BrowseServlet extends VelocityViewServlet to manage a cookie and to
> place results in the context 
>         based on the query part of the client's URL --> 
>   
>   <servlet> 
>    <servlet-name>browse</servlet-name> 
>    <servlet-class>BrowseServlet</servlet-class> 
>   </servlet> 
>   
>   <servlet-mapping> 
>    <servlet-name>browse</servlet-name> 
>    <url-pattern>/browse</url-pattern> 
>   </servlet-mapping> 
> </web-app> 
>   
> When the client attempts to access the URL
> http://host.com/application/browse?name=x, a message with a
> stack trace is displayed in the browser indicating that '/browse' couldn't
> be found in any resource loader.  A single index.vm doesn't seem to be
> appropriate as there are several several servlet components in the
> 'application' web-app.  What am I missing?  None of the examples provided
> with the Velocity tools seems to address this situation. 
>   
> Thanks!
>  
> John 
> ---------------------------------------------------------------------
> 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]

Reply via email to