Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
BIRT 2.3.2 - Specify Port for WebViewer
Wendy_M
I am attempting to run BIRT 2.3.2 in an OSGi environment. When WebViewer.startup(); is called this is displayed in the log:
23-12:28:41 [vent Dispatcher] INFO Container - Started org.eclipse.equinox.http.jetty.internal.Servlet25Handler@1f2f60d
23-12:28:41 [vent Dispatcher] INFO Container - Started HttpContext[/viewer,/viewer]
23-12:28:41 [vent Dispatcher] INFO SocketListener - Started SocketListener on 127.0.0.1:49507
23-12:28:41 [vent Dispatcher] INFO Container - Started org.mortbay.http.HttpServer@15b5783
You can see that the url is: "127.0.0.1:49507" and the context is "viewer." The problem is that each time the WebViewer is started, it uses a different port. I need this to be consistent so that we can provide a link to it from a separate application.
First thought was to add this parameter to the vm arguments:
-Dorg.osgi.service.http.port=8082
but this doesn't seem to make a difference.
Does anyone know how to specify which port the WebViewer should use?
Thank you in advance!
Find more posts tagged with
Comments
Wendy_M
In case anyone is wondering, you can do this by using the code below:
import org.eclipse.birt.report.viewer.ViewerPlugin;
import org.eclipse.birt.report.viewer.utilities.WebViewer;
ViewerPlugin viewerPlugin = ViewerPlugin.getDefault();
Preferences prefs = viewerPlugin.getPluginPreferences();
prefs.setValue("port", 8081);
viewerPlugin.savePluginPreferences();
WebViewer.startup();