Member since
01-20-2016
6
Posts
4
Kudos Received
0
Solutions
02-15-2016
05:45 AM
1 Kudo
Yes, i have added libraries in both WEB-INF/lib and in WEB-INF/classes and now I can able to access my hive tables in JSP pages.
... View more
02-11-2016
07:45 AM
1 Kudo
Hi, I'm just trying to connect my JSP program to retrieve data from hive database. So my jsp code for that is as follows, <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="java.io.*,java.util.*,java.sql.*"%>
<%@ HTTP Status 500 - The absolute uri: http://java.sun.com/jstl/core
cannot be resolved in either web.xml or the jar files deployed with this
application
page import="javax.servlet.http.*,javax.servlet.*" %>
<%@taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="sql" %>
<!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>SELECT OPERATION</title>
</head>
<body>
<sql:setDataSource var="snapshot" driver="org.apache.hive.jdbc.HiveDriver" url="jdbc:hive2://localhost:10000/default" user="root" password="hadoop"/>
<sql:query dataSource="${snapshot}" var="result">SELECT * from test;</sql:query>
<table border="1" width="100%">
<tr>
<th>S.No</th>
<th>Name</th>
</tr>
<c:forEach var="row" items="${result.rows}">
<tr>
<td>
<c:out value="${row.sno}"/>
</td>
<td>
<c:out value="${row.name}"/>
</td>
</tr>
</c:forEach>
</table>
</body></html> web.xml: <?xml version="1.0" encoding="UTF-8"?>
<web-app
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
</web-app> POM.xml : <?xml version="1.0" encoding="UTF-8"?>
<dependency>
<groupId>jstl</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency> I have created a test table in hive database with the following schema (sno int,name String); Server -Tomcat v7 The error which am getting is given below. Please provide me a solution to connect with hive server 2 using JSP
The absolute uri: http://java.sun.com/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application
... View more
Labels:
- Labels:
-
Apache Hive
01-20-2016
06:19 AM
1 Kudo
Hi, I'm working on a project, in that i have to fetch data from hive table to my web pages which was developed in html & jquery. Can u please suggest me any idea to do so..or shall we use obdc connectivity to retrieve those hive records. Thanks in advance. Regards, Priya
... View more
Labels:
- Labels:
-
Apache Hadoop
-
Apache Hive