JBOSS-WEB据说很有前途,有tomcat的优势,又能近似apache的稳定.
下载下来有2个版本.一个是安装版一个是解压缩版--近乎tomcat.是青出于蓝而胜于蓝
修改端口号
修改server.xml文件
<!--
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000" redirectPort="8443" />-->
< Connector port ="9217" protocol ="HTTP/1.1"
connectionTimeout ="20000" redirectPort ="8443" />
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000" redirectPort="8443" />-->
< Connector port ="9217" protocol ="HTTP/1.1"
connectionTimeout ="20000" redirectPort ="8443" />
这是把默认端口号8080改成了9217
然后启动startup.bat如果发现命令窗口一闪而过(这个情况在tomcat也会遇到).原因是环境变量JAVA_HOME的设置问题.
修改catalina.bat文件
rem ---------------------------------------------------------------------------
set JAVA_HOME=C:\Program Files\Java\jdk1.6.0
set JAVA_HOME=C:\Program Files\Java\jdk1.6.0
加入设置环境变量即可
至于启动之后默认的用户名密码
则可以修改tomcat-users.xml文件
<?
xml
version
='1.0'
encoding
='utf-8'
?>
< tomcat-users >
<!--
<role rolename="tomcat"/>
<role rolename="role1"/>
<user username="tomcat" password="tomcat" roles="tomcat"/>
<user username="both" password="tomcat" roles="tomcat,role1"/>
<user username="role1" password="tomcat" roles="role1"/>
-->
< user username ="admin" password ="admin" roles ="manager" />
</ tomcat-users >
< tomcat-users >
<!--
<role rolename="tomcat"/>
<role rolename="role1"/>
<user username="tomcat" password="tomcat" roles="tomcat"/>
<user username="both" password="tomcat" roles="tomcat,role1"/>
<user username="role1" password="tomcat" roles="role1"/>
-->
< user username ="admin" password ="admin" roles ="manager" />
</ tomcat-users >
这个设置用户名密码为admin,admin
整体来说初步使用起来跟tomcat区别不大.使用tomcat的开发人员应该很好上手...
本文转自chainli 51CTO博客,原文链接:http://blog.51cto.com/lichen/166924,如需转载请自行联系原作者