2 wfl1433156146 wfl1433156146 于 2014.05.11 12:53 提问

哪位大神帮帮忙,说是开始缺少S标签
jsp

CSDN移动问答

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">


<br> <s:if test="message!=null"><br> alert(&quot;<s:property value='message'/>&quot;);<br> </s: if> <br> <s:if test="path!=null"><br> document.location.href==&quot;&lt;%=path%&gt;/<s:property value='path'/>&quot;;<br> <a href="/s:if">/s:if</a><br>


2个回答

FENGQIYUNRAN
FENGQIYUNRAN   Rxr 2014.05.11 13:12

问题出在这句:

</s: if> <br> <s:if test="path!=null"> 

你的`在那里。

qwuack
qwuack   2014.06.26 21:10



</s:后面多了个空格,程序认为没有结束标签

Csdn user default icon
上传中...
上传图片
插入图片