4
votes

I am trying to set up a development environment to test Spring Portlet MVC for development of JSR 168 conforming portlets. I have the latest STS installed, which included Spring 2.5 and Eclipse (Catalina). This has been my environment to develop with Spring MVC, and that works fine using Apache as a local server for debugging.

I found some instructions on the Pluto portal site on using Pluto as a remote debugging host for portlets. I have implemented those instructions. I am sending Eclipse into debug mode by right clicking on one of the JSPs and going into "debug as". My problem is that when I log into Pluto, it is not sending me into debug mode. I am seeing the default Pluto page as opposed to my portlet. My portlet has not been installed onto Pluto, and the instructions do not seem to require the portlet to be installed.

To help, I have a screen shot at http://www.ceruleaninc.ca/pluto_problem.jpg, showing the following:

  • Eclipse showing the remote debugging to localhost:8000
  • Tomcat showing the "Listening for transport dt_socket at address: 8000
  • The Catalina.bat jpda start command
  • The Pluto Portal screen after log in

Thanks much! I would welcome any advice on approaches to debugging portlets. I am not tied to pluto. There does seem to be a lack of detailed instructions on this topic.

1

1 Answers

0
votes

When you run Pluto in debug mode, it is an external application, so you need to connect Eclipse to that external application rather than trying to debug a JSP.
The simplest way to do this is to select the project containing your sources, right-click and select Debug Configurations.... In the dialog's left-hand pane you should see an item called Remote Java application, double-click that and a new launch configuration should appear in the right-hand pane. Ensure the host and port is correct (it defaults to localhost, 8000) and it has a memorable name (it will default to the selected resource's name) and then click Debug.

remote debug configuration screenshot http://www.nakov.com/blog/wp-content/uploads/2008/08/eclipse-remote-debug-configuration.png

Eclipse will then attempt to attach the debugger to any process listening on the specified port.

On subsequent debug runs you can the simply select Run->[name of your external configuration].