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 16445 - Allow registering HTTP server content through module layers
Summary: Allow registering HTTP server content through module layers
Status: RESOLVED FIXED
Alias: None
Product: ide
Classification: Unclassified
Component: Internal Server (show other bugs)
Version: 3.x
Hardware: All All
: P3 blocker (vote)
Assignee: Petr Jiricka
URL:
Keywords: API
Depends on:
Blocks: 30599
  Show dependency tree
 
Reported: 2001-10-11 08:41 UTC by Petr Jiricka
Modified: 2011-09-19 23:19 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Jiricka 2001-10-11 08:41:19 UTC
Allow other modules to register servlets which the HTTP server module would 
run. This would allow extending the functionality of the internal server.

For example, currently there is a Javadoc servlet, which is a part of the HTTP 
server module, although in fact it should be a part of the Javadoc module.

The registration should be done through modules' XML layers and should contain 
at least the servlet class name and URI mapping.
Comment 1 Jan Chalupa 2001-11-27 12:40:28 UTC
Target milestone 3.3.1.
Comment 2 Rich Unger 2002-04-19 19:22:15 UTC
I'd think that the preferred way to do this would not be 
through layer files, but through web.xml files, which are 
already fully descriptive of servlet contexts.

I'm already accomplishing this in my httpserver_tomcat4 
module by having modules that wish to register servlets 
drop .war files into netbeans/system/httpserver/webapps
Comment 3 Petr Jiricka 2002-04-22 08:12:03 UTC
I agree that registering servlets through standard web.xml 
files is a better way than the layer file. [This 
enhancement request was entered when we did not 
support .war files, but with Rich's module, the situation 
is now different.]

Comment 4 Marek Grummich 2002-07-22 09:16:38 UTC
Set target milestone to TBD
Comment 5 Marek Grummich 2002-07-22 09:18:37 UTC
Set target milestone to TBD
Comment 6 _ pkuzel 2003-09-29 11:18:18 UTC
I have another use case. I need to add new content to be served in new
projects based IDE. My content is generated Javadoc in following
formats: HTTP URL, local folder and JAR archive. I need to support
showing Javadoc content in browser (possibly external). I have trouble
with the JAR archives that cannot be accessed directly by a well-known
URL.

Currently the httpserver serves global repository content. But I
cannot mount jar archive content in global repository because its
project specifics.

Conceptually, ideal registration would look like:

  at module layer:

     <file name="HTTPContentProviders">
         <file name="handlerProtocol.instance">
             <attr name="instanceCreate" .... />

  URL producer API:

    HTTPContent.createURL(String handlerProtocol, String content)

  and a callback

    InputStream serve(String content);



Besides, in Jini module I solve similar problem using generic
(unsupported) custom servlet and passing around URLs pointing to it
"http://:8082/servlet/o.n.m.j.s.ExportServlet/content_path-info".

This raw approach suits too.

I do not know WARs.