top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

Getting 405 status from local Tomcat on Windows

+1 vote
88 views

I am running Tomcat 7.0.41 on a Windows laptop (8.1 Pro). I recently reinstalled the Windows and since re-installing tomcat and my server application, it runs fine when I connect to it from a web browser.

However, when I tell my desktop client app to connect to the server, it fails on the initial connection with a 405status. I am running the server is debug, from Eclipse, and have put breakpoints in the doGet, doPost, and doPut methods of my ControllerServlet class that extends the java.servlet.http.HttpServlet. None of these breakpoints fire before the client gets back the 405 status. (the client works fine if connecting to the real server running tomcat 6 on an Ubuntu server.)

I can find no place locally where verb filtering is being configured.

Any suggestions?

posted May 30, 2014 by Jai Prakash

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

1 Answer

0 votes

You can configure an access log and look there for what request line your client is actually sending.

If your request line is no starting with "GET ", "POST " or "PUT " then none of doGet() doPost(), doPut() methods can be called.

You can put a breakpoint in javax.servlet.http.HttpServer.service() or in org.apache.catalina.connector.CoyoteAdapter class.

I hope this would be helpful for you.

answer May 30, 2014 by Naveena Garg
Similar Questions
+2 votes

I'm receiving the following exception:

java.net.SocketException: "Permission denied": connect

when instantiating a Socket from a servlet:

final Socket smtpSocket = new Socket(mailTransportHost, mailTransportPort);

This application was running as a service under Windows Server 3003 R2 32-bits. After migrating it to Windows Server 2008 R2 64-bit, I cannot longer establish connection with the smtp server.

This only happen when running Tomcat as a service. Running as a standalone (starting it up using startup.bat) works fine. No exception instantiating Socket, emails are sent.

Environment:

 - Windows Server 2008 R2 64-bit
 - Tomcat 7.0.39
 - jdk1.6.0_33-x64
+1 vote

My development setup is Win7 while my production is RHEL6. Both of the environments have the same settings in conf/logging.properties but the files in logs/ are slightly different.

The access logs are named the same way. But on RHEL there's no tomcat7-stdout or tomcat7-stderr log files. Just 'catalina.out.YEAR.MO.DY' and the cumulative "catalina.out" with no date.

What accounts for the differences? Also, how would you stop logging to the 'catalina.out' file. It gets unusably gigantic within a few days.

0 votes

I'm trying to install tomcat service for Windows 7 manually on my system through command prompt.

I tried with">>service.bat install MyProject" but it looks like service doesn't get installed properly because I can see the service in the list but when I start it, it throws error.

Any idea on what could be the issue?

I'm not using tomcat's installer for windows as I would like to bundle it along with my project installer with bundled Java as well. I could use other Windows batch scripts of starting and shutting down tomcat which work well.

0 votes

I have a KVM machine with CentOS 6.4 (64bit), I have a Linux guest running well on this, I created a Windows 2008 R2 guest and once I start it, after sometime all the host memory get exhausted and both the guests (linux+win) killed.

Host has 32 GB RAM, 8 GB is allocated to Linux guest and 8 GB to Windows. Any idea? anyone experienced similar issue?

Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...