Skip to content

Commit

Permalink
Entrega aula 04
Browse files Browse the repository at this point in the history
  • Loading branch information
Moraes authored and Moraes committed Nov 5, 2018
0 parents commit 4dffce3
Show file tree
Hide file tree
Showing 157 changed files with 70,708 additions and 0 deletions.
Binary file added pipoca_aula04/.DS_Store
Binary file not shown.
17 changes: 17 additions & 0 deletions pipoca_aula04/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v8.0 (2)">
<attributes>
<attribute name="owner.project.facets" value="jst.web"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jre1.8.0_191">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="build/classes"/>
</classpath>
1 change: 1 addition & 0 deletions pipoca_aula04/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build/
31 changes: 31 additions & 0 deletions pipoca_aula04/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>pipoca_aula04</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
</natures>
</projectDescription>
12 changes: 12 additions & 0 deletions pipoca_aula04/.settings/.jsdtscope
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry excluding="**/bower_components/*|**/node_modules/*|**/*.min.js" kind="src" path="WebContent"/>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
<attributes>
<attribute name="hide" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
<classpathentry kind="output" path=""/>
</classpath>
7 changes: 7 additions & 0 deletions pipoca_aula04/.settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.8
8 changes: 8 additions & 0 deletions pipoca_aula04/.settings/org.eclipse.wst.common.component
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="pipoca">
<wb-resource deploy-path="/" source-path="/WebContent" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>
<property name="context-root" value="pipoca"/>
<property name="java-output-path" value="/pipoca/build/classes"/>
</wb-module>
</project-modules>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<runtime name="Apache Tomcat v8.0 (2)"/>
<fixed facet="wst.jsdt.web"/>
<fixed facet="jst.web"/>
<fixed facet="java"/>
<installed facet="java" version="1.8"/>
<installed facet="jst.web" version="3.1"/>
<installed facet="wst.jsdt.web" version="1.0"/>
</faceted-project>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
org.eclipse.wst.jsdt.launching.baseBrowserLibrary
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Window
3 changes: 3 additions & 0 deletions pipoca_aula04/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:

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
35 changes: 35 additions & 0 deletions pipoca_aula04/WebContent/WEB-INF/spring-context.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?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:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<context:component-scan
base-package="br.usjt.ads.arqdes" />
<mvc:annotation-driven />
<mvc:default-servlet-handler />
<mvc:interceptors>
<bean class="br.usjt.ads.arqdes.interceptor.LoginInterceptor" />
</mvc:interceptors>
<bean
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/views/" />
<property name="suffix" value=".jsp" />
</bean>

<bean id="mysqlDataSource"
class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName"
value="com.mysql.jdbc.Driver"></property>
<property name="url" value="jdbc:mysql://localhost/pipocadb"></property>
<property name="username" value="root"></property>
<property name="password" value="12345"></property>
</bean>


</beans>
75 changes: 75 additions & 0 deletions pipoca_aula04/WebContent/WEB-INF/views/AlterarFilme.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<c:import url="header.jsp" />

<body>
<!-- Barra superior com os menus de navegação -->
<c:import url="Menu.jsp" />
<!-- Container Principal -->
<div id="main" class="container mt-4">
<h3 class="page-header">Alterar Filme #${filme.id }</h3>
<!-- Formulario para alteração de clientes -->
<form action="salvar_filme" method="post">
<!-- area de campos do form -->
<input type="hidden" name="id" value="${filme.id }" />
<div class="row">
<div class="form-group col-md-4">
<label for="genero">Gênero</label> <select class="form-control"
name="genero.id" id="genero">
<c:forEach var="genero" items="${generos}">
<option value="${genero.id}">${genero.nome}</option>
</c:forEach>
</select>
</div>
<div class="form-group col-md-8">
<label for="titulo">Título</label>
<input type="text"
class="form-control" name="titulo" id="titulo"
maxlength="100" placeholder="${filme.titulo}">
</div>
</div>
<div class="row">
<div class="form-group col-md-12">
<label for="descricao">Descrição</label>
<textarea class="form-control rounded-0" id="descricao"
name="descricao" maxlength="4000" rows="10" placeholder="${filme.descricao }"></textarea>
</div>
</div>
<div class="row">
<div class="form-group col-md-8">
<label for="diretor">Direção</label> <input type="text"
class="form-control" name="diretor" id="diretor" maxlength="60"
placeholder="${filme.diretor }">
</div>

<div class="form-group col-md-4">
<label for="dataLancamento">Lançamento</label> <input type="text"
class="form-control" name="dataLancamento" id="dataLancamento"
placeholder="${filme.dataLancamento }">
</div>
</div>
<div class="row">
<div class="form-group col-md-8">
<label for="posterpath">Poster</label> <input type="text"
class="form-control" name="posterPath" id="posterpath"
maxlength="200" placeholder="${filme.posterPath }">
</div>
<div class="form-group col-md-4">
<label for="popularidade">Popularidade</label> <input type="number"
class="form-control" name="popularidade" id="popularidade"
min="0.0" max="100.0" placeholder="${filme.popularidade }">
</div>
</div>
<hr />
<div id="actions" class="row">
<div class="col-md-12">
<button type="submit" class="btn btn-primary" name="acao"
value="atualizar">Salvar</button>
<a href="inicio" class="btn btn-default">Cancelar</a>
</div>
</div>
</form>
</div>
<c:import url="footer.jsp" />
58 changes: 58 additions & 0 deletions pipoca_aula04/WebContent/WEB-INF/views/Cliente.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html lang="pt-br">

<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Visualizar Cliente</title>

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

<body>
<!-- Barra superior com os menus de navegação -->
<c:import url="Menu.jsp"/>
<!-- Container Principal -->
<div id="main" class="container">
<h3 class="page-header">Visualizar Cliente #${cliente.id}</h3>
<div class="row">
<div class="col-md-12">
<p><strong>Nome</strong>
</p>
<p>
${cliente.nome}
</p>
</div>
</div>
<div class="row">
<div class="col-md-6">
<p><strong>Celular</strong>
</p>
<p>
${cliente.fone}
</p>
</div>
<div class="col-md-6">
<p><strong>E-Mail</strong>
</p>
<p>
${cliente.email}
</p>
</div>
</div>
<hr />
<div id="actions" class="row">
<div class="col-md-12">
<a href="index.jsp" class="btn btn-default">Voltar</a>
</div>
</div>
</div>
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
</body>

</html>
65 changes: 65 additions & 0 deletions pipoca_aula04/WebContent/WEB-INF/views/CriarFilme.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<c:import url="header.jsp" />

<body>
<!-- Barra superior com os menus de navegação -->
<c:import url="Menu.jsp"/>
<!-- Container Principal -->
<div id="main" class="container mt-4">
<h3 class="page-header">Incluir Filme</h3>
<!-- Formulario para inclusao de clientes -->
<form action="inserir_filme" method="post">
<!-- area de campos do form -->
<div class="row">
<div class="form-group col-md-4">
<label for="genero">Gênero</label>
<select class="form-control" name="genero.id" id="genero">
<c:forEach var="genero" items="${generos}">
<option value="${genero.id}">${genero.nome}</option>
</c:forEach>
</select>
</div>
<div class="form-group col-md-8">
<label for="titulo">Título</label>
<input type="text" class="form-control" name="titulo" id="titulo" required maxlength="100" placeholder="nome do filme">
</div>
</div>
<div class="row">
<div class="form-group col-md-12">
<label for="descricao">Descrição</label>
<textarea class="form-control rounded-0" id="descricao" name ="descricao" maxlength="4000" rows="10"></textarea>
</div>
</div>
<div class="row">
<div class="form-group col-md-8">
<label for="diretor">Direção</label>
<input type="text" class="form-control" name="diretor" id="diretor" maxlength="60" placeholder="nome do(s) diretor(es)">
</div>

<div class="form-group col-md-4">
<label for="dataLancamento">Lançamento</label>
<input type="text" class="form-control" name="dataLancamento" id="dataLancamento" placeholder="formato dd/mm/yyyy">
</div>
</div>
<div class="row">
<div class="form-group col-md-8">
<label for="posterpath">Poster</label>
<input type="text" class="form-control" name="posterPath" id="posterpath" maxlength="200" placeholder="caminho da imagem do poster">
</div>
<div class="form-group col-md-4">
<label for="popularidade">Popularidade</label>
<input type="number" class="form-control" name="popularidade" id="popularidade" min="0.0" max="100.0">
</div>
</div>
<hr />
<div id="actions" class="row">
<div class="col-md-12">
<button type="submit" class="btn btn-primary" name="acao" value="criar">Salvar</button>
<a href="index.jsp" class="btn btn-default">Cancelar</a>
</div>
</div>
</form>
</div>
<c:import url="footer.jsp" />
Loading

0 comments on commit 4dffce3

Please sign in to comment.