According to the evolution of technologies, Web applications become the corner stone to seamlessly integrate the services of an enterprise. Unfortunately, current development practice for Web applications generally relies on the capability of individual developers and, thus, it is unpredictable. To address this problem, this thesis proposes a model-based approach for generating Web applications from scenarios in the J2EE platform. Its goal is to enable Web applications to be developed with human’s efforts. The proposed model, the Page Transition Model (PTM), is based on the Finite State Machine (FSM) because it naturally captures the behavioral characteristics of Web applications as well as it enables to utilize existing techniques to automatically generate FSM from scenarios. Note that the best FSM that show correct behaviors should be selected. This problem motivates the development of a metric for the FSM to select the best FSM from a set of generated ones. Currently, the approach supports the JSP implementation from PTM, but the extension to other current Web technologies is straightforward. With the proposed approach, it is possible to reduce effort of Web application developments dramatically.