On 22/07/2010 09:27, Beto wrote:
> I know, it is the default. I thought that I would need to change that
> extension since now I'm using jsp.
So you want to do this?
<servlet-mapping>
<servlet-name>ClickServlet</servlet-name>
<url-pattern>*.jsp</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>ClickServlet</servlet-name>
<url-pattern>*.htm</url-pattern>
</servlet-mapping>
I haven't tested but I think this will cause problems because Click is not a
JSP engine and won't be
able to handle JSP requests directly. What Click does is forward the JSP
requests to the Servlet
container. If you apply the mapping above Click will forward the request unto
itself and go into a
recursive loop.
Can you confirm whether this is true?
>> Even if the template is a JSP, you still access the URL via .htm. Click
>> will automatically check whether the
>> template is a HTM or JSP and change the extension accordingly.
>
> I didn't find this information in your reference [1].
> Where, in the docs, can I find more about setting up jsp in click?
There is some docs on JSP here:
http://click.apache.org/docs/user-guide/html/ch02.html
>>
>> What is the reason you want to access the url via *.jsp?
> It seems intuitive, no? Veloctiy -> htm; JSP -> jsp
Sure, but as I explained above this might cause an infinite loop as Click
forwards JSP requests unto
itself.
Regards
Bob