while trying to run servlet encountering this error
Type Status Report
Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
Apache Tomcat/9.0.37 here is my .java
import java.sql.*;
class BatchUpdations
{
public static void main(String args[])
{
try
{
Class.forName("com.mysql.cj.jdbc.Driver");
Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/stud","root","root");
Statement st=con.createStatement();
st.addBatch("insert into student1 values(190,'sfd')");
st.addBatch("insert into student1 values(193,'sasdf')");
st.addBatch("insert into student1 values(590,'sadf')");
st.addBatch("insert into student1 values(390,'adfd')");
st.executeBatch();
System.out.println("Records inserted");
st.close();
con.close();
}
catch(Exception e)
{
e.printStackTrace();
}
}
}
and web.xml
<servlet>
<servlet-name>BatchUpdations</servlet-name>
<servlet-class>BatchUpdations</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>BatchUpdations</servlet-name>
<url-pattern>/BatchUpdations</url-pattern>
</servlet-mapping>
<servlet>