I get the answer
down vote
accept
Build Path -> Configuration Build Path -> Add External Jars
In "Order and Export" tab click on select all...
or coping file into WEB-INF/lib
Then just refresh your project and restart the server then deploy the project
it will work fine...
> From: [email protected]
> To: [email protected]
> Subject: Error Hbase in JSP
> Date: Thu, 15 Mar 2012 17:39:28 +0800
>
>
> Dear All friends
>
> I create a JSP project. There are two files in my project. the fist one in
> Test.java and the second one is HbasePage.jsp.
>
> I wrote a simple code in Test.Java as u can see in following. this code ran
> successfully
>
> System.out.println("Hbase Tester Begining");
> try
> {
> Configuration _conf = HBaseConfiguration.create();
> }
> catch(Exception ex)
> {
> System.out.println("Error"+ex.getMessage());
> }
>
> after that I copy this code in my JSP file. I don't forget import the
> packages to the JSP file ;) so when I run my JSP file in Tomcat 7 , I saw
> these errors :
>
> An error occurred at line: 1 in the generated java file
> The type org.apache.hadoop.conf.Configuration cannot be resolved. It is
> indirectly referenced from required .class files
>
> An error occurred at line: 15 in the generated java file
> Only a type can be imported. org.apache.hadoop.hbase.HBaseConfiguration
> resolves to a package
>
> An error occurred at line: 17 in the generated java file
> Only a type can be imported. org.apache.hadoop.conf.Configuration resolves to
> a package
>
> Amazing...... they are in the same project and I added all Jar files to my
> project ....
>
> please advice me.
>
>
>
>
>