为了账号安全,请及时绑定邮箱和手机立即绑定

页面没跳转成功

index.jsp

<%@ page language="java" contentType="text/html; charset=utf-8"%>

<%@ taglib uri="/struts-tags" prefix="s"%>

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<title>Insert title here</title>

<link type="text/css" href="css/bootstrap.min.css" rel="stylesheet">

    <link type="text/css" href="css/beyond.min.css" rel="stylesheet">

    <link type="text/css" href="css/font-awesome.min.css" rel="stylesheet"/>

    <link type="text/css" href="css/style.css" rel="stylesheet">

<script type="text/javascript" src="js/ajax.js"></script>

<script type="text/javascript" src="js/member.js"></script>

</head>

<body id="body">

<!--  <table background='images/login.jpg' width="600" height="360" ><tr><td valign="top" align="center">-->


<c:if test="${!empty requestScope.message}">

<script type="text/javascript">

alert("${requestScope.message}");

</script>

<c:remove var="message" scope="request"/>

</c:if>

<c:if test="${!empty sessionScope.message}">

<script type="text/javascript">

alert("${sessionScope.message}");

</script>

<c:remove var="message" scope="session"/>

</c:if>

<c:if test="${!empty sessionScope.teacher}">


<c:remove var="teacher" scope="session"/>

</c:if>

<c:if test="${!empty sessionScope.student}">


<c:remove var="student" scope="session"/>

</c:if>

<c:if test="${!empty sessionScope.admin}">


<c:remove var="admin" scope="session"/>

</c:if>


<c:if test="${!empty score}">

<c:remove var="score" scope="session"/>

</c:if>

<div style="position:absolute;left: 50%;top: 50%;width: 600px;height:360px;margin-left:-300px;margin-top:-200px;background-image: url('images/login.jpg');background-size:600px 360px">

    <div style="position: relative;">

   

<form role="form" id="login_form" class="form-horizontal" method="post" action="<%=request.getContextPath()%>/Admin_login.action"

              style="position: absolute;top: 120px;right: 160px;width:320px;font-size: 14px; color: #ffffff; ">


            <div class="form-group">



                <label for="username"

                       class="col-xs-3 control-label  " style="font-weight: bold;">用户名:</label>


                <div class="input-group col-xs-9">

                    

                        <input type="text" class="form-control" id="username" name="username" placeholder="请输入用户名"

                               required>

          

                    

                </div>

            </div>

            <div class="form-group">

                <label for="password"

                       class="col-xs-3 control-label  " style="font-weight: bold;">密码:</label>


                <div class="input-group col-xs-9">

                     

                             <input type="password" class="form-control" id="password" name="password"

                                    placeholder="请输入密码" required>

                             

                   

                </div>

            </div>


            <div class=" form-group" style="text-align: right;margin-left: 20px">


                <button type="submit" id="btn_login" class="btn btn-palegreen ">登录</button>

                <button type="reset" class="btn btn-blue">重置</button>

                <a href="index.jsp" class="btn btn-warning">取消</a>

            </div>

            <label id="login_tips"  style="float: right;color: red;font-weight: 100;font-size: 12px">


            </label>

        </form>

</div>

</div>

   <script src="js/jquery.min.js"></script>

</body>

</html>

struts.xml

<?xml version="1.0" encoding="UTF-8"?>


<!DOCTYPE struts PUBLIC


"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"


"http://struts.apache.org/dtds/struts-2.3.dtd">


<struts>

<package name="default" namespace="/" extends="struts-default">

<action name="*_*" class="action.{1}Action" method="{2}">

<result name="login_success">login_success.jsp</result>

<result name="login_failure">index.jsp</result>

</action>

    </package>


</struts>


正在回答

2 回答

大部分同学的问题应该是有两个包没有导入,这个是老师没有注意到的地方,自行百度log4j的两个jar包,导入lib里面就可以解决,亲测可用~~

0 回复 有任何疑惑可以回复我~

错误信息是什么


0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

页面没跳转成功

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信