How to bind a servlet to a context?
Posted
by simpatico
on Stack Overflow
See other posts from Stack Overflow
or by simpatico
Published on 2010-05-27T06:44:08Z
Indexed on
2010/05/27
12:01 UTC
Read the original article
Hit count: 201
I got
javax.servlet.ServletException: Error instantiating servlet class servlets.MemoServlet
javax.naming.NameNotFoundException: Name servlets.MemoServlet is not bound in this Context
when using
<form action="MemoServlet">
I know I could use managedbeans, but I've to use servlets.
I suspect the problem has to do with JSF.
context.xml
:
<?xml version="1.0" encoding="UTF-8"?>
<Context antiJARLocking="true" path="/MemoWeb/faces"/>
web.xml
:
<servlet-mapping>
<servlet-name>MemoServlet</servlet-name>
<url-pattern>/faces/MemoServlet</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>MemoServlet</servlet-name>
<servlet-class>servlets.MemoServlet</servlet-class>
</servlet>
I seem to have this problem all over the place:
com.sun.faces.mgbean.ManagedBeanCreationException: An error occurred performing resource injection on managed bean userManager
....
Caused by: javax.naming.NameNotFoundException: Name user.UserManager is not bound in this Context
© Stack Overflow or respective owner