The WEB-INF way is the standard practice. You can also assign an
impossible role to these folders in web.xml.

On May 20, 7:10 pm, Peter <appministra...@gmail.com> wrote:
> Hi,
>
> After toying with App Engine for a few hours, I've found that in order
> to hide a static file from the web content path you have to go through
> the following two steps.
>
> First, since App Engine has a special way to serve the static file,
> you have to add the xml below to appengine-web.xml to exclude it from
> being treated as static file.
>
> <static-files>
>         <exclude path="/**.xhtml" />
> </static-files>
>
> [from the doc: "Many web applications have files that are served
> directly to the user's browser, such as images, CSS stylesheets, or
> browser JavaScript code. These are known as static files because they
> do not change, and can benefit from web servers dedicated just to
> static content. App Engine serves static files from dedicated servers
> and caches."]
>
> Second, create a filter to stop the web container from serving the
> file from the web content path.
>
> <filter>
>         <filter-name>restrict</filter-name>
>         <filter-class>myapp.RestrictAccessFilter</filter-class>
> </filter>
>
> <filter-mapping>
>         <filter-name>restrict</filter-name>
>         <url-pattern>*.xhtml</url-pattern>
> </filter-mapping>
>
> I'd like to know if there are simpler ways to achieve the same
> result.  (I know files in WEB-INF are always hidden but there are
> times that it is not that convenient e.g. JSF :-)
>
> Peter
>
> --
> 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 
> athttp://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-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.

Reply via email to