Possibly relevant is what the mac installer does on startup. It basically
fires up an embedded jetty and when started uses a little utility class to
open the web admin console in the default system browser.
https://github.com/geoserver/geoserver/blob/master/src/release/installer/mac/console/src/main/java/org/geoserver/console/GeoServerConsole.java#L539
On Sun, Sep 16, 2012 at 1:42 AM, Andrea Aime
<[email protected]>wrote:
> On Sat, Sep 15, 2012 at 4:18 PM, Michal Zimmermann <[email protected]>wrote:
>
>> Hi,
>> I run geoserver on localhost with website stored in data_dir/www
>> directory. I would like to have it opened once geoserver is up and
>> running, but whatever I try I don't succeed. I tried editing
>> startup.bat file, but it seems that
>> :run
>> set RUN_JAVA=%JAVA_HOME%\bin\java
>> cd %GEOSERVER_HOME%
>> echo Please wait while loading GeoServer...
>> echo.
>> "%RUN_JAVA%" -DGEOSERVER_DATA_DIR="%GEOSERVER_DATA_DIR%"
>> -Djava.awt.headless=true -DSTOP.PORT=8079 -DSTOP.KEY=geoserver -jar
>> start.jar
>> start www.google.cz
>> cd bin
>> goto end
>>
>> %RUN_JAVA% somehow blocks the code below and it is never executed. Is
>> there a way to make this work?
>> Thing is I want the http://localhost:8080/geoserver/www to open as
>> soon as geoserver has finished loading and is ready to serve
>> maps/pages. Any help appreciated.
>>
>
> I'm afraid there is no easy solution, web applications are normally
> running in
> their own web server, other than the user's machine, so the problem is
> normally
> not even posed.
>
> I guess you're trying to use GeoServer + web client as a sort of a desktop
> application instead, with GeoServer running on the same machine as the
> html client.
>
> The are multiple issues here. Only GeoServer itself knows when the startup
> completed, so opening the application would have to be done by GeoServer.
> Which is possible, but you have to program a bit in Java, creating a bean
> that listens for application context events, and when the application
> startup
> event arrives use something like
> Runtime.exec("start http://127.0.0.1:8080/geoserver/www/myPage.html")
> to force the operating system to open the web page
>
> Cheers
> Andrea
>
> --
> ==
> Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
> information.
> ==
>
> Ing. Andrea Aime
> @geowolf
> Technical Lead
>
> GeoSolutions S.A.S.
> Via Poggio alle Viti 1187
> 55054 Massarosa (LU)
> Italy
> phone: +39 0584 962313
> fax: +39 0584 962313
> mob: +39 339 8844549
>
> http://www.geo-solutions.it
> http://twitter.com/geosolutions_it
>
> -------------------------------------------------------
>
>
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://ad.doubleclick.net/clk;258768047;13503038;j?
> http://info.appdynamics.com/FreeJavaPerformanceDownload.html
> _______________________________________________
> Geoserver-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>
--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users