OpenJWeb在Eclipse EE下的配置要点



有不少开发人员在Eclipse Mars EE下配置OpenJWeb失败,主要原因为以下几点:

(1) 没有配置内存相关的参数,导致启动时出现内存不足的问题。

(2)Tomcat设置问题。

(3)Conext设置问题:

 

第一个问题,内存设置的方式:找到

Run---RunConfigurations.. 菜单,打开Arguments标签:
 
在JVM arguments末尾增加:
 -Xms1280m -Xmx1280m -XX:PermSize=300m -XX:MaxNewSize=256m
-XX:MaxPermSize=300m -XX:SurvivorRatio=7
 
开发人员可根据自己的机器进行适当调整,PerSize的值不要设置太小。
第二个问题:Tomcat Server的属性设置:
参考下面的界面:
 
 
第三个问题:server.xml中的Context配置:
 
在</Host>前增加:
 
<Context path="/portal"  docBase="d:/project/openjweb/webapps" workDir="/temp" debug="1" 
reloadable="true" crossContext="true" >

  
   <Resource name="jdbc/mysql" auth="Container" type="javax.sql.DataSource" 
              driverClassName="com.mysql.jdbc.Driver" 
              url="jdbc:mysql://localhost:3333/erp" 
              username="root" password="mysql" schema="erp" maxActive="200" maxIdle="20" 
maxWait="10000"/> 
    <resource-ref>
        <descrtiption>jdbc/mysql</descrtiption>
        <res-ref-name>jdbc/mysql</res-ref-name>
        <res-type>javax.sql.DataSource</res-type>
        <res-auth>Container</res-auth>
    </resource-ref>

  <Resource name="jdbc/ds10" auth="Container" type="javax.sql.DataSource" 
              driverClassName="com.mysql.jdbc.Driver" 
              url="jdbc:mysql://localhost:3333/erp" 
              username="root" password="mysql"  schema="erp" maxActive="200" maxIdle="20" maxWait="10000"/> 
    <resource-ref>
        <descrtiption>jdbc/ds10</descrtiption>
        <res-ref-name>jdbc/ds10</res-ref-name>
        <res-type>javax.sql.DataSource</res-type>
        <res-auth>Container</res-auth>
    </resource-ref>
< /Context>
 
删除D:\project\apache-tomcat-7.0.57-win64\conf\Catalina\localhost\portal.xml

OpenJWeb官方网址 看看。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值