Thank you, I think the leading "/" did it... JSP templates are loading for me now.
Thanks again, Ari On Thu, Feb 24, 2011 at 9:06 AM, Bob Schellink <[email protected]> wrote: > On 2011/02/24 15:42 PM, Ari wrote: > > Starting from the example that ships with Click 2.2.0, I stripped out the > authentication component, > > and verified that the app runs fine at > http://localhost:8080/myapp/user/home.htm. > > > > Then I renamed the home.htm and border-template.htm to jsp extensions, > and changed the corresponding > > method call in BorderPage.java to: > > > > public String getTemplate() { > > //return "border-template.htm"; > > return "border-template.jsp"; > > } > > Shouldn't you prefix with a '/' -> "/border..." > > > > > When I browse to http://localhost:8080/myapp/user/home.htm I get: > > > > _The requested resource (/myapp/user/border-template.jsp) is not > available._ > > > Have you placed your border-template.jsp under /user? > > > > > and the Tomcat (6.0.26) logs, with everything set to FINE, say: > > [Click] [debug] /border-template.jsp -> CLASS NOT FOUND > > This is correct. There is no BorderTemplate class. > > > > I then stripped out all the Velocity code and replaced with JSP > equivalents, using the > > examples/webapp/border-template.jsp as a guide, but that made no > difference. > > > > However if I browse to http://localhost:8080/myapp/user/home.jsp > > By accessing JSP directly you are bypassing Click. Remember that Click is > generally mapped to serve > '.htm' files. That is why you should still ref urls with .htm. > > Hope this helps. > > Bob >
