简体   繁体   中英

How do I setup a server for android phone on my local machine?

I am working on a nfc project in which there is a need of client-server model.

The Actual scenario is, when my Tag is tapped, the data in tag should proceed to the server and server then looks-up in database for that particular key data in tag and sends related information back to my android phone as a response.

I have Apache Tomcat, Eclipse Helios and Eclipse Indigo, currently I'm thinking of get it done using servlet? But little confused as I am totally new to this scenario. Kindly guide me. Thanks in advanced.

If I were you, I'd let my phone connect to the wireless router, then setup Apache on my computer and allow the phone to pull pages from Apache server. As long as you are testing there's no big deal which software to use on the server, Tomcat or not, you may easily get away with PHP, CGI or even simple static text pages.

After you setup Apache, use ifconfig or ipconfig to find out the IP address and then let your phone to access http://IP_address_you've_just_found/ , this should get you going.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM