You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@click.apache.org by ha...@welinux.cl on 2010/03/20 00:46:58 UTC

A subtle bug in Documentation of DataContext

Hi,

I've loosing some minutes tracking the infamous "Current thread has no bound ObjectContext" message.

To create web.xml i copied blindly the documentation in:
http://click.apache.org/docs/extras-api/org/apache/click/extras/cayenne/DataContextFilter.html

The problem is in the name of the click servlet, which must match exactly the server-name attribute on the filter configuration.

The filter configuration says: click-servlet and must say: ClickServlet (to keep the new servlet name).

Now is:
   
    <filter-mapping>
     <filter-name>data-context-filter</filter-name>
     <servlet-name>click-servlet</servlet-name>
   </filter-mapping>

And must be:

	<filter-mapping>
		<filter-name>data-context-filter</filter-name>
		<servlet-name>ClickServlet</servlet-name>
	</filter-mapping>

I hope this can help others... in any case, thanks a lot for this project!!

Bye
Hans

-- 
Hans Poo, WeLinux S.A. http://www.welinux.cl
Oficina: 697.25.42, Celular: 09-319.93.05
Bombero Ossa # 1010, Santiago


Re: A subtle bug in Documentation of DataContext

Posted by Bob Schellink <sa...@gmail.com>.
Thanks Hans, I've updated the JavaDoc to use the names ClickServlet and DataContextFilter.

kind regards

bob


On 20/03/2010 10:46 AM, hans@welinux.cl wrote:
> Hi,
>
> I've loosing some minutes tracking the infamous "Current thread has no bound ObjectContext" message.
>
> To create web.xml i copied blindly the documentation in:
> http://click.apache.org/docs/extras-api/org/apache/click/extras/cayenne/DataContextFilter.html
>
> The problem is in the name of the click servlet, which must match exactly the server-name attribute on the filter configuration.
>
> The filter configuration says: click-servlet and must say: ClickServlet (to keep the new servlet name).
>
> Now is:
>
>      <filter-mapping>
>       <filter-name>data-context-filter</filter-name>
>       <servlet-name>click-servlet</servlet-name>
>     </filter-mapping>
>
> And must be:
>
> 	<filter-mapping>
> 		<filter-name>data-context-filter</filter-name>
> 		<servlet-name>ClickServlet</servlet-name>
> 	</filter-mapping>
>
> I hope this can help others... in any case, thanks a lot for this project!!
>
> Bye
> Hans
>