JavaWeb: How to build a web project with Eclipse

1. Introduction

    1) Usually we use MyEclipse wizard to build a web project

        1) All the dependencies has been included automatically

        2) All the directories and files has been created automatically

    2) But how do we use Eclipse to build such a similar web project?

 

2. Build a web project manually

    1) Package import

        1) Import JRE System Library

        2) Import Java EE 5 Libraries

            1) javaee.jar

            2) jsf-impl.jar

            3) jsf-api.jar

            4) jstl-1.2.jar

    2) Directory creation


     3) Important file creation

        1) index.jsp


        2) MANIFEST.MF

        3) web.xml

    4) Modify some important files in the project directory

        1) .classpath <Define the output folder that is different from that of JavaSE project>

 
        2) .project <Imported a lot of buildcommands to build the web project>

 

3. Deploye this project into Tomcat

    1) Get the url of this project in local.

    2) Explore into Tomcat folder : D:\Program Files\Tomcat 6.0\conf\server.xml

 

4. Embed this Tomcat into Eclipse

    Preferences -> Servers -> Tomcat 6.X -> Config the home dir

 

5. Start this Tomcat from Eclipse

    All done!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值