This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 60503 - Can't Create a new servlet!
Summary: Can't Create a new servlet!
Status: RESOLVED DUPLICATE of bug 60908
Alias: None
Product: javaee
Classification: Unclassified
Component: Code (show other bugs)
Version: 4.x
Hardware: All Windows XP
: P3 blocker (vote)
Assignee: Milan Kuchtiak
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-24 20:50 UTC by zwollner
Modified: 2010-01-12 02:10 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description zwollner 2005-06-24 20:50:11 UTC
If I goto File > New File, then chose Web and then Servlet and hit next, Nothing
Happens!!! also if I right click on a package and goto New > Servlet, Nothing
Happens!!

I used to love netBeans but ever since I upgraded to 4.1 I've had nothing but
problems (I'd almost be more productive using notepad!). they better release a
new version Soon! or as much as I'd hate to I may switch to Eclipse.
Comment 1 Jiri Kovalsky 2005-06-27 06:40:12 UTC
Can you please try this again with new userdir (netbeans.exe -userdir C:\abcd) ?
Since it works fine for me in FCS build #200505031930 of NetBeans 4.1 I would
say that your installation got broken. Also what kind of project do you have
opened when creating new servlet ?
Comment 2 Jaroslav Pospisil 2005-06-27 09:09:14 UTC
Could you please specify build number and jdk version you are using?I can't
reproduce it either on 4.1fcs or latest dev build.
Comment 3 zwollner 2005-06-27 14:31:29 UTC
Build: 200505031930
JDK: 1.4.2_06

The project I have open is a Web App that I imported from sources.

I just created a new blank web app and I can create a new servlet just fine. why
woun't it work on the other one?
Comment 4 zikmund 2005-07-11 16:15:08 UTC
Could you please try it with clean userdir? If it is really project specific
bug, could you please send me (privately) your project? Thanks!
Comment 5 zwollner 2005-07-11 16:26:23 UTC
I tried it with a clean userdir and still no luck, and I can't send you the
project, it contains some sensitive data and I don't think the company I work
for would like that.
Anyway, I've uninstalled 4.1 and am now using 4.0, I miss some of the features
of 4.1, but 4.0 is much more stable.
Comment 6 zikmund 2005-07-11 16:48:33 UTC
Is there a chance try to delete most of the project's JSPs and classes and send
only a simple skeleton which reproduces the bug?
Comment 7 zikmund 2005-07-13 09:25:32 UTC
I found the problem - you have non-standard Web application structure (non
Jakarta structure) which is not supported by NetBeans. Servlet wizard throws NPE
when it can't find web.xml in WEB-INF directory under Web Pages. I filed a new
issue 60908 with clear description of NPE problem.
For your case I'd recommend move web.xml to jsp/WEB-INF directory if it is
possible. Otherwise you could create your specific pre-build step which copies
jsp/WEB-INF/web.xml (created because of NetBeans) into src/web.xml on each build.

*** This issue has been marked as a duplicate of 60908 ***
Comment 8 zwollner 2005-07-13 14:34:44 UTC
but it shouldn't matter where the web.xml is as long as it's placed in the
correct structure during the build.
Comment 9 zikmund 2005-07-13 14:41:15 UTC
It should matter because servlets have to be added into original web.xml not
into its build copy which will be deleted on next clean ;-).