帮帮忙:如何判断跳转页面
代码如下,如何判断执行完一次后跳转到指定页面,如:mainpage.jsp
不用<script>跳转,请教下函数的方法。
<html> <head> <title>录入数据</title> </head> <body> <% try{ request.setCharacterEncoding("utf-8"); String insert = "insert into news(num,theme,author,date) values('"+request.getParameter("num")+"','"+request.getParameter("theme")+"','"+request.getParameter("author")+"','"+request.getParameter("date")+"')"; if(null != request.getParameter("num") && !"".equals(request.getParameter("num")) ) { myDBbean.update(insert); } } catch(Exception ex){ ex.printStackTrace(); } finally{ myDBbean.close(); }%>