Also HTTP Status 404 - /Login/userdetail.java

Ads
 

Also HTTP Status 404 - /Login/userdetail.java

same can't to run.. error also please help..

index.jsp

<%@page pageEncoding="UTF-8"%>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <form name="f1" action="userdetail.java" method="post">
            Username:<input type="text" name="uname">
            Password:<input type="text" name="upass">
                     <input type="submit" value="Send">
            </form>
    </body>
</html>

userdetail.java

(server I'm using wamp server to connect. add library - MySQL JDBC Driver-mysql-connector-java-5.1.13-bin.jar - apache tomcat

In the services, in NetBeans IDE already at server -jdbc:mysql://localhost:3306/userdetail[root on Default schema

 
import java.io.*; 
import java.net.*; 
import javax.servlet.*; 
import javax.servlet.http.*; 
import java.sql.*;

@WebServlet(name = "userdetail", urlPatterns = {"/userdetail"}) public class userdetail extends HttpServlet {

 public class LoginServlet extends HttpServlet{
      public void doPost(HttpServletRequest request,
      HttpServletResponse response)
      throws ServletException, IOException {
      response.setContentType("text/html");
      PrintWriter out = response.getWriter();
      String user=request.getParameter("uname");
      String pass=request.getParameter("upass");

   try {

   Class.forName("com.mysql.jdbc.Driver").newInstance();
            Connection myConn=DriverManager.getConnection("jdbc.mysql://localhost:3306/Login","root","root");
            Statement myStmt=myConn.createStatement();
            String query="select * from user where username='"+user+"' and password='"+pass+"'";
            ResultSet myRs=myStmt.executeQuery(query);

          if(myRs.next());
        {
            out.println("Welcome "+user);
        }

        }
    catch(Exception e)
    {
        System.out.println("Exception"+e);
    }


  }
}

*please help.. Thx alot

View Answers

July 24, 2012 at 11:16 AM

Post your error that comes while running the application.

Ads









Related Tutorials/Questions & Answers:
HTTP Status 404 -
HTTP Status 404 -   HTTP Status 404 - type Status report message description The requested resource () is not available. Apache Tomcat/5.5.31 how to rectify the above error
error of HTTP Status 404 while running servlet on apache tomcat server
error of HTTP Status 404 while running servlet on apache tomcat server ... here, the browser responds "HTTP Status 404 - /java_mail/hello" wht could... and have set classpath properly. on typing "http://localhost:8080" i do get
Advertisements
my server is giving me erro HTTP Status 404 - /SimpleServelet/ wen i try to run the srvelet
my server is giving me erro HTTP Status 404 - /SimpleServelet/ wen i try to run the srvelet  my server is giving me erro HTTP Status 404 - /SimpleServelet/ wen i try to run the srvelet. can some one help me. thx. moses
my server is giving me erro HTTP Status 404 - /SimpleServelet/ wen i try to run the srvelet
my server is giving me erro HTTP Status 404 - /SimpleServelet/ wen i try to run the srvelet  my server is giving me erro HTTP Status 404 - /SimpleServelet/ wen i try to run the srvelet. can some one help me. thx. moses
my server is giving me erro HTTP Status 404 - /SimpleServelet/ wen i try to run the srvelet
my server is giving me erro HTTP Status 404 - /SimpleServelet/ wen i try to run the srvelet  my server is giving me erro HTTP Status 404 - /SimpleServelet/ wen i try to run the srvelet. can some one help me. thx. moses
my server is giving me erro HTTP Status 404 - /SimpleServelet/ wen i try to run the srvelet
my server is giving me erro HTTP Status 404 - /SimpleServelet/ wen i try to run the srvelet  my server is giving me erro HTTP Status 404 - /SimpleServelet/ wen i try to run the srvelet. can some one help me. thx. moses
HTTP Status 500 -
HTTP Status 500 -   Hi, I am new to jsp... Installed Tomcat 5.5.... wrote. i can see these errors... HTTP Status 500 - type Exception report...\lib.*; 3)Also put the servlet api.jar file inside the lib folder. 4)Now create
ModuleNotFoundError: No module named 'http-status'
ModuleNotFoundError: No module named 'http-status'  Hi, My Python... 'http-status' How to remove the ModuleNotFoundError: No module named 'http-status' error? Thanks   Hi, In your python environment
ModuleNotFoundError: No module named 'http-status'
ModuleNotFoundError: No module named 'http-status'  Hi, My Python... 'http-status' How to remove the ModuleNotFoundError: No module named 'http-status' error? Thanks   Hi, In your python environment
HTTP Status 500 -
HTTP Status 500 -   I've installed my Java libraries, and I am successfully able to compile and run Jave files from the command line. However, when I.... TTP Status 500 - type Exception report message description The server
Error : http status 500?
Error : http status 500?  hello sir, am using netbeans6.7.1 version i implemented one program i.e web application ..when am excuting this one i got one error http status 500...please solve this error ..when did i mistakn
Getting HTTP 404 error in Spring web MVC with Hibernate Integration
Getting HTTP 404 error in Spring web MVC with Hibernate Integration   Hi, i am Getting HTTP 404 error in Spring web MVC with Hibernate Integration...;Please visit the following links: http://www.roseindia.net/struts/hibernate-spring
ModuleNotFoundError: No module named 'django-http-status'
ModuleNotFoundError: No module named 'django-http-status'  Hi, My... named 'django-http-status' How to remove the ModuleNotFoundError: No module named 'django-http-status' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'http-status-code'
ModuleNotFoundError: No module named 'http-status-code'  Hi, My... named 'http-status-code' How to remove the ModuleNotFoundError: No module named 'http-status-code' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'http-status-code'
ModuleNotFoundError: No module named 'http-status-code'  Hi, My... named 'http-status-code' How to remove the ModuleNotFoundError: No module named 'http-status-code' error? Thanks   Hi, In your
Error 404 on localhost:8080 Tomcat Apache 6.0.32 with Elipse IDE and IE/Other Browsers
Error 404 on localhost:8080 Tomcat Apache 6.0.32 with Elipse IDE and IE/Other Browsers  HTTP Status 404 - type Status message description... the following: http://localhost:8080 - 404 not found http://localhost:8005 - cannot
404 error
404 error  i have 404 error in my addition programe of servlet how should i solve this. i'm using netbean on glassfish server
404 error
404 error  i have 404 error in my addition programe of servlet how should i solve this. i'm using netbean on glassfish server
http status 500 error in tomcat 6 while using eclipse helios
http status 500 error in tomcat 6 while using eclipse helios  ...(ServletConfig sc){ System.out.println("init() login servlet... IOException,ServletException{ System.out.println("service() login servlet
http status 500 error in tomcat 6 while using eclipse helios
http status 500 error in tomcat 6 while using eclipse helios  ...(ServletConfig sc){ System.out.println("init() login servlet... IOException,ServletException{ System.out.println("service() login servlet
http status 500 error in tomcat 6 while using eclipse helios
http status 500 error in tomcat 6 while using eclipse helios  ...(ServletConfig sc){ System.out.println("init() login servlet... IOException,ServletException{ System.out.println("service() login servlet
http status 500 error in tomcat 6 while using eclipse helios
http status 500 error in tomcat 6 while using eclipse helios  ...(ServletConfig sc){ System.out.println("init() login servlet... IOException,ServletException{ System.out.println("service() login servlet
http status 500 error in tomcat 6 while using eclipse helios
http status 500 error in tomcat 6 while using eclipse helios  ...(ServletConfig sc){ System.out.println("init() login servlet... IOException,ServletException{ System.out.println("service() login servlet
404 error
404 error   hello anybody help me when i deployed my ear file into jboss->server-> default->deploy folder it doesn't shows any error. but when i run this application by using localhost:8080/webapp ,it shows 404 error
loacation of errorpage in web.xml for 404 error
loacation of errorpage in web.xml for 404 error   The webpage cannot be found HTTP 404 Most likely causes: ‚?ĘThere might be a typing error... to and look for the information you want. More information This error (HTTP 404
ubuntu disco Release 404 Not Found
http://in.archive.ubuntu.com/ubuntu disco Release 404 Not Found [IP: 43.255.166.254 80] Err:5 http://in.archive.ubuntu.com/ubuntu disco-updates Release 404...-backports Release 404 Not Found [IP: 43.255.166.254 80] Ign:7 http
htpp 404 error "Servlet as is not available"
htpp 404 error "Servlet as is not available"  hi iam new to struts. when iam running my struts app after filling the login form iam getting "Servlet as is not available". iam unable to find out where the error is.iam pasting my
htpp 404 error "Servlet as is not available"
htpp 404 error "Servlet as is not available"  hi iam new to struts. when iam running my struts app after filling the login form iam getting "Servlet as is not available". iam unable to find out where the error is.iam pasting my
server status
server status   How to check the apache server status in unix machine
Main memory is also known as
Main memory is also known as   Main memory of a computer is also known
ModuleNotFoundError: No module named 'also'
ModuleNotFoundError: No module named 'also'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'also' How to remove the ModuleNotFoundError: No module named 'also' error

Ads