0
votes

I was facing issues with integrating the Spring Batch admin UI with existing spring, spring batch application. I have done that successfully. I am using Spring 3.2.0.RELEASE and Spring Batch admin 1.3.1.RELEASE versions. Now I am able to see the first page with all the CSS and images, But When I navigate using the menu I get 404, I know the problem is with URL. For Home screen:

http://localhost:8089/TestMe/batch/

When I click on the Job menu I get 404

http://localhost:8089/TestMe/Jobs/

When I use the same url like this it shows the page but no CSS styling.

http://localhost:8089/TestMe/batch/Jobs/

So Issue is with URL & resources location. But where to configure these? Any sample would be great help. Thanks for reading.

P.S I have two dispatcher servlets 1 for my application and 2nd for the spring batch. I tried adding but this doesn't work either.

1

1 Answers

0
votes

It looks like you haven't configured your servlet path correctly. It defaults to / so each link will be off of the root for the app (http://localhost8089/TestMe/ in this example). To configure this correctly, update your servlet mapping in your web.xml and override the resourceService in your override application context:

<bean id="resourceService" 
      class="org.springframework.batch.admin.web.resources.DefaultResourceService">
    <property name="servletPath" value="/batch"/>
</bean>