Joel,

At first look it seemed to me odd, but I google search I got this link. It
seems that you have not provided ' ; ' at the end of  your import. Also
test it out putting the jar in the webapps/lib or <tomcat-root>/lib.

I need to research on aptitude installation though. The following link
might help.

http://stackoverflow.com/questions/1858463/java-error-only-a-type-can-be-imported-xyz-resolves-to-a-package

best of luck
Vishwanath

On Thu, Sep 13, 2012 at 11:12 AM, joel badia escolà <basto...@gmail.com>wrote:

> Hello everyone, i have a problem with my jsp app for adding external
> jars. First of all I have tried the same code and app directory
> structure in netbeans ide "built-in" tomcat and works fine, but when i
> try to serve my app in my tomcat installation (installed using
> aptitude) it seems that it's impossible to locate the external jar.
>
> Only with this code:
>
> <%@page import="weka.classifiers.trees.RandomTree" %>
>
> <%
> RandomTree t = new RandomTree();
> out.println();
> out.println("It works");
> %>
>
> I get this error message:
>
> org.apache.jasper.JasperException: Unable to compile class for JSP:
>
> An error occurred at line: 6 in the generated java file
> Only a type can be imported. weka.classifiers.trees.RandomTree
> resolves to a package
>
> An error occurred at line: 6 in the jsp file:
> /DiseaseDiscover/make_diagnosis.jsp
> RandomTree cannot be resolved to a type
> 3: <%@page import="weka.classifiers.trees.RandomTree" %>
> 4:
> 5: <%
> 6: RandomTree t = new RandomTree();
> 7: out.println();
> 8: out.println("It works");
> 9: %>
>
> I tried to put weka.jar in all this directories my-app/WEB-INF/lib/ &
> /var/lib/tomcat6/common/ & /var/lib/tomcat6/server/ &
> /usr/share/tomcat6/lib/
>
> In all directories I get the same error message.
>
> Greetings,
>
> Joel
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

Reply via email to