The Artima Developer Community
Sponsored Link

Java Buzz Forum
Running Pebble on Jetty 4.2.x

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Simon Brown

Posts: 636
Nickname: simonbrown
Registered: Jun, 2003

Simon Brown is a Java developer, architect and author.
Running Pebble on Jetty 4.2.x Posted: Mar 3, 2004 7:46 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Simon Brown.
Original Post: Running Pebble on Jetty 4.2.x
Feed Title: Simon Brown's weblog
Feed URL: http://www.simongbrown.com/blog/feed.xml?flavor=rss20&category=java
Feed Description: My thoughts on Java, software development and technology.
Latest Java Buzz Posts
Latest Java Buzz Posts by Simon Brown
Latest Posts From Simon Brown's weblog

Advertisement

I've had a few e-mails over the past weeks asking about how to run Pebble on Jetty so thought that I would post the instructions here before adding them to the Pebble user guide.

  1. Extract the WAR file to the $JETTY_HOME/webapps directory.
  2. Edit the WEB-INF/web.xml file, setting the blog.url, blog.dir and blog.multiUser parameters as appropriate.
  3. Define the security realm in the $JETTY_HOME/etc/jetty.xml file (the example below uses a simple username-password pair in plain text).
    <Call name="addRealm">
      <Arg>
        <New class="org.mortbay.http.HashUserRealm">
          <Arg>Pebble Realm</Arg>
          <Put name="simon">password</Put>
          <Call name="addUserToRole">
            <Arg>simon</Arg>
            <Arg>blog-owner</Arg>
          </Call>
          <Call name="addUserToRole">
            <Arg>simon</Arg>
            <Arg>blog-contributor</Arg>
          </Call>
        </New>
      </Arg>
    </Call>
    

If you are deploying Pebble to Jetty, it is important that you do define a security role before starting up the server. If you don't, you'll get the error page (indicating that "something has gone wrong") when you try to access a secure page. Let me know if you have any problems.

Read: Running Pebble on Jetty 4.2.x

Topic: Home Alone Redux Previous Topic   Next Topic Topic: Headless Exception

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use