I used Stripes with JSP and "action bean first" approach, (all JSPs were under
/WEB-INF/jsp/)
I used action beans like:
@UrlBinding("some-url.xhtml")
public class HomeActionBean extends BaseActionBean {
@DefaultHandler
@DontValidate
public Resolution display() {
return n
As an alternative, you could create a servlet filter that maps to the
pattern *.tfl and throws an exception or forwards to an access denied
page and/or sets the appropriate HTTP error code.
Chris.
On Oct 21, 2008, at 1:11 PM, Marcus wrote:
> I used Stripes with JSP and "action bean first" ap
Or you could subclass FreemarkerServlet and test wether the response has
been forwarded or not. The code inside doGet/doPost would look something
like
if (request.getAttribute("javax.servlet.forward.servlet_path") == null)) {
response.sendError(HttpServletResponse.SC_NOT_FOUND);
} else {
s
If preventing direct access to the templates by putting them under /WEB-INF,
just like you were doing with JSPs, is enough for you, that should work.
In other words, I've switched from JSPs to FTL in the way that you describe
and it worked; I did not get 404 errors. Note that you still need the
Fr
I also expected this to work... But as it was not I become to think that it
shouldn't.
I guess something wrong with web.xml I tried several variants of web.xml here
is my current file (note that Dynamic Mapping Filter)
File location is /WEB-INF/templates/frontend/index.ftl
this one works (but
Marcus, try it with this, since you are giving the full path to your
template in your Action Bean:
web.xml:
TemplatePath
/
Freddy
-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build th
y Daoud [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2008 3:50 PM
To: stripes-users@lists.sourceforge.net
Subject: Re: [Stripes-users] freemaker templates under the WEB-INF
Marcus, try it with this, since you are giving the full path to your
template in your Action Bean:
web.xml:
Thank you guys,
After changing TemplatePath to "/" it works nice.
-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes