-
1. Re: Adding a context to Jetty to use jsp pages
jonlee Aug 20, 2003 8:02 PM (in response to doc_brown)This is a solution. Since there are many things that must be statically defined, it is not flexible and may be subject to compilation and run-time failures. You would add the code fragment to your jbossweb-jetty.sar/META-INF/jboss-service.xml - probably after the listener definitions.
/documents/*
/docroot
Java Server Page
*.jsp
org.apache.jasper.servlet.JspServlet
/java/JBoss-3.2.0/server/default/lib/javax.servlet.jar:/java/JBoss-3.2.0/server/default/deploy/jbossweb-jetty.sar/jasper-runtime.jar
It would be easier to just add a directory called documents.war to your deploy directory. You can then drop your JSPs and static content into the directory. Note that you do not need a WEB-INF/web.xml if you only have JSPs and static content. -
2. Re: Adding a context to Jetty to use jsp pages
trajano Aug 23, 2003 5:54 PM (in response to doc_brown)Not really sure where to put this. This is the snippet I have before I started in the jboss-service.xml file inside jbossweb.sar\META-INF
/Curam/*
c:/Curam/webclient/Web Content/ -
3. Re: Adding a context to Jetty to use jsp pages
trajano Aug 23, 2003 7:44 PM (in response to doc_brown)I've got some partial good news on my part. I basically got JBoss to read the JSPs from a separate directory. However, it does not register the classpath properly nor the rest of the WEB-INFs :(
I created a App.war folder which contained the entire contents of WEB-INF from my original app and a jetty-web.xml file which contained:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure 1.2//EN" "http://jetty.mortbay.org/configure_1_2.dtd">
C:/Curam/webclient/Web Content
C:/Curam/webclient/Web Content
I tried to set the "classPath" here, but it does not work. It requires the classpath from the WEB-INF -
4. Re: Adding a context to Jetty to use jsp pages
jonlee Aug 25, 2003 8:03 AM (in response to doc_brown)The Jetty tutorials specifically recommend that the JBoss classloader not be bypassed.
"Note: If you run Jetty within JBoss, then you should NOT use the addWebApplication API (or XML), as this bypasses the JBoss classloaders. Use the JBoss deployment mechanisms instead and only use the Jetty configuration for listeners and logs."
There are probably going to be a series of issues and consequences with creating a web application outside of the control of JBoss yet running in the JBoss environment.