Wednesday Feb 07, 2007

Debug Portlet Application while using NetBeans 5.5 IDE and Portal Pack Portlet Plugin

This blog describes how you can debug a portlet application while you are using NetBeans 5.5 IDE + Portal Pack plug-in for portlet development.

This blog assumes that you are using 

Though Portal Pack plugin starts the Glassfish server automatically from NetBeans IDE, but currently it doesn't starts the server in debug mode. Using the following approach you can quickly debug your portlet application.

Set Debug mode for GlassFish Application Server

  1. Open NetBeans IDE
  2.  I am assuming that you have already added a Portlet Container instance in your NetBeans IDE
  3. Go to Runtime window . Right click on Servers > Open Source Portlet Container instance.
  4. Click "Start" to start the server.
  5. When the server is started properly. Open http://localhost:4848 in your browser.
  6. Login to GlassFish Admin Console as "admin" (default password is "adminadmin")
  7. Go to the "Application Server" page .
  8. Select the JVM Settings tab and the General option.
  9. Check the Debug Enabled box.
  10. Check debug port (default value is 9010)
  11. Select the Save button.
  12. Now  restart  the  server through  the NetBeans IDE  by the same way  you had started the server.

Configure debugger in NetBeans IDE

  1. Go to Run > Attach Debugger menu in title menu bar of NetBeans IDE.
  2.  It will pop-up a dialog box.
  3. Select Debugger as "JPDA Debugger"
  4. Select Connector as "SocketAttach"
  5. Give your machine host. (example, localhost)
  6. Give debug port no. (Default, 9010).
  7. Click Ok
  8. Now the debugger will be attached to the application server's debug port
You are now ready to debug your portlet application. Add break point in your portlet java file and start debugging. All of the above configuration steps are required once.

 

 


About

ranjansatya

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today