• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Invoking a servlet in Java

brikis98

Diamond Member
I have a servlet running on the local machine called MyServlet. I'm trying to invoke it's doPost method from a separate Java program. Using google, i found that this code should work, but i'm having problems: as soon as I reach the BufferedWriter out = .... line, I get the exception:

java.net.ConnectException: Connection refused: connect

i think i have the URL right and the servlet is running (on Tomcat), so what else could cause this issue?

 
Back
Top