25.02.2015 Views

Introducing Spring Framework

Introducing Spring Framework

Introducing Spring Framework

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

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

10:38:27.619 [1141619556@qtp-568919009-0] DEBUG o.s.web.servlet.DispatcherServlet - Last-Modified<br />

value for [/ch10/mydocuments/search/all] is: -1<br />

10:38:27.634 [1141619556@qtp-568919009-0] DEBUG o.s.jdbc.core.JdbcTemplate - Executing SQL query [<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 />

10:38:27.635 [1141619556@qtp-568919009-0] DEBUG o.s.jdbc.datasource.DataSourceUtils - Fetching JDBC<br />

Connection from DataSource<br />

10:38:27.635 [1141619556@qtp-568919009-0] DEBUG o.s.j.d.SimpleDriverDataSource - Creating new JDBC<br />

Driver Connection to [jdbc:hsqldb:mem:dataSource]<br />

Internationalization: i18n<br />

I said that the <strong>Spring</strong> MVC has other features like i18n (Internationalization). Chapter 6 talked about the message<br />

bundles; the <strong>Spring</strong> MVC has that capability too. Let’s see how to do it.<br />

First, you need to add some extra bean definitions to the XML configuration file in order for it to be ready for this<br />

particular feature. Listing 10-8 shows you how it’s done.<br />

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

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

141

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

Saved successfully!

Ooh no, something went wrong!