Help resolve URL Pattern Issue in Spring

Completed Posted 4 years ago Paid on delivery
Completed Paid on delivery

Need assistance from developer calling the URL, http://localhost:8080/[war file]/api/vase/123 with the below configurations. I get the error "Request method 'DELETE' not supported" on the server and "405 Method not allowed" on the client. It only works if RequestMapping in class is @RequestMapping(value="/api", method = [login to view URL]). "/api/vase/123" does not work. An expert should be able to quickly resolve this issue live with me on chat.

1) [login to view URL]

<web-app xmlns:xsi="[login to view URL]" xmlns="[login to view URL]" xsi:schemaLocation="[login to view URL] [login to view URL]" id="WebApp_ID" version="3.0">

....

<servlet>

<servlet-name>abc</servlet-name>

<servlet-class>[login to view URL]</servlet-class>

<init-param>

<param-name>contextConfigLocation</param-name>

<param-value>/WEB-INF/[login to view URL]</param-value>

</init-param>

<load-on-startup>1</load-on-startup>

</servlet>

<servlet-mapping>

<servlet-name>abc</servlet-name>

<url-pattern>/api/*</url-pattern>

<url-pattern>*.do</url-pattern>

</servlet-mapping>

..

</web-app>

2) Controller class

@Controller

public class VaseDelete {

@RequestMapping(value="/api/vase/{idx}", method = [login to view URL])

public @ResponseBody void deleteFile(@PathVariable("idx") String uuid, HttpServletResponse response, HttpServletRequest request) {

try{

[login to view URL]("text/plain");

[login to view URL]().write("200");

}catch(Throwable th){

}

}

}

Java XML RESTful Java Spring Web Development

Project ID: #23489755

About the project

8 proposals Remote project Active 4 years ago

Awarded to:

javayesu

Hi I have 7+ years of experience with spring and springboot. worked with various rest APIs(get/put/post/delete) will be able to complete your work on time with the best quality

$15 USD in 1 day
(0 Reviews)
0.0

8 freelancers are bidding on average $29 for this job

kamiomar

Hi, i am a software engineer expert in java and spring boot. see my profile. we can discuss more over chat. Thanks Kamran

$30 USD in 1 day
(39 Reviews)
6.2
alexkvat

Hello, ready to help you. Can start ASAP. Done lots of projects with REST API on Spring. Message me to discuss more. Regards, Alex.

$10 USD in 7 days
(1 Review)
3.1
ankushbist23

I have the proper solution to help you in this. Worked in the same area for more than 2 years and has develoled many applications like similar structure.

$45 USD in 2 days
(0 Reviews)
0.0
hlavacekpa

I think this will be a very easy fix and it could be my first freelance job. I would really like to solve the problem and already have some ideas on mind how to make it work.

$15 USD in 1 day
(0 Reviews)
0.0