I'm trying to get Velocity up and running with GAE, and the first
problem I'm bumping into is that servlet mapping doesn't seem to be
working as I'd expect.

I've cut down the Web.xml to its bare minimum:
<servlet>
        <servlet-name>velocity</servlet-name>
        <servlet-class>org.apache.velocity.tools.view.VelocityViewServlet</
servlet-class>
</servlet>
<servlet-mapping>
        <servlet-name>velocity</servlet-name>
        <url-pattern>*.vm</url-pattern>
</servlet-mapping>
<welcome-file-list>
        <welcome-file>index.vm</welcome-file>
</welcome-file-list>

Now, when I access http://localhost:8888/ it presents with me with a
page that looks as I'd expect (give or take).  But when I access
http://localhost:8888/index.vm it shows me the source of the page,
rather than the processed version.

With "*.vm" in the url-pattern, I'd have expected it to work exactly
the same in both cases.

I did a bit of further testing, rerouting things to my own servlet to
see when it got called and when it didn't.  If I use a uri to a file
that exists then I get the source of it.  If I use a uri for a file
that doesn't exist (i.e. http://localhost:8888/DoesntExist.vm) then my
servlet is called.

Any suggestions as to why it would be getting the file directly rather
than calling the servlet?  Is there a setting I need to configure to
tell it to call the servlet even if the file exists?

Cheers,

Andy

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to