action接收URL参数问题
直接通过URL传值URL如:http://localhost:8080/jhxm/ltdx.action?sms.username=ltdx&sms.password=ltdx&sms.phone=1331094435&sms.SM_Content=fvgfb丰东¥%……&*()%20%20%20%20股份部分&sms.spNumber=&sms.motime=
我在Action中接收sms.SM_Content值时只能接受到“%”之前的值,之后的无法接受什么原因啊,如果用“&”也是同样效果只能接受&之前的不能后半部分被过滤掉饿了啊。怎么回事啊接收代码如下:
package com.qian.actions;import java.util.Map;import org.apache.taglibs.standard.tag.common.core.ParamSupport;import org.omg.CORBA.Request;import com.opensymphony.xwork2.ActionContext;import com.opensymphony.xwork2.ActionSupport;import com.qian.biz.ReceiveBIZ;import com.qian.vo.SMSendVO;public class LtDxTSAction extends ActionSupport { // MainListener ml=new MainListener(); SMSendVO sms = new SMSendVO(); ReceiveBIZ biz = new ReceiveBIZ(); public SMSendVO getSms() { return sms; } public void setSms(SMSendVO sms) { this.sms = sms; } public String execute() throws Exception { // ml.start(); if (!sms.getUsername().trim().equals("") && !sms.getPassword().trim().equals("")) { if (sms.getUsername().equals("ltdx") && sms.getPassword().equals("ltdx")) { if (sms.getPhone() != null || sms.getSpNumber() != null) { String content=(String) parmas.get(sms.getSM_Content()); biz.receiveLTDX(sms.getPhone(), sms.getSpNumber(), sms .getSM_Content(), sms.getMotime()); return "success"; } } else { System.out.println("用户名密码错误"); return "namepwderror"; } } else { System.out.println("用户名密码不能为空"); return "namepwdempty"; } return "bzd"; }}