In my project, it has two servers named SMS-GW and CP. They communicate to each other by HTTP(s) socket. In CP server contains Tomcat, DBMS to provide a JSP Website (used the Struts Framwork, too :-). The SMS-GW server sends various parameters to the CP server through HTTP POST method. I don't know between java.net package or servlet class, which one is better to implement? Thanx in advance.
I didn't understand, but it seams that CP is a web applications (you mentioned Struts, database, etc), so in this case, your application shouls implement a servlet. However, it seams to be that SMS-GW is only a client, that sends only request to CP. In this case, you don't need to write a servlet (with another tomcat installation). Just write a simple java aplication and use URL.getConnection() to send you data to the servlet. java.net package has low level IP/TCP/UDP connection funtionality. You can also use it (class Socket) to let SMS-GW tcp-connect to you server via port 80, but I suggest to use URLConnection intead.
subject: Between java.net package or servlet class, which is better