25.02.2015 Views

Introducing Spring Framework

Introducing Spring Framework

Introducing Spring Framework

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 10 ■ Showing Your <strong>Spring</strong> Application on the Web<br />

The DispatcherServlet defined in your web.xml, as shown in Listing 10-4, will be the front controller that is<br />

taking care of sending requests to the controller (see Listing 10-3) and the response back with the correct view. Now<br />

you need to tell the <strong>Spring</strong> MVC where your views will be. Listing 10-5 contains the <strong>Spring</strong> XML configuration needed<br />

for the <strong>Spring</strong> container to instantiate the necessary beans.<br />

Listing 10-5. mydocuments-servlet.xml<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

select d.documentId, d.name, d.location, d.description as doc_desc,<br />

d.typeId, d.created, d.modified,<br />

t.name as type_name, t.description as type_desc, t.extension from<br />

documents d<br />

join types t<br />

on d.typeId = t.typeId<br />

<br />

<br />

<br />

<br />

137

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!