css - Changes not shown after commit (Heroku Java) -
i working on java project on spring framework. project cloned heroku site. encountered 2 issues...
i have created jsp file (testing.jsp) , committed + pushed heroku. created in src/main/webapp/web-inf/jsp/testing.jsp
<servlet-name>spring</servlet-name> <url-pattern>/people/*</url-pattern> <url-pattern>/testing/*</url-pattern>
i have edited in web.xml file , pushed heroku. however, when tried view in browser, shows me same interface default people.jsp page.
my web.xml file: https://skydrive.live.com/redir?resid=2fc5994fbeb75cc5!174&authkey=!apyqgwzbkhkoaym
i have created css file , pushed heroku. have added following...
<link href="/imagecss.css" rel="stylesheet">
when view in browser, shows "http status 404 - /imagecss.css"
i new , can't seem google useful helps me in issue.
you need to:
add
mvc:resources
config inapplicationcontext.xml
following:<mvc:resources mapping="/resources/**" location="/resources/" />
create folder
css
undersrc/main/webapp/resources/
,resources
1 if haven't it.link ccs stylesheet in jsp following:
<link rel="stylesheet" href="<c:url value="/resources/css/imagecss.css" />">
remember include jstl taglig in page:
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
for point 1, can't add multiple <url-pattern>
single <servlet-mapping>
. should have this:
<servlet-mapping> <servlet-name>spring</servlet-name> <url-pattern>/people/*</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>spring</servlet-name> <url-pattern>/testing/*</url-pattern> </servlet-mapping>
Comments
Post a Comment