début projet SDIS avec formulaire profil non terminé

This commit is contained in:
morgann.david 2024-11-08 08:43:52 +01:00
parent 49b3c996cf
commit 53fe3c3dea
9 changed files with 129 additions and 12 deletions

View File

@ -7,8 +7,8 @@
<!-- the Compile on Save feature is turned off for the project. --> <!-- the Compile on Save feature is turned off for the project. -->
<!-- You can turn off the Compile on Save (or Deploy on Save) setting --> <!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
<!-- in the project's Project Properties dialog box.--> <!-- in the project's Project Properties dialog box.-->
<project name="ap33AppliSDIS" default="default" basedir="."> <project name="ap33ApplicationSDIS-V2" default="default" basedir=".">
<description>Builds, tests, and runs the project ap33AppliSDIS.</description> <description>Builds, tests, and runs the project ap33ApplicationSDIS-V2.</description>
<import file="nbproject/build-impl.xml"/> <import file="nbproject/build-impl.xml"/>
<!-- <!--

View File

@ -17,7 +17,7 @@
- cleanup - cleanup
--> -->
<project xmlns:webproject1="http://www.netbeans.org/ns/web-project/1" xmlns:webproject2="http://www.netbeans.org/ns/web-project/2" xmlns:webproject3="http://www.netbeans.org/ns/web-project/3" basedir=".." default="default" name="ap33AppliSDIS-impl"> <project xmlns:webproject1="http://www.netbeans.org/ns/web-project/1" xmlns:webproject2="http://www.netbeans.org/ns/web-project/2" xmlns:webproject3="http://www.netbeans.org/ns/web-project/3" basedir=".." default="default" name="ap33ApplicationSDIS-V2-impl">
<import file="ant-deploy.xml"/> <import file="ant-deploy.xml"/>
<fail message="Please build using Ant 1.7.1 or higher."> <fail message="Please build using Ant 1.7.1 or higher.">
<condition> <condition>
@ -470,7 +470,7 @@ or ant -Dj2ee.platform.classpath=&lt;server_classpath&gt; (where no properties f
</fileset> </fileset>
</union> </union>
<taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/> <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
<testng classfilesetref="test.set" failureProperty="tests.failed" listeners="org.testng.reporters.VerboseReporter" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="ap33AppliSDIS" testname="TestNG tests" workingDir="${basedir}"> <testng classfilesetref="test.set" failureProperty="tests.failed" listeners="org.testng.reporters.VerboseReporter" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="ap33ApplicationSDIS-V2" testname="TestNG tests" workingDir="${basedir}">
<xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/> <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
<propertyset> <propertyset>
<propertyref prefix="test-sys-prop."/> <propertyref prefix="test-sys-prop."/>
@ -618,7 +618,7 @@ or ant -Dj2ee.platform.classpath=&lt;server_classpath&gt; (where no properties f
<condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}"> <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
<isset property="test.method"/> <isset property="test.method"/>
</condition> </condition>
<condition else="-suitename ap33AppliSDIS -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}"> <condition else="-suitename ap33ApplicationSDIS-V2 -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
<matches pattern=".*\.xml" string="@{testClass}"/> <matches pattern=".*\.xml" string="@{testClass}"/>
</condition> </condition>
<delete dir="${build.test.results.dir}" quiet="true"/> <delete dir="${build.test.results.dir}" quiet="true"/>

View File

@ -1,8 +1,8 @@
build.xml.data.CRC32=7a7da587 build.xml.data.CRC32=b7dbe5f7
build.xml.script.CRC32=b229f15b build.xml.script.CRC32=14676051
build.xml.stylesheet.CRC32=1707db4f@1.98.0.1 build.xml.stylesheet.CRC32=1707db4f@1.98.0.1
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=7a7da587 nbproject/build-impl.xml.data.CRC32=b7dbe5f7
nbproject/build-impl.xml.script.CRC32=c145c343 nbproject/build-impl.xml.script.CRC32=ff0143c9
nbproject/build-impl.xml.stylesheet.CRC32=334708a0@1.98.0.1 nbproject/build-impl.xml.stylesheet.CRC32=334708a0@1.98.0.1

View File

@ -77,6 +77,6 @@ src.dir=${source.root}/java
test.src.dir=test test.src.dir=test
war.content.additional= war.content.additional=
war.ear.name=${war.name} war.ear.name=${war.name}
war.name=ap33AppliSDIS.war war.name=ap33ApplicationSDIS-V2.war
web.docbase.dir=web web.docbase.dir=web
webinf.dir=web/WEB-INF webinf.dir=web/WEB-INF

View File

@ -3,7 +3,7 @@
<type>org.netbeans.modules.web.project</type> <type>org.netbeans.modules.web.project</type>
<configuration> <configuration>
<data xmlns="http://www.netbeans.org/ns/web-project/3"> <data xmlns="http://www.netbeans.org/ns/web-project/3">
<name>ap33AppliSDIS</name> <name>ap33ApplicationSDIS-V2</name>
<minimum-ant-version>1.6.5</minimum-ant-version> <minimum-ant-version>1.6.5</minimum-ant-version>
<web-module-libraries/> <web-module-libraries/>
<web-module-additional-libraries/> <web-module-additional-libraries/>

View File

@ -0,0 +1,85 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/JSP_Servlet/Servlet.java to edit this template
*/
package servlets;
import java.io.IOException;
import java.io.PrintWriter;
import jakarta.servlet.ServletException;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
/**
*
* @author morgann.david
*/
public class ProfilServlet extends HttpServlet {
/**
* Processes requests for both HTTP <code>GET</code> and <code>POST</code>
* methods.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html;charset=UTF-8");
try (PrintWriter out = response.getWriter()) {
/* TODO output your page here. You may use following sample code. */
out.println("<!DOCTYPE html>");
out.println("<html>");
out.println("<head>");
out.println("<title>Servlet ProfilServlet</title>");
out.println("</head>");
out.println("<body>");
out.println("<h1>Servlet ProfilServlet at " + request.getContextPath() + "</h1>");
out.println("</body>");
out.println("</html>");
}
}
// <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
/**
* Handles the HTTP <code>GET</code> method.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
}
/**
* Handles the HTTP <code>POST</code> method.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
}
/**
* Returns a short description of the servlet.
*
* @return a String containing servlet description
*/
@Override
public String getServletInfo() {
return "Short description";
}// </editor-fold>
}

View File

@ -1,2 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Context path="/ap33AppliSDIS"/> <Context path="/ap33ApplicationSDIS-V2"/>

View File

@ -0,0 +1,21 @@
<%--
Document : profilPompierVue
Created on : 7 nov. 2024, 15:07:13
Author : morgann.david
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>SDIS 29 - Profil</title>
</head>
<body>
<h1>Profil du pompier</h1>
<form>
<input type="text" id="ztnom" name="nom" readonly>
<input type="text" id="ztprenom" name="prenom" readonly><br>
</form>
</body>
</html>

11
web/WEB-INF/web.xml Normal file
View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="6.0" xmlns="https://jakarta.ee/xml/ns/jakartaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd">
<servlet>
<servlet-name>ProfilServlet</servlet-name>
<servlet-class>servlets.ProfilServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ProfilServlet</servlet-name>
<url-pattern>/Profil</url-pattern>
</servlet-mapping>
</web-app>