exception « URL « JSP-Servlet Q&A





1. Liferay hook: filter url giving filterstart error and current url generates exception null    stackoverflow.com

I'm trying to make an autologinfilter in Eclipse using a liferay hook. Now I've added the:

<filter>
    <filter-name>myautologinfilter</filter-name>
    <filter-class>bla.bla.xyz</filter-class>
</filter>
<filter-mapping>
    <filter-name>myautologinfilter</filter-name>
    <url-pattern>/c/login/myurl</url-pattern>
</filter-mapping>
to ...

2. Handle a non existing servlet exception    stackoverflow.com

When I type a non-existing servlet in a url an exception error

HTTP Status 404 - 
that's reasonable, but where should I handle the exception? at what scope??