You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by "Reiche, Andreas" <An...@lgln.niedersachsen.de> on 2011/12/20 12:52:23 UTC

Problem with embedded jetty using AWT

Hi,
has anyone already recognized this behaviour.
I have a Wicket (1.4.18) project build from the Wicket archetype. I'm developing in Eclipse on a Win XP machine.
Up to now everything worked fine, but now i have the following problem:
I need to inherit a dynamic Image in a wicket page. I use the AWT toolkit for that purpose.
As Wicket Model i use a RenderedDynamicImageResource which gives me a Graphics2D object to draw on.
If i try to debug or run the code in the embedded jetty which i use in my IDE then the JVM 'hangs' and the image is not rendered.

If i deploy the app to a standalone jetty or a standalone tomcat everything goes fine.
This is exactly the problem which is described here:
http://www.chartdir.com/forum/download_thread.php?bn=chartdir_support&pattern=&thread=1290008946#N1290102636

First i thought of a security issue, like mentioned in above thread, but even after i gave the embedded jetty a java.security.AllPermission
the prob still exits.

Here is the code which creates and starts the jetty server.

...
	public static void main(String[] args) throws Exception {
		try {
			Server server = startJettyServer(8080);
			System.in.read();
			System.out.println(">>> STOPPING EMBEDDED JETTY SERVER");
			// while (System.in.available() == 0) {
			// Thread.sleep(5000);
			// }
			server.stop();
			server.join();
		} catch (Exception e) {
			e.printStackTrace();
			System.exit(100);
		}
	}

	public static Server startJettyServer(int port) throws Exception {
		Server server = new Server();
		SocketConnector connector = new SocketConnector();
		// Set some timeout options to make debugging easier.
		connector.setMaxIdleTime(1000 * 60 * 60);
		connector.setSoLingerTime(-1);
		connector.setPort(port);
		server.setConnectors(new Connector[] { connector });

		WebAppContext bb = new WebAppContext();
		bb.setServer(server);
		bb.setContextPath("/");
		bb.setWar("src/main/webapp");
		bb.setAttribute("serveIcon", false);

		Permission perm = new AllPermission();
		PermissionCollection permissions = perm.newPermissionCollection();
		permissions.add(perm);

		bb.setPermissions(permissions);
		// START JMX SERVER
		// MBeanServer mBeanServer =
		// ManagementFactory.getPlatformMBeanServer();
		// MBeanContainer mBeanContainer = new MBeanContainer(mBeanServer);
		// server.getContainer().addEventListener(mBeanContainer);
		// mBeanContainer.start();

		server.addHandler(bb);

		System.out.println(">>> STARTING EMBEDDED JETTY SERVER, PRESS ANY KEY TO STOP");
		server.start();
		return server;
	}
...


I alreasy searched the jetty doc, but could not found any hints.
Appreciate any input on that. 

Mit freundlichen Grüßen
Andreas Reiche

Landesamt für Geoinformation und Landentwicklung Niedersachsen (LGLN)
- Landesvermessung und Geobasisinformation -
Fachgebiet 423 - Wertermittlungsinformation, Geschäftsnachweise, KLR
Podbielskistraße 331, 30659 Hannover
Tel.:	 0511 64609-443
Fax:	 0511 64609-128
mailto:andreas.reiche@lgln.niedersachsen.de
www.lgln.niedersachsen.de

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Problem with embedded jetty using AWT

Posted by Martijn Dashorst <ma...@gmail.com>.
did you define -Djava.awt.headless=true as a jvm parameter?

Martijn

On Tue, Dec 20, 2011 at 12:52 PM, Reiche, Andreas
<An...@lgln.niedersachsen.de> wrote:
> Hi,
> has anyone already recognized this behaviour.
> I have a Wicket (1.4.18) project build from the Wicket archetype. I'm developing in Eclipse on a Win XP machine.
> Up to now everything worked fine, but now i have the following problem:
> I need to inherit a dynamic Image in a wicket page. I use the AWT toolkit for that purpose.
> As Wicket Model i use a RenderedDynamicImageResource which gives me a Graphics2D object to draw on.
> If i try to debug or run the code in the embedded jetty which i use in my IDE then the JVM 'hangs' and the image is not rendered.
>
> If i deploy the app to a standalone jetty or a standalone tomcat everything goes fine.
> This is exactly the problem which is described here:
> http://www.chartdir.com/forum/download_thread.php?bn=chartdir_support&pattern=&thread=1290008946#N1290102636
>
> First i thought of a security issue, like mentioned in above thread, but even after i gave the embedded jetty a java.security.AllPermission
> the prob still exits.
>
> Here is the code which creates and starts the jetty server.
>
> ...
>        public static void main(String[] args) throws Exception {
>                try {
>                        Server server = startJettyServer(8080);
>                        System.in.read();
>                        System.out.println(">>> STOPPING EMBEDDED JETTY SERVER");
>                        // while (System.in.available() == 0) {
>                        // Thread.sleep(5000);
>                        // }
>                        server.stop();
>                        server.join();
>                } catch (Exception e) {
>                        e.printStackTrace();
>                        System.exit(100);
>                }
>        }
>
>        public static Server startJettyServer(int port) throws Exception {
>                Server server = new Server();
>                SocketConnector connector = new SocketConnector();
>                // Set some timeout options to make debugging easier.
>                connector.setMaxIdleTime(1000 * 60 * 60);
>                connector.setSoLingerTime(-1);
>                connector.setPort(port);
>                server.setConnectors(new Connector[] { connector });
>
>                WebAppContext bb = new WebAppContext();
>                bb.setServer(server);
>                bb.setContextPath("/");
>                bb.setWar("src/main/webapp");
>                bb.setAttribute("serveIcon", false);
>
>                Permission perm = new AllPermission();
>                PermissionCollection permissions = perm.newPermissionCollection();
>                permissions.add(perm);
>
>                bb.setPermissions(permissions);
>                // START JMX SERVER
>                // MBeanServer mBeanServer =
>                // ManagementFactory.getPlatformMBeanServer();
>                // MBeanContainer mBeanContainer = new MBeanContainer(mBeanServer);
>                // server.getContainer().addEventListener(mBeanContainer);
>                // mBeanContainer.start();
>
>                server.addHandler(bb);
>
>                System.out.println(">>> STARTING EMBEDDED JETTY SERVER, PRESS ANY KEY TO STOP");
>                server.start();
>                return server;
>        }
> ...
>
>
> I alreasy searched the jetty doc, but could not found any hints.
> Appreciate any input on that.
>
> Mit freundlichen Grüßen
> Andreas Reiche
>
> Landesamt für Geoinformation und Landentwicklung Niedersachsen (LGLN)
> - Landesvermessung und Geobasisinformation -
> Fachgebiet 423 - Wertermittlungsinformation, Geschäftsnachweise, KLR
> Podbielskistraße 331, 30659 Hannover
> Tel.:    0511 64609-443
> Fax:     0511 64609-128
> mailto:andreas.reiche@lgln.niedersachsen.de
> www.lgln.niedersachsen.de
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: AW: Problem with embedded jetty using AWT

Posted by Chantal Ackermann <ch...@btelligent.de>.
Just wondering - could SWT (Eclipse) cause that problem? Maybe it is
interfering with the AWT classpath.



On Tue, 2011-12-20 at 13:44 +0100, Reiche, Andreas wrote:
> Yep, this was the first i tried, but didn't help.
> 
> Andreas
>  
> 
> -----Ursprüngliche Nachricht-----
> Von: Martijn Dashorst [mailto:martijn.dashorst@gmail.com] 
> Gesendet: Dienstag, 20. Dezember 2011 13:35
> An: users@wicket.apache.org
> Betreff: Re: Problem with embedded jetty using AWT
> 
> did you define -Djava.awt.headless=true as a jvm parameter?
> 
> Martijn
> 
> On Tue, Dec 20, 2011 at 12:52 PM, Reiche, Andreas
> <An...@lgln.niedersachsen.de> wrote:
> > Hi,
> > has anyone already recognized this behaviour.
> > I have a Wicket (1.4.18) project build from the Wicket archetype. I'm developing in Eclipse on a Win XP machine.
> > Up to now everything worked fine, but now i have the following problem:
> > I need to inherit a dynamic Image in a wicket page. I use the AWT toolkit for that purpose.
> > As Wicket Model i use a RenderedDynamicImageResource which gives me a Graphics2D object to draw on.
> > If i try to debug or run the code in the embedded jetty which i use in my IDE then the JVM 'hangs' and the image is not rendered.
> >
> > If i deploy the app to a standalone jetty or a standalone tomcat everything goes fine.
> > This is exactly the problem which is described here:
> > http://www.chartdir.com/forum/download_thread.php?bn=chartdir_support&pattern=&thread=1290008946#N1290102636
> >
> > First i thought of a security issue, like mentioned in above thread, but even after i gave the embedded jetty a java.security.AllPermission
> > the prob still exits.
> >
> > Here is the code which creates and starts the jetty server.
> >
> > ...
> >        public static void main(String[] args) throws Exception {
> >                try {
> >                        Server server = startJettyServer(8080);
> >                        System.in.read();
> >                        System.out.println(">>> STOPPING EMBEDDED JETTY SERVER");
> >                        // while (System.in.available() == 0) {
> >                        // Thread.sleep(5000);
> >                        // }
> >                        server.stop();
> >                        server.join();
> >                } catch (Exception e) {
> >                        e.printStackTrace();
> >                        System.exit(100);
> >                }
> >        }
> >
> >        public static Server startJettyServer(int port) throws Exception {
> >                Server server = new Server();
> >                SocketConnector connector = new SocketConnector();
> >                // Set some timeout options to make debugging easier.
> >                connector.setMaxIdleTime(1000 * 60 * 60);
> >                connector.setSoLingerTime(-1);
> >                connector.setPort(port);
> >                server.setConnectors(new Connector[] { connector });
> >
> >                WebAppContext bb = new WebAppContext();
> >                bb.setServer(server);
> >                bb.setContextPath("/");
> >                bb.setWar("src/main/webapp");
> >                bb.setAttribute("serveIcon", false);
> >
> >                Permission perm = new AllPermission();
> >                PermissionCollection permissions = perm.newPermissionCollection();
> >                permissions.add(perm);
> >
> >                bb.setPermissions(permissions);
> >                // START JMX SERVER
> >                // MBeanServer mBeanServer =
> >                // ManagementFactory.getPlatformMBeanServer();
> >                // MBeanContainer mBeanContainer = new MBeanContainer(mBeanServer);
> >                // server.getContainer().addEventListener(mBeanContainer);
> >                // mBeanContainer.start();
> >
> >                server.addHandler(bb);
> >
> >                System.out.println(">>> STARTING EMBEDDED JETTY SERVER, PRESS ANY KEY TO STOP");
> >                server.start();
> >                return server;
> >        }
> > ...
> >
> >
> > I alreasy searched the jetty doc, but could not found any hints.
> > Appreciate any input on that.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


AW: AW: Problem with embedded jetty using AWT

Posted by "Reiche, Andreas" <An...@lgln.niedersachsen.de>.
Not sure how i can check this?
But i don't think so because i have a little test class which generates the picture through AWT.
When i ran this class as a java application from inside Eclipse, then the image is created fine.
Just when it runs in the context of the jetty server it fails.
By the way. The problematic method is the BufferedImage#createGraphics(). on this Method the jvm hangs.

Andreas

-----Ursprüngliche Nachricht-----
Von: Chantal Ackermann [mailto:chantal.ackermann@btelligent.de] 
Gesendet: Dienstag, 20. Dezember 2011 13:58
An: users@wicket.apache.org
Betreff: Re: AW: Problem with embedded jetty using AWT


Just wondering - could SWT (Eclipse) cause that problem? Maybe it is
interfering with the AWT classpath.



On Tue, 2011-12-20 at 13:44 +0100, Reiche, Andreas wrote:
> Yep, this was the first i tried, but didn't help.
> 
> Andreas
>  
> 
> -----Ursprüngliche Nachricht-----
> Von: Martijn Dashorst [mailto:martijn.dashorst@gmail.com] 
> Gesendet: Dienstag, 20. Dezember 2011 13:35
> An: users@wicket.apache.org
> Betreff: Re: Problem with embedded jetty using AWT
> 
> did you define -Djava.awt.headless=true as a jvm parameter?
> 
> Martijn
> 
> On Tue, Dec 20, 2011 at 12:52 PM, Reiche, Andreas
> <An...@lgln.niedersachsen.de> wrote:
> > Hi,
> > has anyone already recognized this behaviour.
> > I have a Wicket (1.4.18) project build from the Wicket archetype. I'm developing in Eclipse on a Win XP machine.
> > Up to now everything worked fine, but now i have the following problem:
> > I need to inherit a dynamic Image in a wicket page. I use the AWT toolkit for that purpose.
> > As Wicket Model i use a RenderedDynamicImageResource which gives me a Graphics2D object to draw on.
> > If i try to debug or run the code in the embedded jetty which i use in my IDE then the JVM 'hangs' and the image is not rendered.
> >
> > If i deploy the app to a standalone jetty or a standalone tomcat everything goes fine.
> > This is exactly the problem which is described here:
> > http://www.chartdir.com/forum/download_thread.php?bn=chartdir_support&pattern=&thread=1290008946#N1290102636
> >
> > First i thought of a security issue, like mentioned in above thread, but even after i gave the embedded jetty a java.security.AllPermission
> > the prob still exits.
> >
> > Here is the code which creates and starts the jetty server.
> >
> > ...
> >        public static void main(String[] args) throws Exception {
> >                try {
> >                        Server server = startJettyServer(8080);
> >                        System.in.read();
> >                        System.out.println(">>> STOPPING EMBEDDED JETTY SERVER");
> >                        // while (System.in.available() == 0) {
> >                        // Thread.sleep(5000);
> >                        // }
> >                        server.stop();
> >                        server.join();
> >                } catch (Exception e) {
> >                        e.printStackTrace();
> >                        System.exit(100);
> >                }
> >        }
> >
> >        public static Server startJettyServer(int port) throws Exception {
> >                Server server = new Server();
> >                SocketConnector connector = new SocketConnector();
> >                // Set some timeout options to make debugging easier.
> >                connector.setMaxIdleTime(1000 * 60 * 60);
> >                connector.setSoLingerTime(-1);
> >                connector.setPort(port);
> >                server.setConnectors(new Connector[] { connector });
> >
> >                WebAppContext bb = new WebAppContext();
> >                bb.setServer(server);
> >                bb.setContextPath("/");
> >                bb.setWar("src/main/webapp");
> >                bb.setAttribute("serveIcon", false);
> >
> >                Permission perm = new AllPermission();
> >                PermissionCollection permissions = perm.newPermissionCollection();
> >                permissions.add(perm);
> >
> >                bb.setPermissions(permissions);
> >                // START JMX SERVER
> >                // MBeanServer mBeanServer =
> >                // ManagementFactory.getPlatformMBeanServer();
> >                // MBeanContainer mBeanContainer = new MBeanContainer(mBeanServer);
> >                // server.getContainer().addEventListener(mBeanContainer);
> >                // mBeanContainer.start();
> >
> >                server.addHandler(bb);
> >
> >                System.out.println(">>> STARTING EMBEDDED JETTY SERVER, PRESS ANY KEY TO STOP");
> >                server.start();
> >                return server;
> >        }
> > ...
> >
> >
> > I alreasy searched the jetty doc, but could not found any hints.
> > Appreciate any input on that.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


AW: AW: Problem with embedded jetty using AWT

Posted by "Reiche, Andreas" <An...@lgln.niedersachsen.de>.
OK, I'm a bit further now.
Just tried it with a windows Admin User and TaTaaaa.
Seems that our security policies deny something for a normal user which is needed when running embedded jetty.
I have to contact our sys admins.

Thanks so far,

Andreas 

-----Ursprüngliche Nachricht-----
Von: Reiche, Andreas [mailto:Andreas.Reiche@lgln.niedersachsen.de] 
Gesendet: Dienstag, 20. Dezember 2011 14:25
An: users@wicket.apache.org
Betreff: AW: AW: Problem with embedded jetty using AWT

Not sure how i can check this?
But i don't think so because i have a little test class which generates the picture through AWT.
When i ran this class as a java application from inside Eclipse, then the image is created fine.
Just when it runs in the context of the jetty server it fails.
By the way. The problematic method is the BufferedImage#createGraphics(). on this Method the jvm hangs.

Andreas

-----Ursprüngliche Nachricht-----
Von: Chantal Ackermann [mailto:chantal.ackermann@btelligent.de] 
Gesendet: Dienstag, 20. Dezember 2011 13:58
An: users@wicket.apache.org
Betreff: Re: AW: Problem with embedded jetty using AWT


Just wondering - could SWT (Eclipse) cause that problem? Maybe it is
interfering with the AWT classpath.



On Tue, 2011-12-20 at 13:44 +0100, Reiche, Andreas wrote:
> Yep, this was the first i tried, but didn't help.
> 
> Andreas
>  
> 
> -----Ursprüngliche Nachricht-----
> Von: Martijn Dashorst [mailto:martijn.dashorst@gmail.com] 
> Gesendet: Dienstag, 20. Dezember 2011 13:35
> An: users@wicket.apache.org
> Betreff: Re: Problem with embedded jetty using AWT
> 
> did you define -Djava.awt.headless=true as a jvm parameter?
> 
> Martijn
> 
> On Tue, Dec 20, 2011 at 12:52 PM, Reiche, Andreas
> <An...@lgln.niedersachsen.de> wrote:
> > Hi,
> > has anyone already recognized this behaviour.
> > I have a Wicket (1.4.18) project build from the Wicket archetype. I'm developing in Eclipse on a Win XP machine.
> > Up to now everything worked fine, but now i have the following problem:
> > I need to inherit a dynamic Image in a wicket page. I use the AWT toolkit for that purpose.
> > As Wicket Model i use a RenderedDynamicImageResource which gives me a Graphics2D object to draw on.
> > If i try to debug or run the code in the embedded jetty which i use in my IDE then the JVM 'hangs' and the image is not rendered.
> >
> > If i deploy the app to a standalone jetty or a standalone tomcat everything goes fine.
> > This is exactly the problem which is described here:
> > http://www.chartdir.com/forum/download_thread.php?bn=chartdir_support&pattern=&thread=1290008946#N1290102636
> >
> > First i thought of a security issue, like mentioned in above thread, but even after i gave the embedded jetty a java.security.AllPermission
> > the prob still exits.
> >
> > Here is the code which creates and starts the jetty server.
> >
> > ...
> >        public static void main(String[] args) throws Exception {
> >                try {
> >                        Server server = startJettyServer(8080);
> >                        System.in.read();
> >                        System.out.println(">>> STOPPING EMBEDDED JETTY SERVER");
> >                        // while (System.in.available() == 0) {
> >                        // Thread.sleep(5000);
> >                        // }
> >                        server.stop();
> >                        server.join();
> >                } catch (Exception e) {
> >                        e.printStackTrace();
> >                        System.exit(100);
> >                }
> >        }
> >
> >        public static Server startJettyServer(int port) throws Exception {
> >                Server server = new Server();
> >                SocketConnector connector = new SocketConnector();
> >                // Set some timeout options to make debugging easier.
> >                connector.setMaxIdleTime(1000 * 60 * 60);
> >                connector.setSoLingerTime(-1);
> >                connector.setPort(port);
> >                server.setConnectors(new Connector[] { connector });
> >
> >                WebAppContext bb = new WebAppContext();
> >                bb.setServer(server);
> >                bb.setContextPath("/");
> >                bb.setWar("src/main/webapp");
> >                bb.setAttribute("serveIcon", false);
> >
> >                Permission perm = new AllPermission();
> >                PermissionCollection permissions = perm.newPermissionCollection();
> >                permissions.add(perm);
> >
> >                bb.setPermissions(permissions);
> >                // START JMX SERVER
> >                // MBeanServer mBeanServer =
> >                // ManagementFactory.getPlatformMBeanServer();
> >                // MBeanContainer mBeanContainer = new MBeanContainer(mBeanServer);
> >                // server.getContainer().addEventListener(mBeanContainer);
> >                // mBeanContainer.start();
> >
> >                server.addHandler(bb);
> >
> >                System.out.println(">>> STARTING EMBEDDED JETTY SERVER, PRESS ANY KEY TO STOP");
> >                server.start();
> >                return server;
> >        }
> > ...
> >
> >
> > I alreasy searched the jetty doc, but could not found any hints.
> > Appreciate any input on that.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


AW: Problem with embedded jetty using AWT

Posted by "Reiche, Andreas" <An...@lgln.niedersachsen.de>.
Yep, this was the first i tried, but didn't help.

Andreas
 

-----Ursprüngliche Nachricht-----
Von: Martijn Dashorst [mailto:martijn.dashorst@gmail.com] 
Gesendet: Dienstag, 20. Dezember 2011 13:35
An: users@wicket.apache.org
Betreff: Re: Problem with embedded jetty using AWT

did you define -Djava.awt.headless=true as a jvm parameter?

Martijn

On Tue, Dec 20, 2011 at 12:52 PM, Reiche, Andreas
<An...@lgln.niedersachsen.de> wrote:
> Hi,
> has anyone already recognized this behaviour.
> I have a Wicket (1.4.18) project build from the Wicket archetype. I'm developing in Eclipse on a Win XP machine.
> Up to now everything worked fine, but now i have the following problem:
> I need to inherit a dynamic Image in a wicket page. I use the AWT toolkit for that purpose.
> As Wicket Model i use a RenderedDynamicImageResource which gives me a Graphics2D object to draw on.
> If i try to debug or run the code in the embedded jetty which i use in my IDE then the JVM 'hangs' and the image is not rendered.
>
> If i deploy the app to a standalone jetty or a standalone tomcat everything goes fine.
> This is exactly the problem which is described here:
> http://www.chartdir.com/forum/download_thread.php?bn=chartdir_support&pattern=&thread=1290008946#N1290102636
>
> First i thought of a security issue, like mentioned in above thread, but even after i gave the embedded jetty a java.security.AllPermission
> the prob still exits.
>
> Here is the code which creates and starts the jetty server.
>
> ...
>        public static void main(String[] args) throws Exception {
>                try {
>                        Server server = startJettyServer(8080);
>                        System.in.read();
>                        System.out.println(">>> STOPPING EMBEDDED JETTY SERVER");
>                        // while (System.in.available() == 0) {
>                        // Thread.sleep(5000);
>                        // }
>                        server.stop();
>                        server.join();
>                } catch (Exception e) {
>                        e.printStackTrace();
>                        System.exit(100);
>                }
>        }
>
>        public static Server startJettyServer(int port) throws Exception {
>                Server server = new Server();
>                SocketConnector connector = new SocketConnector();
>                // Set some timeout options to make debugging easier.
>                connector.setMaxIdleTime(1000 * 60 * 60);
>                connector.setSoLingerTime(-1);
>                connector.setPort(port);
>                server.setConnectors(new Connector[] { connector });
>
>                WebAppContext bb = new WebAppContext();
>                bb.setServer(server);
>                bb.setContextPath("/");
>                bb.setWar("src/main/webapp");
>                bb.setAttribute("serveIcon", false);
>
>                Permission perm = new AllPermission();
>                PermissionCollection permissions = perm.newPermissionCollection();
>                permissions.add(perm);
>
>                bb.setPermissions(permissions);
>                // START JMX SERVER
>                // MBeanServer mBeanServer =
>                // ManagementFactory.getPlatformMBeanServer();
>                // MBeanContainer mBeanContainer = new MBeanContainer(mBeanServer);
>                // server.getContainer().addEventListener(mBeanContainer);
>                // mBeanContainer.start();
>
>                server.addHandler(bb);
>
>                System.out.println(">>> STARTING EMBEDDED JETTY SERVER, PRESS ANY KEY TO STOP");
>                server.start();
>                return server;
>        }
> ...
>
>
> I alreasy searched the jetty doc, but could not found any hints.
> Appreciate any input on that.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org