title: How to make paging menu with css
body: <p>I'm developing classified website.In ad view page i have to get ads data from db. So i used servlet to do it. all work is done now and work perfectly. But after all it's look soo basic(I mean not attractive.). I want to make it look professional. How i am doin this? please help me to look this professional.
  Thank You.
  Dilshan.</p>
  
  <p>Servlet code is this : </p>
  
  <pre><code>    int page = 1;
      int recordsPerPage = 5;
      if(request.getParameter("page") != null)
      page = Integer.parseInt(request.getParameter("page"));
      //  EmployeeDAO dao = new EmployeeDAO();
      View_ads_cls be=new View_ads_cls();
      List&lt;Ads_view_to&gt; list = be.getRecentAdd((page-1)*recordsPerPage,
      recordsPerPage);
      int noOfRecords = be.getNoOfRecords();
      int noOfPages = (int) Math.ceil(noOfRecords * 1.0 / recordsPerPage);
      request.setAttribute("allads", list);
      request.setAttribute("noOfPages", noOfPages);
      request.setAttribute("currentPage", page);
      RequestDispatcher view = request.getRequestDispatcher("ad_viewer.jsp");
      view.forward(request, response);     
  </code></pre>
  
  <p>jsp page is here: 
          
          
          Emp ID
          Emp Name
          Salary
          Dept Name
          Dept Name2
          </p>
  
  <pre><code>    &lt;c:forEach var="employee" items="${allads}"&gt;
      &lt;tr&gt;
      &lt;td&gt;${employee.brand}&lt;/td&gt;
      &lt;td&gt;${employee.description}&lt;/td&gt;
      &lt;td&gt;${employee.price}&lt;/td&gt;
       &lt;td&gt;&lt;img src=${employee.imageurl}&gt;&lt;/td&gt;
  
  
   &lt;/tr&gt;
   &lt;/c:forEach&gt;
   &lt;/table&gt;
  &lt;c:if test="${currentPage != 1}"&gt;
  &lt;td&gt;&lt;a href="view_ads?page=${currentPage - 1}"&gt;Previous&lt;/a&gt;&lt;/td&gt;
  &lt;/c:if&gt;
  
  &lt;%--For displaying Page numbers.
  The when condition does not display a link for the current page--%&gt;
  &lt;table border="1" cellpadding="5" cellspacing="5"&gt;
      &lt;tr&gt;
  &lt;c:forEach begin="1" end="${noOfPages}" var="i"&gt;
  &lt;c:choose&gt;
  &lt;c:when test="${currentPage eq i}"&gt;
  &lt;td&gt;${i}&lt;/td&gt;
  &lt;/c:when&gt;
  &lt;c:otherwise&gt;
   &lt;td&gt;&lt;a href="view_ads?page=${i}"&gt;${i}&lt;/a&gt;&lt;/td&gt;
   &lt;/c:otherwise&gt;
  &lt;/c:choose&gt;
  &lt;/c:forEach&gt;
  &lt;/tr&gt;
  &lt;/table&gt;
  
  &lt;%--For displaying Next link --%&gt;
  &lt;c:if test="${currentPage lt noOfPages}"&gt;
  &lt;td&gt;&lt;a href="view_ads?page=${currentPage + 1}"&gt;Next&lt;/a&gt;&lt;/td&gt;
  &lt;/c:if&gt;
  </code></pre>