分类目录归档:开发

[转]Tomcat:IOException while loading persisted sessions: java.io.EOFException解决手记

转自:http://www.blogjava.net/apple0668/archive/2007/10/12/152383.html

一直用tomcat一段时间都正常无事,最近一次启动tomcat就发生以下异常:

严重: IOException while loading persisted sessions: java.io.EOFException
严重: Exception loading sessions from persistent storage

原因是tomcat对硬盘的session读取失败,彻底解决办法一下:将work下面的文件清空,主要是*.ser文件,或者只是删除掉session.ser即可以解决。

Virtual Hosts with JBoss AS

转自:https://community.jboss.org/wiki/VirtualHostsWithJBossAS

If you want to set up a virtual host for your web app, create or modify the WEB-INF/jboss-web.xml to contain the highlighted line as follows:

 

your-app.war/WEB-INF/jboss-web.xml

<jboss-web>    <virtual-host>www.mycompany.com</virtual-host>    <virtual-host>www.myothercompany.com</virtual-host><context-root>/</context-root> </jboss-web>

 

The following example shows a vhost configuration for the jmx-console.war for jboss-5.0.

jbossweb.sar/server.xml

<Server>    <Service name="jboss.web">       <!-- A HTTP/1.1 Connector on port 8080 -->       <Connector protocol="HTTP/1.1" port="8080" address="${jboss.bind.address}"                connectionTimeout="20000" redirectPort="8443" ></Connector>       <Engine name="jboss.web" defaultHost="localhost"> ...          <Host name="localhost"> ...             <Valve className="org.jboss.web.tomcat.service.jca.CachedConnectionValve"                 cachedConnectionManagerObjectName="jboss.jca:service=CachedConnectionManager"                 transactionManagerObjectName="jboss:service=TransactionManager" ></Valve>          </Host>          <Host name="loopback">             <Alias>loopback-120</Alias>             <Valve className="org.jboss.web.tomcat.service.jca.CachedConnectionValve"                 cachedConnectionManagerObjectName="jboss.jca:service=CachedConnectionManager"                 transactionManagerObjectName="jboss:service=TransactionManager" ></Valve>          </Host>     </Engine>   </Service> </Server>

 

 

jmx-console.war/WEB-INF/jboss-web.xml

<jboss-web>    <!-- Uncomment the security-domain to enable security. You will       need to edit the htmladaptor login configuration to setup the       login modules used to authentication users.       <security-domain>java:/jaas/jmx-console</security-domain>    -->    <virtual-host>loopback</virtual-host> </jboss-web>