Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Embedded web application
Embedded web application [message #143634] Tue, 14 October 2003 10:14 Go to next message
Eclipse UserFriend
Originally posted by: Eric.Jain.isb-sib.ch

I'm trying to embed a web application within an existing plug-in. Currently,
I simply have a bunch of static HTML files in a "web" subdirectory within
the plug-in. In MyPlugin.startup() I do the following:

String id = getDescriptor().getUniqueIdentifier():
Path path = new Path("web");
WebappManager.start("test", id, path);
log.debug("Port: " + WebappManager.getPort());

When I then point a browser to http://localhost:xyz/test/, I get: "The
document that you have requested is not available."

If I change the path to http://localhost:xyz/help/, the same message
appears, initially. Only after opening the help from within Eclipse at least
once does the help application load correctly. I therefore assume I am
missing one step in order to activate my own web application, but what?

--
Eric Jain
Re: Embedded web application [message #143669 is a reply to message #143634] Tue, 14 October 2003 10:55 Go to previous messageGo to next message
Eclipse UserFriend
What you did is enough, and works for me. Check the .log. There might be
something else that has a side effect as you describe.
Konrad Kolosowski

"Eric Jain" <Eric.Jain@isb-sib.ch> wrote in message
news:bmh0ap$ifk$1@eclipse.org...
> I'm trying to embed a web application within an existing plug-in.
Currently,
> I simply have a bunch of static HTML files in a "web" subdirectory within
> the plug-in. In MyPlugin.startup() I do the following:
>
> String id = getDescriptor().getUniqueIdentifier():
> Path path = new Path("web");
> WebappManager.start("test", id, path);
> log.debug("Port: " + WebappManager.getPort());
>
> When I then point a browser to http://localhost:xyz/test/, I get: "The
> document that you have requested is not available."
>
> If I change the path to http://localhost:xyz/help/, the same message
> appears, initially. Only after opening the help from within Eclipse at
least
> once does the help application load correctly. I therefore assume I am
> missing one step in order to activate my own web application, but what?
>
> --
> Eric Jain
>
>
Re: Embedded web application [message #143678 is a reply to message #143634] Tue, 14 October 2003 11:00 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dorian.birsan.net

"Eric Jain" <Eric.Jain@isb-sib.ch> wrote in message
news:bmh0ap$ifk$1@eclipse.org...
> I'm trying to embed a web application within an existing plug-in.
Currently,
> I simply have a bunch of static HTML files in a "web" subdirectory within
> the plug-in. In MyPlugin.startup() I do the following:
>
> String id = getDescriptor().getUniqueIdentifier():
> Path path = new Path("web");
> WebappManager.start("test", id, path);
> log.debug("Port: " + WebappManager.getPort());
>
> When I then point a browser to http://localhost:xyz/test/, I get: "The
> document that you have requested is not available."
>
> If I change the path to http://localhost:xyz/help/, the same message
> appears, initially. Only after opening the help from within Eclipse at
least
> once does the help application load correctly. I therefore assume I am
> missing one step in order to activate my own web application, but what?

Was your plugin active when you browsed the page? Your plugin's startup()
method should run in order to register the webapp.

-Dorian

>
> --
> Eric Jain
>
>
Re: Embedded web application [message #143922 is a reply to message #143678] Tue, 14 October 2003 12:28 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Eric.Jain.isb-sib.ch

> Was your plugin active when you browsed the page? Your plugin's
> startup() method should run in order to register the webapp.

Definitely, I print out the port number in the startup method. Without that
I wouldn't even know where to point the browser to.

--
Eric Jain
Re: Embedded web application [message #143974 is a reply to message #143669] Tue, 14 October 2003 13:15 Go to previous message
Eclipse UserFriend
Originally posted by: Eric.Jain.isb-sib.ch

> What you did is enough, and works for me. Check the .log. There
> might be something else that has a side effect as you describe.

The problem turned out to be that I was trying to put the web application
root into a sub directory within the plug-in. The following works:

String id = getDescriptor().getUniqueIdentifier();
WebappManager.start("test", id, new Path(""));

--
Eric Jain
Previous Topic:How to pipe into the status line?
Next Topic:how to split edit view
Goto Forum:
  


Current Time: Sat Jun 21 17:36:05 EDT 2025

Powered by FUDForum. Page generated in 1.06998 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top