Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Alternative of HTML in Jetty9

Hi Joakim,

I'm migrating the application from Jetty 6.1.19 to Jetty-9.1.1. I have few doubts in the code used to start the server. The existing code in Jetty6 uses webAppDeployer to deploy but the same class is replaced by webAppProvider in jetty-9.

In the below code from Jetty6 , when I change to Jetty 9, I have few doubts written near to code lines,

    this.jettyWebServer = new Server(); --->

        ThreadPool threadPool = new ThreadPool(threadPoolSize); -> ThreadPool class not available .    .         only ThreadPool interface in Jetty9( can we use QueueThreadPool in jetty9)

        jettyWebServer.setThreadPool(threadPool);
      
        Connector connector = new SelectChannelConnector(); --> SelectChannelConnector not avialble in jetty6, any alternative for this class ?

        connector.setPort(port);  --> connector will be ServerConnector ?

        this.jettyWebServer.setConnectors(new Connector[]{connector});

 

        WebAppDeployer webAppDeployer = new WebAppDeployer(); -> webAppProvider  ?

        webAppDeployer.setContexts(this.jettyWebServer);

        webAppDeployer.setWebAppDir(warpath); --> no method in webAppProvider  to set WebAppDir

        webAppDeployer.setExtract(true);

        webAppDeployer.setParentLoaderPriority(true);

        webAppDeployer.start();

        this.jettyWebServer.setStopAtShutdown(true);

        this.jettyWebServer.setSendServerVersion(false);
       
       this.jettyWebServer.start();

        this.jettyWebServer.join();

Is the code above is enough to start Jetty-9 ?. or anything missing ?.

Thanks,
Arun

On Fri, Aug 7, 2015 at 10:07 PM, Joakim Erdfelt <joakim@xxxxxxxxxxx> wrote:
Found an api reference on a 3rd party site.


Yeah, those don't exist in Jetty 9 (or Jetty 7 or Jetty 8 for that matter)

The oldest copy of the code I could find is from 2007.

You might have some luck copying those files into place on your own project and using them (with some modifications for references to jetty utility classes)

OR, just use any of the hundreds of html templating libraries for Java Servlets out there.


Joakim Erdfelt / joakim@xxxxxxxxxxx

On Fri, Aug 7, 2015 at 9:30 AM, Joakim Erdfelt <joakim@xxxxxxxxxxx> wrote:
Not sure what the org.mortbay.html classes are.
The existence of that namespace/classes tree is news to most of us.

What do they do?




Joakim Erdfelt / joakim@xxxxxxxxxxx

On Fri, Aug 7, 2015 at 9:12 AM, Arun Kumar <arunkumarstay@xxxxxxxxx> wrote:
Hi Team,

While migrating the jetty5 to jetty9, I need to rewrite HTML code from org.mortbay.html classes like table, page, block etc to similar in jetty9.
what is the alternative to html classes in jetty9 ?.
can I use servlets in jetty 9 to implement the same logic ?

Thanks,,
Arun

_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users



_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


Back to the top