File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes how to run servlet in eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Reply locked New topic
Author

how to run servlet in eclipse

Shanthi Mari
Greenhorn

Joined: Jul 24, 2005
Posts: 24
I am using eclipse3,tomcat 5.0.28 and Sysdeo plugin

I created a servlet program in Eclipse when I debug I get this error.


Failed to connect to remote VM.

java.io.IOException: EOF encountered during handshake
org.eclipse.jdi.internal.connect.SocketTransportImpl.PerformHandshake(SocketTransportImpl.java:151)
org.eclipse.jdi.internal.connect.SocketTransportImpl.attach(SocketTransportImpl.java:48)
org.eclipse.jdi.internal.connect.SocketAttachingConnectorImpl.attach(SocketAttachingConnectorImpl.java:103)
org.eclipse.jdt.internal.launching.SocketAttachConnector.connect(SocketAttachConnector.java:131)
org.eclipse.jdt.internal.launching.JavaRemoteApplicationLaunchConfigurationDelegate.launch(JavaRemoteApplicationLaunchConfigurationDelegate.java:75)
org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:569)
org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:788)
org.eclipse.debug.internal.ui.DebugUIPlugin$6.run(DebugUIPlugin.java:955)
org.eclipse.core.internal.jobs.Worker.run(Worker.java:66)

Is any configuration error?
Help me ...........


Sun certified Programmer (SCJP1.4)<br />SCWCD
Andrew Moores
Greenhorn

Joined: May 28, 2005
Posts: 12
I assume the servlet is running successfully in Tomcat. If so, to debug it from eclipse you need to make some changes to the tomcat start-up script along the following lines:

set JPDA_TRANSPORT=dt_socket
set JPDA_ADDRESS=6666 (You can change this number if you don't like it!)
catalina jpda start

Then, from eclipse create a new debug configuration for a remote Java application and specify the port as defined above.

When you run in debug mode Eclipse will connect to the VM used by Tomcat. Take a look at the Tomcat docs as they explain this better than I can here, but this should help you to get going.

Andrew
Jack Wiesenthaler
Ranch Hand

Joined: Jul 26, 2001
Posts: 75
Or Install Exadel studio basic version ;-)
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

This is a duplicate of the post here and will be closed.

Please don't post the same question in multiple forums.

thanks,
Dave.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to run servlet in eclipse
 
Similar Threads
Eclipse: help needed
Remote debugging from eclipse :Failed to Connect to Remote VM.Connection Refused
To debug Servlet in Eclipse
Can't connect to debugged process:Could not connect to server
Problem debug Servlet with Eclipse !!!