alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Struts example source code file (JettyPlutoLauncher.java)

This example Struts source code file (JettyPlutoLauncher.java) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Struts tags/keywords

exception, jettyplutolauncher, plutoinvoker/strutsportlet, portletservlet, server, server, servletholder, servletholder, strutsportlet, strutsportlet, webappcontext, webappcontext

The Struts JettyPlutoLauncher.java source code

import org.apache.pluto.core.PortletServlet;
import org.mortbay.jetty.Server;
import org.mortbay.jetty.servlet.ServletHolder;
import org.mortbay.jetty.webapp.WebAppContext;

public class JettyPlutoLauncher {
	public static void main(String[] args) throws Exception {
	    System.setProperty("org.apache.pluto.embedded.portletId", "StrutsPortlet");
	    Server server = new Server(8080);
	    WebAppContext webapp = new WebAppContext("src/main/webapp", "/test");
	    webapp.setDefaultsDescriptor("/WEB-INF/jetty-pluto-web-default.xml");
	    ServletHolder portletServlet = new ServletHolder(new PortletServlet());
	    portletServlet.setInitParameter("portlet-name", "StrutsPortlet");
	    portletServlet.setInitOrder(1);
	    webapp.addServlet(portletServlet, "/PlutoInvoker/StrutsPortlet");
	    server.addHandler(webapp);
	    server.start();
	}
}

Other Struts examples (source code examples)

Here is a short list of links related to this Struts JettyPlutoLauncher.java source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.