• 3.1 首页功能的开发-跳转到首页


    第三章. 业务功能开发

    项目结构如下:

    3.1 首页功能的开发

    用户访问项目首页,首先进入登录页面。

    用户登录流程图:

    1. 我们先写跳转到登录界面,在请求准发到index中如下图所示:

    2. 由于配置了视图解析器,查看index中写了什么?

    3. login.jsp中内容如下:

      1. <%@ page contentType="text/html;charset=UTF-8" language="java" %>
      2. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
      3. <%
      4. String basePath=request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+request.getContextPath()+"/";
      5. %>
      6. "<%=basePath%>">
      7. "UTF-8">
      8. "jquery/bootstrap_3.3.0/css/bootstrap.min.css" type="text/css" rel="stylesheet" />
      9. "position: absolute; top: 0px; left: 0px; width: 60%;">
      10. "image/IMG_7114.JPG" style="width: 100%; height: 90%; position: relative; top: 50px;">
  • "top" style="height: 50px; background-color: #3C3C3C; width: 100%;">
  • "position: absolute; top: 5px; left: 0px; font-size: 30px; font-weight: 400; color: white; font-family: 'times new roman'">CRM  "font-size: 12px;"2019 动力节点
  • "position: absolute; top: 120px; right: 100px;width:450px;height:400px;border:1px solid #D5D5D5">
  • "position: absolute; top: 0px; right: 60px;">
  • "page-header">
  • 登录

  • "workbench/index.html" class="form-horizontal" role="form">
  • "form-group form-group-lg">
  • "width: 350px;">
  • "form-control" id="loginAct" type="text" value="${cookie.loginAct.value}" placeholder="用户名">
  • "width: 350px; position: relative;top: 20px;">
  • "form-control" id="loginPwd" type="password" value="${cookie.loginPwd.value}" placeholder="密码">
  • "checkbox" style="position: relative;top: 30px; left: 10px;">
  • if test="${not empty cookie.loginAct and not empty cookie.loginPwd}">
  • "checkbox" id="isRemPwd" checked>
  • if>
  • if test="${empty cookie.loginAct or empty cookie.loginPwd}">
  • "checkbox" id="isRemPwd">
  • if>
  • 十天内免登录
  •   
  • "msg" style="color: red">
  • 启动项目:测试如下:

  • 相关阅读:
    盘点敏捷项目失败的6个主要原因
    ​python 的字符串转为字典​
    2022最新IDEA配置Maven及Tomcat--详细、简单,适合初学者
    No servers available for service: renren…。 Gateway 网关报503错误 ,已解决
    基于Vue的前端UI组件库的比对和选型
    shell脚本中的小坑(空格)--两个小栗子
    Matlab之数组字符串函数汇总
    Golang 手写一个并发任务 manager
    毕业了,感觉自己一无是处,不知道做什么,怎么办?
    Tone Mapping Correction
  • 原文地址:https://blog.csdn.net/weixin_48370579/article/details/127992747