Alex Rivera | Logout

Spring MVC tutorial from the scratch

Asked 2011-08-11T11:58:06.110
29

I am quite new to spring coding.. I asked a question earlier but no one replied so I am asking it the other way..!! I need to move my application from simple Java to Spring MVC.

Is there any good Spring MVC tutorials that gives info from scratch??

My simple code is below.

public void run()
{
    try
    {
        DataInputStream din = new DataInputStream (
            m_connection.getInputStream() );

        PrintStream pout = new PrintStream (
            m_connection.getOutputStream() );

        // Read line from client
        String data = din.readLine();

        // Check to see if we should simulate a stalled server
        if (shallWeStall)
        {
            // Yes .. so reset flag and stall
            shallWeStall = false;

            try
            {
                Thread.sleep (20000);
            } catch (InterruptedException ie ) {}
        }
        else
        {
            // No.... but we will next time
            shallWeStall = true;
        }

        // Echo data back to clinet
        pout.println (data);

        // Close connection
        m_connection.close();
    }
    catch (IOException ioe) 
    {
        System.err.println ("I/O error");
    }
}

I tried googling, but everything I found was too tough to start from.

Edit
Report

1 Answer

3

This tutorial explains basic concepts and provide step by step explanation for implementation.
I started with this one and it really helped me :)

answered 2012-07-01T08:11:07.183

Your Answer