i building jsp website application struts using eclipse , tomcat server. have written jsp code , added following code make stylesheet visible jsp :
<base href="${pagecontext.request.contextpath}"> <link rel="stylesheet" type="text/css" href="styles/style.css"> my application looks fine , styled in web viewing interface of eclipse when run in browser styling not applied page. think there might rooting issue involving because of struts. can me problem?
cheers!
try this:
<link rel="stylesheet" type="text/css" href="<s:url value='/styles/style.css'/>" />
this generate correct url taking account deployment path.
Comments
Post a Comment