下面是我的JSP页面,今天跳转的时候,工程名不见了。我晕!
正常:http://localhost:8089/Kiss20110530/Test_list.do?dispatch=insertUser
错误:http://localhost:8089/Test_list.do?dispatch=insertUser大家帮我看看是哪里不对啊?<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib uri="/tags/struts-html"   prefix="html"   %>
<%@ taglib uri="/tags/struts-html"   prefix="html"   %>
<%@ taglib uri="/tags/struts-logic"  prefix="logic"  %>
<%@ taglib uri="/tags/struts-bean"   prefix="bean"   %>
<%@ taglib uri="/tags/struts-nested" prefix="nested" %>
<%@ taglib uri="/tags/tag-page" prefix="page" %>
<%@ taglib uri="/tags/tag-button" prefix="button" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<html:form styleId="testList" action="/Test_add"  method="post" enctype="multipart/form-data">
<table width="100%" align="center">
<tr>
<td align="center">RECORD_ID:</td>
<td><nested:text property="record_id" styleClass="input" size="45" maxlength="40"/></td>
</tr>
<tr>
<td align="center">CR_PGM_ID:</td>
<td><nested:text property="cr_Pgm_Id" styleClass="input" size="45" maxlength="40"/></td>
</tr>
<tr>
<td align="center">CR_USER_ID:</td>
<td><nested:text property="cr_User_Id" styleClass="input" size="45" maxlength="40"/></td>
</tr>
<tr>
<td align="center">CR_DT:</td>
<td><nested:text property="cr_Dt" styleClass="input" size="45" maxlength="40"/></td>
</tr>
<tr align="center" valign="middle">
<td colspan="2">
<input name="return" type="button" class="button2" value="确定" onClick="btnFunction('testList', 'Test_add.do?dispatch=insertUser')">
<input name="return" type="submit" value="返 回" >   
</td>
</tr>
</table>
</html:form>
</body>
</html>

解决方案 »

  1.   

    楼主你将Test_add 前面的/去掉看看.
      

  2.   

    你直接用<form></form>标签呢 然后再把Test_add前面的/去掉试试呢
      

  3.   

    那个表单的action不能用相对路径的,要写成"http://localhost:8089/Kiss20110530/Test_add",你试试
      

  4.   

    在页面的头部加上这句试一下
    <base href="request.getContextPath()"/>
     
      

  5.   

    form表单的action地址错了,有两个原因,一个是你的相对路径你写的不正确,还有一个就是你可以选择使用绝对路径,request.getContextPath(),试试吧,慢慢调试,这就是个经验问题,慢慢的你就懂了
      

  6.   

    onClick="btnFunction('testList', 'Test_add.do?dispatch=insertUser')"
    btnFunction()这个方法名在哪了?