I tried restart and redeploy, but they not works.
How to make sure my change is in the classpath?
As i said before, META-INF/jsftemplating/Handler.map is generated in the
war WEB-INF/lib directory.
I use Netbean jsf wizard to create project, does the war file structure
it generated meet the requirement jsftemplate?
Thanks,
Jim
Ken Paulsen wrote:
>
> If it's still showing "Test.getResponse" on the info.jsf page, then
> one of the following must be happening:
>
> 1) Your changes aren't in the classpath.
> 2) You haven't restarted the server (or redeployed the app)
>
> The container's classloader caches things in the classpath, so
> redeploying or restarting the server is necessary. You can also use
> the ".reload" feature, which essentially redeploys... I've had
> problems w/ this feature in the past, but I think those problems have
> been addressed.
>
> Good luck!
>
> Ken
>
>
> Jim Jiang wrote:
>
>> Both answer is 'Yes'.
>> I clean and build project , the Handler.map show the 'tt.getResponse' .
>> The only difference between my step with the guide is that I copy all
>> the needed jar to <glassfish>/lib, to reduce the war size for quicker
>> deployment.
>>
>> Thanks,
>> Jim
>>
>> Anissa Lam wrote:
>>
>>> Hi Jim,
>>> After changing the name of the method, did you 'clean and build
>>> project' ?
>>> When you look at the Handler.map, does it show 'tt.getResponse'
>>> or 'Test.getResponse' ?
>>>
>>> Anissa
>>>
>>> Jim Jiang wrote:
>>>
>>>> I have a basic question about JSFTemplate.
>>>> I followed the guide 'Templating for JavaServer™ Faces Technology
>>>> -- NetBeans Project Tutorial' , and deploy and run the demo
>>>> successfully.
>>>> But when I tried to modified the demo to change handler name from
>>>> Test.getResponse to * tt.*getResponse, I got below error when
>>>> running abc.jsf.
>>>>
>>>> /javax.servlet.ServletException: Handler 'tt*.*getResponse' in
>>>> event 'beforeEncode' is not declared! Ensure the '_at_Handler'
>>>> annotation has been defined on the handler Java method, that it has
>>>> been compiled with the annotation processing tool, and that the
>>>> resulting 'META-INF/jsftemplating/Handler.map' is located in your
>>>> classpath (you may need to do a clean build)./
>>>>
>>>>
>>>> I only changed 2 place:
>>>> One is in abc.jsf: (the bold text)
>>>> <!beforeEncode
>>>> * tt.*getResponse(upper(userInput="#{in}"
>>>> response=>$pageSession{foo});
>>>> />
>>>> Another is in ExampleHandlers.java
>>>> @Handler(id="*tt*.getResponse",
>>>> input={
>>>> @HandlerInput(name="userInput", type=String.class)
>>>> },
>>>> output={
>>>> @HandlerOutput(name="response", type=String.class)
>>>> })
>>>>
>>>> I make sure that the file META-INF/jsftemplating/Handler.map is
>>>> generated in the war WEB-INF/lib directory.
>>>> but the info.jsf always show the handler I defined, it always show
>>>> Test.getReponse.
>>>>
>>>> Any other place need to be changed for just renaming handler?
>>>> BTW, I use Netbean 5.5.
>>>>
>>>> Thanks,
>>>> Jim
>>>
>>>