resin里的配置文件里如何设置两个数据库连接? 多加一个数据源就多加一个<database>标签不得了,注意jndi取不同的名字就行,这样在代码里就根据不同的名字来找数据源了 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 能帮我具体标签一下吗?<host id='xxx1.vicp.net'> 要如何设定?不太会哦。谢谢!! 给你一个示例吧:<resource-ref> <res-ref-name>jdbc/qgear</res-ref-name> <res-type>javax.sql.DataSource</res-type> <init-param driver-name="org.gjt.mm.mysql.Driver"/> <init-param url="jdbc:mysql://localhost:3306/qgear?useUnicode=true&characterEncoding=GBK"/> <init-param user="root"/> <init-param password=""/> <init-param max-connections="120"/> <init-param max-idle-time="3"/> </resource-ref> <resource-ref> <res-ref-name>jdbc/jhk</res-ref-name> <res-type>javax.sql.DataSource</res-type> <init-param driver-name="com.microsoft.jdbc.sqlserver.SQLServerDriver"/> <init-param url="jdbc:microsoft:sqlserver://192.168.1.239:1433;databasename=jhk"/> <init-param user="sa"/> <init-param password=""/> <init-param max-connections="120"/> <init-param max-idle-time="3"/> </resource-ref> <host id='www.jewerly.con'> <welcome-file-list>index.jsp, index.htm, index.html </welcome-file-list> <error-log id='logs/qgear.con.log'/> <doc-dir>E:\inetpub\wwwroot\101Jewelry.Com\WebSite</doc-dir> <web-app id='/'> <classpath id='WEB-INF/classes' source='WEB-INF/classes' compile='false'/> <servlet-mapping url-pattern='/servlet/*' servlet-name='invoker'/> <servlet-mapping url-pattern='*.jsp' servlet-name='jsp'/> <servlet-mapping url-pattern='*.htm' servlet-name='jsp'/> <servlet-mapping url-pattern='*.html' servlet-name='jsp'/> <session-config> <session-max>4096</session-max> <session-timeout>30</session-timeout> <enable-cookies>true</enable-cookies> <enable-url-rewriting>true</enable-url-rewriting> </session-config> </web-app> </host> <host id='www.note.con'> <welcome-file-list>index.jsp, index.htm, index.html </welcome-file-list> <error-log id='logs/note.log'/> <doc-dir>E:\inetpub\wwwroot\note12</doc-dir> <web-app id='/'> <classpath id='WEB-INF/classes' source='WEB-INF/classes' compile='false'/> <servlet-mapping url-pattern='/servlet/*' servlet-name='invoker'/> <servlet-mapping url-pattern='*.jsp' servlet-name='jsp'/> <servlet-mapping url-pattern='*.htm' servlet-name='jsp'/> <servlet-mapping url-pattern='*.html' servlet-name='jsp'/> <session-config> <session-max>4096</session-max> <session-timeout>30</session-timeout> <enable-cookies>true</enable-cookies> <enable-url-rewriting>true</enable-url-rewriting> </session-config> </web-app> </host> 晕,怎么不行呢?你这示例是不同的数据库而且没看到对应的标签呢能在我那基础上加吗?我那两个都是mysql数据库/ 数据库我加了一份<jndi-name>jdbc/aaaa</jndi-name><jndi-name>jdbc/bbbb</jndi-name>但是虚拟主机对应怎么设定呢 <host id='xxx1.vicp.net'> <document-directory>D:\web1</document-directory> <!-- configures an explicit root web-app --> <web-app id='/' document-directory="D:\web1"/> </host> 本地的虚拟主机在 C:\WINDOWS\system32\drivers\etc\hosts 文件里加:如:127.0.0.1 localhost192.168.0.1 www.101jewelry.con192.168.0.1 WWW.Q-GEAR.CON然后在区域网的机子就可以用了 服务器推的一个小疑问。 hibernate怎么实现批量删除? 请各位老兄帮忙!提供个例子。 关于BigDecimal,急!! 门户网站 救命啦!加载页面时要进入到一个action里面接受信息返回出来 向新浪svn提交代码。求解答 一个jsp入门级的问题,但是可把我愁死了,大侠们帮帮忙了。 IIS和RESIN搭配的一个问题,100分! 急救啊!谁有关于java.sql库的对像及方法的参考手册呀? ajax如何传递数组到后台,后台在action中如何去接收 通过jsp页面传递参数给crystal report,怎么不行呀??急 有句话看不懂,请教大家
<resource-ref>
<res-ref-name>jdbc/qgear</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<init-param driver-name="org.gjt.mm.mysql.Driver"/>
<init-param url="jdbc:mysql://localhost:3306/qgear?useUnicode=true&characterEncoding=GBK"/>
<init-param user="root"/>
<init-param password=""/>
<init-param max-connections="120"/>
<init-param max-idle-time="3"/>
</resource-ref> <resource-ref>
<res-ref-name>jdbc/jhk</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<init-param driver-name="com.microsoft.jdbc.sqlserver.SQLServerDriver"/>
<init-param url="jdbc:microsoft:sqlserver://192.168.1.239:1433;databasename=jhk"/>
<init-param user="sa"/>
<init-param password=""/>
<init-param max-connections="120"/>
<init-param max-idle-time="3"/>
</resource-ref>
<host id='www.jewerly.con'>
<welcome-file-list>index.jsp, index.htm, index.html </welcome-file-list>
<error-log id='logs/qgear.con.log'/>
<doc-dir>E:\inetpub\wwwroot\101Jewelry.Com\WebSite</doc-dir>
<web-app id='/'>
<classpath id='WEB-INF/classes'
source='WEB-INF/classes'
compile='false'/>
<servlet-mapping url-pattern='/servlet/*' servlet-name='invoker'/>
<servlet-mapping url-pattern='*.jsp' servlet-name='jsp'/>
<servlet-mapping url-pattern='*.htm' servlet-name='jsp'/>
<servlet-mapping url-pattern='*.html' servlet-name='jsp'/>
<session-config>
<session-max>4096</session-max>
<session-timeout>30</session-timeout>
<enable-cookies>true</enable-cookies>
<enable-url-rewriting>true</enable-url-rewriting>
</session-config>
</web-app>
</host> <host id='www.note.con'>
<welcome-file-list>index.jsp, index.htm, index.html </welcome-file-list>
<error-log id='logs/note.log'/>
<doc-dir>E:\inetpub\wwwroot\note12</doc-dir>
<web-app id='/'>
<classpath id='WEB-INF/classes'
source='WEB-INF/classes'
compile='false'/>
<servlet-mapping url-pattern='/servlet/*' servlet-name='invoker'/>
<servlet-mapping url-pattern='*.jsp' servlet-name='jsp'/>
<servlet-mapping url-pattern='*.htm' servlet-name='jsp'/>
<servlet-mapping url-pattern='*.html' servlet-name='jsp'/>
<session-config>
<session-max>4096</session-max>
<session-timeout>30</session-timeout>
<enable-cookies>true</enable-cookies>
<enable-url-rewriting>true</enable-url-rewriting>
</session-config>
</web-app>
</host>
<host id='xxx1.vicp.net'>
<document-directory>D:\web1</document-directory>
<!-- configures an explicit root web-app -->
<web-app id='/' document-directory="D:\web1"/>
</host>
如:
127.0.0.1 localhost
192.168.0.1 www.101jewelry.con
192.168.0.1 WWW.Q-GEAR.CON然后在区域网的机子就可以用了