<jsp:useBean ../>简洁用法

<%@page contentType="text/html; charset=gb2312" %>
<jsp:useBean id=
"news" scope="session" class="news.News"/>
<jsp:setProperty name=
"news" property="*"/>
<%@page import=
"news.*"%>
<%
NewsDAO  newsDAO;
ApplicationContextFactory.init(
"/news/applicationContext.xml");
newsDAO = (NewsDAO)ApplicationContextFactory.getApplicationContext().getBean(
"newsDAO");
newsDAO.addNews(news);
//response.sendRedirect("index.jsp");
out.println(
"OK!!");
out.println(
"<meta http-equiv='refresh' content='0;URL=../index.jsp'>");
%>  
lunzi   2006-06-08 00:54:06 评论:2   阅读:1877   引用:0
lunzi @2006-06-08 20:24:58  游客
jsp标签我没用过,有时间试一下,发这个帖子主要是备需要用的时候,查询方便.
@2006-06-08 07:49:40  weiking
useBean不怎么用了吧,我感觉标签好用些。

发表评论>>

署名发表(评论可管理,不必输入下面的姓名)

姓名:

主题:

内容: 最少15个,最长1000个字符

验证码: (如不清楚,请刷新)

Copyright@2004-2010 powered by YuLog