day6_EL

博客介绍了EL标签,它可用于取数据和输出数据,能简化JSP代码。阐述了EL表达式语法,如${输出数据或者取对象} ,还提及JSP传值的三种方法。介绍了EL隐含对象查找值的范围,指出EL不能做循环,需引入jstl,同时给出了jstl表达式控制标签示例。

EL:通过EL标签取数据和输出数据,简化代码,尽量在JSP中不要使用Java代码。
语法:${输出数据或者取对象} 可不能用它来搞for循环
一.el中的表达式

    a)算术运算符
       +、-、*、/和 %(或 mod)
    b)关系运算符
	 ==(或 eq)、!=(或 ne)、<(或 lt)、
	>(或 gt)、<=(或 le)和 >=(或 ge)
    c)逻辑运算符
	 &&(或 and)、||(或 or)和 !(或 not) 
    d)判空运算符
	**empty**
	      <%String name="";
	      request.setAttribute("name",name);%>
	  如:${empty name}
 测试:

login.jsp

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
	%>
	<base href="<%=basePath%>" />
	
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>邮箱登录</title>
<style type="text/css">
	body{
		font-size: 20px;
		margin: 0px;
		padding: 0px;
		background: url("logo.gif");
		background-repeat: no-repeat;
		background-position: right,bottom;
		background-color: #7DDC87;
	}
	input {
		border: 1px solid yellow;
		border-radius:20px;
		line-height: 25px;
	}
	.btn:LINK;.btn:VISITED {
		background-color: #F0F0F0;
    }
    .btn:HOVER {
		background-color: #148D08;

	}
</style>
</head>
<body>
<%=basePath %>
<%
String error = request.getParameter("error");
if(error!=null&&error.equals("")){
	out.println(error);
                         }
%>
	<center>
	<!-- String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";已经到了项目下边  -->
		<form action="form/loginCL.jsp">
			<table>
				<tr><td>用户名:</td>
				<td><input type="text" name="name"></td>
					<td>@163.com</td></tr>
				<tr><td>密&nbsp;&nbsp;码:</td>
				<td><input type="password" name="pwd"></td>
					<td><a href="">忘记密码</a></td></tr>	
			</table>
				<input type="submit" value="登录" class="btn">
					&nbsp;<a href="register.html">注册邮箱</a>
		</form>
	</center>
</body>
</html>

loginCL.jsp

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!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>逻辑处理</title>
</head>
<body>
<%
//在jsp中这些都是可以直接用的 不需要再new出来
    String name1  = request.getParameter("name");
     String pwd  = request.getParameter("pwd"); 
   if("briup".equals(name1)&&"briup".equals(pwd)){
	   request.setAttribute("name","briup");
	   /* request.getDispatcherType("success").forward(request.response); */
	   %>
	   <!-- 动态引入 -->
	  <jsp:include  page = "success.jsp"></jsp:include> 
	  <%-- <jsp:param value="briup" name="name"/> --%>

	   
	   
	   <%
	/*    response.sendRedirect("success.jsp"); */
   }else{
	   /* request.getRequestDispatcher("login.jsp").forward( request, response); */
	   %>
	   <jsp:forward page="login.jsp">
	      <jsp:param  value="用户名密码不正确" name="error"/>
	   </jsp:forward>
	   <% 
	
   }
%>
</body>
</html>

success.jsp

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!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>登录成功</title>
</head>

    <body>

<%-- 恭喜<%=request.getParameter("name") %>登陆成功 --%>
恭喜${name}, 登陆成功 
</body>
</html>

恭喜${name}, 登陆成功 中采用了el 表达式;
jsp中传值有三种方法:
1.jsp的动态传入

<jsp:include  page = "success.jsp">
<jsp:param value="briup" name="name"/>
</jsp:include> 

2.java代码传值 动态跳转

<% request.setAttribute("name","briup");%>
 <jsp:include  page = "success.jsp"></jsp:include> 

3.纯java传值和跳转

<%
request.setAttribute("name","briup");
 request.getRequestDispatcher("success.jsp").forward(request,response);
%>

二:表达式语言(EL)中可以使用的隐含对象:

1) pageContext: jsp页面的上下文,它提供了访问以下对象的方法,唯一一个既是jsp的隐含对象,又是el的隐含对象。通过.操作符来得到数据。

        a) servletContext 
			${pageContext.servletContext}
			等于
			out.println(pageContext.getServletContext())
		b) session
			${pageContext.session.id}
			等于
			out.println(pageContext.getSession().getId())
		c) request
			${pageContext.request}
			等于
			out.println(pageContext.getRequest())
		d) response
			${pageContext.response}
			等于
			out.println(pageContext.getResponse())
2) param: 把请求中的参数和单个值进行映射
          ${param.name}或者${param["name"]}或者${param['name']}
  		 等于
  		out.println(request.getParameter("name"))
3) paramValues: 把请求中的参数和一个array值进行映射,比如获取多选框的值。
	${paramValues.hobby}
	或者${paramValues["hobby"]}
	或者${paramValues['hobby']}
   	等于
	String[] array = 
	request.getParameterValues("hobby")
    	out.println(array);
	${paramValues.hobby[0]}
4) cookie: 把请求中的Cookie和单个值进行映射
	Cookie cookie = new Cookie("height","100");
	Cookie cookie2 = new Cookie("width","200");
	response.addCookie(cookie);
	response.addCookie(cookie2);

     在服务器端获得从客户端发送过来的cookie:
	${cookie.height}: 输出一个Cookie的对象
	${cookie.height.name}=${cookie.height.value}
		分别输出Cookie的名称和值(height=100)
		${cookie.width}: 同上
	${cookie.width.name}=${cookie.width.value}: 同上

5) initParam: 把Web应用上下文的初始化参数和单个值进行映射
	${initParam.name}
	等于
	String value = getServletContext().getInitParameter("name");
	out.println(value);

6) pageScope: 把page范围中的key和value进行映射
	pageContext.setAttribute("name","jack");		
	${pageScope.name}
	等于
	out.println(pageContext.getAttribute("name"));
7) requestScope: 把request范围中的key和value进行映射
	request.setAttribute("name","jack");
	${requestScope.name}
	等于
	out.println(request.getAttribute("name"));
8) sessionScope: 把session范围中的key和value进行映射
	session.setAttribute("name","jack");
	${sessionScope.name}
	等于
	out.println(session.getAttribute("name"));
9) applicationScope: 把application范围中的key和value进行映射
	getServletContext().setAttribute("name","jack");
	${applicationScope.name}
	等于
	out.println(getServletContext().getAttribute("name"));

注意: 如果没有指明任何的范围根据key来查找对应的value,默认从page、request、session和application从小到大的范围开始查找,若找到就不往更大的
范围去查找。
例如: ${name} ,分别从page request session 和 application中去查找name的值
(scope.getAttribute(“name”)),scope为上面四种范围。
测试超链接后谁能拿到值:
el1.jsp

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!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>el表达式</title>
</head>
<body>
${4+5}
<br>
${6>4 }
<br>
<%
request.setAttribute("name", "rr");
pageContext.setAttribute("name1","pp");
session.setAttribute("name","ss");
application.setAttribute("name","aa");

%>
${ empty name} <br>
${name }
<br>
	${pageContext.session.id}
	<%out.println(pageContext.getSession().getId()); %>
<br>
page:${pageScope.name }
<br>
session:${sessionScope.name }
<br>
app:${applicationScope.name }
<br>
request:${requestScope.name }
<br>
name:${name }
<br>
<a href = "el2.jsp">跳转查传过去的能不能取到</a>
</body>
</html>

el2.jsp

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!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>
</head>
<body>
page:${pageScope.name }
<br>
session:${sessionScope.name }
<br>
app:${applicationScope.name }
<br>
request:${requestScope.name }
</body>
</html>

在这里插入图片描述发现只是剩下了application和session
同时我们也发现,el是不能做循环的,所以就引入了jstl这是第三方的得引入架包,但是刚有架包还不行,还得在jsp页面中引进来

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
 <%@ taglib prefix = "c" uri="http://java.sun.com/jsp/jstl/core" %>
<!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>jstl</title>
</head>
<body>
<h1>c:out</h1>
<c:out value="briup"></c:out>
</body>
</html>

如果出现啥xml解析错误啥的,看一下你的引用中是不是有空格,。!等
关于jsti:
第一类:表达式控制标签
1、<c:out> 输出变量到JspWriter输出流中

  1. 语法1:<c:out value=“result”
    [escapeXml]="{true|false}"
    [default=“defaultValue”]/>
    注意:a)如果result为null,则输出default中的值
<c:out value="${name }" default="tom" ></c:out>
       b)escapeXml:设定是否转换特殊字符(如&lt;、&gt;等一些转
  义字符),在默认值为true的情况下直接是输出&lt;的,如果改为 false将会进行转义输出“<”等。
  2) 语法2:<c:out value="result" [escapeXml]="{true|false}">default value</c:out>

例如: value可以使用el表达式
<c:out value="${student.address.country}"/>
实例:
Login.jsp

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!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>login页面</title>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
	%>
	<base href="<%=basePath%>" />
</head>

<body>
<form action="login">
账号:<input type="text" name = "name"/><br>
密码:<input type="text" name="password"/><br>
<input type="submit" value="提交">
</form>
</body>
</html>

servlet

package com.briup.servlet;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import javax.websocket.Session;

import com.briup.bean.User;

public class UserLoginServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		 request.setCharacterEncoding("utf-8");
   	    response.setCharacterEncoding("utf-8");
   	    response.setContentType("text/html;charset=utf-8");
		String name = (String)request.getParameter("name");
		String password = (String)request.getParameter("password");
		System.out.println(name);
		User u = new User();
		   u.setName(name);
           u.setPassword(password);	
           
              HttpSession session = request.getSession();
              session.setAttribute("u",u);
           
           request.getRequestDispatcher("success.jsp").forward(request,	 response);
	}
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		doGet(request, response);
	}

}

success.jsp

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
 <%@taglib prefix="c"  uri="http://java.sun.com/jsp/jstl/core" %>
<!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>登录成功</title>
</head>
<body>
账号:<c:out  value="${u.name}" default="null"/><br>
密码:<c:out  value="${u.password}" default="null" />
</body>
</html>

在这里插入图片描述在这里插入图片描述

[root@yfw ~]# cd /opt/openfire [root@yfw openfire]# java -version openjdk version "1.8.0_312" OpenJDK Runtime Environment (build 1.8.0_312-b07) OpenJDK 64-Bit Server VM (build 25.312-b07, mixed mode) [root@yfw openfire]# # 应输出:openjdk version "11.0.13" ... [root@yfw openfire]# sudo find /usr -name "java" -path "*/bin/java" 2>/dev/null | grep -i java-11 /usr/lib/jvm/java-11-openjdk-11.0.13.0.8-4.el8_5.x86_64/bin/java [root@yfw openfire]# export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-11.0.13.0.8-4.el8_5.x86_64 [root@yfw openfire]# export PATH=$JAVA_HOME/bin:$PATH [root@yfw openfire]# java -version openjdk version "11.0.13" 2021-10-19 LTS OpenJDK Runtime Environment 18.9 (build 11.0.13+8-LTS) OpenJDK 64-Bit Server VM 18.9 (build 11.0.13+8-LTS, mixed mode, sharing) [root@yfw openfire]# javac -version javac 11.0.13 [root@yfw openfire]# echo $JAVA_HOME /usr/lib/jvm/java-11-openjdk-11.0.13.0.8-4.el8_5.x86_64 [root@yfw openfire]# sudo yum install -y git maven Failed to set locale, defaulting to C.UTF-8 Last metadata expiration check: 1 day, 18:59:27 ago on Wed Oct 1 12:25:44 2025. Package git-2.27.0-1.el8.x86_64 is already installed. Dependencies resolved. ========================================================================================================== Package Arch Version Repo Size ========================================================================================================== Installing: maven noarch 1:3.5.4-5.module_el8.0.0+39+6a9b6e22 AppStream 27 k Installing dependencies: aopalliance noarch 1.0-17.module_el8.0.0+39+6a9b6e22 AppStream 17 k apache-commons-cli noarch 1.4-4.module_el8.0.0+39+6a9b6e22 AppStream 74 k apache-commons-codec noarch 1.11-3.module_el8.0.0+39+6a9b6e22 AppStream 288 k apache-commons-io noarch 1:2.6-3.module_el8.0.0+39+6a9b6e22 AppStream 224 k apache-commons-lang3 noarch 3.7-3.module_el8.0.0+39+6a9b6e22 AppStream 483 k apache-commons-logging noarch 1.2-13.module_el8.0.0+39+6a9b6e22 AppStream 85 k atinject noarch 1-28.20100611svn86.module_el8.0.0+39+6a9b6e22 AppStream 20 k cdi-api noarch 1.2-8.module_el8.0.0+39+6a9b6e22 AppStream 70 k geronimo-annotation noarch 1.0-23.module_el8.0.0+39+6a9b6e22 AppStream 25 k glassfish-el-api noarch 3.0.1-0.7.b08.module_el8.0.0+39+6a9b6e22 AppStream 105 k google-guice noarch 4.1-11.module_el8.0.0+39+6a9b6e22 AppStream 471 k guava20 noarch 20.0-8.module_el8.0.0+39+6a9b6e22 AppStream 2.1 M hawtjni-runtime noarch 1.16-2.module_el8.0.0+39+6a9b6e22 AppStream 43 k httpcomponents-client noarch 4.5.5-4.module_el8.0.0+39+6a9b6e22 AppStream 718 k httpcomponents-core noarch 4.4.10-3.module_el8.0.0+39+6a9b6e22 AppStream 638 k jansi noarch 1.17.1-1.module_el8.0.0+82+8ee6c375 AppStream 79 k jansi-native x86_64 1.7-7.module_el8.0.0+39+6a9b6e22 AppStream 75 k java-1.8.0-openjdk-devel x86_64 1:1.8.0.312.b07-2.el8_5 AppStream 9.8 M javapackages-tools noarch 5.3.0-1.module_el8.0.0+11+5b8c10bd AppStream 44 k jboss-interceptors-1.2-api noarch 1.0.0-8.module_el8.0.0+39+6a9b6e22 AppStream 33 k jcl-over-slf4j noarch 1.7.25-4.module_el8.0.0+39+6a9b6e22 AppStream 32 k jsoup noarch 1.11.3-3.module_el8.0.0+39+6a9b6e22 AppStream 386 k maven-lib noarch 1:3.5.4-5.module_el8.0.0+39+6a9b6e22 AppStream 1.4 M maven-resolver-api noarch 1:1.1.1-2.module_el8.0.0+39+6a9b6e22 AppStream 138 k maven-resolver-connector-basic noarch 1:1.1.1-2.module_el8.0.0+39+6a9b6e22 AppStream 51 k maven-resolver-impl noarch 1:1.1.1-2.module_el8.0.0+39+6a9b6e22 AppStream 177 k maven-resolver-spi noarch 1:1.1.1-2.module_el8.0.0+39+6a9b6e22 AppStream 40 k maven-resolver-transport-wagon noarch 1:1.1.1-2.module_el8.0.0+39+6a9b6e22 AppStream 39 k maven-resolver-util noarch 1:1.1.1-2.module_el8.0.0+39+6a9b6e22 AppStream 148 k maven-shared-utils noarch 3.2.1-0.1.module_el8.0.0+39+6a9b6e22 AppStream 165 k maven-wagon-file noarch 3.1.0-1.module_el8.0.0+39+6a9b6e22 AppStream 26 k maven-wagon-http noarch 3.1.0-1.module_el8.0.0+39+6a9b6e22 AppStream 27 k maven-wagon-http-shared noarch 3.1.0-1.module_el8.0.0+39+6a9b6e22 AppStream 49 k maven-wagon-provider-api noarch 3.1.0-1.module_el8.0.0+39+6a9b6e22 AppStream 63 k plexus-cipher noarch 1.7-14.module_el8.0.0+39+6a9b6e22 AppStream 29 k plexus-classworlds noarch 2.5.2-9.module_el8.0.0+39+6a9b6e22 AppStream 65 k plexus-containers-component-annotations noarch 1.7.1-8.module_el8.0.0+39+6a9b6e22 AppStream 24 k plexus-interpolation noarch 1.22-9.module_el8.0.0+39+6a9b6e22 AppStream 79 k plexus-sec-dispatcher noarch 1.4-26.module_el8.0.0+39+6a9b6e22 AppStream 37 k plexus-utils noarch 3.1.0-3.module_el8.0.0+39+6a9b6e22 AppStream 259 k publicsuffix-list noarch 20180723-1.el8 base 79 k sisu-inject noarch 1:0.3.3-6.module_el8.0.0+39+6a9b6e22 AppStream 339 k sisu-plexus noarch 1:0.3.3-6.module_el8.0.0+39+6a9b6e22 AppStream 180 k slf4j noarch 1.7.25-4.module_el8.0.0+39+6a9b6e22 AppStream 77 k Enabling module streams: maven 3.5 scala 2.10 Transaction Summary ========================================================================================================== Install 45 Packages Total download size: 19 M Installed size: 52 M Downloading Packages: (1/45): apache-commons-cli-1.4-4.module_el8.0.0+39+6a9b6e22.noarch.rpm 4.3 MB/s | 74 kB 00:00 (2/45): aopalliance-1.0-17.module_el8.0.0+39+6a9b6e22.noarch.rpm 860 kB/s | 17 kB 00:00 (3/45): publicsuffix-list-20180723-1.el8.noarch.rpm 3.3 MB/s | 79 kB 00:00 (4/45): apache-commons-codec-1.11-3.module_el8.0.0+39+6a9b6e22.noarch.rpm 11 MB/s | 288 kB 00:00 (5/45): apache-commons-io-2.6-3.module_el8.0.0+39+6a9b6e22.noarch.rpm 7.7 MB/s | 224 kB 00:00 (6/45): apache-commons-lang3-3.7-3.module_el8.0.0+39+6a9b6e22.noarch.rpm 14 MB/s | 483 kB 00:00 (7/45): atinject-1-28.20100611svn86.module_el8.0.0+39+6a9b6e22.noarch.rpm 1.7 MB/s | 20 kB 00:00 (8/45): apache-commons-logging-1.2-13.module_el8.0.0+39+6a9b6e22.noarch.r 4.2 MB/s | 85 kB 00:00 (9/45): geronimo-annotation-1.0-23.module_el8.0.0+39+6a9b6e22.noarch.rpm 3.6 MB/s | 25 kB 00:00 (10/45): cdi-api-1.2-8.module_el8.0.0+39+6a9b6e22.noarch.rpm 4.3 MB/s | 70 kB 00:00 (11/45): glassfish-el-api-3.0.1-0.7.b08.module_el8.0.0+39+6a9b6e22.noarch 7.8 MB/s | 105 kB 00:00 (12/45): hawtjni-runtime-1.16-2.module_el8.0.0+39+6a9b6e22.noarch.rpm 2.9 MB/s | 43 kB 00:00 (13/45): google-guice-4.1-11.module_el8.0.0+39+6a9b6e22.noarch.rpm 13 MB/s | 471 kB 00:00 (14/45): httpcomponents-client-4.5.5-4.module_el8.0.0+39+6a9b6e22.noarch. 16 MB/s | 718 kB 00:00 (15/45): httpcomponents-core-4.4.10-3.module_el8.0.0+39+6a9b6e22.noarch.r 15 MB/s | 638 kB 00:00 (16/45): guava20-20.0-8.module_el8.0.0+39+6a9b6e22.noarch.rpm 25 MB/s | 2.1 MB 00:00 (17/45): jansi-1.17.1-1.module_el8.0.0+82+8ee6c375.noarch.rpm 3.1 MB/s | 79 kB 00:00 (18/45): jansi-native-1.7-7.module_el8.0.0+39+6a9b6e22.x86_64.rpm 3.7 MB/s | 75 kB 00:00 (19/45): jboss-interceptors-1.2-api-1.0.0-8.module_el8.0.0+39+6a9b6e22.no 4.4 MB/s | 33 kB 00:00 (20/45): javapackages-tools-5.3.0-1.module_el8.0.0+11+5b8c10bd.noarch.rpm 2.1 MB/s | 44 kB 00:00 (21/45): jcl-over-slf4j-1.7.25-4.module_el8.0.0+39+6a9b6e22.noarch.rpm 2.6 MB/s | 32 kB 00:00 (22/45): maven-3.5.4-5.module_el8.0.0+39+6a9b6e22.noarch.rpm 3.6 MB/s | 27 kB 00:00 (23/45): jsoup-1.11.3-3.module_el8.0.0+39+6a9b6e22.noarch.rpm 16 MB/s | 386 kB 00:00 (24/45): maven-resolver-api-1.1.1-2.module_el8.0.0+39+6a9b6e22.noarch.rpm 7.2 MB/s | 138 kB 00:00 (25/45): maven-resolver-connector-basic-1.1.1-2.module_el8.0.0+39+6a9b6e2 3.5 MB/s | 51 kB 00:00 (26/45): maven-lib-3.5.4-5.module_el8.0.0+39+6a9b6e22.noarch.rpm 22 MB/s | 1.4 MB 00:00 (27/45): maven-resolver-impl-1.1.1-2.module_el8.0.0+39+6a9b6e22.noarch.rp 7.2 MB/s | 177 kB 00:00 (28/45): maven-resolver-spi-1.1.1-2.module_el8.0.0+39+6a9b6e22.noarch.rpm 3.8 MB/s | 40 kB 00:00 (29/45): java-1.8.0-openjdk-devel-1.8.0.312.b07-2.el8_5.x86_64.rpm 63 MB/s | 9.8 MB 00:00 (30/45): maven-resolver-transport-wagon-1.1.1-2.module_el8.0.0+39+6a9b6e2 760 kB/s | 39 kB 00:00 (31/45): maven-resolver-util-1.1.1-2.module_el8.0.0+39+6a9b6e22.noarch.rp 2.7 MB/s | 148 kB 00:00 (32/45): maven-shared-utils-3.2.1-0.1.module_el8.0.0+39+6a9b6e22.noarch.r 9.9 MB/s | 165 kB 00:00 (33/45): maven-wagon-file-3.1.0-1.module_el8.0.0+39+6a9b6e22.noarch.rpm 1.6 MB/s | 26 kB 00:00 (34/45): maven-wagon-http-3.1.0-1.module_el8.0.0+39+6a9b6e22.noarch.rpm 1.7 MB/s | 27 kB 00:00 (35/45): maven-wagon-provider-api-3.1.0-1.module_el8.0.0+39+6a9b6e22.noar 5.6 MB/s | 63 kB 00:00 (36/45): maven-wagon-http-shared-3.1.0-1.module_el8.0.0+39+6a9b6e22.noarc 2.8 MB/s | 49 kB 00:00 (37/45): plexus-cipher-1.7-14.module_el8.0.0+39+6a9b6e22.noarch.rpm 2.1 MB/s | 29 kB 00:00 (38/45): plexus-classworlds-2.5.2-9.module_el8.0.0+39+6a9b6e22.noarch.rpm 5.6 MB/s | 65 kB 00:00 (39/45): plexus-containers-component-annotations-1.7.1-8.module_el8.0.0+3 2.3 MB/s | 24 kB 00:00 (40/45): plexus-interpolation-1.22-9.module_el8.0.0+39+6a9b6e22.noarch.rp 6.4 MB/s | 79 kB 00:00 (41/45): plexus-sec-dispatcher-1.4-26.module_el8.0.0+39+6a9b6e22.noarch.r 2.1 MB/s | 37 kB 00:00 (42/45): plexus-utils-3.1.0-3.module_el8.0.0+39+6a9b6e22.noarch.rpm 11 MB/s | 259 kB 00:00 (43/45): sisu-inject-0.3.3-6.module_el8.0.0+39+6a9b6e22.noarch.rpm 13 MB/s | 339 kB 00:00 (44/45): slf4j-1.7.25-4.module_el8.0.0+39+6a9b6e22.noarch.rpm 6.5 MB/s | 77 kB 00:00 (45/45): sisu-plexus-0.3.3-6.module_el8.0.0+39+6a9b6e22.noarch.rpm 7.8 MB/s | 180 kB 00:00 ---------------------------------------------------------------------------------------------------------- Total 48 MB/s | 19 MB 00:00 Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Installing : plexus-utils-3.1.0-3.module_el8.0.0+39+6a9b6e22.noarch 1/45 Installing : maven-resolver-api-1:1.1.1-2.module_el8.0.0+39+6a9b6e22.noarch 2/45 Installing : maven-wagon-provider-api-3.1.0-1.module_el8.0.0+39+6a9b6e22.noarch 3/45 Installing : maven-resolver-spi-1:1.1.1-2.module_el8.0.0+39+6a9b6e22.noarch 4/45 Installing : maven-resolver-util-1:1.1.1-2.module_el8.0.0+39+6a9b6e22.noarch 5/45 Installing : slf4j-1.7.25-4.module_el8.0.0+39+6a9b6e22.noarch 6/45 Installing : httpcomponents-core-4.4.10-3.module_el8.0.0+39+6a9b6e22.noarch 7/45 Installing : atinject-1-28.20100611svn86.module_el8.0.0+39+6a9b6e22.noarch 8/45 Installing : plexus-containers-component-annotations-1.7.1-8.module_el8.0.0+39+6a9b6e22.n 9/45 Installing : plexus-classworlds-2.5.2-9.module_el8.0.0+39+6a9b6e22.noarch 10/45 Installing : plexus-cipher-1.7-14.module_el8.0.0+39+6a9b6e22.noarch 11/45 Installing : hawtjni-runtime-1.16-2.module_el8.0.0+39+6a9b6e22.noarch 12/45 Installing : guava20-20.0-8.module_el8.0.0+39+6a9b6e22.noarch 13/45 Installing : apache-commons-io-1:2.6-3.module_el8.0.0+39+6a9b6e22.noarch 14/45 Installing : maven-shared-utils-3.2.1-0.1.module_el8.0.0+39+6a9b6e22.noarch 15/45 Installing : jansi-native-1.7-7.module_el8.0.0+39+6a9b6e22.x86_64 16/45 Installing : plexus-sec-dispatcher-1.4-26.module_el8.0.0+39+6a9b6e22.noarch 17/45 Installing : jcl-over-slf4j-1.7.25-4.module_el8.0.0+39+6a9b6e22.noarch 18/45 Installing : maven-resolver-impl-1:1.1.1-2.module_el8.0.0+39+6a9b6e22.noarch 19/45 Installing : plexus-interpolation-1.22-9.module_el8.0.0+39+6a9b6e22.noarch 20/45 Installing : geronimo-annotation-1.0-23.module_el8.0.0+39+6a9b6e22.noarch 21/45 Installing : apache-commons-logging-1.2-13.module_el8.0.0+39+6a9b6e22.noarch 22/45 Installing : apache-commons-lang3-3.7-3.module_el8.0.0+39+6a9b6e22.noarch 23/45 Installing : apache-commons-codec-1.11-3.module_el8.0.0+39+6a9b6e22.noarch 24/45 Installing : apache-commons-cli-1.4-4.module_el8.0.0+39+6a9b6e22.noarch 25/45 Installing : aopalliance-1.0-17.module_el8.0.0+39+6a9b6e22.noarch 26/45 Installing : google-guice-4.1-11.module_el8.0.0+39+6a9b6e22.noarch 27/45 Installing : jansi-1.17.1-1.module_el8.0.0+82+8ee6c375.noarch 28/45 Installing : maven-resolver-connector-basic-1:1.1.1-2.module_el8.0.0+39+6a9b6e22.noarch 29/45 Installing : maven-resolver-transport-wagon-1:1.1.1-2.module_el8.0.0+39+6a9b6e22.noarch 30/45 Installing : maven-wagon-file-3.1.0-1.module_el8.0.0+39+6a9b6e22.noarch 31/45 Installing : jsoup-1.11.3-3.module_el8.0.0+39+6a9b6e22.noarch 32/45 Installing : jboss-interceptors-1.2-api-1.0.0-8.module_el8.0.0+39+6a9b6e22.noarch 33/45 Installing : javapackages-tools-5.3.0-1.module_el8.0.0+11+5b8c10bd.noarch 34/45 Error unpacking rpm package javapackages-tools-5.3.0-1.module_el8.0.0+11+5b8c10bd.noarch Installing : java-1.8.0-openjdk-devel-1:1.8.0.312.b07-2.el8_5.x86_64 35/45 error: unpacking of archive failed on file /usr/bin/build-classpath;68df09d9: cpio: open error: javapackages-tools-5.3.0-1.module_el8.0.0+11+5b8c10bd.noarch: install failed Running scriptlet: java-1.8.0-openjdk-devel-1:1.8.0.312.b07-2.el8_5.x86_64 35/45 failed to link /usr/bin/appletviewer -> /etc/alternatives/appletviewer: Operation not permitted failed to link /usr/bin/clhsdb -> /etc/alternatives/clhsdb: Operation not permitted failed to link /usr/bin/extcheck -> /etc/alternatives/extcheck: Operation not permitted failed to link /usr/bin/hsdb -> /etc/alternatives/hsdb: Operation not permitted failed to link /usr/bin/idlj -> /etc/alternatives/idlj: Operation not permitted failed to remove link /usr/bin/jaotc: Operation not permitted failed to link /usr/bin/javah -> /etc/alternatives/javah: Operation not permitted failed to remove link /usr/bin/jdeprscan: Operation not permitted failed to link /usr/bin/jhat -> /etc/alternatives/jhat: Operation not permitted failed to remove link /usr/bin/jhsdb: Operation not permitted failed to remove link /usr/bin/jimage: Operation not permitted failed to remove link /usr/bin/jlink: Operation not permitted failed to remove link /usr/bin/jmod: Operation not permitted failed to link /usr/bin/jsadebugd -> /etc/alternatives/jsadebugd: Operation not permitted failed to remove link /usr/bin/jshell: Operation not permitted failed to link /usr/bin/native2ascii -> /etc/alternatives/native2ascii: Operation not permitted failed to link /usr/bin/schemagen -> /etc/alternatives/schemagen: Operation not permitted failed to link /usr/bin/wsgen -> /etc/alternatives/wsgen: Operation not permitted failed to link /usr/bin/wsimport -> /etc/alternatives/wsimport: Operation not permitted failed to link /usr/bin/xjc -> /etc/alternatives/xjc: Operation not permitted Installing : glassfish-el-api-3.0.1-0.7.b08.module_el8.0.0+39+6a9b6e22.noarch 36/45 Installing : cdi-api-1.2-8.module_el8.0.0+39+6a9b6e22.noarch 37/45 Installing : sisu-inject-1:0.3.3-6.module_el8.0.0+39+6a9b6e22.noarch 38/45 Installing : sisu-plexus-1:0.3.3-6.module_el8.0.0+39+6a9b6e22.noarch 39/45 Installing : maven-lib-1:3.5.4-5.module_el8.0.0+39+6a9b6e22.noarch 40/45 Installing : publicsuffix-list-20180723-1.el8.noarch 41/45 Installing : httpcomponents-client-4.5.5-4.module_el8.0.0+39+6a9b6e22.noarch 42/45 Installing : maven-wagon-http-shared-3.1.0-1.module_el8.0.0+39+6a9b6e22.noarch 43/45 Installing : maven-wagon-http-3.1.0-1.module_el8.0.0+39+6a9b6e22.noarch 44/45 Installing : maven-1:3.5.4-5.module_el8.0.0+39+6a9b6e22.noarch 45/45 Running scriptlet: maven-1:3.5.4-5.module_el8.0.0+39+6a9b6e22.noarch 45/45 failed to link /usr/bin/mvn -> /etc/alternatives/mvn: Operation not permitted failed to link /usr/bin/mvnDebug -> /etc/alternatives/mvnDebug: Operation not permitted warning: %post(maven-1:3.5.4-5.module_el8.0.0+39+6a9b6e22.noarch) scriptlet failed, exit status 2 Error in POSTIN scriptlet in rpm package maven Running scriptlet: java-1.8.0-openjdk-devel-1:1.8.0.312.b07-2.el8_5.x86_64 45/45 Running scriptlet: maven-1:3.5.4-5.module_el8.0.0+39+6a9b6e22.noarch 45/45 Verifying : publicsuffix-list-20180723-1.el8.noarch 1/45 Verifying : aopalliance-1.0-17.module_el8.0.0+39+6a9b6e22.noarch 2/45 Verifying : apache-commons-cli-1.4-4.module_el8.0.0+39+6a9b6e22.noarch 3/45 Verifying : apache-commons-codec-1.11-3.module_el8.0.0+39+6a9b6e22.noarch 4/45 Verifying : apache-commons-io-1:2.6-3.module_el8.0.0+39+6a9b6e22.noarch 5/45 Verifying : apache-commons-lang3-3.7-3.module_el8.0.0+39+6a9b6e22.noarch 6/45 Verifying : apache-commons-logging-1.2-13.module_el8.0.0+39+6a9b6e22.noarch 7/45 Verifying : atinject-1-28.20100611svn86.module_el8.0.0+39+6a9b6e22.noarch 8/45 Verifying : cdi-api-1.2-8.module_el8.0.0+39+6a9b6e22.noarch 9/45 Verifying : geronimo-annotation-1.0-23.module_el8.0.0+39+6a9b6e22.noarch 10/45 Verifying : glassfish-el-api-3.0.1-0.7.b08.module_el8.0.0+39+6a9b6e22.noarch 11/45 Verifying : google-guice-4.1-11.module_el8.0.0+39+6a9b6e22.noarch 12/45 Verifying : guava20-20.0-8.module_el8.0.0+39+6a9b6e22.noarch 13/45 Verifying : hawtjni-runtime-1.16-2.module_el8.0.0+39+6a9b6e22.noarch 14/45 Verifying : httpcomponents-client-4.5.5-4.module_el8.0.0+39+6a9b6e22.noarch 15/45 Verifying : httpcomponents-core-4.4.10-3.module_el8.0.0+39+6a9b6e22.noarch 16/45 Verifying : jansi-1.17.1-1.module_el8.0.0+82+8ee6c375.noarch 17/45 Verifying : jansi-native-1.7-7.module_el8.0.0+39+6a9b6e22.x86_64 18/45 Verifying : java-1.8.0-openjdk-devel-1:1.8.0.312.b07-2.el8_5.x86_64 19/45 Verifying : javapackages-tools-5.3.0-1.module_el8.0.0+11+5b8c10bd.noarch 20/45 Verifying : jboss-interceptors-1.2-api-1.0.0-8.module_el8.0.0+39+6a9b6e22.noarch 21/45 Verifying : jcl-over-slf4j-1.7.25-4.module_el8.0.0+39+6a9b6e22.noarch 22/45 Verifying : jsoup-1.11.3-3.module_el8.0.0+39+6a9b6e22.noarch 23/45 Verifying : maven-1:3.5.4-5.module_el8.0.0+39+6a9b6e22.noarch 24/45 Verifying : maven-lib-1:3.5.4-5.module_el8.0.0+39+6a9b6e22.noarch 25/45 Verifying : maven-resolver-api-1:1.1.1-2.module_el8.0.0+39+6a9b6e22.noarch 26/45 Verifying : maven-resolver-connector-basic-1:1.1.1-2.module_el8.0.0+39+6a9b6e22.noarch 27/45 Verifying : maven-resolver-impl-1:1.1.1-2.module_el8.0.0+39+6a9b6e22.noarch 28/45 Verifying : maven-resolver-spi-1:1.1.1-2.module_el8.0.0+39+6a9b6e22.noarch 29/45 Verifying : maven-resolver-transport-wagon-1:1.1.1-2.module_el8.0.0+39+6a9b6e22.noarch 30/45 Verifying : maven-resolver-util-1:1.1.1-2.module_el8.0.0+39+6a9b6e22.noarch 31/45 Verifying : maven-shared-utils-3.2.1-0.1.module_el8.0.0+39+6a9b6e22.noarch 32/45 Verifying : maven-wagon-file-3.1.0-1.module_el8.0.0+39+6a9b6e22.noarch 33/45 Verifying : maven-wagon-http-3.1.0-1.module_el8.0.0+39+6a9b6e22.noarch 34/45 Verifying : maven-wagon-http-shared-3.1.0-1.module_el8.0.0+39+6a9b6e22.noarch 35/45 Verifying : maven-wagon-provider-api-3.1.0-1.module_el8.0.0+39+6a9b6e22.noarch 36/45 Verifying : plexus-cipher-1.7-14.module_el8.0.0+39+6a9b6e22.noarch 37/45 Verifying : plexus-classworlds-2.5.2-9.module_el8.0.0+39+6a9b6e22.noarch 38/45 Verifying : plexus-containers-component-annotations-1.7.1-8.module_el8.0.0+39+6a9b6e22.n 39/45 Verifying : plexus-interpolation-1.22-9.module_el8.0.0+39+6a9b6e22.noarch 40/45 Verifying : plexus-sec-dispatcher-1.4-26.module_el8.0.0+39+6a9b6e22.noarch 41/45 Verifying : plexus-utils-3.1.0-3.module_el8.0.0+39+6a9b6e22.noarch 42/45 Verifying : sisu-inject-1:0.3.3-6.module_el8.0.0+39+6a9b6e22.noarch 43/45 Verifying : sisu-plexus-1:0.3.3-6.module_el8.0.0+39+6a9b6e22.noarch 44/45 Verifying : slf4j-1.7.25-4.module_el8.0.0+39+6a9b6e22.noarch 45/45 Installed: aopalliance-1.0-17.module_el8.0.0+39+6a9b6e22.noarch apache-commons-cli-1.4-4.module_el8.0.0+39+6a9b6e22.noarch apache-commons-codec-1.11-3.module_el8.0.0+39+6a9b6e22.noarch apache-commons-io-1:2.6-3.module_el8.0.0+39+6a9b6e22.noarch apache-commons-lang3-3.7-3.module_el8.0.0+39+6a9b6e22.noarch apache-commons-logging-1.2-13.module_el8.0.0+39+6a9b6e22.noarch atinject-1-28.20100611svn86.module_el8.0.0+39+6a9b6e22.noarch cdi-api-1.2-8.module_el8.0.0+39+6a9b6e22.noarch geronimo-annotation-1.0-23.module_el8.0.0+39+6a9b6e22.noarch glassfish-el-api-3.0.1-0.7.b08.module_el8.0.0+39+6a9b6e22.noarch google-guice-4.1-11.module_el8.0.0+39+6a9b6e22.noarch guava20-20.0-8.module_el8.0.0+39+6a9b6e22.noarch hawtjni-runtime-1.16-2.module_el8.0.0+39+6a9b6e22.noarch httpcomponents-client-4.5.5-4.module_el8.0.0+39+6a9b6e22.noarch httpcomponents-core-4.4.10-3.module_el8.0.0+39+6a9b6e22.noarch jansi-1.17.1-1.module_el8.0.0+82+8ee6c375.noarch jansi-native-1.7-7.module_el8.0.0+39+6a9b6e22.x86_64 java-1.8.0-openjdk-devel-1:1.8.0.312.b07-2.el8_5.x86_64 jboss-interceptors-1.2-api-1.0.0-8.module_el8.0.0+39+6a9b6e22.noarch jcl-over-slf4j-1.7.25-4.module_el8.0.0+39+6a9b6e22.noarch jsoup-1.11.3-3.module_el8.0.0+39+6a9b6e22.noarch maven-1:3.5.4-5.module_el8.0.0+39+6a9b6e22.noarch maven-lib-1:3.5.4-5.module_el8.0.0+39+6a9b6e22.noarch maven-resolver-api-1:1.1.1-2.module_el8.0.0+39+6a9b6e22.noarch maven-resolver-connector-basic-1:1.1.1-2.module_el8.0.0+39+6a9b6e22.noarch maven-resolver-impl-1:1.1.1-2.module_el8.0.0+39+6a9b6e22.noarch maven-resolver-spi-1:1.1.1-2.module_el8.0.0+39+6a9b6e22.noarch maven-resolver-transport-wagon-1:1.1.1-2.module_el8.0.0+39+6a9b6e22.noarch maven-resolver-util-1:1.1.1-2.module_el8.0.0+39+6a9b6e22.noarch maven-shared-utils-3.2.1-0.1.module_el8.0.0+39+6a9b6e22.noarch maven-wagon-file-3.1.0-1.module_el8.0.0+39+6a9b6e22.noarch maven-wagon-http-3.1.0-1.module_el8.0.0+39+6a9b6e22.noarch maven-wagon-http-shared-3.1.0-1.module_el8.0.0+39+6a9b6e22.noarch maven-wagon-provider-api-3.1.0-1.module_el8.0.0+39+6a9b6e22.noarch plexus-cipher-1.7-14.module_el8.0.0+39+6a9b6e22.noarch plexus-classworlds-2.5.2-9.module_el8.0.0+39+6a9b6e22.noarch plexus-containers-component-annotations-1.7.1-8.module_el8.0.0+39+6a9b6e22.noarch plexus-interpolation-1.22-9.module_el8.0.0+39+6a9b6e22.noarch plexus-sec-dispatcher-1.4-26.module_el8.0.0+39+6a9b6e22.noarch plexus-utils-3.1.0-3.module_el8.0.0+39+6a9b6e22.noarch publicsuffix-list-20180723-1.el8.noarch sisu-inject-1:0.3.3-6.module_el8.0.0+39+6a9b6e22.noarch sisu-plexus-1:0.3.3-6.module_el8.0.0+39+6a9b6e22.noarch slf4j-1.7.25-4.module_el8.0.0+39+6a9b6e22.noarch Failed: javapackages-tools-5.3.0-1.module_el8.0.0+11+5b8c10bd.noarch Error: Transaction failed [root@yfw openfire]#
10-04
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值