NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

NetBeans 7 & Tomcat 7 : running the ServletStateless example? (beginner question)

 
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users
View previous topic :: View next topic  
Author Message
ivoras



Joined: 27 Jul 2011
Posts: 2

PostPosted: Wed Jul 27, 2011 11:50 pm    Post subject: NetBeans 7 & Tomcat 7 : running the ServletStateless example? (beginner question) Reply with quote

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

PostPosted: Thu Jul 28, 2011 2:46 pm    Post subject: Reply with quote

Or another question: can anyone run this example successfully?
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo