zoukankan      html  css  js  c++  java
  • 每日博客

    时间:上午8:50-9:50,下午4:00-6:00

    代码:200多行?

    博客:1

    知识点:web,数据库,html

    <%@ page language="java" contentType="text/html; charset=UTF-8"
        pageEncoding="UTF-8"%>
    <!DOCTYPE html>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Insert title here</title>
    </head>
    <body>
    <%
    String name=request.getParameter("name");
    String pwd=request.getParameter("pwd");
    if(name!=null&&pwd!=null&&name.equals("jsj")&&pwd.equals("123")){
    %>
    <jsp:forward page="success.jsp"/>
    <% 
    }else{response.sendRedirect("fail.html");} 
    %>
    </body>
    </html>
    <%
     Object oCount = application.getAttribute("count");
     Integer count=null;
     if(oCount==null)
     {
      count = new Integer(1);   
      application.setAttribute("count", count);
     }
     else
     {
      count = (Integer)application.getAttribute("count");
      count = new Integer(count.intValue()+1);  
      application.setAttribute("count", count);
     }
     %>
    这是第<%=count.intValue() %>次登录。
    <%
     Object oCount = application.getAttribute("count");
     Integer count=null;
     if(oCount==null)
     {
      count = new Integer(1);   
      application.setAttribute("count", count);
     }
     else
     {
      count = (Integer)application.getAttribute("count");
      count = new Integer(count.intValue()+1);  
      application.setAttribute("count", count);
     }
     %>
    这是第<%=count.intValue() %>次登录。
    <%request.setCharacterEncoding("utf-8");%>
    <%=(String)session.getAttribute("flag")%>
  • 相关阅读:
    Java数据类型转换
    github的入门使用
    移动端的头部标签和meta
    gulp&gulp-less
    前端工程筹建NodeJs+gulp+bower
    jQuery 遍历
    JavaScript for...in 语句
    console.log在线调试
    sessionStorage html5客户端本地存储之sessionStorage及storage事件
    一个页面从输入url到加载完成的过程都发生了什么,请详细说明
  • 原文地址:https://www.cnblogs.com/hfy717/p/14579236.html
Copyright © 2011-2022 走看看