我登录成功可以跳到成功的界面,但是其他的就不能跳了,要么就直接跳到http://www.soso.com/q?cin=tGdSNDxdFQqOksqBpKGb-S060wc30g00&w=site:localhost&cid=th.er&unc=y400372_2他了很郁闷啊,不知道那里错了求解代码如下:
Action的代码
package com.qian.actions;
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 (null != sms.getUsername() || null != sms.getPassword()) {
if (sms.getUsername().equals("ltdx")
&& sms.getPassword().equals("ltdx")) {
if (sms.getPhone() != null || sms.getSpNumber() != null) {
System.out.println("我到这里");
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";
}
}struts2.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">
<struts>
<constant name="struts.devMode" value="true"></constant>
<constant name="struts.i18n.encoding" value="UTF-8"></constant>
<package name="struts2" namespace="/" extends="struts-default">
<action name="ltdx" class="com.qian.actions.LtDxTSAction" method="execute">
 <result name="namepwderror">/error/namepwderror.jsp</result>
<result name="namepwdempty">/error</result>
<result name="success">/result.jsp</result>
</action>
</package>
</struts>