読者です 読者をやめる 読者になる 読者になる

感謝のプログラミング 10000時間

たどり着いた結果(さき)は、感謝でした。

EAR and WAR

<スポンサーリンク>

The servlet container is the core J2EE technology that powers the web tier.

Rather than recreating the wheel, JBoss allows you to integrate the servlet container of your choice.

Edit server.xml to change the port tomcat listens on.
$JBOSS_HOME/server/default/deploy/jbossweb-tomcat55.sar

In a well-engineered application, componets in each tier are "highly cohesive" and "loosely coupled".

In the presentation tire, it is known as the Moled/View/Controller pattern.

The WAR file, as you might guess from its name(Web ARchive), is a collection of presentation tier files.

Notice that the URL of your web application is the same as the WAR file name. This URL is called the Context Root.

Your compiled java classes and library JARs are stored in the WEB-INF directory. Files in WEB-INF are hidden from public view.

We can call a resource stored in WEB-INF, as long as it was configured in web.xml.

//Redirect to destination page.
RerquestDispatcher dispatcher =	
		getServletContext().getRequestDispatcher(destinationPage);
------------
dispatcher.forward(request. response);
------------
List carList = new ArrayList();
carList.add(new CarBean("Toyota", "Camvy", "2005"));
request.setAttribute("carList", carList);
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<c:forEach items='${carList}' var 'car'>


</c:forEach>

the servlet-mapping section exposes hidden WEB-INF resources to the public.

Just as WAR file contains a web.xml deployment descriptor,
an EAR file contains a file named application.xml.

The EAR file's META-INF derectory stores application.xml.

the context root is your web site's URL.

When your WAR file is deployed inside on EAR, this element allows you to override the physical name of the WAR and use whatever URL you'd like.

今回で感謝のプログラミングは【362時間目】
10000時間まで、あと【9638時間】