From the course: Java EE: JavaServer Faces JSF

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Source code protection

Source code protection

From the course: Java EE: JavaServer Faces JSF

Start my 1-month free trial

Source code protection

- [Instructor] So we've created a number of xhtml files in our JSF application. In a real world application we'll probably have a host of other resource files, style sheets, images and other bits and pieces. We probably don't want a malicious user or even a casual browser to access directly. We certainly don't want our xhtml files displayed as raw xml in the browser. This video is the story of source code protection. In our worked up xml, we've set up a servlet mapping for our Faces servlets to intercept and take control of browser requests with the Faces URL mapping. There's really nothing stopping a user from requesting our JSF pages without using the URL mapping that we've defined. What'll happen is they'll just see the raw xml file, a source code leak and all it's embarrassments. Let's see what that looks like. So this is a logistic JSF page. Watch what happens when we remove the Faces URL mapping. We see raw text in the browser, viewing the source we see the entire Facelets code.…

Contents