Hi, On Wed, 2011-07-06 at 23:04 -0300, Herli Joaquim de Menezes wrote:
> Now I have to create a Web application. In order to do this, I considered > using a MVC architecture. My first try was to use a control servlet, and > javabeans to handle the logic of the application. I got no success, I am not > used to work with javabeans, but as far as I know, there is no way to read > the OWL file in order to be processed by javabeans. Am I right? A javabean is just a java object with a particular convention for the naming of getters/setters. There's no problems with creating an OntModel and read an OWL file into it from within a javabean. > Then I tried > using servlets with no success. Likewise there's no problem with reading OWL files into models from within a servlet. > So I got lost and couldn't figure out how > can the OWL be read in order to be processed by web application. Does > anybody has some suggestion? Without more details on what was going wrong it is kind of hard to advise. At a guess you might have problems addressing your OWL file. When a servlet, or code run from a servlet, runs then its current directory is typically the home of the servlet container rather than the servlet itself. Though that depends on the servlet container. You can use absolute path names, include files as resources in your jars or use the ServletContext methods like getResource and getRealPath to access files but don't rely on direct file reads of relative addresses. If that's your issue then that is generic servlet programming and not specific to Jena. Dave
