Home
Products
MiniTemplator
DSP collection
ServletViewer
Snippets & Tips
Java
VBasic
VBScript
C#
C / C++
MS SQL Server
TypeScript
source-code.biz
Contact
Donate
About

ServletViewer

ServletViewer is an open source Java program that loads a Java servlet and displays its output in a web browser window. It can be used to run a Java servlet web application as a stand-alone program on the local computer.

Features

Versions of ServletViewer

There are multiple versions of ServletViewer, which use different browser technologies to display the servlet output.

Lobo Browser version
  • Uses Lobo Browser, a pure Java browser.
  • Advantage: Portable, pure Java technology.
  • Disadvantage: The current Lobo Browser version is incomplete and slow for complex web applications.
MozSwing version
  • Uses MozSwing to embed XULRunner (the Mozilla browser runtime environment).
  • MozSwing is currently available for Windows, Mac OS X, Linux and Solaris.
  • Advantage: Bundled Mozilla browser included. New and fast browser technology, independent of the browser which the user has installed.
  • Disadvantage: Platform specific.
  • Disadvantage: Big footprint (the MozSwing/XULRunner files are large).
  • Note: The MozSwing files are not included in the ServletViewer download ZIP files. You have to copy the mozswing directory into the ServletViewer directory and rename it to "mozswing", or set the environment variable MOZSWING_HOME.
  • Note for Mac OS X: There is a problem with the current MozSwing version 2.0beta2 on Mac OS X. The old MozSwing version 1.0 works on the Mac, but the JAR file names in the ServletViewer shell script have to be adapted (change MozillaInterfaces-1.9.jar to MozillaInterfaces-1.8.1.4.jar).
SWT version
  • Uses the SWT browser widget as an embedded web browser.
  • The SWT browser widget uses IE on Windows, Safari on Mac OS X or Mozilla on Linux (details).
  • Disadvantage: Platform specific.
  • Disadvantage: Different browser technologies and browser versions.
"usr" version
  • Launches the users default browser as an external browser. (The browser is not embedded within the Java GUI environment as with the other ServletViewer versions).
  • For Java 1.6 and later, java.awt.Desktop.browse() is used. If the java.awt.Desktop class is not available, BrowserLauncher2 is used.
  • Advantage: Uses the browser that the user is used to.
  • Disadvantage: ServletViewer has no way to detect when the user closes the browser window, so it cannot terminate automatically when the user has finished working with the servlet application.
  • Disadvantage: Different browser technologies and browser versions.

Download

Binaries of Lobo Browser version: ServletViewerLobo_2008-08-25.zip 3 MB
Binaries of MozSwing version: ServletViewerMoz_2008-08-25.zip 1 MB
Binaries of SWT version for Windows: ServletViewerSwt_Win32_2008-08-25.zip 2 MB
Binaries of SWT version for Mac OS X: ServletViewerSwt_MacOSX_2008-08-25.zip 2 MB
Binaries of SWT version for Linux: ServletViewerSwt_Linux_2008-08-25.zip 2 MB
Binaries of "usr" version: ServletViewerUsr_2008-08-25.zip 1 MB
Source code only (without libraries): ServletViewer_SourceOnly_2008-08-25.zip 47 KB
Source code and libraries: ServletViewer_SourceAndLibs_2008-08-25.zip 6 MB

Remarks

Bug Reports, Feature Requests, Old Versions

SourceForge Project Page