Please use JSTL library (c:url) to generate URLs.