As in any Web application you will have to make architectural decisions for three or more layers.
Storage layer
Most of the tools for ontology manipulation (Jena, Virtuoso, Sesame, Protege) offers a number of ways to store your data: in-process (in memory) models, RDB model (in RDBMS of your choice), native format storage. The choice depends on your environment constrains and performance/scalability requirements.
Manipulation layer
Selecting a solution here brings always some trade-off between level of abstraction and expressiveness. This is because it's hard to map all ontology constructs to object-oriented constructs.
Given that you may choose between:
- Jastor or JenaBean that generates Java POJO classes corresponding to your ontology classes, and
- Jena
Model
/OntModel
, or Protege API to minipulate RDF, OWL, and frame-based ontologies on a lower level.
Jastor wraps Jena OntModel
or Model
but hides Jena internals from you, so if you find it limited you may always extend it. Note, Jastor seems not to be maintained any more.
Representation layer
Manipulation layer technologies let's you hide ontology internals from the representation view, so you may use traditional technologies like JSP to produce HTML output. Still, for some problems it may be convenient for you to emit model in RDF/XML format and apply XSL(T)-like transformation to it. I found rx4RDF, a Python-based tool, useful for supporting this kind of transformations.
Disclaimer: I worked 6 years ago with the mentioned technologies. Things may have changed in the meantime. Hence:
- I encourage you to see architectures of different existing Semantic Web applications and find the one that suits your problem. For instance here.
- Although lot's of work has been done in the field of Semantic Web tooling, this is still nichè technology. To target better your question, you may try to ask your question on product mailing lists and research fora.
- Also, W3C maintains pretty long list of tools for RDF processing.