怎样把下面JSP中的JSTL改写成Scriptlit代码
怎样把下面JSP中的JSTL改写成Scriptlit代码?谢谢
Java code:
//获取列名colName和列数numberofColumns
int numberofColumns=rs.getMetaData().getColumnCount();
String[] colName=new String[numberofColumns];
for(i=1;i<numberofColumns;i++) {
colName[i]=rs.getMetaData().getColumnName(i);
}
//内容装入Map,
List list=new ArrayList();
try{
while(rs.next()){
Map map=new HashMap();
for(int i=1;i<colName.length;i++){
map.put(colName[i],rs.getString(i));
}
list.add(map);
}
//然后在JSP页面调用:下面的代码如果不用JSTL,用Scriptlit怎样写?
<%
List caseList=caseDao.getAll();
pageContext.setAttribute("caseList",caseList);
%>
<tr >
<td>姓名</td>
<td>性别</td>
<td>班级</td>
&l
相关问答:
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jas ......
我想登录后,如果登录成功就去执行某个页面
我现在的代码是这样的:
if(rs.next()){
session.setAttribute( "username" , user);
<jsp:include page="login.jsp" />// ......
一个JSP页面接收其他页面提交过来的FORM表单,但是要求只接收当前站点及其子站点提交过来的FORM表单,其他站点提交过来的表单不接收,这个怎么设置?
用过滤器
filter
将当前站点及其子站点放一个目录
然 ......
<html><head><title>[@title]</title>
<meta http-equiv=Content-Type content="text/html; charset=gb2312">
<script language='javascript'>
function diyCheck ......
我JSP的页面是:
<%@ page language="java" contentType="text/html; charset=gb2312"
%>
<script>
function Save(){
xmlHttp=GetXmlHttpObject()
if(xmlHttp==nul ......