我一直在想如何做到这一点,并且据我所知我正在做我发现的各种资源去做。我有一个名为spring-hibernate-mysql的Spring应用程序,我希望能够通过以下路径访问:http://example.com/l/
,而不是我目前必须访问的方式:http://example.com/spring-hibernate-mysql/l/
。春天,Tomcat试图设置server.xml中的上下文URL路径,它不工作
,因为它出现在Eclipse我的应用程序的名字是spring-hibernate-mysql
,当我建立它的战争被称为spring-hibernate-mysql.war
我已经把这个代码在我的Tomcat的server.xml中,但它不工作:<Context docBase="spring-hibernate-mysql" path="" reloadable="true" />
任何建议表示赞赏。
这是不是有帮助? http://stackoverflow.com/questions/5204383/how-to-set-spring-mvc-web-application-context-as-root-on-tomcat/5204395 – 2011-03-19 21:33:08