Sambuca Embedded HTTP Framework - Running the Demo

Navigation

Running the Demo Sambuca Simple Directory HTTP Server

  1. Make sure the Sambuca JAR is in your classpath ([SAMBUCA_INSTALL_DIR]/bin/sambuca.jar). From the command line you can run [SAMBUCA_INSTALL_DIR]/cmd/setenv.bat from Windows to automatically set your classpath for the current command line session only.
  2. Run the com.roguelogic.sambuca.SambucaHttpServerDemo class. You can run [SAMBUCA_INSTALL_DIR]/cmd/SambucaHttpServerDemo.bat from Windows to start the SambucaHttpServerDemo using the default command line arguments: ../wwwroot 8080. This batch file will not set the optional system properties. See Usage below for more information.
  3. Usage of the Demo File Web Server:
    java <-DMimeTypes=[MIME_TYPES.PROPERTIES]> <-DSambucaLogger=[CLASS_NAME]> com.roguelogic.sambuca.SambucaHttpServerDemo [WWW_ROOT_DIR] [PORT]
    Where [WWW_ROOT_DIR] is a directory on your local computer to be made available for browsing via connection on the supplied [PORT].
  4. Example: $JAVA_HOME/bin/java -cp /home/user/sambuca/bin/sambuca.jar com.roguelogic.sambuca.SambucaHttpServerDemo /home/user/sambuca_www_root 8080
  5. From a browser if you started your server on port 8080 enter the URL: http://localhost:8080/. If you are using the default installation of Sambuca you should see the index.htm of the documentation.
  6. If you would like the test Form Post support enter the following in a browser: http://localhost:8080/post_test.htm and enter some test values in the text fields and click Submit. You should get an HTTP Request Debug page.


RogueLogic