0

am developing a java web application using netbeans ide(jdk 1.6, tomcat 7, mysql, spring 3.0.2, hibernate).I have a multiactioncontroller named 'maincon'. In web.xml, the home page is set as redirect.jsp. the redirect.jsp will redirect the request to index page with the help of multiaction controller. now how can I use css files in this index.jsp
I have a 'indexpageStyle.css' file in the WEB-INF/resources/styles/. if more information is required to answer this, please ask.

Thanks in advance

2 Answers 2

1

Browsers do not have direct access to resources under WEB-INF; if you really need it there (which would be weird) you'll need to stream it back yourself.

Otherwise, move it out of there, include it as a regular CSS resource, but generate the file's path using or the Spring equivalent.

Sign up to request clarification or add additional context in comments.

Comments

0

you can use like this inside jsp

<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/source/css/reset.css">

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.