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.
Build 200503101100 1.Add appserver and enable HTTP monitor 2.Create new web module 3.Edit web.xml ans web folder to enable HTTP monitor with this module(check the help/HTTP Monitor/Setting up...) 4.Run module once without open HTTP monitor window(default) 5. ERROR: HTTP monitor window won't appear and even if it's opened afterwards,no record is there. NOTICE: HTTP server is not running,if I check it - appserver doesn't start HTTP server.
Easy to do, see how Tomcat module does this org.netbeans.modules.tomcat5.ide.MonitorSupport: private static URL getSampleHTTPServerURL() { FileSystem fs = Repository.getDefault().getDefaultFileSystem(); FileObject fo = fs.findResource("HTTPServer_DUMMY"); if (fo == null) { return null; } URL u = URLMapper.findURL(fo, URLMapper.NETWORK); return u; }
I am lost. Easy to do where? What to do? Did you add the necessary jar for this to work also? This is not described in your secenario. need more info asap.
I ve added the needed jar and also created the filter in web.xml as is described in help.I've checked all and tested it also case with open HTTP monitor window,when it works O.K.
which needed jar? i.e one or two: httpmonitor and schema2beans? For app server, schema2beans should not be added. What does it mean that "HTTP Server" is not running? Which one? the one from NetBeans? Hw a plugin can start programatically the internal server? Based on wich information?
O.K. I'll write it step by step. 1) I added the appserver 8.1 in Runtime tab 2) I switched to Properties of this appserver and checked Enable HTTP Monitor 3) I've created new Web module - all stay default so server was appserver 4) I consulted the Help/Contents/Servers and Databases/HTTP monitor/Setting up the HTTP monitor 5)I opened the web.xml and inserted filter: <filter> <filter-name>HTTPMonitorFilter</filter-name> <filter-class>org.netbeans.modules.web.monitor.server.MonitorFilter</filter-class> <init-param> <param-name>netbeans.monitor.ide</param-name> <param-value>localhost:8082 </param-value> </init-param> </filter> <filter-mapping> <filter-name>HTTPMonitorFilter</filter-name> <url-pattern>/*</url-pattern> <dispatcher>REQUEST</dispatcher> <dispatcher>FORWARD</dispatcher> <dispatcher>INCLUDE</dispatcher> <dispatcher>ERROR</dispatcher> </filter-mapping> 6) Since I used SJS appserver 8.1,I only added IDE-install-directory/enterprise1/modules/ext/org-netbeans-modules-web-httpmonitor.jar to WEB-INF/lib of my web module. 7) I started application by clicking on Run in menu and then HTTP server from Netbeans didn't started what also caused no HTTP monitor window was opened and no record there appeared. When I work with Tomcat,HTTP server is always started after I Run the web application, so I expect the same behaviour from appserver. I think we had to to either correct this or update the help and specifically say the user,he must run the HTTP server first,if he want to use HTTP monitor with appserver.
I'm forwarding oppinion of Stepan Herold: Tomcat's starts the internal http server by itself, in the MonitorSupport.getSampleHTTPServerURL method private static URL getSampleHTTPServerURL() { FileSystem fs = Repository.getDefault().getDefaultFileSystem(); FileObject fo = fs.findResource("HTTPServer_DUMMY"); if (fo == null) { return null; } URL u = URLMapper.findURL(fo, URLMapper.NETWORK); return u; } The URLMapper.findURL call causes the internal http server to startup.
our plugin does the same, but this call is in the automatic setting or http moniotr, and this bug is about manual configuration of http monitor in the web app itself... So how can the plugin knows when it deployed to configured for http monitor web apps that it needs to start the internal http monitor?
This is how it works for tomcat when you set its "http monitor enabled" option and I guess from Ludo's comment that it works the same way for appserver. To summarize it: these steps needs to be done by plugin before the server with the "http monitor enabled" option is started. 1. The httpmonitor and schema2beans jar files should be copied to the server (appserver requires only the httpmonitor jar since it already has the schema2beans jar). 2. The filter declaration should be added to the <CATALINA_BASE>/conf/web.xml. (default-web.xml for appserver). This does NOT belong to web applications web.xml! 3. plugin should then start the internal http server (the one from the runtime tab) by calling the URLMapper.findURL(fo, URLMapper.NETWORK), as described above. However, if an user wants to enable the http monitor manually, he should perform ALL the above steps by himself. In this case it is OK to add the filter definition to application's web.xml. I've just checked the ide help and the #3 step is missing. User should go to the runtime tab and start the internal "HTTP Server" manually. TO Geertjan: CC'ing Geertjan since this issue is bound to be reassinged to him. TO Jarda: could you please check whether it works for appserver with "http monitor enabled" option as described? I mean w/o copying or tweaking the web.xml.
Cannot reproduce in build 200503170655,probably fixed. Reassigning to Geertjan,help should be updated.
Fixed in "Setting up the HTTP monitor" topic. Please verify this topic very carefully.
Verified in 200504291131.