Can I debug a portlet on a Websphere Portal?

I use Rational Application Developer to develop JSR168 portlets and deploy them to Websphere Portal 6.1 . Now I want to debug them.

What I want to do is this workflow:

  • Developing a portlet and setting a breakpoint
  • Run the portal in debug mode
  • Expand the portlet using the right-click context menu in RAD
  • Open the portal, create the page, place the portlet
  • Run an action that should lead me to a breakpoint.
  • Use the debug perspective in RAD to debug

Is this possible and is there a textbook?

+4
source share
3 answers

The process of setting up a portal server on your local development machine is quite simple. At first I did not find the configuration information, but they are available on the IBM website at https://www-304.ibm.com/support/docview.wss?uid=swg21330952 for portal 6.1.

The installation took me a couple of hours, but after that you can add Portal to your Rational Application Developer and start it. It's painfully slow on an old machine, and you really want to have 4 GB of RAM for daily use.

If Portal is running, right-click your portlet project and select "Deploy Portlet ..." from the context menu. The portlet will be deployed.

I need to check if @Nachtfrost is right by clearing the temporary directories to enable the right-click deployment again.

If a right-click deployment doesn’t work for you, try this approach: (this will not allow you to debug portlets! This meant as a workaround to run them)

  • Export the portlet as WAR (right-click the project, select "Export ... from the context menu"
  • Right-click the portal in the Servers view and select Open Portal from the context menu
  • Log in as administrator, open Administration
  • Go to the web application menu (I am writing this from memory, so try to find the menu somewhere in the Portlet administration menu)
  • Install the portlet from the WAR file, like any other web application.
  • Create a new page, place your portlet on this page
+1
source

when using Rational Software Developer or Architect, you need to clean Websphere temporary directories from time to time for both the portal and the application server. Whenever something is strange, clean them.

Your workspace may be another problem. If pure temporary directories do not work for me, I create a new workspace. To reduce setup tasks for each new workspace, I do basic setup and chekc for a disruptive operation or GIT.

+1
source

I have the usual bad transfer of my Dev portal server to the real DNS name through the hosts file, but allowing it to get the IP address from the DHCP server. Weeks pass, and DHCP passes the new address, and the Debug portlet in Rational will not work . This is true even if the server is configured for a local host in Rational.

If portlet debugging worked and is now stopped, make sure your DNS on IP is valid.

0
source

Source: https://habr.com/ru/post/1346202/


All Articles