Skip to main content

Posts

Showing posts from June, 2024

Connection_Demo

 Java Servlet Database Connectivity import jakarta.servlet.ServletException; import jakarta.servlet.http.HttpServlet; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.PrintWriter; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; /** * Servlet implementation class Connection_Demo */ public class Connection_Demo extends HttpServlet { private static final long serialVersionUID = 1L; protected void doGet(HttpServletRequest request , HttpServletResponse response ) throws ServletException, IOException { final String JDBC_DRIVER = "com.mysql.jdbc.Driver" ; final String DB_URL = "jdbc:mysql://localhost:3306/demo" ; // Database credentials final String USER = "root" ; final String PASS = "Rajesh@2023" ; ...

JAVA_Full_Stack

  Steps to Ensure Compatibility and Optimal Setup: Download and Install Eclipse : Go to the Eclipse Downloads page and select the "Eclipse IDE for Enterprise Java and Web Developers" package. https://www.eclipse.org/downloads/packages/release/2023-12/r   Download and Install JDK 17 : Obtain JDK 17 from the Oracle JDK Downloads or the OpenJDK 17 page. Follow the installation instructions specific to your operating system. Download and Install Apache Tomcat 10.1 : Download Tomcat 10.1 from the Apache Tomcat Downloads page. Extract the files to a convenient directory. Configure Eclipse to Use JDK 17 : Open Eclipse and navigate to Window > Preferences > Java > Installed JREs . Click Add , select Standard VM , and point it to the JDK 17 installation directory. Set JDK 17 as the default JRE. Configure Tomcat in Eclipse : Open Eclipse and go to Window > Preferences > Server > Runtime Environments . Click Add , select Apache Tomcat v10.0 , and point it to the di...