<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: how to connect with hive database using JSP ? in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-connect-with-hive-database-using-JSP/m-p/136953#M19092</link>
    <description>&lt;P&gt;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.&lt;/P&gt;</description>
    <pubDate>Mon, 15 Feb 2016 13:45:39 GMT</pubDate>
    <dc:creator>priyadharshini_</dc:creator>
    <dc:date>2016-02-15T13:45:39Z</dc:date>
    <item>
      <title>how to connect with hive database using JSP ?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-connect-with-hive-database-using-JSP/m-p/136951#M19090</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm just trying to connect my JSP program to retrieve data from hive database.&lt;/P&gt;&lt;P&gt;So my jsp code for that is as follows,&lt;/P&gt;&lt;PRE&gt;&amp;lt;%@ page language="java" contentType="text/html; charset=UTF-8"  pageEncoding="UTF-8"%&amp;gt;
&amp;lt;%@ page import="java.io.*,java.util.*,java.sql.*"%&amp;gt;
&amp;lt;%@ HTTP Status 500 - The absolute uri: &lt;A href="http://java.sun.com/jstl/core" target="_blank"&gt;http://java.sun.com/jstl/core&lt;/A&gt; 
cannot be resolved in either web.xml or the jar files deployed with this
 application
page import="javax.servlet.http.*,javax.servlet.*" %&amp;gt;
&amp;lt;%@taglib uri="http://java.sun.com/jstl/core" prefix="c"%&amp;gt;
&amp;lt;%@ taglib uri="http://java.sun.com/jstl/core" prefix="sql" %&amp;gt;
 &amp;lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&amp;gt;
&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
&amp;lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&amp;gt;
&amp;lt;title&amp;gt;SELECT OPERATION&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
&amp;lt;sql:setDataSource var="snapshot" driver="org.apache.hive.jdbc.HiveDriver"  url="jdbc:hive2://localhost:10000/default"  user="root"  password="hadoop"/&amp;gt;
&amp;lt;sql:query dataSource="${snapshot}" var="result"&amp;gt;SELECT * from test;&amp;lt;/sql:query&amp;gt; 
&amp;lt;table border="1" width="100%"&amp;gt;
&amp;lt;tr&amp;gt;  
&amp;lt;th&amp;gt;S.No&amp;lt;/th&amp;gt; 
&amp;lt;th&amp;gt;Name&amp;lt;/th&amp;gt;
&amp;lt;/tr&amp;gt;
&amp;lt;c:forEach var="row" items="${result.rows}"&amp;gt;
&amp;lt;tr&amp;gt;  
&amp;lt;td&amp;gt;
&amp;lt;c:out value="${row.sno}"/&amp;gt;
&amp;lt;/td&amp;gt; 
&amp;lt;td&amp;gt;
&amp;lt;c:out value="${row.name}"/&amp;gt;
&amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt;
&amp;lt;/c:forEach&amp;gt;
&amp;lt;/table&amp;gt;
&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&lt;/PRE&gt;&lt;P&gt;web.xml:&lt;/P&gt;&lt;PRE&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;
&amp;lt;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"&amp;gt;
&amp;lt;/web-app&amp;gt;&lt;/PRE&gt;&lt;P&gt;POM.xml :&lt;/P&gt;&lt;PRE&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;
&amp;lt;dependency&amp;gt;
    &amp;lt;groupId&amp;gt;jstl&amp;lt;/groupId&amp;gt;
    &amp;lt;artifactId&amp;gt;jstl&amp;lt;/artifactId&amp;gt;
    &amp;lt;version&amp;gt;1.2&amp;lt;/version&amp;gt;
&amp;lt;/dependency&amp;gt;&lt;/PRE&gt;&lt;P&gt;I have created a &lt;EM&gt;test&lt;/EM&gt; table in hive database with the following schema &lt;EM&gt;(sno int,name String);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Server -Tomcat v7&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;The error which am getting is given below. Please provide me a solution to connect with hive server 2 using JSP&lt;/EM&gt;&lt;/P&gt;
&lt;PRE&gt;The absolute uri: &lt;A href="http://java.sun.com/jstl/core" target="_blank"&gt;http://java.sun.com/jstl/core&lt;/A&gt; cannot be resolved in either web.xml or the jar files deployed with this application&lt;/PRE&gt;</description>
      <pubDate>Thu, 11 Feb 2016 15:45:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-connect-with-hive-database-using-JSP/m-p/136951#M19090</guid>
      <dc:creator>priyadharshini_</dc:creator>
      <dc:date>2016-02-11T15:45:35Z</dc:date>
    </item>
    <item>
      <title>Re: how to connect with hive database using JSP ?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-connect-with-hive-database-using-JSP/m-p/136952#M19091</link>
      <description>&lt;P&gt;That does not sound like an Hive error at all but some library dependencies you have missing.&lt;/P&gt;&lt;P&gt;&lt;A href="http://stackoverflow.com/questions/4928271/how-to-install-jstl-the-absolute-uri-http-java-sun-com-jstl-core-cannot-be-r" target="_blank"&gt;http://stackoverflow.com/questions/4928271/how-to-install-jstl-the-absolute-uri-http-java-sun-com-jstl-core-cannot-be-r&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2016 17:57:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-connect-with-hive-database-using-JSP/m-p/136952#M19091</guid>
      <dc:creator>bleonhardi</dc:creator>
      <dc:date>2016-02-11T17:57:56Z</dc:date>
    </item>
    <item>
      <title>Re: how to connect with hive database using JSP ?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-connect-with-hive-database-using-JSP/m-p/136953#M19092</link>
      <description>&lt;P&gt;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.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Feb 2016 13:45:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-connect-with-hive-database-using-JSP/m-p/136953#M19092</guid>
      <dc:creator>priyadharshini_</dc:creator>
      <dc:date>2016-02-15T13:45:39Z</dc:date>
    </item>
    <item>
      <title>Re: how to connect with hive database using JSP ?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-connect-with-hive-database-using-JSP/m-p/136954#M19093</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/2278/priyadharshinishakthivel.html" nodeid="2278"&gt;@priya dharshini&lt;/A&gt; if Benjamin's answer help, please accept it.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Feb 2016 20:04:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-connect-with-hive-database-using-JSP/m-p/136954#M19093</guid>
      <dc:creator>aervits</dc:creator>
      <dc:date>2016-02-15T20:04:20Z</dc:date>
    </item>
  </channel>
</rss>

