| Author |
How to use NetBeans for Servlet/JSP development
|
Mark Howard
Ranch Hand
Joined: Feb 14, 2001
Posts: 285
|
|
I am completely new in the Java IDE world, so forgive me if this question sounds a bit lame... In an attempt to familiarise myself with a Java IDE I downloaded NetBeans from the web and am trying to test a Servet/JSP web app I'd created earlier using TextPad (while preparing for SCWCD). I've configured the IDE as well as I can from the online Help documentation, and got as far as starting the internal Tomcat server, but then I get stuck. How do I actually run the servlets and JSP of my web app? Do I need to open a browser window and run from the address line, or do I initiate the servlets from within NetBeans somehow? Any help much appreciated
|
 |
Mark Howard
Ranch Hand
Joined: Feb 14, 2001
Posts: 285
|
|
Please ignore the plea for help in my previous post as I've discovered the problem I was experiencing. It seems that when you execute a servlet from within NetBeans, the request path it uses excludes the web application context name. Eg. If the web app context is called Test and the servlet is called MyTestServlet, NetBeans will open a browser with a request path of: http://localhost:8080/servlet/MyTestServlet (Note: no Test in the path) When creating a servlet from scratch within NetBeans, it defines a servlet-mapping in the deployment descriptor to ensure that the servlet is found. Sneaky. And confusing for newbies like me who are trying to use NetBeans on existing Servlet/JSP code without making any code or web.xml changes! (I suspect this may be configurable somewhere in NetBeans but I haven't come across it yet) Still, I find NetBeans quite easy to use even though I have nothing else to compare it against other than TextPad.
|
 |
 |
|
|
subject: How to use NetBeans for Servlet/JSP development
|
|
|