解决H2数据库的webAllowOthers禁用
在H2数据库嵌入到WebApplication中的时候,当启动Tomcat时,发现错误:Sorry, remote connections ('webAllowOthers') are disabled on this server.打开web.xmlH2Consoleorg.h2.server.web.WebServlet-we
·
在H2数据库嵌入到WebApplication中的时候,当启动Tomcat时,发现错误:
Sorry, remote connections ('webAllowOthers') are disabled on this server.
打开web.xml
<servlet>
<servlet-name>H2Console</servlet-name>
<servlet-class>org.h2.server.web.WebServlet</servlet-class>
<init-param>
<param-name>-webAllowOthers</param-name>
<param-value></param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>H2Console</servlet-name>
<url-pattern>/console/*</url-pattern>
</servlet-mapping>
重新启动Tomcat服务,页面显示
更多推荐



所有评论(0)