You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@abdera.apache.org by cels <ce...@yahoo.com> on 2008/08/16 00:32:38 UTC

Run Abdera sample on Tomcat

Hi, 
  I am new to Abdera.I ran the sample came with the abdera 0.4.0.
In the sample,the follwing lines  start the jetty server.Could anyone please
help  me ,what should I modify in these line to run Tomcat or Glassfish
instead of Jetty.

int port = 9002;
    try {
      port = args.length > 0 ? Integer.parseInt(args[0]) : 9002;
    } catch (Exception e) {}
    Server server = new Server(port);
    Context context = new Context(server, "/", Context.SESSIONS);
    ServletHolder servletHolder = new ServletHolder(new
EmployeeProviderServlet());
    context.addServlet(servletHolder, "/*");
    server.start();
    server.join();


Thank You.
Cels

-- 
View this message in context: http://www.nabble.com/Run-Abdera-sample-on-Tomcat-tp19006531p19006531.html
Sent from the abdera-user mailing list archive at Nabble.com.


Re: Run Abdera sample on Tomcat

Posted by David Calavera <da...@gmail.com>.
Hi Cels,

first of all I recommend that you use the trunk version, although is not a
stable version we've solved several bugs. On the other hand, if you want to
use the examples with tomcat you just need to add the
EmployeeProviderServlet to your web.xml.

Regards

On Sat, Aug 16, 2008 at 12:32 AM, cels <ce...@yahoo.com> wrote:

>
> Hi,
>  I am new to Abdera.I ran the sample came with the abdera 0.4.0.
> In the sample,the follwing lines  start the jetty server.Could anyone
> please
> help  me ,what should I modify in these line to run Tomcat or Glassfish
> instead of Jetty.
>
> int port = 9002;
>    try {
>      port = args.length > 0 ? Integer.parseInt(args[0]) : 9002;
>    } catch (Exception e) {}
>    Server server = new Server(port);
>    Context context = new Context(server, "/", Context.SESSIONS);
>    ServletHolder servletHolder = new ServletHolder(new
> EmployeeProviderServlet());
>    context.addServlet(servletHolder, "/*");
>    server.start();
>    server.join();
>
>
> Thank You.
> Cels
>
> --
> View this message in context:
> http://www.nabble.com/Run-Abdera-sample-on-Tomcat-tp19006531p19006531.html
> Sent from the abdera-user mailing list archive at Nabble.com.
>
>


-- 
David Calavera
http://www.thinkincode.net