jsp中的jena包

发布于 2024-09-08 22:32:16 字数 1407 浏览 1 评论 0原文

我将 Jena 包导入到我的 JSP 页面中。

<%@ page import="com.hp.hpl.jena.datatypes.xsd.XSDDatatype" %>
<%@ page import="com.hp.hpl.jena.ontology.DatatypeProperty" %>
<%@ page import="com.hp.hpl.jena.ontology.Individual" %>
<%@ page import="com.hp.hpl.jena.ontology.OntClass" %>
<%@ page import="com.hp.hpl.jena.ontology.OntModel" %>
<%@ page import="com.hp.hpl.jena.ontology.OntModelSpec" %>
<%@ page import="com.hp.hpl.jena.rdf.model.Literal" %>
<%@ page import="com.hp.hpl.jena.rdf.model.ModelFactory" %>
<%@ page import="com.hp.hpl.jena.rdf.model.Statement" %>
<%@ page import="com.hp.hpl.jena.util.FileManager" %>

当我运行它时,会提示错误:

org.apache.jasper.JasperException: Unable to compile class for JSP: 

An error occurred at line: 9 in the generated java file
Only a type can be imported. com.hp.hpl.jena.datatypes.xsd.XSDDatatype resolves to a package

An error occurred at line: 10 in the generated java file
Only a type can be imported. com.hp.hpl.jena.ontology.DatatypeProperty resolves to a package

An error occurred at line: 11 in the generated java file
Only a type can be imported. com.hp.hpl.jena.ontology.Individual resolves to a package

An error occurred at line: 12 in the generated java file
Only a type can be imported. com.hp.hpl.jena.ontology.OntClass resolves to a package

我该如何纠正这个问题?

i imported Jena packages into my JSP page.

<%@ page import="com.hp.hpl.jena.datatypes.xsd.XSDDatatype" %>
<%@ page import="com.hp.hpl.jena.ontology.DatatypeProperty" %>
<%@ page import="com.hp.hpl.jena.ontology.Individual" %>
<%@ page import="com.hp.hpl.jena.ontology.OntClass" %>
<%@ page import="com.hp.hpl.jena.ontology.OntModel" %>
<%@ page import="com.hp.hpl.jena.ontology.OntModelSpec" %>
<%@ page import="com.hp.hpl.jena.rdf.model.Literal" %>
<%@ page import="com.hp.hpl.jena.rdf.model.ModelFactory" %>
<%@ page import="com.hp.hpl.jena.rdf.model.Statement" %>
<%@ page import="com.hp.hpl.jena.util.FileManager" %>

When I run it, the error will prompt:

org.apache.jasper.JasperException: Unable to compile class for JSP: 

An error occurred at line: 9 in the generated java file
Only a type can be imported. com.hp.hpl.jena.datatypes.xsd.XSDDatatype resolves to a package

An error occurred at line: 10 in the generated java file
Only a type can be imported. com.hp.hpl.jena.ontology.DatatypeProperty resolves to a package

An error occurred at line: 11 in the generated java file
Only a type can be imported. com.hp.hpl.jena.ontology.Individual resolves to a package

An error occurred at line: 12 in the generated java file
Only a type can be imported. com.hp.hpl.jena.ontology.OntClass resolves to a package

How can I correct this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文