Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-help-dev] creating a secondary help webapp?

Erik:

The good news is that you're on the right track. The bad news is that yes,
many of the calls from JSP/servlets into help are using internal API's.
Another point that is not clear in our docs (we will update them soon), is
that the new webapp will completely replace the default webapp.
Basically, you would have to copy the content of the current webapp (check
the Eclipse licence to make sure this is allowed) and make the necessary
changes.
I think it is worth sharing your experience here, so we can perhaps improve
the help API's (current API's are only those found in the  org.eclipse.help
and org.eclipse.help.browser).

If your strategy is to really create a second webapp that does not displace
the help webapp, then you would have to use the (currently internal, but
likely to be made public in a future release) the
org.eclipse.help.internal.appserver.WebappManager class to register the
webapp. Basically, your plugin should not configure the webapp extension
point, but would have to somehow be started and register the webapp (take a
look at org.eclipse.help.internal.HelpSystem.ensureWebappRunning() ).
The steps would have to be:

*  Create a new plugin directory.
*  Create the webapp in the usual way with
     -  WEB-INF/web.xml mapping the requests
     -  JSPs in the plugin directory (it is better to have them
precompiled)
     -  servlets in WEB-INF/lib/*.jar
*  Create a runtime library of classes used by the JSPs as a jar file in
the plugin directory
*  Create a plugin.xml similar to org.eclipse.help.webapp_*/plugin.xml but
specify
     -  the plugin ID for your plugin
     -  your runtime library
     -  *do not* define the webapp extension point in the plugin.xml
* Ensure your plugin is started:
     - if you're part of the eclipse workbench, then look at the
org.eclipse.ui.startup extension point
     - if you're running the infocenter, then things are a bit more
complicated
       and I'd suggest you should probably open a feature on
Platform->Help.
       Check with the Eclipse Platform folks to see if there is a way for a
plugin to be started when the (headless) platform starts.
* In your plugin startup() start your webapp:
org.eclipse.help.internal.appserver.WebappManager.start("webappname", ...)
* You will then point your browser to the url of this new webapp. Again,
use the org.eclipse.help.internal.appserver.WebappManager to get the host
and port, and use the context name of your webapp, as you registered it in
the previous step.

I am pretty sure I missed some of the fine points in your approach, so feel
free to post more details or ask for clarification.
-Dorian



|---------+----------------------------------->
|         |           Erik                    |
|         |           Hennum/Oakland/IBM@IBMUS|
|         |           Sent by:                |
|         |           platform-help-dev-admin@|
|         |           eclipse.org             |
|         |                                   |
|         |                                   |
|         |           02/20/2003 07:58 PM     |
|         |           Please respond to       |
|         |           platform-help-dev       |
|         |                                   |
|---------+----------------------------------->
  >-------------------------------------------------------------------------------------------------------------|
  |                                                                                                             |
  |       To:       platform-help-dev@xxxxxxxxxxx                                                               |
  |       cc:                                                                                                   |
  |       Subject:  [platform-help-dev] creating a secondary help webapp?                                       |
  |                                                                                                             |
  |                                                                                                             |
  >-------------------------------------------------------------------------------------------------------------|







Esteemed Help Creators:

How does one go about creating a secondary webapp for Eclipse 2.1 (that is,
a webapp that supports additional requests without replacing the standard
webapp) that can be invoked via URL under InfoCenter Eclipse?

I looked at org.eclipse.help_*/schema/webapp.mxsd but didn't get enough to
get going.

Is it something along the lines of the following:

*  Create a new plugin directory.
*  Create the webapp in the usual way with
     -  WEB-INF/web.xml mapping the requests
     -  JSPs in the plugin directory
     -  servlets in WEB-INF/lib/*.jar
*  Create a runtime library of classes used by the JSPs as a jar file in
the plugin directory
*  Create a plugin.xml similar to org.eclipse.help.webapp_*/plugin.xml but
specify
     -  the plugin ID for your plugin
     -  your runtime library
     -  the false value for the default attribute of the webapp element

If so, how is the URL determined for the new web application?

If not, should the webapp plugin provide a class equivalent to
org.eclipse.help.internal.HelpApplication and a plugin.xml similar to
org.eclipse.help_*/plugin.xml?  How would a JSP in this new web application
construct a relative URL for using a JSP in the standard web application?

Since all of the help APIs have internal in their path, is it correct to
assume that other plugins shouldn't call those APIs?


Thanks in advance,


Erik Hennum
ehennum (at) us (dot) ibm (dot) com

_______________________________________________
platform-help-dev mailing list
platform-help-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-help-dev





Back to the top