Re: [appengine-java] Servlet Mapping not working as expected

2011-09-26 Thread Stephen Johnson
My guess is that Google is interpreting them as static files and Google's
infrastructure is handling them before it reaches your app. So, read up on
excluding static files so they aren't served up by Google's infrastructure
at http://code.google.com/appengine/docs/java/config/appconfig.html

Also, I put my JSP files in my WEB-INF and you may want to do that as well
with your vm files. Then there shouldn't be any way they will be served as
static files by Google.

Stephen
CortexConnect.com


On Sun, Sep 25, 2011 at 11:50 AM, Andrew Ducker wrote:

> 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:
> 
>velocity
>org.apache.velocity.tools.view.VelocityViewServlet servlet-class>
> 
> 
>velocity
>*.vm
> 
> 
>index.vm
> 
>
> Now, when I access http://localhost:/ it presents with me with a
> page that looks as I'd expect (give or take).  But when I access
> http://localhost:/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:/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.
>
>

-- 
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.



[appengine-java] Servlet Mapping not working as expected

2011-09-26 Thread Andrew Ducker
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:

velocity
org.apache.velocity.tools.view.VelocityViewServlet


velocity
*.vm


index.vm


Now, when I access http://localhost:/ it presents with me with a
page that looks as I'd expect (give or take).  But when I access
http://localhost:/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:/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.



[appengine-java] Servlet Mapping not working as expected

2010-01-11 Thread Icarus
Hi,

 I have the following issue :

 The below servlet mapping when run on the local app engine instance
maps
 correctly for http://localhost:8080/sitefeed/
but not for
http://localhost:8080/sitefeed  


SiteUploadServlet
com.mysite.SiteUploadServlet


SiteFeedServlet
com.mysite.SiteFeedServlet



SiteUploadServlet
/siteupload/*


SiteFeedServlet
/sitefeed/*


Is this an issue on the GAE ?
-- 
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-j...@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.