Skip to content

Resource not available for CSS and JS #11

@rokkam

Description

@rokkam

Bootstrap is not working for me.

The browser is trying to find the css at - not sure if this is right
http://localhost:8080/sample/person/webjars/bootstrap/3.3.6/css/bootstrap.min.css

Project Name: sample
tried a bunch of things including restarts, updating maven,...

In DispatcherServlet.xml
<mvc:resources mapping="/webjars/**" location="/webjars/" />

PersonController.java has
@RequestMapping(value = "/person/searchPerson", method=RequestMethod.GET)
public ModelAndView searchPerson() {
ModelAndView mv = new ModelAndView("/person/searchPerson","person", new Person());
return mv;
}

in JSP

in pom.xml

	<!-- bootstrap -->
	<dependency>
	    <groupId>org.webjars</groupId>
	    <artifactId>bootstrap</artifactId>
	    <version>3.3.6</version>
	</dependency>
	
	<!-- jquery -->
	<dependency>
	    <groupId>org.webjars.bower</groupId>
	    <artifactId>jquery</artifactId>
	    <version>1.9.1</version>
	</dependency> 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions