tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Barry Books (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (TAP5-2174) Add main method the Jetty7Runner
Date Thu, 28 Aug 2014 19:08:08 GMT

    [ https://issues.apache.org/jira/browse/TAP5-2174?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14114177#comment-14114177
] 

Barry Books commented on TAP5-2174:
-----------------------------------

	public static void main(String[] args) throws Exception {
		String webapp = "src/main/webapp";
		String context = "/";
		Integer httpPort = 8080;
		Integer sslPort = 8443;
		boolean usage = false;
		
		
		for ( int i = 0; i < args.length; i++ ) {
			if ( "-webapp".equals(args[i])) {
				if ( ++i >= args.length ) {
					usage = true;
				} else {
					webapp = args[i];
				}
			} else if ( "-context".equals(args[i])) {
				if ( ++i >= args.length ) {
					usage = true;
				} else {
					context = args[i];
				}
			} else if ( "-httpPort".equals(args[i])) {
				if ( ++i >= args.length ) {
					usage = true;
				} else {
					try {
						httpPort = new Integer(args[i]);
					} catch (Exception e) {
						usage = true;
					}
				}
			} else if ( "-sslPort".equals(args[i])) {
				if ( ++i >= args.length ) {
					usage = true;
				} else {
					try {
						sslPort = new Integer(args[i]);
					} catch (Exception e) {
						usage = true;
					}
				}				
			} else if ( "-?".equals(args[i])) {
				usage = true;
			}
		}	
		
		if ( usage ) {
			System.out.println("usage: -webapp src/main/webapp -context / -httpPort 8080 -sslPort 8443
-?");
		} else {
			new Jetty7Runner(webapp, context, httpPort, sslPort);
		}
	}

> Add main method the Jetty7Runner
> --------------------------------
>
>                 Key: TAP5-2174
>                 URL: https://issues.apache.org/jira/browse/TAP5-2174
>             Project: Tapestry 5
>          Issue Type: New Feature
>          Components: tapestry-test
>    Affects Versions: 5.4
>            Reporter: Barry Books
>            Assignee: Howard M. Lewis Ship
>            Priority: Minor
>              Labels: enhancement
>
> Please add a main method to Jetty7Runner (really in tapestry-runner) so Jetty can easily
be started from an IDE development environment. Something like
> 	public static void main(String[] args) throws Exception {
> 		String webapp = System.getProperty("webapp") == null ? "src/main/webapp" : System.getProperty("webapp");
> 		String context = System.getProperty("context") == null ? "/" : System.getProperty("context");
> 		String httpPort = System.getProperty("httpPort") == null ? "8080" : System.getProperty("httpPort");
> 		String sslPort = System.getProperty("sslPort") == null ? "8443" : System.getProperty("sslPort");
> 		new Jetty7Runner(webapp, context, new Integer(httpPort), new Integer(sslPort));
> 	}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message