eclipse - How to include properly a css file in jsp -
i tried :
<link type="text/css" rel="stylesheet" href="${pagecontext.request.contextpath}/css/style.css" />
but css won't apply. :(
am missing obvious ?
edit :
here jsp :
<%@ page pageencoding="utf-8"%> <!doctype html> <html > <head> <meta charset="utf-8"> <title>log-in</title> <link type="text/css" rel="stylesheet" href="${pagecontext.request.contextpath}/css/style.css" /> </head> <body> <div class="login-card"> <h1>log-in</h1><br> <form> <input type="text" name="user" placeholder="username"> <input type="password" name="pass" placeholder="password"> <input type="submit" name="login" class="login login-submit" value="login"> </form> <div class="login-help"> <a href="#">register</a> • <a href="#">forgot password</a> </div> </div> </body> </html>
try this:- <jsp:include page="style.css"/>
using include directive should trick.
Comments
Post a Comment