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 152526

Summary: Maven Web Project: Run File action doesn't work for servlet
Product: javaee Reporter: Milan Kuchtiak <mkuchtiak>
Component: MavenAssignee: Milos Kleint <mkleint>
Status: VERIFIED FIXED    
Severity: blocker    
Priority: P2    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on: 188700    
Bug Blocks:    

Description Milan Kuchtiak 2008-11-06 12:47:00 UTC
There is Run File action available on servlet node, or editor pop up, but execution doesn't work:

[exec:exec]
Exception in thread "main" java.lang.NoSuchMethodError: main
------------------------------------------------------------------------
[ERROR]BUILD ERROR
Comment 1 Milos Kleint 2008-11-10 09:42:43 UTC
a general issue.
For each packaging, there's only one definition of run.single and debug.single possible right now. 
We need a way to register a multitude of possible mappings for run.singe and debug.single and choose the appropriate one
at runtime. Also the user shall be allowed to customize all of these and override the defaults.
Comment 3 Quality Engineering 2008-11-22 04:45:16 UTC
Integrated into 'main-golden', will be available in build *200811220201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/fc2a43593c27
User: Milos Kleint <mkleint@netbeans.org>
Log: #152526 new framework for run.single/debug.single processing, allows to run java files as main() or servlet, run html and & jsp files differently. Could be useful for groovy&scala I guess.
unify the UI for servlet running (by copy&pasting from web project)
fix main method execution for main classes in test packages.
Comment 4 Jaroslav Pospisil 2009-04-08 12:44:02 UTC
v.