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";
}
When I browse to http://localhost:8080/myapp/user/home.htm I get:
*The requested resource (/myapp/user/border-template.jsp) is not available.*
and the Tomcat (6.0.26) logs, with everything set to FINE, say:
[Click] [debug] /border-template.jsp -> CLASS NOT FOUND
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
then the home.jsp itself shows up, but the border-template.jsp still isn't
surrounding it.
I thought that the external facing URI would still end with .htm even when
the underlying page is actually a jsp. But neither case really "works".
Any ideas what's going wrong? It's a clean Tomcat with nothing else
installed.
Thanks for the help,
Ari
On Thu, Feb 24, 2011 at 7:32 AM, Gilberto <[email protected]> wrote:
> You need to take this[1] into account.
>
> Regards,
>
> Gilberto
> [1]
> http://click.1134972.n2.nabble.com/State-of-JSP-support-td1567308.html#a5329326
>
>
> 2011/2/24 Ari <[email protected]>
>
> Thank you for the reply... I had looked at these but still didn't
>> understand how to set it up.
>>
>> Specifically, the jsp-support link mentions that "JSP Pages can be
>> automatically loaded like Velocity templates" but then just gives an example
>> of explicitly wiring a single class to a single jsp.
>>
>> I'd like to use the automatic wiring, as that seems like one of the
>> primary benefits of the Click framework. Is this possible to do with JSPs?
>>
>> Thanks
>> Ari
>>
>>
>> On Wed, Feb 23, 2011 at 10:05 PM, Malcolm Edgar
>> <[email protected]>wrote:
>>
>>> Please look under the Click Examples menu: General:
>>>
>>> http://click.avoka.com/click-examples/jsp/hello-world.htm
>>> http://click.avoka.com/click-examples/jsp/customer-table.htm
>>> http://click.avoka.com/click-examples/jsp/edit-customer.htm
>>> http://click.avoka.com/click-examples/jsp/navigation-a.htm
>>> http://click.avoka.com/click-examples/jsp/multi-path-demo.htm
>>>
>>> Please see:
>>>
>>> http://click.apache.org/docs/faq.html#jsp-support
>>>
>>> regadrs Malcolm Edgar
>>>
>>> On Thu, Feb 24, 2011 at 1:55 PM, Ari <[email protected]> wrote:
>>> > Hi,
>>> >
>>> > I've seen many mentions of how Click fully supports JSP, but haven't
>>> been
>>> > able to locate directions for how to actually do it.
>>> >
>>> > I saw the example of setting the template engine to FreeMarker by
>>> adding a
>>> > <template-service> element to click.xml... was wondering what would be
>>> the
>>> > equivalent way to use a JSP engine?
>>> >
>>> > I've tried simply renaming my .htm files to .jsp, but they still seem
>>> to be
>>> > using Velocity as the template engine. I also didn't see anything
>>> special
>>> > in the click.xml for the jsp examples.
>>> >
>>> > Thanks
>>> > Ari
>>> >
>>> >
>>>
>>
>>
>