Tomcat "HTTP Status 403 – Forbidden" on PUT or DELETE REST request

I updated Tomcat from version 9.0.17 to 9.0.65 and I faced a problem with PUT REST request, I got an "HTTP Status 403 – Forbidden" Error. After searching from many posts I found that tomcat has a restricted methods list on its web.xml file, so I just deleted the PUT method there, I don't have "Delete" Web Services so I still restrict it. The list is almost at the end of the file

    
      restricted methods
      /*
      TRACE
      
      DELETE
      HEAD
      OPTIONS
	
      

It worked for me just by modifying that, but another solution I found was to set the parameter "readonly" to "false" on the same file, maybe it works for you.

    
        default
        org.apache.catalina.servlets.DefaultServlet
        
            debug
            0
        
         
            readonly
            false
        
        
            listings
            false
        
        1
    

After these changes, the server is accepting PUT Request... if it works for you too, celebrate like Kashiyua!!! 😀

 

Comments

Popular posts from this blog

View PDF File on APEX (Simple approach)

Set Custom APP Icon on APEX

ID Basado en trigger y secuencia para todas las tablas - Oracle