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

2011-09-26 Thread Nichole
try a forward within index.jsp instead:

jsp:forward page=/index.vm /


On Sep 26, 1:42 pm, Stephen Johnson onepagewo...@gmail.com wrote:
 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
 athttp://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 and...@ducker.org.ukwrote:







  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-namevelocity/servlet-name
         servlet-classorg.apache.velocity.tools.view.VelocityViewServlet/
  servlet-class
  /servlet
  servlet-mapping
         servlet-namevelocity/servlet-name
         url-pattern*.vm/url-pattern
  /servlet-mapping
  welcome-file-list
         welcome-fileindex.vm/welcome-file
  /welcome-file-list

  Now, when I accesshttp://localhost:/it presents with me with a
  page that looks as I'd expect (give or take).  But when I access
 http://localhost:/index.vmit 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] Re: Servlet Mapping not working as expected

2010-01-11 Thread Peter Ondruska
You need additional mapping for /sitefeed:

servlet-mapping
servlet-nameSiteFeedServlet/servlet-name
url-pattern/sitefeed/url-pattern
/servlet-mapping


/sitefeed/* will not match /sitefeed

On Jan 11, 11:40 am, Icarus pr.a...@gmail.com wrote:
 Hi,

  I have the following issue :

  The below servlet mapping when run on the local app engine instance
 maps
  correctly forhttp://localhost:8080/sitefeed/
 but not forhttp://localhost:8080/sitefeed         !-- The '/' is not used --

 servlet
 servlet-nameSiteUploadServlet/servlet-name
 servlet-classcom.mysite.SiteUploadServlet/servlet-class
 /servlet
 servlet
 servlet-nameSiteFeedServlet/servlet-name
 servlet-classcom.mysite.SiteFeedServlet/servlet-class
 /servlet

 servlet-mapping
 servlet-nameSiteUploadServlet/servlet-name
 url-pattern/siteupload/*/url-pattern
 /servlet-mapping
 servlet-mapping
 servlet-nameSiteFeedServlet/servlet-name
 url-pattern/sitefeed/*/url-pattern
 /servlet-mapping

 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.