diff --git a/.gitignore b/.gitignore index ccbbf20..2f06b63 100644 --- a/.gitignore +++ b/.gitignore @@ -74,3 +74,13 @@ /Semester 2/Assignments/EventsLabValueChangeListener_CalebFontenot/target/ /Semester 2/Assignments/EventsLabValueChangeListener/target/ /Semester 2/Assignments/Supplier_Parts_Calendar_Primefaces/target/ +/Semester 2/Assignments/AjaxLab_CalebFontenot/target/ +/Semester 2/Assignments/Review_JSF/target/ +/Semester 2/Exams/FinalExamProblem1_CalebFontenot/target/ +/Semester 2/Exams/FinalExamProblem3_CalebFontenot/target/ +/Semester 2/Exams/FinalExamProblem2_CalebFontenot/target/ +/Semester 2/Exams/FinalExamProblem4_CalebFontenot/target/ +/Semester 3/Examples/ajax-examples/Ajax1_Echo/target/ +/Semester 3/Examples/ajax-examples/Ajax2/target/ +/Semester 2/Exams/Ajax3-Tags-Testing/target/ +/Semester 2/Exams/Ajax4Listener/target/ diff --git a/Semester 2/Assignments/AjaxLab_CalebFontenot/faces-config.NavData b/Semester 2/Assignments/AjaxLab_CalebFontenot/faces-config.NavData new file mode 100644 index 0000000..298bfc5 --- /dev/null +++ b/Semester 2/Assignments/AjaxLab_CalebFontenot/faces-config.NavData @@ -0,0 +1,6 @@ + + + + + + diff --git a/Semester 2/Assignments/AjaxLab_CalebFontenot/labAjax1.pdf b/Semester 2/Assignments/AjaxLab_CalebFontenot/labAjax1.pdf new file mode 100644 index 0000000..03c936f Binary files /dev/null and b/Semester 2/Assignments/AjaxLab_CalebFontenot/labAjax1.pdf differ diff --git a/Semester 2/Assignments/AjaxLab_CalebFontenot/nb-configuration.xml b/Semester 2/Assignments/AjaxLab_CalebFontenot/nb-configuration.xml new file mode 100644 index 0000000..84a842c --- /dev/null +++ b/Semester 2/Assignments/AjaxLab_CalebFontenot/nb-configuration.xml @@ -0,0 +1,18 @@ + + + + + + Facelets + + diff --git a/Semester 2/Assignments/AjaxLab_CalebFontenot/pom.xml b/Semester 2/Assignments/AjaxLab_CalebFontenot/pom.xml new file mode 100644 index 0000000..f29b9c5 --- /dev/null +++ b/Semester 2/Assignments/AjaxLab_CalebFontenot/pom.xml @@ -0,0 +1,42 @@ + + 4.0.0 + edu.slcc.asdv.caleb + AjaxLab_CalebFontenot + 1.0-SNAPSHOT + war + AjaxLab_CalebFontenot-1.0-SNAPSHOT + + + UTF-8 + 10.0.0 + + + + + jakarta.platform + jakarta.jakartaee-api + ${jakartaee} + provided + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + 11 + 11 + + + + org.apache.maven.plugins + maven-war-plugin + 3.3.2 + + + + \ No newline at end of file diff --git a/Semester 2/Assignments/AjaxLab_CalebFontenot/src/main/java/beans/UserBean.java b/Semester 2/Assignments/AjaxLab_CalebFontenot/src/main/java/beans/UserBean.java new file mode 100644 index 0000000..bf58f18 --- /dev/null +++ b/Semester 2/Assignments/AjaxLab_CalebFontenot/src/main/java/beans/UserBean.java @@ -0,0 +1,68 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/JSF/JSFManagedBean.java to edit this template + */ + +package beans; + +import jakarta.inject.Named; +import jakarta.enterprise.context.SessionScoped; +import java.io.Serializable; + +/** + * + * @author caleb + */ +@Named(value="user") +@SessionScoped +public class UserBean implements Serializable{ + + private String name; + private String password; + + /** + * Get the value of password + * + * @return the value of password + */ + public String getPassword() + { + return password; + } + + /** + * Set the value of password + * + * @param password new value of password + */ + public void setPassword(String password) + { + this.password = password; + } + + + /** + * Get the value of name + * + * @return the value of name + */ + public String getName() + { + return name; + } + + /** + * Set the value of name + * + * @param name new value of name + */ + public void setName(String name) + { + this.name = name; + } + + /** Creates a new instance of UserBean */ + public UserBean() { + } + +} diff --git a/Semester 2/Assignments/AjaxLab_CalebFontenot/src/main/java/edu/slcc/asdv/caleb/ajaxlab_calebfontenot/JakartaRestConfiguration.java b/Semester 2/Assignments/AjaxLab_CalebFontenot/src/main/java/edu/slcc/asdv/caleb/ajaxlab_calebfontenot/JakartaRestConfiguration.java new file mode 100644 index 0000000..e21d9fe --- /dev/null +++ b/Semester 2/Assignments/AjaxLab_CalebFontenot/src/main/java/edu/slcc/asdv/caleb/ajaxlab_calebfontenot/JakartaRestConfiguration.java @@ -0,0 +1,13 @@ +package edu.slcc.asdv.caleb.ajaxlab_calebfontenot; + +import jakarta.ws.rs.ApplicationPath; +import jakarta.ws.rs.core.Application; + +/** + * Configures Jakarta RESTful Web Services for the application. + * @author Juneau + */ +@ApplicationPath("resources") +public class JakartaRestConfiguration extends Application { + +} diff --git a/Semester 2/Assignments/AjaxLab_CalebFontenot/src/main/java/edu/slcc/asdv/caleb/ajaxlab_calebfontenot/resources/JakartaEE10Resource.java b/Semester 2/Assignments/AjaxLab_CalebFontenot/src/main/java/edu/slcc/asdv/caleb/ajaxlab_calebfontenot/resources/JakartaEE10Resource.java new file mode 100644 index 0000000..7296c5a --- /dev/null +++ b/Semester 2/Assignments/AjaxLab_CalebFontenot/src/main/java/edu/slcc/asdv/caleb/ajaxlab_calebfontenot/resources/JakartaEE10Resource.java @@ -0,0 +1,20 @@ +package edu.slcc.asdv.caleb.ajaxlab_calebfontenot.resources; + +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.core.Response; + +/** + * + * @author + */ +@Path("jakartaee10") +public class JakartaEE10Resource { + + @GET + public Response ping(){ + return Response + .ok("ping Jakarta EE") + .build(); + } +} diff --git a/Semester 2/Assignments/AjaxLab_CalebFontenot/src/main/resources/META-INF/persistence.xml b/Semester 2/Assignments/AjaxLab_CalebFontenot/src/main/resources/META-INF/persistence.xml new file mode 100644 index 0000000..7582bf1 --- /dev/null +++ b/Semester 2/Assignments/AjaxLab_CalebFontenot/src/main/resources/META-INF/persistence.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Semester 2/Assignments/AjaxLab_CalebFontenot/src/main/resources/messages/messages.properties b/Semester 2/Assignments/AjaxLab_CalebFontenot/src/main/resources/messages/messages.properties new file mode 100644 index 0000000..8101294 --- /dev/null +++ b/Semester 2/Assignments/AjaxLab_CalebFontenot/src/main/resources/messages/messages.properties @@ -0,0 +1,9 @@ + +# Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license +# Click nbfs://nbhost/SystemFileSystem/Templates/Other/properties.properties to edit this template +loginWindowTitle=Ajax Echo +loginHeading=Please Log-In +namePrompt=Name: +passwordPrompt=Password: +loginButtonText=Log-In +greeting=Welcome \ No newline at end of file diff --git a/Semester 2/Assignments/AjaxLab_CalebFontenot/src/main/webapp/WEB-INF/beans.xml b/Semester 2/Assignments/AjaxLab_CalebFontenot/src/main/webapp/WEB-INF/beans.xml new file mode 100644 index 0000000..3f8e63e --- /dev/null +++ b/Semester 2/Assignments/AjaxLab_CalebFontenot/src/main/webapp/WEB-INF/beans.xml @@ -0,0 +1,7 @@ + + + diff --git a/Semester 2/Assignments/AjaxLab_CalebFontenot/src/main/webapp/WEB-INF/faces-config.xml b/Semester 2/Assignments/AjaxLab_CalebFontenot/src/main/webapp/WEB-INF/faces-config.xml new file mode 100644 index 0000000..8b5a26c --- /dev/null +++ b/Semester 2/Assignments/AjaxLab_CalebFontenot/src/main/webapp/WEB-INF/faces-config.xml @@ -0,0 +1,32 @@ + + + + + + messages.messages + msgs + + + diff --git a/Semester 2/Assignments/AjaxLab_CalebFontenot/src/main/webapp/WEB-INF/glassfish-web.xml b/Semester 2/Assignments/AjaxLab_CalebFontenot/src/main/webapp/WEB-INF/glassfish-web.xml new file mode 100644 index 0000000..673cc06 --- /dev/null +++ b/Semester 2/Assignments/AjaxLab_CalebFontenot/src/main/webapp/WEB-INF/glassfish-web.xml @@ -0,0 +1,25 @@ + + + + + + + + Keep a copy of the generated servlet class' java code. + + + diff --git a/Semester 2/Assignments/AjaxLab_CalebFontenot/src/main/webapp/WEB-INF/web.xml b/Semester 2/Assignments/AjaxLab_CalebFontenot/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000..fcfcd54 --- /dev/null +++ b/Semester 2/Assignments/AjaxLab_CalebFontenot/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,24 @@ + + + + jakarta.faces.PROJECT_STAGE + Development + + + Faces Servlet + jakarta.faces.webapp.FacesServlet + 1 + + + Faces Servlet + /faces/* + + + + 30 + + + + faces/index.xhtml + + diff --git a/Semester 2/Assignments/AjaxLab_CalebFontenot/src/main/webapp/index.xhtml b/Semester 2/Assignments/AjaxLab_CalebFontenot/src/main/webapp/index.xhtml new file mode 100644 index 0000000..268d74a --- /dev/null +++ b/Semester 2/Assignments/AjaxLab_CalebFontenot/src/main/webapp/index.xhtml @@ -0,0 +1,27 @@ + + + + + #{msgs.loginWindowTitle} + + + +

#{msgs.loginHeading}

+ + #{msgs.namePrompt} + + + + #{msgs.passwordPrompt} + + + +
+

+ +

+
+
+ diff --git a/Semester 2/Assignments/AjaxLab_CalebFontenot/src/main/webapp/welcome.xhtml b/Semester 2/Assignments/AjaxLab_CalebFontenot/src/main/webapp/welcome.xhtml new file mode 100644 index 0000000..590d6ad --- /dev/null +++ b/Semester 2/Assignments/AjaxLab_CalebFontenot/src/main/webapp/welcome.xhtml @@ -0,0 +1,12 @@ + + + + + #{msgs.loginWindowTitle} + + +

#{msgs.greeting} #{user.name}

+
+ diff --git a/Semester 2/Assignments/EventsLabValueChangeListener_CalebFontenot/faces-config.NavData b/Semester 2/Assignments/EventsLabValueChangeListener_CalebFontenot/faces-config.NavData index e69de29..298bfc5 100644 --- a/Semester 2/Assignments/EventsLabValueChangeListener_CalebFontenot/faces-config.NavData +++ b/Semester 2/Assignments/EventsLabValueChangeListener_CalebFontenot/faces-config.NavData @@ -0,0 +1,6 @@ + + + + + + diff --git a/Semester 2/Assignments/Review_JSF/nb-configuration.xml b/Semester 2/Assignments/Review_JSF/nb-configuration.xml new file mode 100644 index 0000000..f89ff8d --- /dev/null +++ b/Semester 2/Assignments/Review_JSF/nb-configuration.xml @@ -0,0 +1,21 @@ + + + + + + 10-web + gfv700ee10 + Facelets + JDK_11__System_ + + diff --git a/Semester 2/Assignments/Review_JSF/pom.xml b/Semester 2/Assignments/Review_JSF/pom.xml new file mode 100644 index 0000000..76c78e6 --- /dev/null +++ b/Semester 2/Assignments/Review_JSF/pom.xml @@ -0,0 +1,83 @@ + + 4.0.0 + asdv + Review_JSF + 1 + war + Review_JSF-1 + + + 11 + 11 + ${project.build.directory}/endorsed + UTF-8 + false + 10.0.0 + + + + + jakarta.platform + jakarta.jakartaee-api + ${jakartaee} + provided + + + org.primefaces + primefaces + 13.0.2 + jakarta + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + 11 + 11 + + ${endorsed.dir} + + + + + org.apache.maven.plugins + maven-war-plugin + 2.3 + + false + + + + org.apache.maven.plugins + maven-dependency-plugin + 2.6 + + + validate + + copy + + + ${endorsed.dir} + true + + + jakarta.platform + jakarta.jakartaee-api + ${jakartaee} + jar + + + + + + + + + \ No newline at end of file diff --git a/Semester 2/Assignments/Review_JSF/src/main/java/_01_ajax/AjaxBean.java b/Semester 2/Assignments/Review_JSF/src/main/java/_01_ajax/AjaxBean.java new file mode 100644 index 0000000..96e4b3e --- /dev/null +++ b/Semester 2/Assignments/Review_JSF/src/main/java/_01_ajax/AjaxBean.java @@ -0,0 +1,53 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/JSF/JSFManagedBean.java to edit this template + */ +package _01_ajax; + +import jakarta.inject.Named; +import jakarta.enterprise.context.RequestScoped; + +/** + * + * @author asdv5 + */ +@Named(value = "ajaxBean") +@RequestScoped +public class AjaxBean +{ + private String inputText1; + private String inputText2; + private String outputText1; + + + public String getOutputText1() { + return inputText1 + ", " + inputText2; + } + + + + public String getInputText1() { + return inputText1; + } + + public void setInputText1(String inputText1) { + this.inputText1 = inputText1; + } + + public String getInputText2() { + return inputText2; + } + + public void setInputText2(String inputText2) { + this.inputText2 = inputText2; + } + + + /** + * Creates a new instance of AjaxBean + */ + public AjaxBean() + { + + } +} diff --git a/Semester 2/Assignments/Review_JSF/src/main/java/_02_injection/ForInjection.java b/Semester 2/Assignments/Review_JSF/src/main/java/_02_injection/ForInjection.java new file mode 100644 index 0000000..3b64878 --- /dev/null +++ b/Semester 2/Assignments/Review_JSF/src/main/java/_02_injection/ForInjection.java @@ -0,0 +1,29 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template + */ +package _02_injection; + +import java.util.ArrayList; +import java.util.Arrays; + +/** + * + * @author caleb + */ +public class ForInjection { + + private ArrayList list = + new ArrayList(Arrays.asList(new String[] {"John", "Mary"})); + + public ArrayList getList() + { + return list; + } + + public void setList(ArrayList list) + { + this.list = list; + } + +} diff --git a/Semester 2/Assignments/Review_JSF/src/main/java/_02_injection/InjectionBean.java b/Semester 2/Assignments/Review_JSF/src/main/java/_02_injection/InjectionBean.java new file mode 100644 index 0000000..e92b8b3 --- /dev/null +++ b/Semester 2/Assignments/Review_JSF/src/main/java/_02_injection/InjectionBean.java @@ -0,0 +1,37 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/JSF/JSFManagedBean.java to edit this template + */ + +package _02_injection; + +import jakarta.enterprise.context.RequestScoped; +import jakarta.inject.Inject; +import jakarta.inject.Named; + +/** + * + * @author caleb + */ +@Named(value="injectionBean") +@RequestScoped +public class InjectionBean { + + @Inject + ForInjection fi; + + /** Creates a new instance of InjectionBean */ + public InjectionBean() { + } + + public ForInjection getFi() + { + return fi; + } + + public void setFi(ForInjection fi) + { + this.fi = fi; + } + +} diff --git a/Semester 2/Assignments/Review_JSF/src/main/java/_03_DAO_implementation_and_usage/Dao.java b/Semester 2/Assignments/Review_JSF/src/main/java/_03_DAO_implementation_and_usage/Dao.java new file mode 100644 index 0000000..0fb5c54 --- /dev/null +++ b/Semester 2/Assignments/Review_JSF/src/main/java/_03_DAO_implementation_and_usage/Dao.java @@ -0,0 +1,20 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template + */ +package _03_DAO_implementation_and_usage; + +import java.sql.SQLException; +import java.util.List; + +/** + * + * @author caleb + */ +public interface Dao { + List listAll() throws SQLException; + int insert(T t); + int delete(T t); + int update(T t); + int count(); +} diff --git a/Semester 2/Assignments/Review_JSF/src/main/java/_03_DAO_implementation_and_usage/DaoBean.java b/Semester 2/Assignments/Review_JSF/src/main/java/_03_DAO_implementation_and_usage/DaoBean.java new file mode 100644 index 0000000..94fefaf --- /dev/null +++ b/Semester 2/Assignments/Review_JSF/src/main/java/_03_DAO_implementation_and_usage/DaoBean.java @@ -0,0 +1,31 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/JSF/JSFManagedBean.java to edit this template + */ + +package _03_DAO_implementation_and_usage; + +import jakarta.enterprise.context.RequestScoped; +import jakarta.inject.Named; + + +/** + * + * @author caleb + */ +@Named(value="daoBean") +@RequestScoped +public class DaoBean { + + private Dao dao; + public DaoBean() + { + dao = new DaoObjectManipulator(); + } + + public Dao getDao() + { + return dao; + } + +} diff --git a/Semester 2/Assignments/Review_JSF/src/main/java/_03_DAO_implementation_and_usage/DaoObject.java b/Semester 2/Assignments/Review_JSF/src/main/java/_03_DAO_implementation_and_usage/DaoObject.java new file mode 100644 index 0000000..f099dc6 --- /dev/null +++ b/Semester 2/Assignments/Review_JSF/src/main/java/_03_DAO_implementation_and_usage/DaoObject.java @@ -0,0 +1,43 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template + */ +package _03_DAO_implementation_and_usage; + +import java.io.Serializable; + +/** + * + * @author caleb + */ +public class DaoObject implements Serializable { + + public DaoObject(int key1, String data1) + { + } + + private int key1; + private String data1; + + public String getData() + { + return data1; + } + + public void setData(String data) + { + this.data1 = data; + } + + + public int getKey() + { + return key1; + } + + public void setKey(int key) + { + this.key1 = key; + } + +} diff --git a/Semester 2/Assignments/Review_JSF/src/main/java/_03_DAO_implementation_and_usage/DaoObjectManipulator.java b/Semester 2/Assignments/Review_JSF/src/main/java/_03_DAO_implementation_and_usage/DaoObjectManipulator.java new file mode 100644 index 0000000..c53c7de --- /dev/null +++ b/Semester 2/Assignments/Review_JSF/src/main/java/_03_DAO_implementation_and_usage/DaoObjectManipulator.java @@ -0,0 +1,103 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template + */ +package _03_DAO_implementation_and_usage; + +import java.io.Serializable; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; + +public class DaoObjectManipulator implements Dao, Serializable +{ + @Override + public List listAll() + throws SQLException + { + // test exception code + //if ( true) + // throw new SQLException(); + List tableDao = new ArrayList(); + String databaseName = "dao_test"; + String userName = "java"; + String password = "8VCS49HT2xjsEZvC"; + String URL2 = "com.mysql.jdbc.Driver"; + Connection con = new UtilitiesDatabase().connection( + databaseName, userName, password, URL2); + PreparedStatement ps = null; + try + { + if (con == null) + { + throw new RuntimeException("cannot connect to database"); + } + String table = ""; + ResultSet rs = null; + String sqlStr = "SELECT * FROM dao"; + //prepare statement + ps = con.prepareStatement(sqlStr); + //execute + rs = ps.executeQuery(); + int row = 0; + while (rs.next()) + { + int key = rs.getInt(1); + String data = rs.getString(2); + DaoObject dao = new DaoObject(key, data); + tableDao.add(dao); + row++; + } + } + catch (SQLException ex) + { + ex.printStackTrace(); + } + finally + { + try + { + new UtilitiesDatabase().closeDatabaseConnection(con); + // close the resources + if (ps != null) + { + ps.close(); + } + } + catch (SQLException sqle) + { + System.out.println(sqle); + sqle.printStackTrace(); + throw sqle; + } + } + return tableDao; + } + + @Override + public int insert(DaoObject t) + { + throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody + } + + @Override + public int delete(DaoObject t) + { + throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody + } + + @Override + public int update(DaoObject t) + { + throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody + } + + @Override + public int count() + { + throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody + } +} diff --git a/Semester 2/Assignments/Review_JSF/src/main/java/_03_DAO_implementation_and_usage/UtilitiesDatabase.java b/Semester 2/Assignments/Review_JSF/src/main/java/_03_DAO_implementation_and_usage/UtilitiesDatabase.java new file mode 100644 index 0000000..7bbb734 --- /dev/null +++ b/Semester 2/Assignments/Review_JSF/src/main/java/_03_DAO_implementation_and_usage/UtilitiesDatabase.java @@ -0,0 +1,96 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template + */ +package _03_DAO_implementation_and_usage; + +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.SQLException; +import java.text.ParseException; +import java.text.SimpleDateFormat; + +/** + * + * @author asdv5 + */ +public class UtilitiesDatabase +{ + public Connection connection( + String databaseName, + String userName, + String password, + String URL2 + + ) //throws InstantiationException, IllegalAccessException + { +/* + String databaseName = "suppliers_parts_23"; + String userName = "root"; + String password = "root"; + String URL2 = "com.mysql.jdbc.Driver"; + Connection con = null; +*/ + Connection con; + try + {// Load Sun's jdbc driver + Class.forName(URL2).newInstance(); + System.out.println("JDBC Driver loaded!"); + } + catch (Exception e) // driver not found + { + System.err.println("Unable to load database driver"); + System.err.println("Details : " + e); + return null; + } + String ip = "localhost"; //internet connection + String url = "jdbc:mysql://" + ip + ":3306/" + databaseName + "?allowPublicKeyRetrieval=true&useSSL=false"; + try + { + con = DriverManager.getConnection(url, userName, password); + con.setReadOnly(false); + } + catch (Exception e) + { + System.err.println(e.toString()); + return null; + } + System.out.println("connection successfull"); + return con; + } + + + public void closeDatabaseConnection( Connection con) + { + try + { + if (con != null) + { + con.close(); + } + } + catch (SQLException e) + { + System.out.println(e); + e.printStackTrace(); + } + } + + + +public static java.sql.Date stringDateToSqlDate(String sDate) + { + java.util.Date date = null; + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); + try + { + date = sdf.parse(sDate); + } + catch (ParseException e) + { + e.printStackTrace(); + } + return new java.sql.Date( date.getTime() ); + + } +} diff --git a/Semester 2/Assignments/Review_JSF/src/main/java/_03_DAO_implementation_and_usage/UtilitiesDatabase.java.oldAndStupid b/Semester 2/Assignments/Review_JSF/src/main/java/_03_DAO_implementation_and_usage/UtilitiesDatabase.java.oldAndStupid new file mode 100644 index 0000000..bf6e384 --- /dev/null +++ b/Semester 2/Assignments/Review_JSF/src/main/java/_03_DAO_implementation_and_usage/UtilitiesDatabase.java.oldAndStupid @@ -0,0 +1,103 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template + */ +package _03_DAO_implementation_and_usage; + +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.SQLException; +import java.text.ParseException; +import java.text.SimpleDateFormat; + +/** + * + * @author asdv5 + */ +public class UtilitiesDatabase +{ + public Connection connection( + String databaseName, + String userName, + String password, + String URL2 + + ) //throws InstantiationException, IllegalAccessException + { +/* + String databaseName = "suppliers_parts_23"; + String userName = "root"; + String password = "root"; + String URL2 = "com.mysql.jdbc.Driver"; + Connection con = null; +*/ + Connection con; + try + {// Load Sun's jdbc driver + Class.forName(URL2).newInstance(); + System.out.println("JDBC Driver loaded!"); + } + catch (Exception e) // driver not found + { + System.err.println("Unable to load database driver"); + System.err.println("Details : " + e); + return null; + } + String ip = "localhost"; //internet connection + String url = "jdbc:mysql://" + ip + ":3306/" + databaseName + "?allowPublicKeyRetrieval=true&useSSL=false"; + try + { + con = DriverManager.getConnection(url, userName, password); + con.setReadOnly(false); + } + catch (Exception e) + { + System.err.println(e.toString()); + return null; + } + System.out.println("connection successfull"); + return con; + } + + + public void closeDatabaseConnection( Connection con) + { + try + { + if (con != null) + { + con.close(); + } + } + catch (SQLException e) + { + System.out.println(e); + e.printStackTrace(); + } + } + + + +public static java.sql.Date stringDateToSqlDate(String sDate) + { + java.util.Date date = null; + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); + try + { + date = sdf.parse(sDate); + } + catch (ParseException e) + { + e.printStackTrace(); + } + return new java.sql.Date( date.getTime() ); + + } + + +public static java.util.Date stringDateToJavaUtilitiesDate(String sDate) + { + java.sql.Date sqldate = stringDateToSqlDate(sDate); + return new java.util.Date(sqldate.getTime() ); + } +} diff --git a/Semester 2/Assignments/Review_JSF/src/main/java/asdv/review_jsf/resources/JakartaEE10Resource.java b/Semester 2/Assignments/Review_JSF/src/main/java/asdv/review_jsf/resources/JakartaEE10Resource.java new file mode 100644 index 0000000..5e0499e --- /dev/null +++ b/Semester 2/Assignments/Review_JSF/src/main/java/asdv/review_jsf/resources/JakartaEE10Resource.java @@ -0,0 +1,20 @@ +package asdv.review_jsf.resources; + +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.core.Response; + +/** + * + * @author + */ +@Path("jakartaee10") +public class JakartaEE10Resource { + + @GET + public Response ping(){ + return Response + .ok("ping Jakarta EE") + .build(); + } +} diff --git a/Semester 2/Assignments/Review_JSF/src/main/resources/META-INF/persistence.xml b/Semester 2/Assignments/Review_JSF/src/main/resources/META-INF/persistence.xml new file mode 100644 index 0000000..7582bf1 --- /dev/null +++ b/Semester 2/Assignments/Review_JSF/src/main/resources/META-INF/persistence.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Semester 2/Assignments/Review_JSF/src/main/webapp/WEB-INF/beans.xml b/Semester 2/Assignments/Review_JSF/src/main/webapp/WEB-INF/beans.xml new file mode 100644 index 0000000..9dfae34 --- /dev/null +++ b/Semester 2/Assignments/Review_JSF/src/main/webapp/WEB-INF/beans.xml @@ -0,0 +1,6 @@ + + + \ No newline at end of file diff --git a/Semester 2/Assignments/Review_JSF/src/main/webapp/WEB-INF/glassfish-web.xml b/Semester 2/Assignments/Review_JSF/src/main/webapp/WEB-INF/glassfish-web.xml new file mode 100644 index 0000000..673cc06 --- /dev/null +++ b/Semester 2/Assignments/Review_JSF/src/main/webapp/WEB-INF/glassfish-web.xml @@ -0,0 +1,25 @@ + + + + + + + + Keep a copy of the generated servlet class' java code. + + + diff --git a/Semester 2/Assignments/Review_JSF/src/main/webapp/WEB-INF/web.xml b/Semester 2/Assignments/Review_JSF/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000..fcfcd54 --- /dev/null +++ b/Semester 2/Assignments/Review_JSF/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,24 @@ + + + + jakarta.faces.PROJECT_STAGE + Development + + + Faces Servlet + jakarta.faces.webapp.FacesServlet + 1 + + + Faces Servlet + /faces/* + + + + 30 + + + + faces/index.xhtml + + diff --git a/Semester 2/Assignments/Review_JSF/src/main/webapp/index.xhtml b/Semester 2/Assignments/Review_JSF/src/main/webapp/index.xhtml new file mode 100644 index 0000000..5306309 --- /dev/null +++ b/Semester 2/Assignments/Review_JSF/src/main/webapp/index.xhtml @@ -0,0 +1,109 @@ + + + + + Facelet Title + + + +

1 AJAX tag embedded

+ +
+ + + +
+ +
+ + + +
+ +

2 Class injection

+ + + #{x.toString()} + + + +
+ +

3 DAO

+ #{daoBean.dao.listAll()} +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/Semester 2/Exams/FinalExamProblem1_CalebFontenot/nb-configuration.xml b/Semester 2/Exams/FinalExamProblem1_CalebFontenot/nb-configuration.xml new file mode 100644 index 0000000..39d0b87 --- /dev/null +++ b/Semester 2/Exams/FinalExamProblem1_CalebFontenot/nb-configuration.xml @@ -0,0 +1,21 @@ + + + + + + 10-web + gfv700ee10 + JDK_11__System_ + Facelets + + diff --git a/Semester 2/Exams/FinalExamProblem1_CalebFontenot/pom.xml b/Semester 2/Exams/FinalExamProblem1_CalebFontenot/pom.xml new file mode 100644 index 0000000..c6b91df --- /dev/null +++ b/Semester 2/Exams/FinalExamProblem1_CalebFontenot/pom.xml @@ -0,0 +1,42 @@ + + 4.0.0 + edu.slcc.asdv.caleb + FinalExamProblem1_CalebFontenot + 1.0-SNAPSHOT + war + FinalExamProblem1_CalebFontenot-1.0-SNAPSHOT + + + UTF-8 + 10.0.0 + + + + + jakarta.platform + jakarta.jakartaee-api + 10.0.0 + jar + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + 11 + 11 + + + + org.apache.maven.plugins + maven-war-plugin + 3.3.2 + + + + \ No newline at end of file diff --git a/Semester 2/Exams/FinalExamProblem1_CalebFontenot/src/main/java/classes/PageNavigator.java b/Semester 2/Exams/FinalExamProblem1_CalebFontenot/src/main/java/classes/PageNavigator.java new file mode 100644 index 0000000..b274030 --- /dev/null +++ b/Semester 2/Exams/FinalExamProblem1_CalebFontenot/src/main/java/classes/PageNavigator.java @@ -0,0 +1,45 @@ +package classes; + +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/JSF/JSFManagedBean.java to edit this template + */ + +import jakarta.enterprise.context.SessionScoped; +import jakarta.inject.Named; +import java.io.Serializable; + +/** + * + * @author caleb + */ +@Named(value = "pageNavigator") +@SessionScoped +public class PageNavigator implements Serializable { + + /** + * Creates a new instance of PageNavigator + */ + public PageNavigator() + { + } + private String message; + + public String getMessage() + { + return message; + } + + public void setMessage(String message) + { + this.message = message; + } + + public String determine() + { + int rand = (int) (Math.random() * 4) + 1; + String returnValue = ""; + returnValue = "result" + rand + ".xhtml"; + return returnValue; + } +} diff --git a/Semester 2/Exams/FinalExamProblem1_CalebFontenot/src/main/java/classes/TextLengthValidator.java b/Semester 2/Exams/FinalExamProblem1_CalebFontenot/src/main/java/classes/TextLengthValidator.java new file mode 100644 index 0000000..e4bb520 --- /dev/null +++ b/Semester 2/Exams/FinalExamProblem1_CalebFontenot/src/main/java/classes/TextLengthValidator.java @@ -0,0 +1,39 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template + */ +package classes; + +import jakarta.faces.application.FacesMessage; +import jakarta.faces.component.UIComponent; +import jakarta.faces.context.FacesContext; +import jakarta.faces.validator.FacesValidator; +import jakarta.faces.validator.Validator; +import jakarta.faces.validator.ValidatorException; + +/** + * + * @author caleb + */ +@FacesValidator("textLengthValidator") +public class TextLengthValidator implements Validator { + + /** + * + * @param context + * @param component + * @param value + * @throws ValidatorException + */ + @Override + public void validate(FacesContext context, UIComponent component, Object value) throws ValidatorException + { + String inputText = (String) value; + + if (inputText.length() < 5) { + FacesMessage message = new FacesMessage("Input must be at least 5 characters long!"); + throw new ValidatorException(message); + } + } + +} diff --git a/Semester 2/Exams/FinalExamProblem1_CalebFontenot/src/main/java/edu/slcc/asdv/caleb/finalexamproblem1_calebfontenot/JakartaRestConfiguration.java b/Semester 2/Exams/FinalExamProblem1_CalebFontenot/src/main/java/edu/slcc/asdv/caleb/finalexamproblem1_calebfontenot/JakartaRestConfiguration.java new file mode 100644 index 0000000..22037ea --- /dev/null +++ b/Semester 2/Exams/FinalExamProblem1_CalebFontenot/src/main/java/edu/slcc/asdv/caleb/finalexamproblem1_calebfontenot/JakartaRestConfiguration.java @@ -0,0 +1,13 @@ +package edu.slcc.asdv.caleb.finalexamproblem1_calebfontenot; + +import jakarta.ws.rs.ApplicationPath; +import jakarta.ws.rs.core.Application; + +/** + * Configures Jakarta RESTful Web Services for the application. + * @author Juneau + */ +@ApplicationPath("resources") +public class JakartaRestConfiguration extends Application { + +} diff --git a/Semester 2/Exams/FinalExamProblem1_CalebFontenot/src/main/java/edu/slcc/asdv/caleb/finalexamproblem1_calebfontenot/resources/JakartaEE10Resource.java b/Semester 2/Exams/FinalExamProblem1_CalebFontenot/src/main/java/edu/slcc/asdv/caleb/finalexamproblem1_calebfontenot/resources/JakartaEE10Resource.java new file mode 100644 index 0000000..2ce0e27 --- /dev/null +++ b/Semester 2/Exams/FinalExamProblem1_CalebFontenot/src/main/java/edu/slcc/asdv/caleb/finalexamproblem1_calebfontenot/resources/JakartaEE10Resource.java @@ -0,0 +1,20 @@ +package edu.slcc.asdv.caleb.finalexamproblem1_calebfontenot.resources; + +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.core.Response; + +/** + * + * @author + */ +@Path("jakartaee10") +public class JakartaEE10Resource { + + @GET + public Response ping(){ + return Response + .ok("ping Jakarta EE") + .build(); + } +} diff --git a/Semester 2/Exams/FinalExamProblem1_CalebFontenot/src/main/resources/META-INF/persistence.xml b/Semester 2/Exams/FinalExamProblem1_CalebFontenot/src/main/resources/META-INF/persistence.xml new file mode 100644 index 0000000..7582bf1 --- /dev/null +++ b/Semester 2/Exams/FinalExamProblem1_CalebFontenot/src/main/resources/META-INF/persistence.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Semester 2/Exams/FinalExamProblem1_CalebFontenot/src/main/webapp/WEB-INF/beans.xml b/Semester 2/Exams/FinalExamProblem1_CalebFontenot/src/main/webapp/WEB-INF/beans.xml new file mode 100644 index 0000000..9dfae34 --- /dev/null +++ b/Semester 2/Exams/FinalExamProblem1_CalebFontenot/src/main/webapp/WEB-INF/beans.xml @@ -0,0 +1,6 @@ + + + \ No newline at end of file diff --git a/Semester 2/Exams/FinalExamProblem1_CalebFontenot/src/main/webapp/WEB-INF/glassfish-web.xml b/Semester 2/Exams/FinalExamProblem1_CalebFontenot/src/main/webapp/WEB-INF/glassfish-web.xml new file mode 100644 index 0000000..673cc06 --- /dev/null +++ b/Semester 2/Exams/FinalExamProblem1_CalebFontenot/src/main/webapp/WEB-INF/glassfish-web.xml @@ -0,0 +1,25 @@ + + + + + + + + Keep a copy of the generated servlet class' java code. + + + diff --git a/Semester 2/Exams/FinalExamProblem1_CalebFontenot/src/main/webapp/WEB-INF/web.xml b/Semester 2/Exams/FinalExamProblem1_CalebFontenot/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000..fcf1912 --- /dev/null +++ b/Semester 2/Exams/FinalExamProblem1_CalebFontenot/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,24 @@ + + + + jakarta.faces.PROJECT_STAGE + Development + + + Faces Servlet + jakarta.faces.webapp.FacesServlet + 1 + + + Faces Servlet + /faces/* + + + + 30 + + + + index.xhtml + + diff --git a/Semester 2/Exams/FinalExamProblem1_CalebFontenot/src/main/webapp/index.xhtml b/Semester 2/Exams/FinalExamProblem1_CalebFontenot/src/main/webapp/index.xhtml new file mode 100644 index 0000000..9707ecc --- /dev/null +++ b/Semester 2/Exams/FinalExamProblem1_CalebFontenot/src/main/webapp/index.xhtml @@ -0,0 +1,21 @@ + + + + + Facelet Title + + + +

JSF Navigation via Command Button

+

+

+ Your message: + + +

+ +
+
+ diff --git a/Semester 2/Exams/FinalExamProblem1_CalebFontenot/src/main/webapp/result1.xhtml b/Semester 2/Exams/FinalExamProblem1_CalebFontenot/src/main/webapp/result1.xhtml new file mode 100644 index 0000000..4410d0f --- /dev/null +++ b/Semester 2/Exams/FinalExamProblem1_CalebFontenot/src/main/webapp/result1.xhtml @@ -0,0 +1,14 @@ + + + + + Facelet Title + + +

Result Page 1

+

+ +

Your message: #{pageNavigator.message}

+
+ diff --git a/Semester 2/Exams/FinalExamProblem1_CalebFontenot/src/main/webapp/result2.xhtml b/Semester 2/Exams/FinalExamProblem1_CalebFontenot/src/main/webapp/result2.xhtml new file mode 100644 index 0000000..c24e91f --- /dev/null +++ b/Semester 2/Exams/FinalExamProblem1_CalebFontenot/src/main/webapp/result2.xhtml @@ -0,0 +1,14 @@ + + + + + Facelet Title + + +

Result Page 2

+

+ +

Your message: #{pageNavigator.message}

+
+ diff --git a/Semester 2/Exams/FinalExamProblem1_CalebFontenot/src/main/webapp/result3.xhtml b/Semester 2/Exams/FinalExamProblem1_CalebFontenot/src/main/webapp/result3.xhtml new file mode 100644 index 0000000..409626c --- /dev/null +++ b/Semester 2/Exams/FinalExamProblem1_CalebFontenot/src/main/webapp/result3.xhtml @@ -0,0 +1,14 @@ + + + + + Facelet Title + + +

Result Page 3

+

+ +

Your message: #{pageNavigator.message}

+
+ diff --git a/Semester 2/Exams/FinalExamProblem1_CalebFontenot/src/main/webapp/result4.xhtml b/Semester 2/Exams/FinalExamProblem1_CalebFontenot/src/main/webapp/result4.xhtml new file mode 100644 index 0000000..2a63e57 --- /dev/null +++ b/Semester 2/Exams/FinalExamProblem1_CalebFontenot/src/main/webapp/result4.xhtml @@ -0,0 +1,14 @@ + + + + + Facelet Title + + +

Result Page 4

+

+ +

Your message: #{pageNavigator.message}

+
+ diff --git a/Semester 2/Exams/FinalExamProblem2_CalebFontenot/nb-configuration.xml b/Semester 2/Exams/FinalExamProblem2_CalebFontenot/nb-configuration.xml new file mode 100644 index 0000000..19bf435 --- /dev/null +++ b/Semester 2/Exams/FinalExamProblem2_CalebFontenot/nb-configuration.xml @@ -0,0 +1,20 @@ + + + + + + 10-web + gfv700ee10 + JDK_11__System_ + + diff --git a/Semester 2/Exams/FinalExamProblem2_CalebFontenot/pom.xml b/Semester 2/Exams/FinalExamProblem2_CalebFontenot/pom.xml new file mode 100644 index 0000000..1530f7c --- /dev/null +++ b/Semester 2/Exams/FinalExamProblem2_CalebFontenot/pom.xml @@ -0,0 +1,53 @@ + + 4.0.0 + edu.slcc.asdv.caleb + FinalExamProblem2_CalebFontenot + 1.0-SNAPSHOT + war + FinalExamProblem2_CalebFontenot-1.0-SNAPSHOT + + + UTF-8 + 10.0.0 + + + + + jakarta.platform + jakarta.jakartaee-api + ${jakartaee} + provided + + + org.primefaces + primefaces + 13.0.2 + jakarta + + + com.mysql + mysql-connector-j + 8.1.0 + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + 11 + 11 + + + + org.apache.maven.plugins + maven-war-plugin + 3.3.2 + + + + \ No newline at end of file diff --git a/Semester 2/Exams/FinalExamProblem2_CalebFontenot/src/main/java/beans/PassengerBean.java b/Semester 2/Exams/FinalExamProblem2_CalebFontenot/src/main/java/beans/PassengerBean.java new file mode 100644 index 0000000..fe77cb6 --- /dev/null +++ b/Semester 2/Exams/FinalExamProblem2_CalebFontenot/src/main/java/beans/PassengerBean.java @@ -0,0 +1,75 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/JSF/JSFManagedBean.java to edit this template + */ + +package beans; + +import jakarta.inject.Named; +import jakarta.enterprise.context.SessionScoped; +import jakarta.faces.application.FacesMessage; +import java.io.Serializable; +import java.sql.SQLException; +import java.util.List; +import java.util.logging.Level; +import java.util.logging.Logger; +import org.primefaces.PrimeFaces; +import pojo.DatabaseManipulator; +import pojo.Passenger; + +/** + * + * @author caleb + */ +@Named(value="passengerBean") +@SessionScoped +public class PassengerBean implements Serializable { + DatabaseManipulator dm = new DatabaseManipulator(); + + private Passenger selectedPassenger; + + /** + * Get the value of selectedPassenger + * + * @return the value of selectedPassenger + */ + public Passenger getSelectedPassenger() + { + return selectedPassenger; + } + + /** + * Set the value of selectedPassenger + * + * @param selectedPassenger new value of selectedPassenger + */ + public void setSelectedPassenger(Passenger selectedPassenger) + { + this.selectedPassenger = selectedPassenger; + } + + public List getPassengers() { + List data = null; + try { + data = dm.listAll(); + } catch (SQLException ex) { + Logger.getLogger(PassengerBean.class.getName()).log(Level.SEVERE, null, ex); + } + System.out.println("Fetched data from database!"); + System.out.println(data); + + return data; + } + + /** Creates a new instance of PassengerBean */ + public PassengerBean() { + } + + public void showMessage() { + String messageContent = "You selected the " + selectedPassenger.getBirthday().toString() + "birthday."; + FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_INFO, "Info", messageContent); + PrimeFaces.current().dialog().showMessageDynamic(message); + } + + +} diff --git a/Semester 2/Exams/FinalExamProblem2_CalebFontenot/src/main/java/edu/slcc/asdv/caleb/finalexamproblem2_calebfontenot/JakartaRestConfiguration.java b/Semester 2/Exams/FinalExamProblem2_CalebFontenot/src/main/java/edu/slcc/asdv/caleb/finalexamproblem2_calebfontenot/JakartaRestConfiguration.java new file mode 100644 index 0000000..6cb8d99 --- /dev/null +++ b/Semester 2/Exams/FinalExamProblem2_CalebFontenot/src/main/java/edu/slcc/asdv/caleb/finalexamproblem2_calebfontenot/JakartaRestConfiguration.java @@ -0,0 +1,13 @@ +package edu.slcc.asdv.caleb.finalexamproblem2_calebfontenot; + +import jakarta.ws.rs.ApplicationPath; +import jakarta.ws.rs.core.Application; + +/** + * Configures Jakarta RESTful Web Services for the application. + * @author Juneau + */ +@ApplicationPath("resources") +public class JakartaRestConfiguration extends Application { + +} diff --git a/Semester 2/Exams/FinalExamProblem2_CalebFontenot/src/main/java/edu/slcc/asdv/caleb/finalexamproblem2_calebfontenot/resources/JakartaEE10Resource.java b/Semester 2/Exams/FinalExamProblem2_CalebFontenot/src/main/java/edu/slcc/asdv/caleb/finalexamproblem2_calebfontenot/resources/JakartaEE10Resource.java new file mode 100644 index 0000000..64961f9 --- /dev/null +++ b/Semester 2/Exams/FinalExamProblem2_CalebFontenot/src/main/java/edu/slcc/asdv/caleb/finalexamproblem2_calebfontenot/resources/JakartaEE10Resource.java @@ -0,0 +1,20 @@ +package edu.slcc.asdv.caleb.finalexamproblem2_calebfontenot.resources; + +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.core.Response; + +/** + * + * @author + */ +@Path("jakartaee10") +public class JakartaEE10Resource { + + @GET + public Response ping(){ + return Response + .ok("ping Jakarta EE") + .build(); + } +} diff --git a/Semester 2/Exams/FinalExamProblem2_CalebFontenot/src/main/java/pojo/DatabaseManipulator.java b/Semester 2/Exams/FinalExamProblem2_CalebFontenot/src/main/java/pojo/DatabaseManipulator.java new file mode 100644 index 0000000..4488598 --- /dev/null +++ b/Semester 2/Exams/FinalExamProblem2_CalebFontenot/src/main/java/pojo/DatabaseManipulator.java @@ -0,0 +1,85 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template + */ +package pojo; + +import java.sql.Connection; +import java.sql.Date; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; +import pojo.Passenger; + +/** + * + * @author caleb + */ +public class DatabaseManipulator { + public List listAll() + throws SQLException + { + // test exception code + //if ( true) + // throw new SQLException(); + + List passengerTable = new ArrayList(); + String databaseName = "travel"; + String userName = "java"; + String password = "8VCS49HT2xjsEZvC"; + String URL2 = "com.mysql.jdbc.Driver"; + Connection con = new UtilitiesDatabase().connection( + databaseName, userName, password, URL2); + PreparedStatement ps = null; + try + { + if (con == null) + { + throw new RuntimeException("cannot connect to database"); + } + String table = ""; + ResultSet rs = null; + String sqlStr = "SELECT * FROM passenger"; + //prepare statement + ps = con.prepareStatement(sqlStr); + //execute + rs = ps.executeQuery(); + int row = 0; + while (rs.next()) + { + int pid = rs.getInt(1); + String pname = rs.getString(2); + Date bdate = bdate = rs.getDate(3); + Passenger passenger = new Passenger(pid, pname, bdate); + passengerTable.add(passenger); + row++; + } + } + catch (Exception ex) + { + ex.printStackTrace(); + throw ex; + } + finally + { + try + { + new UtilitiesDatabase().closeDatabaseConnection(con); + // close the resources + if (ps != null) + { + ps.close(); + } + } + catch (SQLException sqle) + { + System.out.println(sqle); + sqle.printStackTrace(); + throw sqle; + } + } + return passengerTable; + } +} diff --git a/Semester 2/Exams/FinalExamProblem2_CalebFontenot/src/main/java/pojo/Passenger.java b/Semester 2/Exams/FinalExamProblem2_CalebFontenot/src/main/java/pojo/Passenger.java new file mode 100644 index 0000000..5eed2de --- /dev/null +++ b/Semester 2/Exams/FinalExamProblem2_CalebFontenot/src/main/java/pojo/Passenger.java @@ -0,0 +1,74 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template + */ +package pojo; + +import java.sql.Date; + +/** + * + * @author caleb + */ +public class Passenger { + + private int pid; + private String pname; + private Date birthday; + + public Passenger(int pid, String pname, Date birthday) + { + this.pid = pid; + this.pname = pname; + this.birthday = birthday; + } + + /** + * Get the value of birthday + * + * @return the value of birthday + */ + public Date getBirthday() + { + return birthday; + } + + /** + * Set the value of birthday + * + * @param birthday new value of birthday + */ + public void setBirthday(Date birthday) + { + this.birthday = birthday; + } + + + public String getPname() + { + return pname; + } + + public void setPname(String pname) + { + this.pname = pname; + } + + + public int getPid() + { + return pid; + } + + public void setPid(int pid) + { + this.pid = pid; + } + + @Override + public String toString() + { + return birthday.toString(); + } + +} diff --git a/Semester 2/Exams/FinalExamProblem2_CalebFontenot/src/main/java/pojo/UtilitiesDatabase.java b/Semester 2/Exams/FinalExamProblem2_CalebFontenot/src/main/java/pojo/UtilitiesDatabase.java new file mode 100644 index 0000000..da1dd37 --- /dev/null +++ b/Semester 2/Exams/FinalExamProblem2_CalebFontenot/src/main/java/pojo/UtilitiesDatabase.java @@ -0,0 +1,109 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template + */ +package pojo; + +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.SQLException; +import java.text.ParseException; +import java.text.SimpleDateFormat; + +/** + * + * @author asdv5 + */ +public class UtilitiesDatabase +{ + public static Connection connection( + String databaseName, + String userName, + String password, + String URL2 + + ) //throws InstantiationException, IllegalAccessException + { +/* + String databaseName = "suppliers_parts_23"; + String userName = "root"; + String password = "root"; + String URL2 = "com.mysql.jdbc.Driver"; + Connection con = null; +*/ + Connection con; + try + {// Load Sun's jdbc driver + Class.forName(URL2).newInstance(); + System.out.println("JDBC Driver loaded!"); + } + catch (Exception e) // driver not found + { + System.err.println("Unable to load database driver"); + System.err.println("Details : " + e); + return null; + } + String ip = "localhost"; //internet connection + String url = "jdbc:mysql://" + ip + ":3306/" + databaseName + "?allowPublicKeyRetrieval=true&useSSL=false"; + try + { + con = DriverManager.getConnection(url, userName, password); + con.setReadOnly(false); + } + catch (Exception e) + { + System.err.println(e.toString()); + return null; + } + System.out.println("connection successful!"); + return con; + } + + + public void closeDatabaseConnection( Connection con) + { + try + { + if (con != null) + { + con.close(); + } + } + catch (SQLException e) + { + System.out.println(e); + e.printStackTrace(); + } + } + + + +public static java.sql.Date stringDateToSqlDate(String sDate) + { + java.util.Date date = null; + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); + try + { + date = sdf.parse(sDate); + } + catch (ParseException e) + { + e.printStackTrace(); + } + return new java.sql.Date( date.getTime() ); + + } + + +public static java.util.Date stringDateToJavaUtilitiesDate(String sDate) + { + java.sql.Date sqldate = stringDateToSqlDate(sDate); + return new java.util.Date(sqldate.getTime() ); + } + public static void main(String[] args) + { + connection("travel", "java", "8VCS49HT2xjsEZvC", "com.mysql.jdbc.Driver"); + + } +} + diff --git a/Semester 2/Exams/FinalExamProblem2_CalebFontenot/src/main/resources/META-INF/persistence.xml b/Semester 2/Exams/FinalExamProblem2_CalebFontenot/src/main/resources/META-INF/persistence.xml new file mode 100644 index 0000000..7582bf1 --- /dev/null +++ b/Semester 2/Exams/FinalExamProblem2_CalebFontenot/src/main/resources/META-INF/persistence.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Semester 2/Exams/FinalExamProblem2_CalebFontenot/src/main/webapp/WEB-INF/beans.xml b/Semester 2/Exams/FinalExamProblem2_CalebFontenot/src/main/webapp/WEB-INF/beans.xml new file mode 100644 index 0000000..9dfae34 --- /dev/null +++ b/Semester 2/Exams/FinalExamProblem2_CalebFontenot/src/main/webapp/WEB-INF/beans.xml @@ -0,0 +1,6 @@ + + + \ No newline at end of file diff --git a/Semester 2/Exams/FinalExamProblem2_CalebFontenot/src/main/webapp/WEB-INF/glassfish-web.xml b/Semester 2/Exams/FinalExamProblem2_CalebFontenot/src/main/webapp/WEB-INF/glassfish-web.xml new file mode 100644 index 0000000..673cc06 --- /dev/null +++ b/Semester 2/Exams/FinalExamProblem2_CalebFontenot/src/main/webapp/WEB-INF/glassfish-web.xml @@ -0,0 +1,25 @@ + + + + + + + + Keep a copy of the generated servlet class' java code. + + + diff --git a/Semester 2/Exams/FinalExamProblem2_CalebFontenot/src/main/webapp/WEB-INF/web.xml b/Semester 2/Exams/FinalExamProblem2_CalebFontenot/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000..fcf1912 --- /dev/null +++ b/Semester 2/Exams/FinalExamProblem2_CalebFontenot/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,24 @@ + + + + jakarta.faces.PROJECT_STAGE + Development + + + Faces Servlet + jakarta.faces.webapp.FacesServlet + 1 + + + Faces Servlet + /faces/* + + + + 30 + + + + index.xhtml + + diff --git a/Semester 2/Exams/FinalExamProblem2_CalebFontenot/src/main/webapp/index.xhtml b/Semester 2/Exams/FinalExamProblem2_CalebFontenot/src/main/webapp/index.xhtml new file mode 100644 index 0000000..2e0f07d --- /dev/null +++ b/Semester 2/Exams/FinalExamProblem2_CalebFontenot/src/main/webapp/index.xhtml @@ -0,0 +1,40 @@ + + + + + Facelet Title + + + + + + + pid + + + pname + + + birthday + + + #{currentValue.pid} + + + #{currentValue.pname} + + + #{currentValue.birthday} + + + + + + + + + + diff --git a/Semester 2/Exams/FinalExamProblem3_CalebFontenot/nb-configuration.xml b/Semester 2/Exams/FinalExamProblem3_CalebFontenot/nb-configuration.xml new file mode 100644 index 0000000..19bf435 --- /dev/null +++ b/Semester 2/Exams/FinalExamProblem3_CalebFontenot/nb-configuration.xml @@ -0,0 +1,20 @@ + + + + + + 10-web + gfv700ee10 + JDK_11__System_ + + diff --git a/Semester 2/Exams/FinalExamProblem3_CalebFontenot/pom.xml b/Semester 2/Exams/FinalExamProblem3_CalebFontenot/pom.xml new file mode 100644 index 0000000..6c055a1 --- /dev/null +++ b/Semester 2/Exams/FinalExamProblem3_CalebFontenot/pom.xml @@ -0,0 +1,42 @@ + + 4.0.0 + edu.slcc.asdv.caleb + FinalExamProblem3_CalebFontenot + 1.0-SNAPSHOT + war + FinalExamProblem3_CalebFontenot-1.0-SNAPSHOT + + + UTF-8 + 10.0.0 + + + + + jakarta.platform + jakarta.jakartaee-api + ${jakartaee} + provided + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + 11 + 11 + + + + org.apache.maven.plugins + maven-war-plugin + 3.3.2 + + + + \ No newline at end of file diff --git a/Semester 2/Exams/FinalExamProblem3_CalebFontenot/src/main/java/edu/slcc/asdv/caleb/finalexamproblem3_calebfontenot/JakartaRestConfiguration.java b/Semester 2/Exams/FinalExamProblem3_CalebFontenot/src/main/java/edu/slcc/asdv/caleb/finalexamproblem3_calebfontenot/JakartaRestConfiguration.java new file mode 100644 index 0000000..f2b9189 --- /dev/null +++ b/Semester 2/Exams/FinalExamProblem3_CalebFontenot/src/main/java/edu/slcc/asdv/caleb/finalexamproblem3_calebfontenot/JakartaRestConfiguration.java @@ -0,0 +1,13 @@ +package edu.slcc.asdv.caleb.finalexamproblem3_calebfontenot; + +import jakarta.ws.rs.ApplicationPath; +import jakarta.ws.rs.core.Application; + +/** + * Configures Jakarta RESTful Web Services for the application. + * @author Juneau + */ +@ApplicationPath("resources") +public class JakartaRestConfiguration extends Application { + +} diff --git a/Semester 2/Exams/FinalExamProblem3_CalebFontenot/src/main/java/edu/slcc/asdv/caleb/finalexamproblem3_calebfontenot/resources/JakartaEE10Resource.java b/Semester 2/Exams/FinalExamProblem3_CalebFontenot/src/main/java/edu/slcc/asdv/caleb/finalexamproblem3_calebfontenot/resources/JakartaEE10Resource.java new file mode 100644 index 0000000..c883039 --- /dev/null +++ b/Semester 2/Exams/FinalExamProblem3_CalebFontenot/src/main/java/edu/slcc/asdv/caleb/finalexamproblem3_calebfontenot/resources/JakartaEE10Resource.java @@ -0,0 +1,20 @@ +package edu.slcc.asdv.caleb.finalexamproblem3_calebfontenot.resources; + +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.core.Response; + +/** + * + * @author + */ +@Path("jakartaee10") +public class JakartaEE10Resource { + + @GET + public Response ping(){ + return Response + .ok("ping Jakarta EE") + .build(); + } +} diff --git a/Semester 2/Exams/FinalExamProblem3_CalebFontenot/src/main/resources/META-INF/persistence.xml b/Semester 2/Exams/FinalExamProblem3_CalebFontenot/src/main/resources/META-INF/persistence.xml new file mode 100644 index 0000000..7582bf1 --- /dev/null +++ b/Semester 2/Exams/FinalExamProblem3_CalebFontenot/src/main/resources/META-INF/persistence.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Semester 2/Exams/FinalExamProblem3_CalebFontenot/src/main/webapp/WEB-INF/beans.xml b/Semester 2/Exams/FinalExamProblem3_CalebFontenot/src/main/webapp/WEB-INF/beans.xml new file mode 100644 index 0000000..9dfae34 --- /dev/null +++ b/Semester 2/Exams/FinalExamProblem3_CalebFontenot/src/main/webapp/WEB-INF/beans.xml @@ -0,0 +1,6 @@ + + + \ No newline at end of file diff --git a/Semester 2/Exams/FinalExamProblem3_CalebFontenot/src/main/webapp/WEB-INF/glassfish-web.xml b/Semester 2/Exams/FinalExamProblem3_CalebFontenot/src/main/webapp/WEB-INF/glassfish-web.xml new file mode 100644 index 0000000..673cc06 --- /dev/null +++ b/Semester 2/Exams/FinalExamProblem3_CalebFontenot/src/main/webapp/WEB-INF/glassfish-web.xml @@ -0,0 +1,25 @@ + + + + + + + + Keep a copy of the generated servlet class' java code. + + + diff --git a/Semester 2/Exams/FinalExamProblem3_CalebFontenot/src/main/webapp/WEB-INF/web.xml b/Semester 2/Exams/FinalExamProblem3_CalebFontenot/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000..fcf1912 --- /dev/null +++ b/Semester 2/Exams/FinalExamProblem3_CalebFontenot/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,24 @@ + + + + jakarta.faces.PROJECT_STAGE + Development + + + Faces Servlet + jakarta.faces.webapp.FacesServlet + 1 + + + Faces Servlet + /faces/* + + + + 30 + + + + index.xhtml + + diff --git a/Semester 2/Exams/FinalExamProblem3_CalebFontenot/src/main/webapp/index.html b/Semester 2/Exams/FinalExamProblem3_CalebFontenot/src/main/webapp/index.html new file mode 100644 index 0000000..3368e9c --- /dev/null +++ b/Semester 2/Exams/FinalExamProblem3_CalebFontenot/src/main/webapp/index.html @@ -0,0 +1,10 @@ + + + + Start Page + + + +

Hello World!

+ + diff --git a/Semester 2/Exams/FinalExamProblem4_CalebFontenot/nb-configuration.xml b/Semester 2/Exams/FinalExamProblem4_CalebFontenot/nb-configuration.xml new file mode 100644 index 0000000..19bf435 --- /dev/null +++ b/Semester 2/Exams/FinalExamProblem4_CalebFontenot/nb-configuration.xml @@ -0,0 +1,20 @@ + + + + + + 10-web + gfv700ee10 + JDK_11__System_ + + diff --git a/Semester 2/Exams/FinalExamProblem4_CalebFontenot/pom.xml b/Semester 2/Exams/FinalExamProblem4_CalebFontenot/pom.xml new file mode 100644 index 0000000..cfa1f52 --- /dev/null +++ b/Semester 2/Exams/FinalExamProblem4_CalebFontenot/pom.xml @@ -0,0 +1,42 @@ + + 4.0.0 + edu.slcc.asdv.caleb + FinalExamProblem4_CalebFontenot + 1.0-SNAPSHOT + war + FinalExamProblem4_CalebFontenot-1.0-SNAPSHOT + + + UTF-8 + 10.0.0 + + + + + jakarta.platform + jakarta.jakartaee-api + ${jakartaee} + provided + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + 11 + 11 + + + + org.apache.maven.plugins + maven-war-plugin + 3.3.2 + + + + \ No newline at end of file diff --git a/Semester 2/Exams/FinalExamProblem4_CalebFontenot/src/main/java/beans/PrimeArrayController.java b/Semester 2/Exams/FinalExamProblem4_CalebFontenot/src/main/java/beans/PrimeArrayController.java new file mode 100644 index 0000000..1a0ef76 --- /dev/null +++ b/Semester 2/Exams/FinalExamProblem4_CalebFontenot/src/main/java/beans/PrimeArrayController.java @@ -0,0 +1,50 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/JSF/JSFManagedBean.java to edit this template + */ + +package beans; + +import jakarta.inject.Named; +import jakarta.enterprise.context.SessionScoped; +import java.io.Serializable; +import java.util.ArrayList; + +/** + * + * @author caleb + */ +@Named(value="primeArrayController") +@SessionScoped +public class PrimeArrayController implements Serializable { + + ArrayList validPrimes = new ArrayList<>(); + private String primeToAdd; + + public String getPrimeToAdd() + { + return primeToAdd; + } + + public void setPrimeToAdd(String primeToAdd) + { + this.primeToAdd = primeToAdd; + validPrimes.add(primeToAdd); + } + + + public ArrayList getValidPrimes() + { + return validPrimes; + } + + public void setValidPrimes(ArrayList validPrimes) + { + this.validPrimes = validPrimes; + } + + /** Creates a new instance of PrimeArrayController */ + public PrimeArrayController() { + } + +} diff --git a/Semester 2/Exams/FinalExamProblem4_CalebFontenot/src/main/java/beans/PrimeNumberValidator.java b/Semester 2/Exams/FinalExamProblem4_CalebFontenot/src/main/java/beans/PrimeNumberValidator.java new file mode 100644 index 0000000..71c1945 --- /dev/null +++ b/Semester 2/Exams/FinalExamProblem4_CalebFontenot/src/main/java/beans/PrimeNumberValidator.java @@ -0,0 +1,34 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template + */ +package beans; + +import jakarta.faces.application.FacesMessage; +import jakarta.faces.component.UIComponent; +import jakarta.faces.context.FacesContext; +import jakarta.faces.validator.FacesValidator; +import jakarta.faces.validator.Validator; +import jakarta.faces.validator.ValidatorException; +import java.math.BigInteger; + +/** + * + * @author caleb + */ +@FacesValidator("primeNumberValidator") +public class PrimeNumberValidator implements Validator { + + + + @Override + public void validate(FacesContext context, UIComponent component, Object value) throws ValidatorException + { + BigInteger bigInt = new BigInteger((String) value); + if (!bigInt.isProbablePrime(100)) { + FacesMessage message = new FacesMessage("That is not a valid prime number."); + throw new ValidatorException(message); + } + } + +} diff --git a/Semester 2/Exams/FinalExamProblem4_CalebFontenot/src/main/java/edu/slcc/asdv/caleb/finalexamproblem4_calebfontenot/JakartaRestConfiguration.java b/Semester 2/Exams/FinalExamProblem4_CalebFontenot/src/main/java/edu/slcc/asdv/caleb/finalexamproblem4_calebfontenot/JakartaRestConfiguration.java new file mode 100644 index 0000000..3bd1dd3 --- /dev/null +++ b/Semester 2/Exams/FinalExamProblem4_CalebFontenot/src/main/java/edu/slcc/asdv/caleb/finalexamproblem4_calebfontenot/JakartaRestConfiguration.java @@ -0,0 +1,13 @@ +package edu.slcc.asdv.caleb.finalexamproblem4_calebfontenot; + +import jakarta.ws.rs.ApplicationPath; +import jakarta.ws.rs.core.Application; + +/** + * Configures Jakarta RESTful Web Services for the application. + * @author Juneau + */ +@ApplicationPath("resources") +public class JakartaRestConfiguration extends Application { + +} diff --git a/Semester 2/Exams/FinalExamProblem4_CalebFontenot/src/main/java/edu/slcc/asdv/caleb/finalexamproblem4_calebfontenot/resources/JakartaEE10Resource.java b/Semester 2/Exams/FinalExamProblem4_CalebFontenot/src/main/java/edu/slcc/asdv/caleb/finalexamproblem4_calebfontenot/resources/JakartaEE10Resource.java new file mode 100644 index 0000000..52d6b53 --- /dev/null +++ b/Semester 2/Exams/FinalExamProblem4_CalebFontenot/src/main/java/edu/slcc/asdv/caleb/finalexamproblem4_calebfontenot/resources/JakartaEE10Resource.java @@ -0,0 +1,20 @@ +package edu.slcc.asdv.caleb.finalexamproblem4_calebfontenot.resources; + +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.core.Response; + +/** + * + * @author + */ +@Path("jakartaee10") +public class JakartaEE10Resource { + + @GET + public Response ping(){ + return Response + .ok("ping Jakarta EE") + .build(); + } +} diff --git a/Semester 2/Exams/FinalExamProblem4_CalebFontenot/src/main/resources/META-INF/persistence.xml b/Semester 2/Exams/FinalExamProblem4_CalebFontenot/src/main/resources/META-INF/persistence.xml new file mode 100644 index 0000000..7582bf1 --- /dev/null +++ b/Semester 2/Exams/FinalExamProblem4_CalebFontenot/src/main/resources/META-INF/persistence.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Semester 2/Exams/FinalExamProblem4_CalebFontenot/src/main/webapp/WEB-INF/beans.xml b/Semester 2/Exams/FinalExamProblem4_CalebFontenot/src/main/webapp/WEB-INF/beans.xml new file mode 100644 index 0000000..9dfae34 --- /dev/null +++ b/Semester 2/Exams/FinalExamProblem4_CalebFontenot/src/main/webapp/WEB-INF/beans.xml @@ -0,0 +1,6 @@ + + + \ No newline at end of file diff --git a/Semester 2/Exams/FinalExamProblem4_CalebFontenot/src/main/webapp/WEB-INF/glassfish-web.xml b/Semester 2/Exams/FinalExamProblem4_CalebFontenot/src/main/webapp/WEB-INF/glassfish-web.xml new file mode 100644 index 0000000..673cc06 --- /dev/null +++ b/Semester 2/Exams/FinalExamProblem4_CalebFontenot/src/main/webapp/WEB-INF/glassfish-web.xml @@ -0,0 +1,25 @@ + + + + + + + + Keep a copy of the generated servlet class' java code. + + + diff --git a/Semester 2/Exams/FinalExamProblem4_CalebFontenot/src/main/webapp/WEB-INF/web.xml b/Semester 2/Exams/FinalExamProblem4_CalebFontenot/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000..fcf1912 --- /dev/null +++ b/Semester 2/Exams/FinalExamProblem4_CalebFontenot/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,24 @@ + + + + jakarta.faces.PROJECT_STAGE + Development + + + Faces Servlet + jakarta.faces.webapp.FacesServlet + 1 + + + Faces Servlet + /faces/* + + + + 30 + + + + index.xhtml + + diff --git a/Semester 2/Exams/FinalExamProblem4_CalebFontenot/src/main/webapp/index.xhtml b/Semester 2/Exams/FinalExamProblem4_CalebFontenot/src/main/webapp/index.xhtml new file mode 100644 index 0000000..b8af21b --- /dev/null +++ b/Semester 2/Exams/FinalExamProblem4_CalebFontenot/src/main/webapp/index.xhtml @@ -0,0 +1,32 @@ + + + + + Facelet Title + + + +

Type in prime numbers only

+
+ + + Valid Primes + + + #{currentValue} + + +
+

+ Please type a number to insert into the data table. +

+ Test if a number is prime: + + + +

+
+
+ diff --git a/Semester 2/ZIPs/FinalExamProblem1_CalebFontenot.zip b/Semester 2/ZIPs/FinalExamProblem1_CalebFontenot.zip new file mode 100644 index 0000000..cbdcb7e Binary files /dev/null and b/Semester 2/ZIPs/FinalExamProblem1_CalebFontenot.zip differ diff --git a/Semester 2/ZIPs/FinalExamProblem2_CalebFontenot.zip b/Semester 2/ZIPs/FinalExamProblem2_CalebFontenot.zip new file mode 100644 index 0000000..89fb3da Binary files /dev/null and b/Semester 2/ZIPs/FinalExamProblem2_CalebFontenot.zip differ diff --git a/Semester 2/ZIPs/FinalExamProblem4_CalebFontenot.zip b/Semester 2/ZIPs/FinalExamProblem4_CalebFontenot.zip new file mode 100644 index 0000000..b35ee65 Binary files /dev/null and b/Semester 2/ZIPs/FinalExamProblem4_CalebFontenot.zip differ diff --git a/Semester 3/Examples/ajax-examples.zip b/Semester 3/Examples/ajax-examples.zip new file mode 100644 index 0000000..e4e6758 Binary files /dev/null and b/Semester 3/Examples/ajax-examples.zip differ diff --git a/Semester 3/Examples/ajax-examples/.DS_Store b/Semester 3/Examples/ajax-examples/.DS_Store new file mode 100644 index 0000000..c718fcd Binary files /dev/null and b/Semester 3/Examples/ajax-examples/.DS_Store differ diff --git a/Semester 3/Examples/ajax-examples/Ajax1_Echo.zip b/Semester 3/Examples/ajax-examples/Ajax1_Echo.zip new file mode 100644 index 0000000..4f44118 Binary files /dev/null and b/Semester 3/Examples/ajax-examples/Ajax1_Echo.zip differ diff --git a/Semester 3/Examples/ajax-examples/Ajax1_Echo/faces-config.NavData b/Semester 3/Examples/ajax-examples/Ajax1_Echo/faces-config.NavData new file mode 100644 index 0000000..298bfc5 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax1_Echo/faces-config.NavData @@ -0,0 +1,6 @@ + + + + + + diff --git a/Semester 3/Examples/ajax-examples/Ajax1_Echo/nb-configuration.xml b/Semester 3/Examples/ajax-examples/Ajax1_Echo/nb-configuration.xml new file mode 100644 index 0000000..f7b0362 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax1_Echo/nb-configuration.xml @@ -0,0 +1,21 @@ + + + + + + 10-web + gfv700ee10 + Facelets + JDK_15__System_ + + diff --git a/Semester 3/Examples/ajax-examples/Ajax1_Echo/pom.xml b/Semester 3/Examples/ajax-examples/Ajax1_Echo/pom.xml new file mode 100644 index 0000000..0c92942 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax1_Echo/pom.xml @@ -0,0 +1,77 @@ + + 4.0.0 + asdv + Ajax1 + 1 + war + Ajax1-Echo + + + 11 + 11 + ${project.build.directory}/endorsed + UTF-8 + false + 10.0.0 + + + + + jakarta.platform + jakarta.jakartaee-api + ${jakartaee} + provided + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + 11 + 11 + + ${endorsed.dir} + + + + + org.apache.maven.plugins + maven-war-plugin + 2.3 + + false + + + + org.apache.maven.plugins + maven-dependency-plugin + 2.6 + + + validate + + copy + + + ${endorsed.dir} + true + + + jakarta.platform + jakarta.jakartaee-api + ${jakartaee} + jar + + + + + + + + + \ No newline at end of file diff --git a/Semester 3/Examples/ajax-examples/Ajax1_Echo/src/main/java/asdv/ajax1/JakartaRestConfiguration.java b/Semester 3/Examples/ajax-examples/Ajax1_Echo/src/main/java/asdv/ajax1/JakartaRestConfiguration.java new file mode 100644 index 0000000..82d8b59 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax1_Echo/src/main/java/asdv/ajax1/JakartaRestConfiguration.java @@ -0,0 +1,13 @@ +package asdv.ajax1; + +import jakarta.ws.rs.ApplicationPath; +import jakarta.ws.rs.core.Application; + +/** + * Configures Jakarta RESTful Web Services for the application. + * @author Juneau + */ +@ApplicationPath("resources") +public class JakartaRestConfiguration extends Application { + +} diff --git a/Semester 3/Examples/ajax-examples/Ajax1_Echo/src/main/java/asdv/ajax1/resources/JakartaEE10Resource.java b/Semester 3/Examples/ajax-examples/Ajax1_Echo/src/main/java/asdv/ajax1/resources/JakartaEE10Resource.java new file mode 100644 index 0000000..4db9d28 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax1_Echo/src/main/java/asdv/ajax1/resources/JakartaEE10Resource.java @@ -0,0 +1,20 @@ +package asdv.ajax1.resources; + +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.core.Response; + +/** + * + * @author + */ +@Path("jakartaee10") +public class JakartaEE10Resource { + + @GET + public Response ping(){ + return Response + .ok("ping Jakarta EE") + .build(); + } +} diff --git a/Semester 3/Examples/ajax-examples/Ajax1_Echo/src/main/java/beans/UserBean.java b/Semester 3/Examples/ajax-examples/Ajax1_Echo/src/main/java/beans/UserBean.java new file mode 100644 index 0000000..e4aed26 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax1_Echo/src/main/java/beans/UserBean.java @@ -0,0 +1,36 @@ +package beans; + +import java.io.Serializable; +import jakarta.inject.Named; +import jakarta.enterprise.context.SessionScoped; + +@Named("user") +@SessionScoped +public class UserBean implements Serializable +{ + private String name = ""; + private String password; + + public String getName() + { + return name; + } + + public void setName(String newValue) + { + System.out.println(newValue); + name = newValue; + } + + public String getPassword() + { + return password; + } + + public void setPassword(String newValue) + { + password = newValue; + } + + +} diff --git a/Semester 3/Examples/ajax-examples/Ajax1_Echo/src/main/resources/META-INF/persistence.xml b/Semester 3/Examples/ajax-examples/Ajax1_Echo/src/main/resources/META-INF/persistence.xml new file mode 100644 index 0000000..7582bf1 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax1_Echo/src/main/resources/META-INF/persistence.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Semester 3/Examples/ajax-examples/Ajax1_Echo/src/main/resources/messages/messages.properties b/Semester 3/Examples/ajax-examples/Ajax1_Echo/src/main/resources/messages/messages.properties new file mode 100644 index 0000000..48778dc --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax1_Echo/src/main/resources/messages/messages.properties @@ -0,0 +1,6 @@ +loginWindowTitle=Ajax Echo +loginHeading=Please Log In +namePrompt=Name: +passwordPrompt=Password: +loginButtonText=Log In +greeting=Welcome \ No newline at end of file diff --git a/Semester 3/Examples/ajax-examples/Ajax1_Echo/src/main/webapp/WEB-INF/beans.xml b/Semester 3/Examples/ajax-examples/Ajax1_Echo/src/main/webapp/WEB-INF/beans.xml new file mode 100644 index 0000000..9dfae34 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax1_Echo/src/main/webapp/WEB-INF/beans.xml @@ -0,0 +1,6 @@ + + + \ No newline at end of file diff --git a/Semester 3/Examples/ajax-examples/Ajax1_Echo/src/main/webapp/WEB-INF/faces-config.xml b/Semester 3/Examples/ajax-examples/Ajax1_Echo/src/main/webapp/WEB-INF/faces-config.xml new file mode 100644 index 0000000..e787af0 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax1_Echo/src/main/webapp/WEB-INF/faces-config.xml @@ -0,0 +1,36 @@ + + + + + + + + + messages.messages + msgs + + + + diff --git a/Semester 3/Examples/ajax-examples/Ajax1_Echo/src/main/webapp/WEB-INF/glassfish-web.xml b/Semester 3/Examples/ajax-examples/Ajax1_Echo/src/main/webapp/WEB-INF/glassfish-web.xml new file mode 100644 index 0000000..673cc06 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax1_Echo/src/main/webapp/WEB-INF/glassfish-web.xml @@ -0,0 +1,25 @@ + + + + + + + + Keep a copy of the generated servlet class' java code. + + + diff --git a/Semester 3/Examples/ajax-examples/Ajax1_Echo/src/main/webapp/WEB-INF/web.xml b/Semester 3/Examples/ajax-examples/Ajax1_Echo/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000..fcfcd54 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax1_Echo/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,24 @@ + + + + jakarta.faces.PROJECT_STAGE + Development + + + Faces Servlet + jakarta.faces.webapp.FacesServlet + 1 + + + Faces Servlet + /faces/* + + + + 30 + + + + faces/index.xhtml + + diff --git a/Semester 3/Examples/ajax-examples/Ajax1_Echo/src/main/webapp/index.xhtml b/Semester 3/Examples/ajax-examples/Ajax1_Echo/src/main/webapp/index.xhtml new file mode 100644 index 0000000..9b99e25 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax1_Echo/src/main/webapp/index.xhtml @@ -0,0 +1,32 @@ + + + + + + + + #{msgs.loginWindowTitle} + + + +

#{msgs.loginHeading}

+ + #{msgs.namePrompt} + + + + + + #{msgs.passwordPrompt} + + + + +

+
+
+ diff --git a/Semester 3/Examples/ajax-examples/Ajax1_Echo/src/main/webapp/welcome.xhtml b/Semester 3/Examples/ajax-examples/Ajax1_Echo/src/main/webapp/welcome.xhtml new file mode 100644 index 0000000..26425f3 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax1_Echo/src/main/webapp/welcome.xhtml @@ -0,0 +1,15 @@ + + + + + #{msgs.loginWindowTitle} + + + +

#{msgs.greeting} #{user.name}!

+
+

password: #{user.password}!

+
+ \ No newline at end of file diff --git a/Semester 3/Examples/ajax-examples/Ajax2.zip b/Semester 3/Examples/ajax-examples/Ajax2.zip new file mode 100644 index 0000000..5f468e1 Binary files /dev/null and b/Semester 3/Examples/ajax-examples/Ajax2.zip differ diff --git a/Semester 3/Examples/ajax-examples/Ajax2/nb-configuration.xml b/Semester 3/Examples/ajax-examples/Ajax2/nb-configuration.xml new file mode 100644 index 0000000..f33c43b --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax2/nb-configuration.xml @@ -0,0 +1,19 @@ + + + + + + Facelets + JDK_15__System_ + + diff --git a/Semester 3/Examples/ajax-examples/Ajax2/pom.xml b/Semester 3/Examples/ajax-examples/Ajax2/pom.xml new file mode 100644 index 0000000..9daeeb5 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax2/pom.xml @@ -0,0 +1,77 @@ + + 4.0.0 + asdv + Ajax2 + 1 + war + Ajax2-1 + + + 11 + 11 + ${project.build.directory}/endorsed + UTF-8 + false + 10.0.0 + + + + + jakarta.platform + jakarta.jakartaee-api + ${jakartaee} + provided + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + 11 + 11 + + ${endorsed.dir} + + + + + org.apache.maven.plugins + maven-war-plugin + 2.3 + + false + + + + org.apache.maven.plugins + maven-dependency-plugin + 2.6 + + + validate + + copy + + + ${endorsed.dir} + true + + + jakarta.platform + jakarta.jakartaee-api + ${jakartaee} + jar + + + + + + + + + \ No newline at end of file diff --git a/Semester 3/Examples/ajax-examples/Ajax2/src/main/java/asdv/ajax2/JakartaRestConfiguration.java b/Semester 3/Examples/ajax-examples/Ajax2/src/main/java/asdv/ajax2/JakartaRestConfiguration.java new file mode 100644 index 0000000..e1f57f6 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax2/src/main/java/asdv/ajax2/JakartaRestConfiguration.java @@ -0,0 +1,13 @@ +package asdv.ajax2; + +import jakarta.ws.rs.ApplicationPath; +import jakarta.ws.rs.core.Application; + +/** + * Configures Jakarta RESTful Web Services for the application. + * @author Juneau + */ +@ApplicationPath("resources") +public class JakartaRestConfiguration extends Application { + +} diff --git a/Semester 3/Examples/ajax-examples/Ajax2/src/main/java/asdv/ajax2/resources/JakartaEE10Resource.java b/Semester 3/Examples/ajax-examples/Ajax2/src/main/java/asdv/ajax2/resources/JakartaEE10Resource.java new file mode 100644 index 0000000..e4ff727 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax2/src/main/java/asdv/ajax2/resources/JakartaEE10Resource.java @@ -0,0 +1,20 @@ +package asdv.ajax2.resources; + +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.core.Response; + +/** + * + * @author + */ +@Path("jakartaee10") +public class JakartaEE10Resource { + + @GET + public Response ping(){ + return Response + .ok("ping Jakarta EE") + .build(); + } +} diff --git a/Semester 3/Examples/ajax-examples/Ajax2/src/main/java/edu/slcc/asdv/AJAXBean.java b/Semester 3/Examples/ajax-examples/Ajax2/src/main/java/edu/slcc/asdv/AJAXBean.java new file mode 100644 index 0000000..06d2b56 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax2/src/main/java/edu/slcc/asdv/AJAXBean.java @@ -0,0 +1,400 @@ + +package edu.slcc.asdv; + +import jakarta.inject.Named; +import jakarta.enterprise.context.SessionScoped; +import java.io.Serializable; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import jakarta.faces.application.FacesMessage; +import jakarta.faces.context.FacesContext; +import jakarta.faces.event.AbortProcessingException; +import jakarta.faces.event.ActionEvent; +import jakarta.faces.event.AjaxBehaviorEvent; + +/** + * + * @author ASDV2 + */ +@Named(value = "AJAXBean") +@SessionScoped +public class AJAXBean implements Serializable +{ + + private int counter = 0; + + private String lastMessage = null; + + private List messages = new ArrayList<>(); + + private boolean bool; + private boolean bool1; + private boolean bool2; + private boolean bool3; + private boolean bool4; + + private boolean spinning = true; + private boolean readOnly = false; + private boolean disabled = true; + + private int age; + + private String name; + + private boolean buttonRed = false; + + public void mouseOverListener(AjaxBehaviorEvent event) + throws AbortProcessingException + { + report("f:ajax mouseOver listener called"); + setButtonRed(true); + } + + public void mouseOutListener(AjaxBehaviorEvent event) + throws AbortProcessingException + { + report("f:ajax mouseOut listener called"); + setButtonRed(false); + } + + public void keyDownListener() throws AbortProcessingException + { + report("f:ajax keydown listener called"); + setButtonRed(false); + } + + public void keyDownListener(AjaxBehaviorEvent event) throws AbortProcessingException + { + report("f:ajax keydown listener called"); + setButtonRed(false); + } + + public boolean isSpinning() + { + return spinning; + } + + public void setSpinning(boolean spinning) + { + this.spinning = spinning; + } + + public boolean isReadOnly() + { + return readOnly; + } + + public void setReadOnly(boolean readOnly) + { + this.readOnly = readOnly; + } + + public boolean isDisabled() + { + return disabled; + } + + public void setDisabled(boolean disabled) + { + this.disabled = disabled; + } + + public boolean isBool1() + { + return bool1; + } + + public void setBool1(boolean bool1) + { + this.bool1 = bool1; + } + + public boolean isBool2() + { + return bool2; + } + + public void setBool2(boolean bool2) + { + this.bool2 = bool2; + } + + public boolean isBool3() + { + return bool3; + } + + public void setBool3(boolean bool3) + { + this.bool3 = bool3; + } + + public boolean isBool4() + { + return bool4; + } + + public void setBool4(boolean bool4) + { + this.bool4 = bool4; + } + + private String input = "Ignore the text. It's not important."; + + public AJAXBean() + { + // getMessages().add("No message yet."); + // getMessages().add("Play with the combobox to add messages."); + } + + private int brand = 1; + + public void clearMessages() + { + messages.clear(); + messages.add("Messages cleared by tab change AJAX event"); + } + + public int getBrand() + { + return brand; + } + + private String now() + { + return new SimpleDateFormat("HH:mm:ss.SSS").format(new Date()); + } + + public void setBrand(int brand) + { + this.brand = brand; + messages.add(0, now() + " Setter has been called: " + brand); + } + + public List getMessages() + { + return messages; + } + + public void setMessages(List messages) + { + this.messages = messages; + } + + public String onBlur() + { + String event = " blur"; + report(event); + return "Hallo"; + } + + private void report(String event) + { + if (event.equals(lastMessage)) + { + counter++; + messages.set(0, now() + " " + event + " (" + counter + ")"); + } + else + { + counter = 1; + messages.add(0, now() + " " + event); + } + lastMessage = event; + try + { + Thread.currentThread().sleep(1); + } + catch (InterruptedException e) + { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + } + + public String onChange() + { + String event = " change"; + report(event); + return "Hallo"; + } + + public String onValueChange() + { + String event = " valueChange"; + report(event); + return "Hallo"; + } + + public String onClick() + { + String event = " click"; + report(event); + return "Hallo"; + } + + public String onDblClick() + { + String event = " dblclick"; + report(event); + return "Hallo"; + } + + public String onFocus() + { + String event = " focus"; + report(event); + return "Hallo"; + } + + public String onKeyDown() + { + String event = " keydown"; + report(event); + return "Hallo"; + } + + public String onKeyPress() + { + String event = " keypress"; + report(event); + return "Hallo"; + } + + public String onKeyUp() + { + String event = " keyup"; + report(event); + return "Hallo"; + } + + public String onMouseDown() + { + String event = " mousedown"; + report(event); + return "Hallo"; + } + + public String onMouseMove() + { + String event = " mousemove"; + report(event); + return "Hallo"; + } + + public String onMouseOut() + { + String event = " mouseout"; + report(event); + return "Hallo"; + } + + public String onMouseOver() + { + String event = " mouseover"; + report(event); + return "Hallo"; + } + + public String onMouseUp() + { + String event = " mouseup"; + report(event); + return "Hallo"; + } + + public String onSelect() + { + String event = " select"; + report(event); + return "Hallo"; + } + + public boolean isBool() + { + return bool; + } + + public void setBool(boolean bool) + { + this.bool = bool; + } + + public String getInput() + { + return input; + } + + public void setInput(String input) + { + this.input = input; + } + + public void standardJSFAction() + { + report("Standard JSF action called"); +// return null; // "landingPage.jsf"; + } + + public void facetListener(AjaxBehaviorEvent event) + throws AbortProcessingException + { + report("f:ajax listener called"); + } + + public void facetListener2(AjaxBehaviorEvent event) + throws AbortProcessingException + { + report("second f:ajax listener called"); + } + + public void standardJSFActionListener() + { + report("Standard JSF actionlistener without parameters called"); + } + + public void standardJSFActionListener(ActionEvent event) + { + report("Standard JSF actionlistener called"); + } + + public void standardJSFActionListener2(ActionEvent event) + { + report("second standard JSF actionlistener called"); + } + + public int getAge() + { + return age; + } + + public void setAge(int age) + { + this.age = age; + FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("You've successfully entered the age.")); + } + + public String getName() + { + return name; + } + + public void setName(String name) + { + this.name = name; + FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("You've successfully entered the name.")); + } + + public boolean isButtonRed() + { + return buttonRed; + } + + public void setButtonRed(boolean buttonRed) + { + this.buttonRed = buttonRed; + } +} diff --git a/Semester 3/Examples/ajax-examples/Ajax2/src/main/java/edu/slcc/asdv/ProcessingBean.java b/Semester 3/Examples/ajax-examples/Ajax2/src/main/java/edu/slcc/asdv/ProcessingBean.java new file mode 100644 index 0000000..382cfb2 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax2/src/main/java/edu/slcc/asdv/ProcessingBean.java @@ -0,0 +1,33 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package edu.slcc.asdv; + +import jakarta.inject.Named; +import jakarta.enterprise.context.RequestScoped; + +/** + * + * @author ASDV2 + */ +@Named(value = "processingBean") +@RequestScoped +public class ProcessingBean +{ + public void processing() + { + synchronized (this) + { + try + { + wait(3000); + } + catch (InterruptedException e1) + { + // waiting interrupted + } + } + } +} diff --git a/Semester 3/Examples/ajax-examples/Ajax2/src/main/java/edu/slcc/asdv/TestBean.java b/Semester 3/Examples/ajax-examples/Ajax2/src/main/java/edu/slcc/asdv/TestBean.java new file mode 100644 index 0000000..470af54 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax2/src/main/java/edu/slcc/asdv/TestBean.java @@ -0,0 +1,58 @@ +package edu.slcc.asdv; + +import jakarta.enterprise.context.RequestScoped; +import jakarta.inject.Named; + + +@Named(value = "testBean") +@RequestScoped +public class TestBean +{ +private String farheneitTemperature; +private String celciusTemperature; + +private String miles; + + public String getMiles() + { + return miles; + } + + public void setMiles(String miles) + { + System.out.println("miles: " + miles); + this.miles = miles; + } + + public String milesToKilometers() + { + if ( this.miles == null ) + return null; + double miles = Double.parseDouble( this.miles ); + double km = miles * 1.65; + return String.valueOf(km); + } + + + public String getFarheneitTemperature(){return farheneitTemperature;} + + public void setFarheneitTemperature(String farheneitTemperature) + { + this.farheneitTemperature = farheneitTemperature; + System.out.println("setter: " + this.farheneitTemperature); + this.celciusTemperature = convertFtoC(); + } + public String getCelciusTemperature(){return celciusTemperature;} + private String convertFtoC() + { + double f = Double.parseDouble( this.farheneitTemperature ); + double c = (f - 32) * ( 5.0 / 9.0); + System.out.println("far: " + this.farheneitTemperature); + System.out.println("convert " + c); + celciusTemperature = String.valueOf(c); + return celciusTemperature; + } + + + +} diff --git a/Semester 3/Examples/ajax-examples/Ajax2/src/main/resources/META-INF/persistence.xml b/Semester 3/Examples/ajax-examples/Ajax2/src/main/resources/META-INF/persistence.xml new file mode 100644 index 0000000..7582bf1 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax2/src/main/resources/META-INF/persistence.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Semester 3/Examples/ajax-examples/Ajax2/src/main/resources/messages/messages.properties b/Semester 3/Examples/ajax-examples/Ajax2/src/main/resources/messages/messages.properties new file mode 100644 index 0000000..48778dc --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax2/src/main/resources/messages/messages.properties @@ -0,0 +1,6 @@ +loginWindowTitle=Ajax Echo +loginHeading=Please Log In +namePrompt=Name: +passwordPrompt=Password: +loginButtonText=Log In +greeting=Welcome \ No newline at end of file diff --git a/Semester 3/Examples/ajax-examples/Ajax2/src/main/webapp/WEB-INF/beans.xml b/Semester 3/Examples/ajax-examples/Ajax2/src/main/webapp/WEB-INF/beans.xml new file mode 100644 index 0000000..9dfae34 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax2/src/main/webapp/WEB-INF/beans.xml @@ -0,0 +1,6 @@ + + + \ No newline at end of file diff --git a/Semester 3/Examples/ajax-examples/Ajax2/src/main/webapp/WEB-INF/faces-config.xml b/Semester 3/Examples/ajax-examples/Ajax2/src/main/webapp/WEB-INF/faces-config.xml new file mode 100644 index 0000000..e787af0 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax2/src/main/webapp/WEB-INF/faces-config.xml @@ -0,0 +1,36 @@ + + + + + + + + + messages.messages + msgs + + + + diff --git a/Semester 3/Examples/ajax-examples/Ajax2/src/main/webapp/WEB-INF/glassfish-web.xml b/Semester 3/Examples/ajax-examples/Ajax2/src/main/webapp/WEB-INF/glassfish-web.xml new file mode 100644 index 0000000..673cc06 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax2/src/main/webapp/WEB-INF/glassfish-web.xml @@ -0,0 +1,25 @@ + + + + + + + + Keep a copy of the generated servlet class' java code. + + + diff --git a/Semester 3/Examples/ajax-examples/Ajax2/src/main/webapp/WEB-INF/web.xml b/Semester 3/Examples/ajax-examples/Ajax2/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000..fcfcd54 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax2/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,24 @@ + + + + jakarta.faces.PROJECT_STAGE + Development + + + Faces Servlet + jakarta.faces.webapp.FacesServlet + 1 + + + Faces Servlet + /faces/* + + + + 30 + + + + faces/index.xhtml + + diff --git a/Semester 3/Examples/ajax-examples/Ajax2/src/main/webapp/index.xhtml b/Semester 3/Examples/ajax-examples/Ajax2/src/main/webapp/index.xhtml new file mode 100644 index 0000000..ada2cde --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax2/src/main/webapp/index.xhtml @@ -0,0 +1,29 @@ + + + + + #{msgs.loginWindowTitle} + + + + + + + + +
+
+ + +
+
+ +
+ +
+ diff --git a/Semester 3/Examples/ajax-examples/Ajax2/src/main/webapp/multipleEventListeners.xhtml b/Semester 3/Examples/ajax-examples/Ajax2/src/main/webapp/multipleEventListeners.xhtml new file mode 100644 index 0000000..f89d8a7 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax2/src/main/webapp/multipleEventListeners.xhtml @@ -0,0 +1,68 @@ + + + + + Facelet Title + + + + + + + + + + + + + + + + + +

+ + + + + + + + + +

+ + + + + + +
+ +
+ +
+ + diff --git a/Semester 3/Examples/ajax-examples/Ajax2/src/main/webapp/resources/css/styles.css b/Semester 3/Examples/ajax-examples/Ajax2/src/main/webapp/resources/css/styles.css new file mode 100644 index 0000000..159891c --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax2/src/main/webapp/resources/css/styles.css @@ -0,0 +1,67 @@ +body { + background-color: #e9e9e9; +} +a:hover { + color: red +} +h1,h2,h3 { + text-align: center; + font-family: Verdana, Arial, Helvetica, sans-serif; + color: black; +} +h1.title { + display: table; + margin: auto; + background-color: #afc4d6; + border-width: 4px; + border-style: outset; + border-color: #9fd1ff; + padding: 5px 8px; + letter-spacing: -.025em; +} +.formTable { + display: table; +} +/* If prompt and input are in two cells of one row, the prompt will be R-aligned. */ +.formTable td:first-child { + text-align: right; +} +/* Third table cell shows the error message, so make it bold and red. Used in validation examples that have h:message. */ +.formTable td:nth-child(3) { + color: red; + font-weight: bold; +} +th { background-color: #afc4d6; + font-size: 110%; + font-family: Arial, Helvetica, sans-serif; +} +legend { + font-weight: bold; + color: black; + background-color: #afc4d6; + border: 1px solid #1a55bf; + padding: 3px 5px; + border-radius: 3px; +} +fieldset { + border-radius: 6px; + display: block; +} +input, textarea { + background-color: #ecedf2; + text-align: left; +} +input[type="checkbox"] { + background-color: transparent; /* For IE -- doesn't matter in FF or Chrome */ +} +input[type="text"]:focus, input[type="password"]:focus, textarea:focus { + background-color: #9fd1ff; +} +.error { + color: red; + font-weight: bold; +} +/* So that in Chrome and IE, the bullets are next to the text in centered lists. Already OK in Firefox. */ +[align="center"] li { + list-style-position: inside; +} diff --git a/Semester 3/Examples/ajax-examples/Ajax2/src/main/webapp/resources/images/ajax-loader.gif b/Semester 3/Examples/ajax-examples/Ajax2/src/main/webapp/resources/images/ajax-loader.gif new file mode 100644 index 0000000..3c2f7c0 Binary files /dev/null and b/Semester 3/Examples/ajax-examples/Ajax2/src/main/webapp/resources/images/ajax-loader.gif differ diff --git a/Semester 3/Examples/ajax-examples/Ajax2/src/main/webapp/resources/scripts/custom-script.js b/Semester 3/Examples/ajax-examples/Ajax2/src/main/webapp/resources/scripts/custom-script.js new file mode 100644 index 0000000..264b923 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax2/src/main/webapp/resources/scripts/custom-script.js @@ -0,0 +1,13 @@ +function onStatusChange( data ) +{ + var spinner = document.getElementById("anImage"); + var status = data.status; + if (status === "begin") + { + spinner.style.display = "inline"; + } + else + { + spinner.style.display = "none"; + } +} \ No newline at end of file diff --git a/Semester 3/Examples/ajax-examples/Ajax2/src/main/webapp/resources/scripts/utils.js b/Semester 3/Examples/ajax-examples/Ajax2/src/main/webapp/resources/scripts/utils.js new file mode 100644 index 0000000..17c1e1c --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax2/src/main/webapp/resources/scripts/utils.js @@ -0,0 +1,48 @@ + +function onStatusChange(data) +{ + var spinner = document.getElementById("spinner"); + var status = data.status; + if (status === "begin") { + spinner.style.display = "inline"; + } else + { + spinner.style.display = "none"; + } +} + +function showWorkingIndicator(data) +{ + showIndicatorRegion(data, + "workingIndicator", + "slowJSF:ajaxMessage2"); +} + +function showIndicatorRegion(data, spinnerRegionId, messageRegionId) +{ + if (data.status == "begin") + { + clearExistingText(messageRegionId); + showElement(spinnerRegionId); + } + else if (data.status == "complete") + { + hideElement(spinnerRegionId); + } +} + +function clearExistingText(id) +{ + document.getElementById(id).innerHTML = ""; +} + +function showElement(id) +{ + document.getElementById(id).style.display = "block"; +} + +function hideElement(id) +{ + document.getElementById(id).style.display = "none"; +} + diff --git a/Semester 3/Examples/ajax-examples/Ajax2/src/main/webapp/temperature.xhtml b/Semester 3/Examples/ajax-examples/Ajax2/src/main/webapp/temperature.xhtml new file mode 100644 index 0000000..068537c --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax2/src/main/webapp/temperature.xhtml @@ -0,0 +1,30 @@ + + + + + Facelet Title + + + + +

On-the-Fly Temperature Converter …

+ Temperature in Fahrenheit: + + + + +
+

+ Temperature in Celsius: + + +

+
+ +
+ + diff --git a/Semester 3/Examples/ajax-examples/Ajax2/src/main/webapp/wrapper.xhtml b/Semester 3/Examples/ajax-examples/Ajax2/src/main/webapp/wrapper.xhtml new file mode 100644 index 0000000..7e02d27 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax2/src/main/webapp/wrapper.xhtml @@ -0,0 +1,43 @@ + + + + + Facelet Title + + + + + +

Ajax tag as Wrapper

+ Temperature in Fahrenheit: + + + +
+ Miles: + + +
+ +
+ +

+ Temperature in Celsius: + + +

+ +

+ Kilometers: + + +

+
+
+ + diff --git a/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing.zip b/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing.zip new file mode 100644 index 0000000..fb1f6fb Binary files /dev/null and b/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing.zip differ diff --git a/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/nb-configuration.xml b/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/nb-configuration.xml new file mode 100644 index 0000000..f7b0362 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/nb-configuration.xml @@ -0,0 +1,21 @@ + + + + + + 10-web + gfv700ee10 + Facelets + JDK_15__System_ + + diff --git a/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/pom.xml b/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/pom.xml new file mode 100644 index 0000000..74e2234 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/pom.xml @@ -0,0 +1,77 @@ + + 4.0.0 + asdv + Ajax3-Tags-Testing + 1 + war + Ajax3-Tags-Testing-1 + + + 11 + 11 + ${project.build.directory}/endorsed + UTF-8 + false + 10.0.0 + + + + + jakarta.platform + jakarta.jakartaee-api + ${jakartaee} + provided + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + 11 + 11 + + ${endorsed.dir} + + + + + org.apache.maven.plugins + maven-war-plugin + 2.3 + + false + + + + org.apache.maven.plugins + maven-dependency-plugin + 2.6 + + + validate + + copy + + + ${endorsed.dir} + true + + + jakarta.platform + jakarta.jakartaee-api + ${jakartaee} + jar + + + + + + + + + \ No newline at end of file diff --git a/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/src/main/java/asdv/ajax3/tags/testing/JakartaRestConfiguration.java b/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/src/main/java/asdv/ajax3/tags/testing/JakartaRestConfiguration.java new file mode 100644 index 0000000..59738af --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/src/main/java/asdv/ajax3/tags/testing/JakartaRestConfiguration.java @@ -0,0 +1,13 @@ +package asdv.ajax3.tags.testing; + +import jakarta.ws.rs.ApplicationPath; +import jakarta.ws.rs.core.Application; + +/** + * Configures Jakarta RESTful Web Services for the application. + * @author Juneau + */ +@ApplicationPath("resources") +public class JakartaRestConfiguration extends Application { + +} diff --git a/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/src/main/java/asdv/ajax3/tags/testing/resources/JakartaEE10Resource.java b/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/src/main/java/asdv/ajax3/tags/testing/resources/JakartaEE10Resource.java new file mode 100644 index 0000000..2f29eea --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/src/main/java/asdv/ajax3/tags/testing/resources/JakartaEE10Resource.java @@ -0,0 +1,20 @@ +package asdv.ajax3.tags.testing.resources; + +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.core.Response; + +/** + * + * @author + */ +@Path("jakartaee10") +public class JakartaEE10Resource { + + @GET + public Response ping(){ + return Response + .ok("ping Jakarta EE") + .build(); + } +} diff --git a/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/src/main/java/beans/AjaxBean.java b/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/src/main/java/beans/AjaxBean.java new file mode 100644 index 0000000..d80e250 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/src/main/java/beans/AjaxBean.java @@ -0,0 +1,68 @@ +package beans; +import java.util.logging.Level; +import java.util.logging.Logger; +import jakarta.enterprise.context.RequestScoped; +import jakarta.inject.Named; +@Named +@RequestScoped +public class AjaxBean +{ + private static final Logger logger + = Logger.getLogger(AjaxBean.class.getName()); + private String firstName = "default"; + private String lastName; + private String phone; + private String age; + private String address; + + public String getFirstName() + { + return firstName; + } + public void setFirstName(String firstName) + { + this.firstName = firstName; + } + public String getLastName() + { + return lastName; + } + public void setLastName(String lastName) + { + this.lastName = lastName; + } + public String getPhone() + { + return phone; + } + public void setPhone(String phone) + { + this.phone = phone; + } + public String getAge() + { + return age; + } + public void setAge(String age) + { + this.age = age; + } + public String getAddress() + { + return address; + } + public void setAddress(String address) + { + this.address = address; + } + public void ajaxAction(String executeNrender) + { + System.out.println(executeNrender); + logger.log(Level.INFO, "First Name = {0}", this.firstName); + logger.log(Level.INFO, "Last Name = {0}", this.lastName); + logger.log(Level.INFO, "Phone = {0}", this.phone); + logger.log(Level.INFO, "Age = {0}", this.age); + logger.log(Level.INFO, "Address = {0}", this.address); + System.out.println("--------------------------------------"); + } +} diff --git a/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/src/main/resources/META-INF/persistence.xml b/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/src/main/resources/META-INF/persistence.xml new file mode 100644 index 0000000..7582bf1 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/src/main/resources/META-INF/persistence.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/src/main/webapp/WEB-INF/beans.xml b/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/src/main/webapp/WEB-INF/beans.xml new file mode 100644 index 0000000..9dfae34 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/src/main/webapp/WEB-INF/beans.xml @@ -0,0 +1,6 @@ + + + \ No newline at end of file diff --git a/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/src/main/webapp/WEB-INF/glassfish-web.xml b/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/src/main/webapp/WEB-INF/glassfish-web.xml new file mode 100644 index 0000000..673cc06 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/src/main/webapp/WEB-INF/glassfish-web.xml @@ -0,0 +1,25 @@ + + + + + + + + Keep a copy of the generated servlet class' java code. + + + diff --git a/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/src/main/webapp/WEB-INF/web.xml b/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000..fcfcd54 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,24 @@ + + + + jakarta.faces.PROJECT_STAGE + Development + + + Faces Servlet + jakarta.faces.webapp.FacesServlet + 1 + + + Faces Servlet + /faces/* + + + + 30 + + + + faces/index.xhtml + + diff --git a/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/src/main/webapp/index.xhtml b/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/src/main/webapp/index.xhtml new file mode 100644 index 0000000..ded4b45 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/src/main/webapp/index.xhtml @@ -0,0 +1,121 @@ + + + + + + + +
+ AJAX - execute=form a render=@form + + First Name + Last Name + Phone: + Age: + Address: + + + + + + + + + + + + + +
+
+ AJAX - execute=@none , render=@form + + First Name: + Last Name: + Phone: + Age: + Address: + + + + + + + + + + + + +
+
+ AJAX - execute=@this render=@form + + First Name + Last Name + Phone: + Age: + Address: + + + +
+ + + + + + + + +
+
+
+ AJAX - identifiers + + First Name + Last Name + Phone: + Age: + Address: + + + +
+ + + + + + + + +
+
+
+ AJAX - execute=@all render=@all +
+ + First Name + Last Name + Phone: + Age: + Address: + + + +
+ + + + + + + + +
+ +
+ diff --git a/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/target/Ajax3-Tags-Testing-1.war b/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/target/Ajax3-Tags-Testing-1.war new file mode 100644 index 0000000..389f4b0 Binary files /dev/null and b/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/target/Ajax3-Tags-Testing-1.war differ diff --git a/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/target/Ajax3-Tags-Testing-1/WEB-INF/beans.xml b/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/target/Ajax3-Tags-Testing-1/WEB-INF/beans.xml new file mode 100644 index 0000000..9dfae34 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/target/Ajax3-Tags-Testing-1/WEB-INF/beans.xml @@ -0,0 +1,6 @@ + + + \ No newline at end of file diff --git a/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/target/Ajax3-Tags-Testing-1/WEB-INF/classes/META-INF/persistence.xml b/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/target/Ajax3-Tags-Testing-1/WEB-INF/classes/META-INF/persistence.xml new file mode 100644 index 0000000..7582bf1 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/target/Ajax3-Tags-Testing-1/WEB-INF/classes/META-INF/persistence.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/target/Ajax3-Tags-Testing-1/WEB-INF/classes/asdv/ajax3/tags/testing/JakartaRestConfiguration.class b/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/target/Ajax3-Tags-Testing-1/WEB-INF/classes/asdv/ajax3/tags/testing/JakartaRestConfiguration.class new file mode 100644 index 0000000..2a88755 Binary files /dev/null and b/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/target/Ajax3-Tags-Testing-1/WEB-INF/classes/asdv/ajax3/tags/testing/JakartaRestConfiguration.class differ diff --git a/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/target/Ajax3-Tags-Testing-1/WEB-INF/classes/asdv/ajax3/tags/testing/resources/JakartaEE10Resource.class b/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/target/Ajax3-Tags-Testing-1/WEB-INF/classes/asdv/ajax3/tags/testing/resources/JakartaEE10Resource.class new file mode 100644 index 0000000..29e4bbe Binary files /dev/null and b/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/target/Ajax3-Tags-Testing-1/WEB-INF/classes/asdv/ajax3/tags/testing/resources/JakartaEE10Resource.class differ diff --git a/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/target/Ajax3-Tags-Testing-1/WEB-INF/classes/beans/AjaxBean.class b/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/target/Ajax3-Tags-Testing-1/WEB-INF/classes/beans/AjaxBean.class new file mode 100644 index 0000000..70671af Binary files /dev/null and b/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/target/Ajax3-Tags-Testing-1/WEB-INF/classes/beans/AjaxBean.class differ diff --git a/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/target/Ajax3-Tags-Testing-1/WEB-INF/glassfish-web.xml b/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/target/Ajax3-Tags-Testing-1/WEB-INF/glassfish-web.xml new file mode 100644 index 0000000..673cc06 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/target/Ajax3-Tags-Testing-1/WEB-INF/glassfish-web.xml @@ -0,0 +1,25 @@ + + + + + + + + Keep a copy of the generated servlet class' java code. + + + diff --git a/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/target/Ajax3-Tags-Testing-1/WEB-INF/web.xml b/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/target/Ajax3-Tags-Testing-1/WEB-INF/web.xml new file mode 100644 index 0000000..fcfcd54 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/target/Ajax3-Tags-Testing-1/WEB-INF/web.xml @@ -0,0 +1,24 @@ + + + + jakarta.faces.PROJECT_STAGE + Development + + + Faces Servlet + jakarta.faces.webapp.FacesServlet + 1 + + + Faces Servlet + /faces/* + + + + 30 + + + + faces/index.xhtml + + diff --git a/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/target/Ajax3-Tags-Testing-1/index.xhtml b/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/target/Ajax3-Tags-Testing-1/index.xhtml new file mode 100644 index 0000000..ded4b45 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/target/Ajax3-Tags-Testing-1/index.xhtml @@ -0,0 +1,121 @@ + + + + + + + +
+ AJAX - execute=form a render=@form + + First Name + Last Name + Phone: + Age: + Address: + + + + + + + + + + + + + +
+
+ AJAX - execute=@none , render=@form + + First Name: + Last Name: + Phone: + Age: + Address: + + + + + + + + + + + + +
+
+ AJAX - execute=@this render=@form + + First Name + Last Name + Phone: + Age: + Address: + + + +
+ + + + + + + + +
+
+
+ AJAX - identifiers + + First Name + Last Name + Phone: + Age: + Address: + + + +
+ + + + + + + + +
+
+
+ AJAX - execute=@all render=@all +
+ + First Name + Last Name + Phone: + Age: + Address: + + + +
+ + + + + + + + +
+ +
+ diff --git a/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/target/classes/META-INF/persistence.xml b/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/target/classes/META-INF/persistence.xml new file mode 100644 index 0000000..7582bf1 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/target/classes/META-INF/persistence.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/target/classes/asdv/ajax3/tags/testing/JakartaRestConfiguration.class b/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/target/classes/asdv/ajax3/tags/testing/JakartaRestConfiguration.class new file mode 100644 index 0000000..2a88755 Binary files /dev/null and b/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/target/classes/asdv/ajax3/tags/testing/JakartaRestConfiguration.class differ diff --git a/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/target/classes/asdv/ajax3/tags/testing/resources/JakartaEE10Resource.class b/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/target/classes/asdv/ajax3/tags/testing/resources/JakartaEE10Resource.class new file mode 100644 index 0000000..29e4bbe Binary files /dev/null and b/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/target/classes/asdv/ajax3/tags/testing/resources/JakartaEE10Resource.class differ diff --git a/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/target/classes/beans/AjaxBean.class b/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/target/classes/beans/AjaxBean.class new file mode 100644 index 0000000..70671af Binary files /dev/null and b/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/target/classes/beans/AjaxBean.class differ diff --git a/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/target/endorsed/jakarta.jakartaee-api-10.0.0.jar b/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/target/endorsed/jakarta.jakartaee-api-10.0.0.jar new file mode 100644 index 0000000..2cedb2d Binary files /dev/null and b/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/target/endorsed/jakarta.jakartaee-api-10.0.0.jar differ diff --git a/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/target/maven-archiver/pom.properties b/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/target/maven-archiver/pom.properties new file mode 100644 index 0000000..ec3b09d --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/target/maven-archiver/pom.properties @@ -0,0 +1,5 @@ +#Generated by Maven +#Tue Jan 23 12:48:16 CST 2024 +groupId=asdv +artifactId=Ajax3-Tags-Testing +version=1 diff --git a/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst new file mode 100644 index 0000000..41bd781 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst @@ -0,0 +1,3 @@ +beans/AjaxBean.class +asdv/ajax3/tags/testing/JakartaRestConfiguration.class +asdv/ajax3/tags/testing/resources/JakartaEE10Resource.class diff --git a/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst new file mode 100644 index 0000000..fcfbfeb --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax3-Tags-Testing/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst @@ -0,0 +1,3 @@ +/home/caleb/ASDV-WebDev/Semester 2/Exams/Ajax3-Tags-Testing/src/main/java/asdv/ajax3/tags/testing/JakartaRestConfiguration.java +/home/caleb/ASDV-WebDev/Semester 2/Exams/Ajax3-Tags-Testing/src/main/java/beans/AjaxBean.java +/home/caleb/ASDV-WebDev/Semester 2/Exams/Ajax3-Tags-Testing/src/main/java/asdv/ajax3/tags/testing/resources/JakartaEE10Resource.java diff --git a/Semester 3/Examples/ajax-examples/Ajax4Listener.zip b/Semester 3/Examples/ajax-examples/Ajax4Listener.zip new file mode 100644 index 0000000..7243045 Binary files /dev/null and b/Semester 3/Examples/ajax-examples/Ajax4Listener.zip differ diff --git a/Semester 3/Examples/ajax-examples/Ajax4Listener/nb-configuration.xml b/Semester 3/Examples/ajax-examples/Ajax4Listener/nb-configuration.xml new file mode 100644 index 0000000..f7b0362 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax4Listener/nb-configuration.xml @@ -0,0 +1,21 @@ + + + + + + 10-web + gfv700ee10 + Facelets + JDK_15__System_ + + diff --git a/Semester 3/Examples/ajax-examples/Ajax4Listener/pom.xml b/Semester 3/Examples/ajax-examples/Ajax4Listener/pom.xml new file mode 100644 index 0000000..0faee86 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax4Listener/pom.xml @@ -0,0 +1,77 @@ + + 4.0.0 + asdv + Ajax4Listener + 1 + war + Ajax4Listener-1 + + + 11 + 11 + ${project.build.directory}/endorsed + UTF-8 + false + 10.0.0 + + + + + jakarta.platform + jakarta.jakartaee-api + ${jakartaee} + provided + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + 11 + 11 + + ${endorsed.dir} + + + + + org.apache.maven.plugins + maven-war-plugin + 2.3 + + false + + + + org.apache.maven.plugins + maven-dependency-plugin + 2.6 + + + validate + + copy + + + ${endorsed.dir} + true + + + jakarta.platform + jakarta.jakartaee-api + ${jakartaee} + jar + + + + + + + + + \ No newline at end of file diff --git a/Semester 3/Examples/ajax-examples/Ajax4Listener/src/main/java/asdv/ajax4listener/JakartaRestConfiguration.java b/Semester 3/Examples/ajax-examples/Ajax4Listener/src/main/java/asdv/ajax4listener/JakartaRestConfiguration.java new file mode 100644 index 0000000..7b6b46d --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax4Listener/src/main/java/asdv/ajax4listener/JakartaRestConfiguration.java @@ -0,0 +1,13 @@ +package asdv.ajax4listener; + +import jakarta.ws.rs.ApplicationPath; +import jakarta.ws.rs.core.Application; + +/** + * Configures Jakarta RESTful Web Services for the application. + * @author Juneau + */ +@ApplicationPath("resources") +public class JakartaRestConfiguration extends Application { + +} diff --git a/Semester 3/Examples/ajax-examples/Ajax4Listener/src/main/java/asdv/ajax4listener/resources/JakartaEE10Resource.java b/Semester 3/Examples/ajax-examples/Ajax4Listener/src/main/java/asdv/ajax4listener/resources/JakartaEE10Resource.java new file mode 100644 index 0000000..1ee5376 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax4Listener/src/main/java/asdv/ajax4listener/resources/JakartaEE10Resource.java @@ -0,0 +1,20 @@ +package asdv.ajax4listener.resources; + +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.core.Response; + +/** + * + * @author + */ +@Path("jakartaee10") +public class JakartaEE10Resource { + + @GET + public Response ping(){ + return Response + .ok("ping Jakarta EE") + .build(); + } +} diff --git a/Semester 3/Examples/ajax-examples/Ajax4Listener/src/main/java/beans/AjaxBean.java b/Semester 3/Examples/ajax-examples/Ajax4Listener/src/main/java/beans/AjaxBean.java new file mode 100644 index 0000000..8674e7c --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax4Listener/src/main/java/beans/AjaxBean.java @@ -0,0 +1,52 @@ +package beans; + +import java.util.logging.Level; +import java.util.logging.Logger; +import jakarta.inject.Named; +import jakarta.enterprise.context.RequestScoped; +import jakarta.faces.event.AjaxBehaviorEvent; + +@Named(value = "ajaxBean") +@RequestScoped +public class AjaxBean +{ + + private static final Logger logger + = Logger.getLogger( AjaxBean.class.getName()); + private String name = "nothing"; + + public String getName() + { + return name; + } + + public void setName(String name) + { + logger.log(Level.INFO, "Name: {0}", name); + this.name = name; + } + public void upperCaseNameAction() + { + logger.log(Level.INFO, "AJAX action "); + name = name.toUpperCase(); + logger.log(Level.INFO, "Name: {0}", name); + } + public void upperCaseName() + { + logger.log(Level.INFO, "AJAX listener " + + "without AjaxBehaviorEvent or AJAX action"); + name = name.toUpperCase(); + logger.log(Level.INFO, "Name: {0}", name); + } + + public void upperCaseNameABE(AjaxBehaviorEvent event) + { + logger.log(Level.INFO, + "AJAX listener with AjaxBehaviorEvent"); + name = name.toUpperCase(); + logger.log(Level.INFO, "Name: {0}", name); + String[] params = {name, event.getComponent().getId()}; + logger.log(Level.SEVERE, "Params: {0} {1}", params); + } + +} diff --git a/Semester 3/Examples/ajax-examples/Ajax4Listener/src/main/resources/META-INF/persistence.xml b/Semester 3/Examples/ajax-examples/Ajax4Listener/src/main/resources/META-INF/persistence.xml new file mode 100644 index 0000000..7582bf1 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax4Listener/src/main/resources/META-INF/persistence.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Semester 3/Examples/ajax-examples/Ajax4Listener/src/main/webapp/WEB-INF/beans.xml b/Semester 3/Examples/ajax-examples/Ajax4Listener/src/main/webapp/WEB-INF/beans.xml new file mode 100644 index 0000000..9dfae34 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax4Listener/src/main/webapp/WEB-INF/beans.xml @@ -0,0 +1,6 @@ + + + \ No newline at end of file diff --git a/Semester 3/Examples/ajax-examples/Ajax4Listener/src/main/webapp/WEB-INF/glassfish-web.xml b/Semester 3/Examples/ajax-examples/Ajax4Listener/src/main/webapp/WEB-INF/glassfish-web.xml new file mode 100644 index 0000000..584a477 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax4Listener/src/main/webapp/WEB-INF/glassfish-web.xml @@ -0,0 +1,25 @@ + + + + + + + + Keep a copy of the generated servlet class' java code. + + + diff --git a/Semester 3/Examples/ajax-examples/Ajax4Listener/src/main/webapp/WEB-INF/web.xml b/Semester 3/Examples/ajax-examples/Ajax4Listener/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000..fcfcd54 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax4Listener/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,24 @@ + + + + jakarta.faces.PROJECT_STAGE + Development + + + Faces Servlet + jakarta.faces.webapp.FacesServlet + 1 + + + Faces Servlet + /faces/* + + + + 30 + + + + faces/index.xhtml + + diff --git a/Semester 3/Examples/ajax-examples/Ajax4Listener/src/main/webapp/index.xhtml b/Semester 3/Examples/ajax-examples/Ajax4Listener/src/main/webapp/index.xhtml new file mode 100644 index 0000000..5ebea70 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax4Listener/src/main/webapp/index.xhtml @@ -0,0 +1,42 @@ + + + + + Facelet Title + + +
+ AJAX - using h:commandButton action attribute + + + + + + + +
+
+ AJAX - listener (without AjaxBehaviorEvent) + + + + + + + +
+
+ AJAX - listener (with AjaxBehaviorEvent) + + + + + + +

+
+ diff --git a/Semester 3/Examples/ajax-examples/Ajax4Listener/target/Ajax4Listener-1.war b/Semester 3/Examples/ajax-examples/Ajax4Listener/target/Ajax4Listener-1.war new file mode 100644 index 0000000..859d3a5 Binary files /dev/null and b/Semester 3/Examples/ajax-examples/Ajax4Listener/target/Ajax4Listener-1.war differ diff --git a/Semester 3/Examples/ajax-examples/Ajax4Listener/target/Ajax4Listener-1/WEB-INF/beans.xml b/Semester 3/Examples/ajax-examples/Ajax4Listener/target/Ajax4Listener-1/WEB-INF/beans.xml new file mode 100644 index 0000000..9dfae34 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax4Listener/target/Ajax4Listener-1/WEB-INF/beans.xml @@ -0,0 +1,6 @@ + + + \ No newline at end of file diff --git a/Semester 3/Examples/ajax-examples/Ajax4Listener/target/Ajax4Listener-1/WEB-INF/classes/META-INF/persistence.xml b/Semester 3/Examples/ajax-examples/Ajax4Listener/target/Ajax4Listener-1/WEB-INF/classes/META-INF/persistence.xml new file mode 100644 index 0000000..7582bf1 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax4Listener/target/Ajax4Listener-1/WEB-INF/classes/META-INF/persistence.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Semester 3/Examples/ajax-examples/Ajax4Listener/target/Ajax4Listener-1/WEB-INF/classes/asdv/ajax4listener/JakartaRestConfiguration.class b/Semester 3/Examples/ajax-examples/Ajax4Listener/target/Ajax4Listener-1/WEB-INF/classes/asdv/ajax4listener/JakartaRestConfiguration.class new file mode 100644 index 0000000..9c43de8 Binary files /dev/null and b/Semester 3/Examples/ajax-examples/Ajax4Listener/target/Ajax4Listener-1/WEB-INF/classes/asdv/ajax4listener/JakartaRestConfiguration.class differ diff --git a/Semester 3/Examples/ajax-examples/Ajax4Listener/target/Ajax4Listener-1/WEB-INF/classes/asdv/ajax4listener/resources/JakartaEE10Resource.class b/Semester 3/Examples/ajax-examples/Ajax4Listener/target/Ajax4Listener-1/WEB-INF/classes/asdv/ajax4listener/resources/JakartaEE10Resource.class new file mode 100644 index 0000000..ae066ed Binary files /dev/null and b/Semester 3/Examples/ajax-examples/Ajax4Listener/target/Ajax4Listener-1/WEB-INF/classes/asdv/ajax4listener/resources/JakartaEE10Resource.class differ diff --git a/Semester 3/Examples/ajax-examples/Ajax4Listener/target/Ajax4Listener-1/WEB-INF/classes/beans/AjaxBean.class b/Semester 3/Examples/ajax-examples/Ajax4Listener/target/Ajax4Listener-1/WEB-INF/classes/beans/AjaxBean.class new file mode 100644 index 0000000..d0d6482 Binary files /dev/null and b/Semester 3/Examples/ajax-examples/Ajax4Listener/target/Ajax4Listener-1/WEB-INF/classes/beans/AjaxBean.class differ diff --git a/Semester 3/Examples/ajax-examples/Ajax4Listener/target/Ajax4Listener-1/WEB-INF/glassfish-web.xml b/Semester 3/Examples/ajax-examples/Ajax4Listener/target/Ajax4Listener-1/WEB-INF/glassfish-web.xml new file mode 100644 index 0000000..584a477 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax4Listener/target/Ajax4Listener-1/WEB-INF/glassfish-web.xml @@ -0,0 +1,25 @@ + + + + + + + + Keep a copy of the generated servlet class' java code. + + + diff --git a/Semester 3/Examples/ajax-examples/Ajax4Listener/target/Ajax4Listener-1/WEB-INF/web.xml b/Semester 3/Examples/ajax-examples/Ajax4Listener/target/Ajax4Listener-1/WEB-INF/web.xml new file mode 100644 index 0000000..fcfcd54 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax4Listener/target/Ajax4Listener-1/WEB-INF/web.xml @@ -0,0 +1,24 @@ + + + + jakarta.faces.PROJECT_STAGE + Development + + + Faces Servlet + jakarta.faces.webapp.FacesServlet + 1 + + + Faces Servlet + /faces/* + + + + 30 + + + + faces/index.xhtml + + diff --git a/Semester 3/Examples/ajax-examples/Ajax4Listener/target/Ajax4Listener-1/index.xhtml b/Semester 3/Examples/ajax-examples/Ajax4Listener/target/Ajax4Listener-1/index.xhtml new file mode 100644 index 0000000..5ebea70 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax4Listener/target/Ajax4Listener-1/index.xhtml @@ -0,0 +1,42 @@ + + + + + Facelet Title + + +
+ AJAX - using h:commandButton action attribute + + + + + + + +
+
+ AJAX - listener (without AjaxBehaviorEvent) + + + + + + + +
+
+ AJAX - listener (with AjaxBehaviorEvent) + + + + + + +

+
+ diff --git a/Semester 3/Examples/ajax-examples/Ajax4Listener/target/classes/META-INF/persistence.xml b/Semester 3/Examples/ajax-examples/Ajax4Listener/target/classes/META-INF/persistence.xml new file mode 100644 index 0000000..7582bf1 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax4Listener/target/classes/META-INF/persistence.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Semester 3/Examples/ajax-examples/Ajax4Listener/target/classes/asdv/ajax4listener/JakartaRestConfiguration.class b/Semester 3/Examples/ajax-examples/Ajax4Listener/target/classes/asdv/ajax4listener/JakartaRestConfiguration.class new file mode 100644 index 0000000..9c43de8 Binary files /dev/null and b/Semester 3/Examples/ajax-examples/Ajax4Listener/target/classes/asdv/ajax4listener/JakartaRestConfiguration.class differ diff --git a/Semester 3/Examples/ajax-examples/Ajax4Listener/target/classes/asdv/ajax4listener/resources/JakartaEE10Resource.class b/Semester 3/Examples/ajax-examples/Ajax4Listener/target/classes/asdv/ajax4listener/resources/JakartaEE10Resource.class new file mode 100644 index 0000000..ae066ed Binary files /dev/null and b/Semester 3/Examples/ajax-examples/Ajax4Listener/target/classes/asdv/ajax4listener/resources/JakartaEE10Resource.class differ diff --git a/Semester 3/Examples/ajax-examples/Ajax4Listener/target/classes/beans/AjaxBean.class b/Semester 3/Examples/ajax-examples/Ajax4Listener/target/classes/beans/AjaxBean.class new file mode 100644 index 0000000..d0d6482 Binary files /dev/null and b/Semester 3/Examples/ajax-examples/Ajax4Listener/target/classes/beans/AjaxBean.class differ diff --git a/Semester 3/Examples/ajax-examples/Ajax4Listener/target/endorsed/jakarta.jakartaee-api-10.0.0.jar b/Semester 3/Examples/ajax-examples/Ajax4Listener/target/endorsed/jakarta.jakartaee-api-10.0.0.jar new file mode 100644 index 0000000..2cedb2d Binary files /dev/null and b/Semester 3/Examples/ajax-examples/Ajax4Listener/target/endorsed/jakarta.jakartaee-api-10.0.0.jar differ diff --git a/Semester 3/Examples/ajax-examples/Ajax4Listener/target/maven-archiver/pom.properties b/Semester 3/Examples/ajax-examples/Ajax4Listener/target/maven-archiver/pom.properties new file mode 100644 index 0000000..d044b09 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax4Listener/target/maven-archiver/pom.properties @@ -0,0 +1,5 @@ +#Generated by Maven +#Tue Jan 23 13:12:55 CST 2024 +groupId=asdv +artifactId=Ajax4Listener +version=1 diff --git a/Semester 3/Examples/ajax-examples/Ajax4Listener/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/Semester 3/Examples/ajax-examples/Ajax4Listener/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst new file mode 100644 index 0000000..783db58 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax4Listener/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst @@ -0,0 +1,3 @@ +beans/AjaxBean.class +asdv/ajax4listener/resources/JakartaEE10Resource.class +asdv/ajax4listener/JakartaRestConfiguration.class diff --git a/Semester 3/Examples/ajax-examples/Ajax4Listener/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/Semester 3/Examples/ajax-examples/Ajax4Listener/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst new file mode 100644 index 0000000..494c179 --- /dev/null +++ b/Semester 3/Examples/ajax-examples/Ajax4Listener/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst @@ -0,0 +1,3 @@ +/home/caleb/ASDV-WebDev/Semester 2/Exams/Ajax4Listener/src/main/java/beans/AjaxBean.java +/home/caleb/ASDV-WebDev/Semester 2/Exams/Ajax4Listener/src/main/java/asdv/ajax4listener/resources/JakartaEE10Resource.java +/home/caleb/ASDV-WebDev/Semester 2/Exams/Ajax4Listener/src/main/java/asdv/ajax4listener/JakartaRestConfiguration.java