java - Failed to load resource: the server responded with a status of 404 (Not Found) in spring mvc -


i trying load css file jsp, not loading , showing message failed load resource: server responded status of 404 (not found).the following code

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> <title>bootstrap form spring mvc example</title> <link href="<c:url value='/resources/css/bootstrap.css'/>" rel="stylesheet" media="screen"> </head> 

in configuration class have added below code:

 public void addresourcehandlers(resourcehandlerregistry registry) {         registry.addresourcehandler("/resources/**")         .addresourcelocations("/resources/");     } 

i have tried solutions, did not find what's wrong,can 1 me?

try way:

public void addresourcehandlers(resourcehandlerregistry registry) {       registry.addresourcehandler("/css/**")         .addresourcelocations("/css/");     } 

this assumes directory structure is:

src   main       java       resources         css       webapp 

the point don't specify resources level in resource handler.


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -