提交到你的问题正在提交中按什么条件来过关

提交到问题按什么条件来过关_百度知道
提交到问题按什么条件来过关
我有更好的答案
内的事业单位考试,他会告诉你东西在哪里,通知我去面试,其中要求提交的材料有一项找学校就业指导中心,已经通过笔试
其他类似问题
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁11049人阅读
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& 服务器端的设置服务器端采用Struts2来接收android端的请求,android版本为2.2.3配置如下:1:web.xml的配置为&?xml version=&1.0& encoding=&UTF-8&?&
&web-app id=&WebApp_9& version=&2.4& xmlns=&/xml/ns/j2ee& xmlns:xsi=&http://www.w3.org/2001/XMLSchema-instance& xsi:schemaLocation=&/xml/ns/j2ee /xml/ns/j2ee/web-app_2_4.xsd&&
&display-name&Struts Blank&/display-name&
&filter-name&struts2&/filter-name&
&filter-class&org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter&/filter-class&
&filter-mapping&
&filter-name&struts2&/filter-name&
&url-pattern&/*&/url-pattern&
&/filter-mapping&
&welcome-file-list&
&welcome-file&index.html&/welcome-file&
&/welcome-file-list&
&/web-app&
2:VideoManageAction类package com.capinfotech.
import javax.servlet.http.HttpServletR
import javax.servlet.http.HttpServletR
import org.apache.struts2.interceptor.ServletRequestA
import org.apache.struts2.interceptor.ServletResponseA
import com.opensymphony.xwork2.ActionS
public class VideoManageAction extends ActionSupport implements ServletRequestAware, ServletResponseAware {
private HttpServletR
private HttpServletR
public void setServletRequest(HttpServletRequest request) {
this.request =
public void setServletResponse(HttpServletResponse response) {
this.response =
public void save() {
String method = this.request.getMethod();
//获得requst的方法
Integer timelength =
if(&GET&.equals(method)) {
title = request.getParameter(&title&);
//获得参数title的值
timelength = new Integer(request.getParameter(&timelength&));
//获得参数timelength的值
System.out.println(&title: & + title);
//输出title的值
System.out.println(&timelength: & + timelength.intValue());
//输出timelength的值
title = request.getParameter(&title&);
timelength = new Integer(request.getParameter(&timelength&));
System.out.println(&title: & + title);
System.out.println(&timelength: & + timelength.intValue());
3:struts.xml的配置为&?xml version=&1.0& encoding=&UTF-8& ?&
&!DOCTYPE struts PUBLIC
&-//Apache Software Foundation//DTD Struts Configuration 2.0//EN&
&http://struts.apache.org/dtds/struts-2.0.dtd&&
&package name=&android& namespace=&/android& extends=&struts-default&&
&action name=&upload& class=&com.capinfotech.android.VideoManageAction& method=&save& &
&/package&
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& android端的配置1:androidmanifest.xml的内容&?xml version=&1.0& encoding=&utf-8&?&
&manifest xmlns:android=&/apk/res/android&
package=&com.capinfotech.upload&
android:versionCode=&1&
android:versionName=&1.0&&
&application android:icon=&@drawable/icon& android:label=&@string/app_name&&
&uses-library android:name=&android.test.runner& /&
&activity android:name=&.MainActivity&
android:label=&@string/app_name&&
&intent-filter&
&action android:name=&android.intent.action.MAIN& /&
&category android:name=&android.intent.category.LAUNCHER& /&
&/intent-filter&
&/activity&
&/application&
&uses-sdk android:minSdkVersion=&8& /&
&uses-permission android:name=&android.permission.INTERNET& /&
&instrumentation android:name=&android.test.InstrumentationTestRunner&
android:targetPackage=&com.capinfotech.upload& android:label=&Tests for My App& /&
&/manifest& 2:HttpRequest类的内容package com.capinfotech.
import java.io.IOE
import java.net.HttpURLC
import java.net.MalformedURLE
import java.net.URL;
import java.util.M
import android.util.L
public class HttpRequest {
private static final String TAG = &HttpRequest&;
public static boolean sendGetRequest(String path, Map&String, String& params) throws IOException {
* http://127.0.0.1/AndroidService/android/upload?title=aaa&timelength=90的形式
StringBuilder sb = new StringBuilder(path);
sb.append('?');
for(Map.Entry&String, String& entry : params.entrySet()) {
sb.append(entry.getKey()).append('=').append(entry.getValue()).append('&');
sb.deleteCharAt(sb.length()-1);
URL url = new URL(sb.toString());
HttpURLConnection conn = (HttpURLConnection)url.openConnection();
conn.setRequestMethod(&GET&);
//设置方法为GET
conn.setReadTimeout(5 * 1000);
//设置过期时间为5秒
if(conn.getResponseCode() == 200) {
//如果成功返回
} catch (MalformedURLException e) {
e.printStackTrace();
Log.e(TAG, e.toString());
3:HttpRequestTest类package com.capinfotech.
import java.io.IOE
import java.util.HashM
import java.util.M
import android.test.AndroidTestC
import android.util.L
import com.capinfotech.net.HttpR
public class HttpRequestTest extends AndroidTestCase {
private static final String TAG = &HttpRequestTest&;
public void testSendGetRequest() throws IOException {
Map&String, String& params = new HashMap&String, String&();
params.put(&title&, &long&);
params.put(&timelength&, &80&);
String path = &http://192.168.1.105/AndroidService/android/upload&;
if(HttpRequest.sendGetRequest(path, params)) {
Log.i(TAG, &success&);
Log.i(TAG, &failure&);
4:测试结果页面上传的参数中含有中文时改变方法testSendGetRequest()方法里的几行程序:Map&String, String& params = new HashMap&String, String&();
params.put(&title&, &变形金刚3&);
params.put(&timelength&, &80&);测试结果页面为:需要修改的程序:1:HttpRequest类修改为:package com.capinfotech.
import java.io.IOE
import java.net.HttpURLC
import java.net.MalformedURLE
import java.net.URL;
import java.net.URLE
import java.util.M
import android.util.L
public class HttpRequest {
private static final String TAG = &HttpRequest&;
public static boolean sendGetRequest(String path, Map&String, String& params, String enc) throws IOException {
* http://127.0.0.1/AndroidService/android/upload?title=aaa&timelength=90的形式
StringBuilder sb = new StringBuilder(path);
sb.append('?');
for(Map.Entry&String, String& entry : params.entrySet()) {
sb.append(entry.getKey()).append('=').append(URLEncoder.encode(entry.getValue(), enc)).append('&');
sb.deleteCharAt(sb.length()-1);
URL url = new URL(sb.toString());
HttpURLConnection conn = (HttpURLConnection)url.openConnection();
conn.setRequestMethod(&GET&);
//设置方法为GET
conn.setReadTimeout(5 * 1000);
//设置过期时间为5秒
if(conn.getResponseCode() == 200) {
//如果成功返回
} catch (MalformedURLException e) {
e.printStackTrace();
Log.e(TAG, e.toString());
主要是在函数中添加了一个表示编码的参数enc,用来控制编码的格式问题2:HttpRequest类修改为public class HttpRequestTest extends AndroidTestCase {
private static final String TAG = &HttpRequestTest&;
public void testSendGetRequest() throws IOException {
Map&String, String& params = new HashMap&String, String&();
params.put(&title&, &变形金刚3&);
params.put(&timelength&, &80&);
String path = &http://192.168.1.105/AndroidService/android/upload&;
if(HttpRequest.sendGetRequest(path, params, &UTF-8&)) {
Log.i(TAG, &success&);
Log.i(TAG, &failure&);
}3:测试结果:这时发现在tomcat控制台输出的参数还是乱码的,之后的工作就是修改服务器的程序4:VideoManageAction类的内容改为package com.capinfotech.
import java.io.UnsupportedEncodingE
import javax.servlet.http.HttpServletR
import javax.servlet.http.HttpServletR
import org.apache.struts2.interceptor.ServletRequestA
import org.apache.struts2.interceptor.ServletResponseA
import com.opensymphony.xwork2.ActionS
public class VideoManageAction extends ActionSupport implements ServletRequestAware, ServletResponseAware {
private HttpServletR
private HttpServletR
public void setServletRequest(HttpServletRequest request) {
this.request =
public void setServletResponse(HttpServletResponse response) {
this.response =
public void save() {
String method = this.request.getMethod();
//获得requst的方法
Integer timelength =
if(&GET&.equals(method)) {
byte[] titleByte = request.getParameter(&title&).getBytes(&iso-8859-1&);
//获得title参数对应的二进制数据
title = new String(titleByte, &UTF-8&);
timelength = new Integer(request.getParameter(&timelength&));
//获得参数timelength的值
System.out.println(&title: & + title);
//输出title的值
System.out.println(&timelength: & + timelength.intValue());
//输出timelength的值
title = request.getParameter(&title&);
timelength = new Integer(request.getParameter(&timelength&));
System.out.println(&title: & + title);
System.out.println(&timelength: & + timelength.intValue());
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
5:测试结果&6:乱码问题总结造成中文乱码的原因有两个:首先,并没有对URL发送的参数进行编码,然后就是服务器端接受参数的问题,Tomcat服务器接收参数时默认为ISO-8859-1,这个编码并不包含中文的编码&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& android端的程序1:strings.xml里的内容,定义用到的字符串资源&?xml version=&1.0& encoding=&utf-8&?&
&resources&
&string name=&hello&&Hello World, MainActivity!&/string&
&string name=&app_name&&上传数据到服务器&/string&
&string name=&title&&视频名称&/string&
&string name=&timelength&&时长&/string&
&string name=&button&&保存&/string&
&string name=&success&&保存成功&/string&
&string name=&error&&保存失败&/string&
&/resources&
2:main.xml的内容,定义布局文件&?xml version=&1.0& encoding=&utf-8&?&
&LinearLayout xmlns:android=&/apk/res/android&
android:orientation=&vertical&
android:layout_width=&fill_parent&
android:layout_height=&fill_parent&
android:layout_width=&fill_parent&
android:layout_height=&wrap_content&
android:text=&@string/title&
android:layout_width=&fill_parent&
android:layout_height=&wrap_content&
android:id=&@+id/title&
android:layout_width=&fill_parent&
android:layout_height=&wrap_content&
android:text=&@string/timelength&
android:layout_width=&fill_parent&
android:layout_height=&wrap_content&
android:id=&@+id/timelength&
android:layout_width=&wrap_content&
android:layout_height=&wrap_content&
android:id=&@+id/button&
android:text=&@string/button&
&/LinearLayout&
3:MainActivity的内容package com.capinfotech.
import java.io.IOE
import java.util.HashM
import java.util.M
import com.capinfotech.net.HttpR
import android.app.A
import android.os.B
import android.util.L
import android.view.V
import android.widget.B
import android.widget.EditT
import android.widget.T
public class MainActivity extends Activity {
private static final String TAG = &MainActivity&;
private EditText titleEditText =
private EditText timeEditText =
private Button button =
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
titleEditText = (EditText)findViewById(R.id.title);
timeEditText = (EditText)findViewById(R.id.timelength);
button = (Button)findViewById(R.id.button);
button.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Map&String, String& params = new HashMap&String, String&();
params.put(&title&, titleEditText.getText().toString());
//获取输入的视频的名字
params.put(&timelength&, timeEditText.getText().toString());
//获取输入的视频的时长
String path = &http://192.168.1.105/AndroidService/android/upload&;
if(HttpRequest.sendGetRequest(path, params, &UTF-8&)) {
Log.i(TAG, &success&);
Toast.makeText(MainActivity.this, R.string.success, Toast.LENGTH_LONG).show(); //提示保存成功
Log.i(TAG, &failure&);
Toast.makeText(MainActivity.this, R.string.error, Toast.LENGTH_LONG).show(); //提示保存失败
} catch (IOException e) {
Log.i(TAG, &failure&);
Toast.makeText(MainActivity.this, R.string.error, Toast.LENGTH_LONG).show();
}4:程序界面与运行效果
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:904106次
积分:12370
积分:12370
排名:第396名
原创:413篇
转载:128篇
评论:143条
(20)(16)(15)(37)(7)(3)(1)(2)(4)(1)(2)(7)(28)(18)(3)(2)(9)(15)(4)(5)(15)(14)(41)(23)(3)(13)(46)(11)(9)(27)(57)(49)(19)(17)站内网址搜索
本页最后更新: 23:34:48
【古巴要求联大朝鲜人权决议删除移交国际法院】
网站分类:
网站名称:
网站地址:
站长邮箱:
站长QQ:
收录时间:
报告错误:
古巴要求联大朝鲜人权决议删除移交国际法院已报错(0)次,打不开请
收录查询:
数据统计:
今日点入:0 总点入:0 总点出:0
网站简介:
国际在线专稿:据韩联社11月13日报道,联合国大会最近在推进包括“将朝鲜人权现状问题移交国际刑事法院(ICC)”内容的决议案,古巴近日要求在联合国朝鲜人权决议案中删除“移交国际刑事法院”的内容。  韩联社消息称,当地时间12日,据联合国消息人士透露,由欧盟和美国等50个国家编制的朝鲜人权决议案中,最核心的内容是“将朝鲜人权现状”移交到国际刑事法院。而古巴近日在就此制定的一份修正案中表示,担心“‘移交国际刑事法院’的说法被写入朝鲜人权决议案后,可能会在今后被当做实例而适用于其他发展中国家”。据悉,古巴将会把这份修正案提交到联合国大会第三委员会。韩联社认为,古巴发表这一立场时考虑到了能够获得一些非洲国家的支持。  报道说,这份修正案如果被提交到第三委员会,委员会将讨论这一修正案的实施与否,如果赞成的国家居多,那么这份决议案将被反映在联合国朝鲜人权决议中,反之将会被废除,并按照原有联合国朝鲜人权决议来执行。  联合国第三委员会表示,最快将于18日开会决定是否通过朝鲜人权决议案,第三委员会的会议结果将被通报到联合国大会。  今年2月17日,联合国人权理事会朝鲜人权状况国际调查委员会发布调查报告,称朝鲜国内存在“践踏人权”状况,此后,联合国人权理事会表示希望国际社会立即采取行动,并呼吁联合国安理会将朝鲜人权问题移交国际法庭。(海燕)(原标题:古巴提案要求联大朝鲜人权决议删除“移交国际法院”)
【最新来访网站】
?&?&?&?&?&?&?&?&?&?&?&?&?&?&?&?&?&?&?&?&?&?&?&?&?&
【相关点出网站】
?&?&?&?&?&?&?&?&?&?&?&?&?&?&?&?&?&?&?&?&?&?&?&?&?&
免责声明:888导航以上所有广告内容均为赞助商广告提供,对其经营行为本网站恕不负责。Copyright&
All Right Reserved
强烈建议使用 IE5.0 以上浏览器 分辨率信用卡申请,我在网上提交的资料,第2天就 有北京光大银行的客服打电话来核实情况,并且问卡片和账单寄到什么地方,?网上查进度也是审批通过,请问我算办下来了还是没有办下来,?十来天了也没有人联系我,这是什么原因啊,打电话去问也是让我等待?-金斧子在2013年时候,因为开野的小车被扣,还有家庭条件原因,开始想通过关系解决问题,想减轻经济压力,结_百度知道
在2013年时候,因为开野的小车被扣,还有家庭条件原因,开始想通过关系解决问题,想减轻经济压力,结
问他怎么办,结果没想到找到自己亲戚居然会承受这么大的恶果,最后他说“我们毕竟是亲戚,后悔这样子托关系解决问题,最后无赖取了五千给他,想减轻经济压力在2013年时候,通过关系把扣押车子的单子拿到手,开始想通过关系解决问题,因为开野的小车被扣。
后来将通话的内容都用手机录了下来,但是那人居心叵测拿着单子狮子大张口索要两万多的金额,拿五千给我剩下的一万多我帮你贴了”,他最后干脆说扣押的单子掉了为借口,但是车贷款买的时候价值六万元.因为不同意所以他也没把扣押的单子拿出来,因开了几年价值大大降低,但家里现金也没那么多,他只是个人民教师,那亲戚是职业高中教师,接着将那张说掉了的扣押单子拿了出来,最后拿着这张单子又交了六千元才将车取出来.交到那老师手上的现金达到五千,还有家庭条件原因,拍着胸口说包在我身上,让我自己去再开一张……最后差点求人了
亲戚就不要用法律手段解决的!脸皮撕破了就闹!闹凶了就找他单位闹,就是无赖就行了,吃喝全赖上,或者是去他家看有什么东西值钱的就搬回来用!直接借钱是亲戚就好办,就说借着玩
其他类似问题
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁

我要回帖

更多关于 你的问题正在提交中 的文章

 

随机推荐