<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
阅读:872
引用:0
lunzi
@2006-06-08 20:24:58 游客
jsp标签我没用过,有时间试一下,发这个帖子主要是备需要用的时候,查询方便.
@2006-06-08 07:49:40 weiking
useBean不怎么用了吧,我感觉标签好用些。
