How to embed i-jetty server into android application?

后端 未结 2 1868
孤独总比滥情好
孤独总比滥情好 2021-02-02 00:47

Hi: I want to integrate i-jetty into an Android application and not the other way around. Has anyone included i-jetty before and got it to run under Android 2.1 or 2.2?

2条回答
  •  礼貌的吻别
    2021-02-02 01:03

    I successfully managed to integrate I-Jetty into my application, for anyone out there who is still hoping to do so.

    So basically what I did is I downloaded the i-jetty source code and imported it as a maven project in eclipse. Then I added a module to the parent pom.xml that points to a webapp maven module I made:

    
       i-jetty-server
       i-jetty-ui
       webapp
    
    

    and listed the i-jetty-parent as the parent in the webapp module's pom.xml:

    
      org.mortbay.ijetty
      ijetty-parent
      3.2-SNAPSHOT
    
    

    Then I copied all my android application files into the i-jetty-ui maven module (including all source files and resources). Then you just change the i-jetty AndroidManifest.xml file to include all your new activities and change the 'startup' activity to your own application's launch activity, and remove the

       
           
           
       
    

    from the IJetty activity declaration.

    And thus you have the original i-jetty application running within your own! Let me know if you need more details, I assumed here you have looked into the source code and have a basic understanding of maven.

提交回复
热议问题