Java Reference
In-Depth Information
property="fullName"/>
,you indicated you are familiar with the
following programming languages:</p>
<ul>
<%
String[] selectedLanguages =
surveyData.getProgLangList();
if (selectedLanguages != null) {
for (int i = 0; i < selectedLanguages.length;
i++) {
%>
<li>
<%= selectedLanguages[i] %>
</li>
<%}
}
%>
</ul>
</body>
</html>
We can execute our application by right-clicking on the project and selecting Run
( or simply by reloading the page), at this point the application will be deployed and
opened automatically in the default browser.
With one minor exception, it should behave exactly like it did before we introduced
the servlet. The one exception is that the URL displayed on the browser's location
text field when the form is submitted is the servlet's URL. The reason for this is
that the URL displayed in the browser does not change when the HTTP request is
forwarded, like we did in our servlet.
We have now successfully re-architected our application to use the industry standard
Model-View-Controller design pattern. We followed standard practices in Java web
applications of having JavaBeans serve as the model, JSPs serving as the view, and a
servlet serving as the controller.
 
Search WWH ::




Custom Search