文件名称:servlettest
介绍说明--下载内容均来自于网络,请自行研究使用
Java看的HTTP网络编程,网络通信编程实例,适用于Android网络编程。在测试代码中服务端我使用三种方式:S2SH、只用Struts2、Servlet。客户端就一种,只不过换个请求的URL。服务端和客户端交互使用了两种方式:XML、JSON,目前开放平台返回的数据都是支持这两种数据格式的。所以我也实现了这两种数据格式。其实还有一种格式,就是google的protocal buffer,这种形式在国内用的人比较少,我也没弄,感兴趣的同学看我提供的文档,自己研究吧。注意把里面的IP换成自己电脑的IP地址。
在使用Servlet的服务端,可以通过下面这种方式设置返回类型,但是其实没用,你设置了,它也不返回。你只能自己封装XML文件或者JSON字符串,然后返回-Java HTTP watch network programming, network communications programming examples for Android network programming. In the test code in the server I use three ways: S2SH, only Struts2, Servlet. On a client, but another URL request. Service and client interaction used in two ways: XML, JSON, the current data returned is an open platform supports both data formats. So I have realized these two data formats. In fact, there is a format that is google' s protocal buffer, this form in the country with relatively few people, I did not get the students interested to see documents I provide, own research. Note that the inside of the IP address of their computer' s IP replaced. In using the Servlet server, you can set up this way by following the return type, but in fact useless, you set up, it does not return. You can only own package XML file or JSON string, and then return
在使用Servlet的服务端,可以通过下面这种方式设置返回类型,但是其实没用,你设置了,它也不返回。你只能自己封装XML文件或者JSON字符串,然后返回-Java HTTP watch network programming, network communications programming examples for Android network programming. In the test code in the server I use three ways: S2SH, only Struts2, Servlet. On a client, but another URL request. Service and client interaction used in two ways: XML, JSON, the current data returned is an open platform supports both data formats. So I have realized these two data formats. In fact, there is a format that is google' s protocal buffer, this form in the country with relatively few people, I did not get the students interested to see documents I provide, own research. Note that the inside of the IP address of their computer' s IP replaced. In using the Servlet server, you can set up this way by following the return type, but in fact useless, you set up, it does not return. You can only own package XML file or JSON string, and then return
(系统自动生成,下载前可以参看下载内容)
下载文件列表
WebAndroidClient\.classpath
................\.project
................\AndroidManifest.xml
................\bin\classes.dex
................\...\.om\parabola\main\Cache$CacheHolder.class
................\...\...\........\....\Cache.class
................\...\...\........\....\LoginActivity$1.class
................\...\...\........\....\LoginActivity.class
................\...\...\........\....\LoginProtocol.class
................\...\...\........\....\R$attr.class
................\...\...\........\....\R$drawable.class
................\...\...\........\....\R$id.class
................\...\...\........\....\R$layout.class
................\...\...\........\....\R$string.class
................\...\...\........\....\R.class
................\...\...\........\....\User.class
................\...\...\........\....\WelcomeActivity.class
................\...\resources.ap_
................\...\WebAndroidClient.apk
................\default.properties
................\gen\com\parabola\main\R.java
................\proguard.cfg
................\readme
................\..s\drawable-hdpi\icon.png
................\...\.........ldpi\icon.png
................\...\.........mdpi\icon.png
................\...\layout\main.xml
................\...\......\welcome.xml
................\...\values\strings.xml
................\src\com\parabola\main\Cache.java
................\...\...\........\....\LoginActivity.java
................\...\...\........\....\LoginProtocol.java
................\...\...\........\....\User.java
................\...\...\........\....\WelcomeActivity.java
..........\.classpath
..........\.mymetadata
..........\.project
..........\.settings\.jsdtscope
..........\.........\org.eclipse.jdt.core.prefs
..........\.........\org.eclipse.wst.jsdt.ui.superType.container
..........\.........\org.eclipse.wst.jsdt.ui.superType.name
..........\src\applicationContext-actions.xml
..........\...\applicationContext-beans.xml
..........\...\applicationContext-commons.xml
..........\...\com\parabola\action\UserAction.java
..........\...\...\........\dao\impl\IUserDao.java
..........\...\...\........\...\....\UserDaoImpl.java
..........\...\...\........\entity\User.hbm.xml
..........\...\...\........\......\User.java
..........\...\...\........\service\impl\IUserServcie.java
..........\...\...\........\.......\....\UserServiceImpl.java
..........\...\hibernate.cfg.xml
..........\...\struts.xml
..........\WebRoot\index.jsp
..........\.......\META-INF\MANIFEST.MF
..........\.......\WEB-INF\classes\applicationContext-actions.xml
..........\.......\.......\.......\applicationContext-beans.xml
..........\.......\.......\.......\applicationContext-commons.xml
..........\.......\.......\.......\com\parabola\action\UserAction.class
..........\.......\.......\.......\...\........\dao\impl\IUserDao.class
..........\.......\.......\.......\...\........\...\....\UserDaoImpl.class
..........\.......\.......\.......\...\........\entity\User.class
..........\.......\.......\.......\...\........\......\User.hbm.xml
..........\.......\.......\.......\...\........\service\impl\IUserServcie.class
..........\.......\.......\.......\...\........\.......\....\UserServiceImpl.class
..........\.......\.......\.......\hibernate.cfg.xml
..........\.......\.......\.......\struts.xml
..........\.......\.......\page\index.jsp
..........\.......\.......\....\register.jsp
..........\.......\.......\web.xml
..........\开发文档\开发文档
StrAnd\.classpath
......\.mymetadata
......\.project
......\.settings\.jsdtscope
......\.........\org.eclipse.jdt.core.prefs
......\.........\org.eclipse.wst.jsdt.ui.superType.container
......\.........\org.eclipse.wst.jsdt.ui.superType.name
......\src\com\dongzi\action\loginAction.java
......\...\struts.xml
......\WebRoot\index.jsp
......\.......\META-INF\MANIFEST.MF
......\.......\WEB-INF\classes\com\dongzi\action\loginAction.class
......\.......\.......\.......\struts.xml
......\.......\.......\web.xml
.ervletTest1\.classpath
............\.mymetadata
............\.project
............\.settings\.jsdtscope
............\.........\org.eclip