web开发经验交流解决思路

   阅读
web开发经验交流
我才开始学jsp 现在把mvc搞懂了,基本上能用model2开发了,但是不知道我运用的不好还是怎么回事,想来想去感觉servlet就能起到一个验证的作用,比如验证用户登录时候的信息是否正确,还有其他的验证功能。除了验证我实在不知道servlet还有别的什么功能!在jsp页面的里,还得jsp自己调用model,显示一些信息。让人感觉jsp页面里面还有很多java代码,看着很不舒服哎 比如如下的代码
各位给提点建议吧
<%@ page language="java" import="java.util.*,board.wl.com.*,java.sql.*,title.wl.com.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  <base href="<%=basePath%>">
   
  <title>My JSP 'title.jsp' starting page</title>
   
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">  
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<style type="text/css">
<!--
a:link {font-family:"宋体";text-decoration:none}
a:visited {font-family:"宋体";text-decoration:none}
a:hover {font-family:"宋体";text-decoration:none}
-->
</style>

  </head>
  
  <body>
  <body>
  <%
  String user=(String)session.getAttribute("user");
  String ii=request.getParameter("BoardId");
  int i=Integer.parseInt(ii);
  i=i+1;
  %>
 <center>
  <table width="1043" border="0">
  <tr>
  <td width="143"><div id="my" align="center"><a href="#">技术论坛首页</a></div></td>
  <td width="100"><div align="center"><a href="#">资讯</a></div></td>
  <td width="100"><div align="center"><a href="#">论坛</a></div></td>
  <td width="100"><div align="center"><a href="#">博客</a></div></td>
  <td width="100"><div align="center"><a href="#">下载</a></div></td>
  <td width="100"><div align="center"><a href="#">搜索</a></div></td>
  <td width="100"><div align="center"><a href="#">更多</a></div></td>
  <td width="100"><div align="center">欢迎</div></td>
  <td width="100"><div align="center"><%=user %></div></td>
  <td width="100"><div align="center"><a href="loginout.jsp">退出</a></div></td>
  </tr>
  <% int pageNow;
  String s_pageNow=request.getParameter("pageNow");
  if(s_pageNow==null){
pageNow=1;
  }else{
  pageNow=Integer.parseInt(s_pageNow);
  }
  Boardinfo bi=new Boardinfo();
  ArrayList al=bi.getBoard();
  BoardBean bb=(BoardBean)al.get(i);
  Title tt=new Title();
  Connection ct=null;
  Statement st=null;
  ResultSet rs=null;
  int pageSize=4;
  int rowCount=tt.getCountById(i);
阅读