I'm attempting to get jsp to work in a bundle.

I loaded the three pax bundles:  
OPS4J Pax Web - Jetty Bundle (0.7.3)
OPS4J Pax Web - Jsp Support (0.7.3)
OPS4J Pax Web - Extender - WAR (0.7.3)

(I didn't use the newer versions because I couldn't get the Apache Felix Web 
Management Console (3.1.6) bundle working with it).

I then added the following to a service tracker:

httpContext = webContainer.createDefaultHttpContext();
            webContainer.registerServlet("/frameworkservlet", new 
FrameworkServlet(), null, httpContext);
            webContainer.registerJsps(new String[]{ "*.jsp" }, httpContext);
            webContainer.registerResources("/", "/war", httpContext);

My manifest file has the entry:
Web-ContextPath: /war

My bundle has a "war" directory, with a jsp directory under that.

All html (and other) pages work just fine.  For example, if I put a index.html 
file in my war directory, it is addressable as http://<ip>:<port>/index.html.  
JSP files are working differently, though.  If I put an index.jsp in my war/jsp 
directory, my jsp file is only addressable by 
http://<ip>:<port>/war/jsp/index.jsp (I would expect that "/war/" would not be 
necessary as part of the path.  Furthermore, I can't seem to access CSS files 
and other resources from my jsp file no matter what path I put in.

If I changes the registerJsps call to new String[]{"/jsp/*"}, I cannot access 
the jsp file from the browser at all (no matter what path I use).

I don't have a web.xml file.  I don't think I need one (based on the fact that 
html is working just fine).

Am I missing something here?  Do I have to add something else to my manifest?

Thanks in advance for any help/advice.  Let me know if you need more 
clarification

Bruce

***************************************************************************************
This e-mail and its attachments are private and may contain confidential and 
proprietary information that is protected. 
If you are not the intended recipient, you are hereby notified that any 
disclosure, copying, distribution or use of the 
information contained in or attached to this message is strictly prohibited. If 
you have received this e-mail in error, 
please notify the sender by replying to this message, and then delete it from 
your system.  Thank you.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to