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 />

Figure 10-4. http://localhost:8080/ch10/mydocuments/search/all?lang=en<br />

And what happens if you are not passing any parameter? Well, the container will take the default<br />

messages.properties file and you will get the English version.<br />

But wait! I have been saying that <strong>Spring</strong> simplifies everything, right? Of course it does. What about getting rid of<br />

all the XML files, even the web.xml (the standard Java way)? Yes, you can! You can use Java configuration. Take a look<br />

at the book’s companion source code for more information about how to do this.<br />

Summary<br />

In this chapter, you used Java’s standard way of deploying web applications using a web structure and a web.xml<br />

configuration file to show your <strong>Spring</strong> application, My Document, in a web page. You also saw how to internationalize<br />

your application by using Message bundles for multiple languages.<br />

In the next chapters, you will still use the <strong>Spring</strong> MVC, but this time you will see how it interacts with other<br />

services besides the Web, such as JMS or AMQP.<br />

144

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

Saved successfully!

Ooh no, something went wrong!