I just created a Main application using Jetty and run it through that... my
main server is jboss/tomcat but for development Jetty works real fine and is
very easy to set up.

Something like:

    public static void main( String[] args ) throws Exception
    {
        logger.debug( "Starting web server..." );

        // create an instance of the web server
        Server server = new Server();

        // Create a connector channel to allow communication with our local
web server
        Connector connector = new SelectChannelConnector();
        connector.setPort( 8080 );
        connector.setHost( "127.0.0.1" );

        // add the connector to the server
        server.addConnector( connector );

        // create a web application context
        WebAppContext applicationContext = new WebAppContext();

        // set the context path of the application
        applicationContext.setContextPath( "/" );

        // path to the exploded application. Will automatically locate
web.xml
        applicationContext.setWar( APPLICATION_BASE_DIRECTORY );

        // set the application context onto the server
        server.setHandler( applicationContext );

        // kill server on shutdown
        server.setStopAtShutdown( true );

        // start the web server
        server.start();
        server.join();
    }



Swapna Rachamalla wrote:
> 
> yeah i got it using Apache Tomcat 6.0 also..
> 
> Thanks a lot..
> 
> 
> 
> On Fri, Feb 6, 2009 at 3:04 PM, Trent Larson <larsontr...@gmail.com>
> wrote:
> 
>> You will have to run your Wicket application with a J2EE application
>> server.
>>
>> I've found Run-Jetty-Run to be extremely easy-to-use:
>>
>> http://code.google.com/p/run-jetty-run/
>>
>> Trent
>>
>> On Fri, Feb 6, 2009 at 2:43 PM, Swapna Rachamalla <
>> swapna.rachama...@gmail.com> wrote:
>>
>> > Hi All
>> >
>> > I have installed Apache wicket plug-ins in Eclipse.
>> >
>> > Now iam able to create Wicket Project from
>> File->New->Other->Wicket->Wicket
>> > Project.
>> >
>> > Then it is asking for Project name. So gave some name..
>> >
>> > Then it is creating MyApplication which extends WebApplication and
>> > configured in the web.xml file.
>> >
>> > then i created HelloWorld.java
>> >
>> > package com.example;
>> > import org.apache.wicket.markup.html.WebPage;
>> > import org.apache.wicket.markup.html.basic.Label;
>> >
>> >
>> > public class HelloWorld extends WebPage {
>> >
>> >    HelloWorld()
>> >    {
>> >        add(new Label("msg","sfjhdsjfdhjdjkf"));
>> >    }
>> >
>> > }
>> >
>> > and modified MyApplication.java file
>> >
>> > public class MyApplication extends WebApplication {
>> >    public MyApplication() {
>> >
>> >    }
>> >
>> >    public void init() {
>> >
>> >    }
>> >
>> >    @Override
>> >    public Class getHomePage() {
>> >        // TODO Auto-generated method stub
>> >        return HelloWorld.class;
>> >    }
>> > }
>> >
>> > and created HelloWorld.html
>> >
>> > <html>
>> > <head>
>> > <title>Insert title here</title>
>> > </head>
>> > <body>
>> > Message goes here
>> > </body>
>> > </html>
>> >
>> > Now Iam unable deploy and run the application.
>> > can u Plz suggest me how to run this application.
>> > Iam not using Maven for building the files and i configured Apache
>> Geronimo
>> > 2.0 Server in Eclipse
>> >
>> > Thanks
>> > Swapna
>> >
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-execute-Wicket-project-in-Eclipse-tp21881247p21891215.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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

Reply via email to