首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > J2EE开发 >

哪儿错了?该怎么解决

2013-10-21 
哪儿错了?a href/displayProduct?productCode8601True Life Songs and Pictures/a404 ErrorThe se

哪儿错了?
<a href="/displayProduct?productCode=8601">True Life Songs and Pictures</a>


404 Error

The server was not able to find the file you requested.





<servlet>
  <servlet-name>DisplayProductServlet</servlet-name>
  <servlet-class>music.catalog.DisplayProductServlet</servlet-class>
 </servlet>

 <servlet-mapping>
  <servlet-name>DisplayProductServlet</servlet-name>
  <url-pattern>/catalog/displayProduct</url-pattern>
 </servlet-mapping>



[解决办法]
<url-pattern>/displayProduct</url-pattern>

[解决办法]
<a href="/displayProduct?productCode=8601">True Life Songs and Pictures</a> 改为
1.
<a href="<%=request.getContextPath()%>/displayProduct?productCode=8601">True Life Songs and Pictures</a>

2. 
<a href${pageContext.request.contextPath}/displayProduct?productCode=8601">True Life Songs and Pictures</a>

热点排行