Skip to content

Commit

Permalink
fonctionnalité création d'un trajet
Browse files Browse the repository at this point in the history
  • Loading branch information
abirbenzaamia committed Jan 15, 2022
0 parents commit 762b7a9
Show file tree
Hide file tree
Showing 42 changed files with 925 additions and 0 deletions.
Binary file not shown.
Empty file.
Binary file added .gradle/7.1/executionHistory/executionHistory.bin
Binary file not shown.
Binary file added .gradle/7.1/executionHistory/executionHistory.lock
Binary file not shown.
Binary file added .gradle/7.1/fileChanges/last-build.bin
Binary file not shown.
Binary file added .gradle/7.1/fileHashes/fileHashes.bin
Binary file not shown.
Binary file added .gradle/7.1/fileHashes/fileHashes.lock
Binary file not shown.
Empty file added .gradle/7.1/gc.properties
Empty file.
Binary file added .gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
2 changes: 2 additions & 0 deletions .gradle/buildOutputCleanup/cache.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#Sat Jan 15 19:20:05 CET 2022
gradle.version=7.1
Binary file added .gradle/buildOutputCleanup/outputFiles.bin
Binary file not shown.
Binary file added .gradle/checksums/checksums.lock
Binary file not shown.
Binary file added .gradle/checksums/md5-checksums.bin
Binary file not shown.
Binary file added .gradle/checksums/sha1-checksums.bin
Binary file not shown.
Empty file added .gradle/vcs-1/gc.properties
Empty file.
3 changes: 3 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/TP_Git-43dbc896db1c9b025084203b9795a954ab344cfa.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions .idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions WebContent/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Manifest-Version: 1.0
Class-Path:

57 changes: 57 additions & 0 deletions WebContent/WEB-INF/jsps/createtrip.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<%@ page language="java" contentType="text/html; charset=US-ASCII"
pageEncoding="US-ASCII"%>
<%@ taglib prefix="sf" uri="http://www.springframework.org/tags/form"%>
<!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=US-ASCII">
<title>Create Trip</title>
</head>
<body>

<h2>Create a Bus Trip</h2>

<sf:form method="post"
action="${pageContext.request.contextPath}/createreserve"
commandName="bus">

<table class="formtable">
<tr>
<td class="label">Leave Date:</td>
<td><sf:input class="control" path="dateLeave" name="dateLeave" type="text" /><br />
<div class="error">
<sf:errors path="dateLeave"></sf:errors>
</div></td>
<tr>
<tr>
<td class="label">Return Date:</td>
<td><sf:input class="control" path="dateReturn" name="dateReturn" type="text" /><br />
<div class="error">
<sf:errors path="dateReturn"></sf:errors>
</div></td>
<tr>
<tr>
<td class="label">Leave From:</td>
<td><sf:input class="control" path="leaveFrom" name="leaveFrom" type="text" /><br />
<div class="error">
<sf:errors path="leaveFrom"></sf:errors>
</div></td>
<tr>
<tr>
<td class="label">Going to:</td>
<td><sf:input class="control" path="goingTo" name="goingTo" type="text" /><br />
<div class="error">
<sf:errors path="goingTo"></sf:errors>
</div></td>
<tr>
<td class="label"></td>
<td><input class="control" value="Create Trip" type="submit" /></td>
</tr>
</table>

</sf:form>

</body>
</html>
45 changes: 45 additions & 0 deletions WebContent/WEB-INF/jsps/home.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<!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>
</head>
<body>
<p>
<a href="${pageContext.request.contextPath}/createaccount">Create
Account</a>
</p>
<p>
<a href="${pageContext.request.contextPath}/login">Login</a>
</p>
<p>
<a href="${pageContext.request.contextPath}/loggedout">Logout</a>
</p>
<p>
<a href="${pageContext.request.contextPath}/results">Search</a>
</p>
<p>
<a href="${pageContext.request.contextPath}/createtrip">Create a Trip</a>
</p>
<p>
<a href="${pageContext.request.contextPath}/getreservations">My Reservations</a>
</p>


<c:forEach var="reserves" items="${reserves}">
<p>
<c:out value="${reserves.leaveFrom}"></c:out>
<c:out value="${reserves.dateLeave}"></c:out>
<c:out value="${reserves.goingTo}"></c:out>
<c:out value="${reserves.dateReturn}"></c:out>
</c:forEach>




</body>
</html>
23 changes: 23 additions & 0 deletions WebContent/WEB-INF/test-servlet.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd">


<context:component-scan base-package="com.telly.controllers">
</context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>

<bean id="jspViewResolver"
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/jsps/"></property>
<property name="suffix" value=".jsp"></property>
</bean>

<bean id="validator"
class="org.springframework.validation.beanvalidation.LocalValidatorFactoryBean">
</bean>
</beans>
61 changes: 61 additions & 0 deletions WebContent/WEB-INF/web.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID" version="2.5">
<display-name>spring-tutorial-50</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<servlet>
<description></description>
<display-name>test</display-name>
<servlet-name>test</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>test</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>

<description>Spring Database</description>
<resource-ref>
<description>DB Connection</description>
<res-ref-name>jdbc/spring</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>

<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>

<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
classpath:com/telly/config/dao-context.xml
classpath:com/telly/config/security-context.xml
classpath:com/telly/config/service-context.xml
</param-value>
</context-param>

<filter>
<display-name>springSecurityFilterChain</display-name>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>


</web-app>


44 changes: 44 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
plugins {
id 'java'
}

group = 'com.telly'
version = '1.0.0'
sourceCompatibility = '1.8'

repositories {
mavenCentral()
}

dependencies {
implementation "org.springframework:spring-core:3.2.3.RELEASE"
implementation "org.springframework:spring-beans:3.2.3.RELEASE"
implementation "org.springframework:spring-context:3.2.3.RELEASE"
implementation "org.springframework:spring-jdbc:3.2.3.RELEASE"
implementation "org.springframework:spring-web:3.2.3.RELEASE"
implementation "org.springframework:spring-webmvc:3.2.3.RELEASE"
implementation "javax.servlet:jstl:1.2"
implementation "mysql:mysql-connector-java:5.1.26"
implementation "javax.validation:validation-api:1.1.0.Final"
implementation "org.hibernate:hibernate:3.5.4-Final"
implementation "org.hibernate:hibernate-validator:5.0.1.Final"
implementation "commons-validator:commons-validator:1.4.0"
implementation "org.springframework.security:spring-security-core:3.1.4.RELEASE"
implementation "org.springframework.security:spring-security-web:3.1.4.RELEASE"
implementation "org.springframework.security:spring-security-config:3.1.4.RELEASE"
implementation "org.springframework.security:spring-security-taglibs:3.1.4.RELEASE"
implementation "org.apache.tiles:tiles-extras:2.2.2"
implementation "org.apache.tiles:tiles-jsp:2.2.2"
implementation "org.apache.tiles:tiles-servlet:2.2.2"
implementation "log4j:log4j:1.2.14"
implementation "org.slf4j:slf4j-api:1.7.5"
implementation "org.slf4j:slf4j-jcl:1.7.5"
implementation "org.springframework:spring-test:3.2.3.RELEASE"
implementation "junit:junit:4.11"
implementation "commons-dbcp:commons-dbcp:1.4"
implementation "org.springframework:spring-orm:3.2.3.RELEASE"
implementation "org.hibernate:hibernate-core:3.6.10.Final"

}


Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 762b7a9

Please sign in to comment.