Run a JSP from within a help plugin [message #492315] |
Mon, 19 October 2009 18:16  |
Eclipse User |
|
|
|
Hi all,
I'm searching for a way to incorporate a JSP in a help plugin.
I assume that there is some extension point that will allow me to instruct the jetty JSP server to compile .jsp files within my plugin, but so far I've been unsuccessful finding this information in the docs. Any pointers at all would be much appreciated.
Thanks,
Doug
|
|
|
|
|
|
Re: Run a JSP from within a help plugin [message #493976 is a reply to message #493263] |
Wed, 28 October 2009 12:02  |
Eclipse User |
|
|
|
Got it.
The necessary change was to add a slash to the end of the servlet class attribute. The plugin.xml now contains the following:
<extension point="org.eclipse.equinox.http.registry.servlets">
<servlet
alias="/jsp/*.jsp"
class="org.eclipse.equinox.jsp.jasper.registry.JSPFactory:/">
</servlet>
<serviceSelector
filter="(other.info=org.eclipse.help)">
</serviceSelector>
</extension>
Note the slash at the end of org.eclipse.equinox.jasper.registry.JSPFactory:/
I don't quite understand why this is necessary, but adding it seemed to do the trick.
Now, on to my next challenge: getting access to Java functions defined in other plugins. Most notably org.eclipse.help.webapp.
|
|
|
Re: Run a JSP from within a help plugin [message #623761 is a reply to message #492324] |
Tue, 20 October 2009 18:10  |
Eclipse User |
|
|
|
Continuing to explore this, I'm going to post the contents of some of my plugin files in hopes someone will see what is wrong.
My plugin.xml file looks like this:
<plugin name="IDL Help" id="com.rsi.idl.doc.base"
version="8.0.0.M0" provider-name="ITT">
<extension point="org.eclipse.equinox.http.registry.servlets">
<servlet
alias="/jsp/*.jsp"
class="org.eclipse.equinox.jsp.jasper.registry.JSPFactory:" >
</servlet>
<serviceSelector
filter="(other.info=org.eclipse.help)">
</serviceSelector>
</extension>
<extension point="org.eclipse.equinox.http.registry.resources">
<resource
alias="/doc"
base-name="/">
</resource>
<serviceSelector
filter="(other.info=org.eclipse.help)">
</serviceSelector>
</extension>
</plugin>
My MANIFEST.MF file looks like this:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: IDL Documentation base
Bundle-SymbolicName: com.rsi.idl.doc.base; singleton:=true
Bundle-Version: 8.0.0.M0
Bundle-Vendor: ITT Visual Information Solutions
Require-Bundle: org.eclipse.equinox.jsp.jasper.registry
I'm trying to call a file called test.jsp located in the root of the plugin directory. test.jsp contains the following:
<html>
<body>
Hello World - <%=new java.util.Date()%>
</body>
</html>
When I start the help system and attempt to load
http://127.0.0.1:2635/help/jsp/test.jsp
I get the following error:
HTTP ERROR: 500
Plug-in com.rsi.idl.doc.base was unable to load class org.eclipse.equinox.jsp.jasper.registry.JSPFactory.
RequestURI=/help/jsp/test.jsp
Can this be some sort of class path issue? The org.eclipse.equinox.jsp.jasper.registry.*.jar file is in my plugins directory, and all of the other JSPs in the help system load properly.
Any ideas?
|
|
|
Powered by
FUDForum. Page generated in 0.25998 seconds