Розробка веб-системи продажі білетів театру

Автор работы: Пользователь скрыл имя, 31 Мая 2013 в 01:06, курсовая работа

Описание

Метою даного курсового проекту є розробка програми, що надає собою доступ до покупки квитків театру в інтернеті. Додаток заснований на технології Java EE і активно використовує його можливості по створенню розподілених інформаційних систем

Содержание

ПЕРЕЧЕНЬ УСЛОВНЫХ ОБОЗНАЧЕНИЙ, СИМВОЛОВ, ЕДИНИЦ, СОКРАЩЕНИЙ И ТЕРМИНОВ 8
ВВЕДЕНИЕ 9
1 АНАЛИЗ РАБОТЫ 11
1.1 Ключевые понятия 11
1.2 Описание работы 12
2 ТЕХНИЧЕСКАЯ РЕАЛИЗАЦИЯ 13
2.1 Выбор технологии реализации 13
2.1 Анализ работы с сервлетами и JSP-страницами 14
3 СТРУКТУРА ПРИЛОЖЕНИЯ 15
3.1 Структура базы данных 15
3.2 Разработа структуры взаимодействия компонентов программы 15
3.3 Разработка сервлета действия 17
3.4 Разработка внешнего вида приложения 19
4 ИНТЕРФЕЙС И РАБОТА ПРОГРАММЫ 20
5 ТЕСТИРОВАНИЕ 18
5.1 Технические требования 18
5.1 Тестирование программы 18
ВЫВОДЫ 20
ПЕРЕЧЕНЬ ССЫЛОК 21
ПРИЛОЖЕНИЕ А 23

Работа состоит из  1 файл

ККП Даниленков Д.О. КИ-08-2.doc

— 844.50 Кб (Скачать документ)

                </div>

            </div>

            <div class="clear">&nbsp;</div>

         <div class="play">

                <div class="time">

                   Small Scene<br />

                    Theater 19<br />

                    11 Feb 2012

                </div>

                <div class="description">

                    <img src="images/152cc435f9ceb6ee688c5c6f184ab03a.jpg" />

                    <h2><a href="single.jsp">"Ivan tales"</a></h2>

                    <p>Ivan tales </p>

                </div>

            </div>

            <div class="clear">&nbsp;</div>

        </div>

        <div id="right-column">

         <br />

         <center><img src="images/logo.png" /></center>

            <br /> <br />

         <h3>About us</h3>

            <p>Our theater.</p>

            <p>Working on.</p>

            <br /> <br />

            <h3>ADMIN</h3>

            <a href="AdminPage.jsp">ADMIN</a>

    <br /> <br />

    <hr></hr>

 

            <h3>Navigation</h3>

            <a href="index.html" class="nav-link">Main</a>

<a href="ticket.jsp" class="nav-link">Book a ticket</a>

            <a href="contact.jsp" class="nav-link">Contact us</a>

            <br /> <br />

            <form name="serach_form" action="#" method="get">

                <h3>Search</h3>

                <input type="text" class="input" name="search" />

            </form>

            <br /> <br />

            <h3>The best</h3>

            <a href="#" class="nav-link">Captains of sand</a>

<a href="#" class="nav-link">Dyadya Vanya</a>

            <a href="#" class="nav-link">Viy</a>

        </div>

        <div class="clear">&nbsp;</div>

        <div id="footer">

         &copy; Copyright 2012.

        </div>

    </div>

</body>

</html>

 

Листинг Addplay.jsp

 

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"

    pageEncoding="ISO-8859-1"%>

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>  

<%@ page import = "com.profitsoft.model.*" %>

<%@ page import = "com.profitsoft.daoimpl.*" %>

<%@ page import = "com.profitsoft.DAO.*" %>

<%@ page import = "com.profitsoft.services.*" %>

<%@ page import = "java.util.*" %>

<%@ page import = "org.springframework.context.support.ClassPathXmlApplicationContext" %>

 

<jsp:useBean id="someplay" class = "com.profitsoft.model.Play"></jsp:useBean>

<%

ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext ("com/profitsoft/daoimpl/DBConf.xml");

PlayService plService = (PlayService) ctx.getBean("playService");

 

if (request.getMethod() == "POST" && request.getParameter("playname") != "" && request.getParameter("playauthor") != "" &&

request.getParameter("playgenre") != ""){

someplay.setName(request.getParameter("playname"));

someplay.setAuthor(request.getParameter("playauthor"));

someplay.setGenre(request.getParameter("playgenre"));

 

plService.insertPlay(someplay);

}

else {

 

out.println("Something is really wrong with data... :(");

}

 

%>

 

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

<title>Insert title here</title>

<link rel="stylesheet" href="css/style.css" />

</head>

<body>

<div id="header-line">&nbsp;</div>

    <div id="wraper">

     <div id="left-column">

         <h3>ADMIN PAGE</h3>

         <br />

         <h3>Play Service</h3>

         <br/>

         Add Play.

          <form name="play_info" action="#" method="POST">

                <h4>NAME</h4>

                <input type="text" class="input" name="playname" />

                <h4>AUTHOR</h4>

                <input type="text" class="input" name="playauthor" />

                <h4>GENRE</h4>

                <input type="text" class="input" name="playgenre" />

                <input type = "submit" value = "add"/>

            </form>

         <hr/>

         

        </div>

        <div id="right-column">

         <br />

         <center><img src="images/logo.png" /></center>

          

            <h3>Navigation</h3>

            <a href="index.html" class="nav-link">Main</a>

<a href="ticket.jsp" class="nav-link">Book a ticket</a>

            <a href="contact.jsp" class="nav-link">Contact us</a>

            <br /> <br />

                       <br /> <br />

                   </div>

        <div class="clear">&nbsp;</div>

        <div id="footer">

         &copy; Copyright 2012.

        </div>

    </div>

</body>

</html>

 

Листинг DeletePlay.jsp

 

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"

    pageEncoding="ISO-8859-1"%>

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>  

<%@ page import = "com.profitsoft.model.*" %>

<%@ page import = "com.profitsoft.daoimpl.*" %>

<%@ page import = "com.profitsoft.DAO.*" %>

<%@ page import = "com.profitsoft.services.*" %>

<%@ page import = "java.util.*" %>

<%@ page import = "org.springframework.context.support.ClassPathXmlApplicationContext" %>

 

<jsp:useBean id="someplay" class = "com.profitsoft.model.Play"></jsp:useBean>

<%

ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext ("com/profitsoft/daoimpl/DBConf.xml");

PlayService plService = (PlayService) ctx.getBean("playService");

 

if (request.getMethod() == "POST" && request.getParameter("playdelete") != "") {

int id = Integer.parseInt(request.getParameter("playdelete")); 

someplay = plService.findPlay(id);

System.out.print(someplay.getId());

 

if (someplay != null) {

plService.deletePlay(someplay);

}

}

else {

 

out.println("Something is really wrong with data... :(");

}

 

%>

 

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

<title>Insert title here</title>

<link rel="stylesheet" href="css/style.css" />

</head>

<body>

<div id="header-line">&nbsp;</div>

    <div id="wraper">

     <div id="left-column">

         <h3>ADMIN PAGE</h3>

         <br />

         <h3>Play Service</h3>

         <br/>

         Delete Play.

          <form name="play_info" action="#" method="POST">

                <h4>ID</h4>

                <input type="text" class="input" name="playdelete" />

                <input type = "submit" value = "delete"/>

            </form>

         <hr/>

         

        </div>

        <div id="right-column">

         <br />

         <center><img src="images/logo.png" /></center>

          

            <h3>Navigation</h3>

            <a href="index.html" class="nav-link">Main</a>

<a href="ticket.jsp" class="nav-link">Book a ticket</a>

            <a href="contact.jsp" class="nav-link">Contact us</a>

            <br /> <br />

                       <br /> <br />

                   </div>

        <div class="clear">&nbsp;</div>

        <div id="footer">

         &copy; Copyright 2012.

        </div>

    </div>

</body>

</html>

 

Листинг UpdatePlay.jsp

 

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"

    pageEncoding="ISO-8859-1"%>

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>  

<%@ page import = "com.profitsoft.model.*" %>

<%@ page import = "com.profitsoft.daoimpl.*" %>

<%@ page import = "com.profitsoft.DAO.*" %>

<%@ page import = "com.profitsoft.services.*" %>

<%@ page import = "java.util.*" %>

<%@ page import = "org.springframework.context.support.ClassPathXmlApplicationContext" %>

 

<jsp:useBean id="someplay" class = "com.profitsoft.model.Play"></jsp:useBean>

<%

ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext ("com/profitsoft/daoimpl/DBConf.xml");

PlayService plService = (PlayService) ctx.getBean("playService");

 

if (request.getMethod() == "POST" && request.getParameter("playfind") != "") {

int id = Integer.parseInt(request.getParameter("playfind")); 

someplay = plService.findPlay(id);

System.out.print(someplay.getId());

 

if (someplay != null && request.getParameter("playname") != "" && request.getParameter("playauthor") != "" &&

request.getParameter("playgenre") != "") {

someplay.setName(request.getParameter("playname"));

someplay.setAuthor(request.getParameter("playauthor"));

someplay.setGenre(request.getParameter("playgenre"));

plService.updatePlay(someplay);

}

}

else {

 

out.println("Something is really wrong with data... :(");

}

 

%>

 

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

<title>Insert title here</title>

<link rel="stylesheet" href="css/style.css" />

</head>

<body>

<div id="header-line">&nbsp;</div>

    <div id="wraper">

     <div id="left-column">

         <h3>ADMIN PAGE</h3>

         <br />

         <h3>Play Service</h3>

         <br/>

         Update Play.

          <form name="play_info" action="#" method="POST">

                <h4>Play ID</h4>

                <input type="text" class="input" name="playfind" />

                <hr/>

                <h4>New values</h4>

                <h4>NAME</h4>

                <input type="text" class="input" name="playname" />

                <h4>AUTHOR</h4>

                <input type="text" class="input" name="playauthor" />

                <h4>GENRE</h4>

                <input type="text" class="input" name="playgenre" />

                <input type = "submit" value = "update"/>

            </form>

         <hr/>

         

        </div>

        <div id="right-column">

         <br />

         <center><img src="images/logo.png" /></center>

          

            <h3>Navigation</h3>

            <a href="index.html" class="nav-link">Main</a>

<a href="ticket.jsp" class="nav-link">Book a ticket</a>

            <a href="contact.jsp" class="nav-link">Contact us</a>

            <br /> <br />

                       <br /> <br />

                   </div>

        <div class="clear">&nbsp;</div>

        <div id="footer">

         &copy; Copyright 2012.

        </div>

    </div>

</body>

</html>

 

Листинг AdminPage.jsp

 

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"

    pageEncoding="ISO-8859-1"%>

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>  

<%@ page import = "com.profitsoft.model.*" %>

<%@ page import = "com.profitsoft.daoimpl.*" %>

<%@ page import = "com.profitsoft.DAO.*" %>

<%@ page import = "com.profitsoft.services.*" %>

<%@ page import = "java.util.*" %>

<%@ page import = "org.springframework.context.support.ClassPathXmlApplicationContext" %>

 

<jsp:useBean id="someplay" class = "com.profitsoft.model.Play"></jsp:useBean>

<%

ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext ("com/profitsoft/daoimpl/DBConf.xml");

PlayService plService = (PlayService) ctx.getBean("playService");

 

if (request.getMethod() == "POST" && request.getParameter("playname") != "" && request.getParameter("playauthor") != "" &&

request.getParameter("playgenre") != ""){

someplay.setName(request.getParameter("playname"));

someplay.setAuthor(request.getParameter("playauthor"));

someplay.setGenre(request.getParameter("playgenre"));

 

plService.insertPlay(someplay);

}

else {

 

out.println("Something is really wrong with data... :(");

}

 

%>

 

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

<title>Insert title here</title>

<link rel="stylesheet" href="css/style.css" />

</head>

<body>

<div id="header-line">&nbsp;</div>

    <div id="wraper">

     <div id="left-column">

         <h3>ADMIN PAGE</h3>

         <br />

         <h3>Play Service</h3>

         <br/>

            <a href="AddPlay.jsp" class="nav-link">Add Play.</a>

         <a href="DeletePlay.jsp" class="nav-link">Delete Play.</a>

         <a href="UpdatePlay.jsp" class="nav-link">Update Play.</a>

         <hr/>

         

        </div>

        <div id="right-column">

         <br />

         <center><img src="images/logo.png" /></center>

          

            <h3>Navigation</h3>

            <a href="index.html" class="nav-link">Main</a>

<a href="ticket.jsp" class="nav-link">Book a ticket</a>

            <a href="contact.jsp" class="nav-link">Contact us</a>

            <br /> <br />

                       <br /> <br />

                   </div>

        <div class="clear">&nbsp;</div>

        <div id="footer">

         &copy; Copyright 2012.

        </div>

    </div>

</body>

</html>

 

Листинг contact.jsp

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />

<title>Time 2 show</title>

<link rel="stylesheet" href="css/style.css" />

    <script src="js/jquery-1.7.1.min.js"></script>

    <script src="js/script.js"></script>

       

</head>

 

<body>

<div id="header-line">&nbsp;</div>

    <div id="wraper">

     <div id="left-column">

         <div class="play">

                <div class="time">

                    CONTACT US

                </div>

                <div class="description">

                 <form action="#" method="post">

                     <span class="input-title">Name</span>

                     <input type="text" class="input" name="name" />

                     <span class="input-title">e-mail</span>

                        <input type="text" class="input" name="email"/>

                     <span class="input-title">Leave your message</span>

                        <input type="text" class="input" name="msg"/>

                        <br />

                        <input type="submit" value="Send" />

                    </form>

Информация о работе Розробка веб-системи продажі білетів театру