开发者

<url-pattern>*.html</url-pattern> in spring 2.0

i am making a sample program in spring mvc from http://maestric.com/doc/java/spring/hello_world. i used <url-pattern>*.jsp</url-pattern> in spring 2.0.

i also changed in springmvc-servlet.xml:<bean name="/hello_world.jsp" class="springmvc.web.HelloWorldController"/>

but it is not run.

开发者_如何学Python

when i use<url-pattern>*.html</url-pattern> it is run. why we use<url-pattern>*.html</url-pattern> in spring 2.0 ?

Can i use other than *.html ?


If you are using the same exercise as in the link, the problem may be because of

<welcome-file>
  jsp/index.jsp
</welcome-file>

Since index.jsp is not mapped to any controller. You can post your error for more investigation.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜