Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <context-param>
- <param-name>contextConfigLocation</param-name>
- <param-value>/WEB-INF/spring/root-context.xml</param-value>
- </context-param>
- <!-- Creates the Spring Container shared by all Servlets and Filters -->
- <listener>
- <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
- </listener>
- <!-- Processes application requests -->
- <servlet>
- <servlet-name>appServlet</servlet-name>
- <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
- <init-param>
- <param-name>contextConfigLocation</param-name>
- <param-value>/WEB-INF/spring/appServlet/servlet-context.xml</param-value>
- </init-param>
- <load-on-startup>1</load-on-startup>
- </servlet>
- <servlet-mapping>
- <servlet-name>appServlet</servlet-name>
- <url-pattern>/</url-pattern>
- </servlet-mapping>
- <?xml version="1.0" encoding="UTF-8"?>
- <beans:beans xmlns="http://www.springframework.org/schema/mvc"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:beans="http://www.springframework.org/schema/beans"
- xmlns:context="http://www.springframework.org/schema/context"
- xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
- <!-- Enables the Spring MVC @Controller programming model -->
- <annotation-driven />
- <!-- Handles HTTP GET requests for /resources/** by efficiently serving up static resources in the ${webappRoot}/resources directory -->
- <resources mapping="/resources/**" location="/resources/" />
- <resources mapping="/images/**" location="/images/" />
- <!-- Resolves views selected for rendering by @Controllers to .jsp resources in the /WEB-INF/views directory -->
- <beans:bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
- <beans:property name="prefix" value="/WEB-INF/views/" />
- <beans:property name="suffix" value=".jsp" />
- </beans:bean>
- <context:component-scan base-package="com.totoroads.webservice.android" />
- </beans:beans>
- @Path("/marker")
- public class GetLatLongMapMarker {
- @GET
- @Path("/doMarker")
- @Produces("application/json;charset=utf-8")
- public String doMap() {
- String carMaps = null;
- ArrayList<CarMap> mapList = new ArrayList<CarMap>();
- try {
- mapList = DBConnection.getAllMapMarker();
- Gson gson = new Gson();
- carMaps = gson.toJson(mapList);
- }
- catch (Exception e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- return carMaps;
- }
- }
- http://192.168.1.221:9999/restfulspringmvc/maker/doMarker
- 02:12:23.239 [http-bio-9999-exec-3] DEBUG o.s.web.servlet.DispatcherServlet - DispatcherServlet with name 'appServlet' processing GET request for [/restfulspringmvc/maker/doMarker]
- 02:12:23.239 [http-bio-9999-exec-3] DEBUG o.s.w.s.m.m.a.RequestMappingHandlerMapping - Looking up handler method for path /maker/doMarker
- 02:12:23.240 [http-bio-9999-exec-3] DEBUG o.s.w.s.m.m.a.RequestMappingHandlerMapping - Did not find handler method for [/maker/doMarker]
- 02:12:23.241 [http-bio-9999-exec-3] WARN o.s.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/restfulspringmvc/maker/doMarker] in DispatcherServlet with name 'appServlet'
- 02:12:23.245 [http-bio-9999-exec-3] DEBUG o.s.web.servlet.DispatcherServlet - Successfully completed request
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement