NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
ivoras
Joined: 27 Jul 2011 Posts: 2
|
Posted: Wed Jul 27, 2011 11:50 pm Post subject: NetBeans 7 & Tomcat 7 : running the ServletStateless example? (beginner question) |
|
|
I'm trying to simply run the ServletStateless example from NB 7 and I'm failing in a way which looks trivial but I can't figure out.
Firstly, I have to add the "Java EE 6 Web" library to the project (but not package it because Tomcat is providing j2ee libraries), and both the build and the deployment proceed ok. This is the only modification to the example project.
However, simply running the example results in a HTTP/500 error with the messages:
javax.servlet.ServletException: Error instantiating servlet class servlet.stateless.Servlet2Stateless
... backtrace
javax.naming.NameNotFoundException: Name servlet.stateless.Servlet2Stateless is not bound in this Context
... backtrace.
The URL the NetBeans is starting is http://localhost:8084/s/servlet, which judging by the code looks ok:
@WebServlet(name="Servlet", urlPatterns={"/servlet"})
public class Servlet2Stateless extends HttpServlet {
...
and the sun-web.xml contains <context-root>/s</context-root>.
Any ideas? |
|
| Back to top |
|
 |
ivoras
Joined: 27 Jul 2011 Posts: 2
|
Posted: Thu Jul 28, 2011 2:46 pm Post subject: |
|
|
| Or another question: can anyone run this example successfully? |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|