Search |
||
uPortal Development, Part 3Posted by gsporar on February 27, 2006 at 9:04 PM PST
Part 1 of this series showed how to create a project for the uPortal Quickstart source code. The project template used was "Web Application with Existing Ant Script." This provides a significant advantage: by having the NetBeans IDE use the Quickstart's build.xml you are guaranteed that the code is built the same way both within and outside of the IDE. There is a slight inconvenience, however, to creating what the NetBeans IDE refers to as a "free-form" project. The inconvenience is that the build.xml from the Quickstart does not contain targets that the IDE needs in order to perform "IDE only" functions. Keep in mind that the NetBeans IDE uses Ant as the basis for its project system. Every time you direct the IDE to do something with a project (clean, build, deploy, run, etc.) what ends up happening is that the IDE runs an Ant target. Since the build.xml from the Quickstart has no reason to include, for example, a target that starts the NetBeans IDE's debugger then you will have to create one. If the IDE had created the build.xml file then that target (and several others) would be included. Fortunately, creating the debugger target is easy because the IDE will do it for you. The steps are: 1. Create .war and .jar Files
2. Start Tomcat in Debug ModeIn the Runtime window, expand the Servers entry and then right-click the entry for Tomcat. If Tomcat is already running, choose Stop. Right-click the entry for Tomcat and choose Start in Debug Mode . 3. Configure the Debugger Properties
4. Start the DebuggerOnce again, choose Run > Debug Main Project. The uPortal logon page should be displayed in a browser. 5. Start DebuggingSet some breakpoints, watch the code run, in other words all the usual stuff. There is helpful information on the debugger in the online guide to using the NetBeans IDE . For example, setting a breakpoint on line 227 of CSnoop.java and then logging into uPortal as demo/demo resulted in the breakpoint being hit (click for full size): When finished, select Run > Finish Debugger Session. Also, note that for web applications like uPortal, the HTTP Monitor is an additional debug tool provided by the NetBeans IDE. For more information on it, refer to the IDE's Help file.»
Comments
Comments are listed in date ascending order (oldest first)
|
||
|
|