Home Answers Viewqa Java-Beginners Still getting the http 404 error

 
 


Karen
Still getting the http 404 error
2 Answer(s)      2 years and 10 months ago
Posted in : Java Beginners

Dear experts,

I refer to the last solution given to me.

A few clarification:-

1. I must stress that the login is part of my index page where I have other things in that page. So, please advise if it is ok to put a login at the right hand column of that page.

2. String query = "SELECT count( * ) FROM user_details WHERE username = ? AND password = ?";

Can I know why you have put username whereby my name in the form is userid?

Anyway, whatever I do, I still receive the http 404 error...saying that login page cannot be found.

Hope that you can advise me what to do...for I'm really buffled and very lost...:-(
View Answers

August 7, 2010 at 11:44 AM


Hi Friend,

The server couldn't find the servlet. There is a problem in path. It is better to put the servlet in the classes folder of your web application folder and do the servlet mapping.Put the jsp code in the webapplication_folder and call the servlet from the following code:

<ul class="list-one">
<li><div id="fig2_8">
<h4>Login</h4>
<form action="./login" method="POST">
<p style="padding-right:15px">ID: <input type="text" name="userid"/></p>
<br/>
<p>Password:<input type="password" name="password" size="15"/></p>
<br/>
</div>
<p><input type="submit" value="Submit" name="submit" />
<input type="reset" value="Reset" name="reset" /></p>
</form>
</ul>

servlet-mapping:

<servlet>
<servlet-name>login</servlet-name>
<servlet-class>login</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>login</servlet-name>
<url-pattern>/login</url-pattern>
</servlet-mapping>

Thanks

August 9, 2010 at 9:24 PM


Dear experts,

It is working fine now.

You guys are simply the Best !

Thank you.


rgds,
Karen









Related Pages:
Still getting the http 404 error - Java Beginners
Still getting the http 404 error  Dear experts, I refer to the last solution given to me. A few clarification:- 1. I must stress... is userid? Anyway, whatever I do, I still receive the http 404 error...saying
defined actions in struts config still getting a HTTP 404 - Struts
defined actions in struts config still getting a HTTP 404  Hi guys, I am getting an Invalid Path requested error. Heres the code snippet from... I get this error HTTP Status 404 - Invalid path /pages/tiles/AddNewCurrency
http 404 resource not found error
http 404 resource not found error   Sir, I have downloaded your... in tomcat manager. But when I try to run I am getting http 404 requested resource not found error. Kindly advise. ss
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
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
Getting 404 errors - Java Beginners
Getting 404 errors  Dear experts, I have embedded a login page...(); }} catch (Exception e) { System.out.println("Error" + e.getMessage... I received a 404 errors and I identified that the servlet doesn't appear
HTTP Status 404 - Struts
HTTP Status 404   Hello, i am making a program of tiles using Struts2. i face error HTTP Status 404 May 4, 2010 11:31:59 AM... error SEVERE: Dispatcher initialization failed Unable to load configuration
Struts 2 : Http Status Error 404 - Struts
Struts 2 : Http Status Error 404  Hi All, I'm facing the below...: --------------------------------------------------------------------------HTTP Status 404... --------------------------------------------------------------------------- ERROR(404) : "The requested
java http 404 status error - JSP-Servlet
java http 404 status error  I have tried to call a servlet from html page.. but it is showing http 404 status error.. and the description... the following link: http://www.roseindia.net/servlets/index.shtml Thanks
HTTP Status 404 - JSP-Servlet
,Suddenly i found my server throwing the following Error: HTTP Status 404...HTTP Status 404  Respected Sir/madam, I am R.Ragavendran.. I... are in the same directory.. Also it was very very sudden error i found.. Before
HTTP Status 404 - /Login/userdetail.java
HTTP Status 404 - /Login/userdetail.java  I using netbeans to coonect.. why always error.. help pls.. thx index.jsp <%@page contentType...;head> <meta http-equiv="Content-Type" content="text/html; charset
loginform giving 404 error
the submit button the give error is populated. HTTP Status 404 - /login.do type...loginform giving 404 error  Hi, I am developing a login form code from roseindia.net. i will develop all the formbean class, action class, login.jsp
HTTP Status 404 - /user/AddToCart.do - Struts
HTTP Status 404 user AddToCart   Hi, I download the JSP source code to run the online shopping cart. Whenever I try to add a Item to cart, it shows me the error page with HTTP Status 404 - /user/AddToCart.do What
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
HTTP Status 404 - /web/login/showLogin.action Error in Struts 2 - Struts
HTTP Status 404 - /web/login/showLogin.action Error in Struts 2  Hi Everyone I am using the following version for my project: Tomcat 6.0.16... the doLogin action . when I click on the link I get the following error type Status
Also HTTP Status 404 - /Login/userdetail.java
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
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
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
404 error
404 error  struts application having 404 error while hosting to a online server.it works fine in my local machine but dont work in virtual host.showing 404 error
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
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
Itried all possible ways still getting thesame error
Itried all possible ways still getting thesame error  java.sql.SQLException: Io exception: Got minus one from a read call at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112
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
Getting an error :(
Getting an error :(  I implemented the same code as above.. But getting this error in console... Console Oct 5, 2012 10:18:14 AM...) at org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:404
still error
still error   st=con.createStatement(); int a=Integer.parseInt(txttrno.getText()); String b=txttname.getText(); String c=txtfrom.getText(); String d=txtto.getText
still error
still error  st=con.createStatement(); int a=Integer.parseInt(txttrno.getText()); String b=txttname.getText(); String c=txtfrom.getText(); String d=txtto.getText
still error
still error  public NewJFrame() { initComponents(); try { Class.forName("java.sql.Driver"); con... second button which i,ve added in ma frame.... plzz smone help me to remove error
still error
still error  public NewJFrame() { initComponents(); try { Class.forName("java.sql.Driver"); con=DriverManager.getConnection("jdbc:mysql://localhost:3306/test","root","admin"); } catch(Exception e
-[UIPopoverController dealloc] reached while popover is still visible.
-[UIPopoverController dealloc] reached while popover is still visible.  Hi, I am getting following error in my application: -[UIPopoverController dealloc] reached while popover is still visible. How to solver this? Thanks
custom 404 error page php - PHP
custom 404 error page php  What is this error means: custom 404 error page php
problem getting servlet:xmlHTTP.status=404 - Ajax
problem getting servlet:xmlHTTP.status=404   hi, ihave a text field in which i type some words and get related response from db via XMLHTTP request... of the servlet, it gets it and teh xmlHTTP.status =404 condition becomes false.im using
error http status-500 invalid path was requested
error http status-500 invalid path was requested  I am using... Foundation//DTD Struts Configuration 1.3//EN" "http... for all module. In this later case, it is still needed to declare one plugin
error http status-500 invalid path was requested
error http status-500 invalid path was requested  I am using... Foundation//DTD Struts Configuration 1.3//EN" "http... for all module. In this later case, it is still needed to declare one plugin
error http status-500 invalid path was requested
error http status-500 invalid path was requested  I am using... Foundation//DTD Struts Configuration 1.3//EN" "http... for all module. In this later case, it is still needed to declare one plugin
error http status-500 invalid path was requested
error http status-500 invalid path was requested  I am using... Struts Configuration 1.3//EN" "http://jakarta.apache.org/struts/dtds.... In this later case, it is still needed to declare one plugin per module
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
error "HTTP Status 500"
error "HTTP Status 500"  How to solve this error "HTTP Status 500
Getting connect error in Jmeter - Development process
Getting connect error in Jmeter  Hi, Am trying to run a simple application in Jakarta Jmeter using HTTP request sampler. I am getting the below error. Please help me in viewing the results. Pl specify if there is any possible
getting error while inserting values in database
getting error while inserting values in database  AddUser.java..."); if (envContext == null)throw new Exception("Error: No Context"); if (ds == null) throw new Exception("Error: No DataSource
error in servlet
error in servlet  while excuting the servlet program, it produce the error as "HTTP 404 not found". i couldnt rectify that error. can you help me... is not getting the path properly. Put your servlet in classes folder. Do servlet
404 status received in xmlhttp.status - Ajax
404 status received in xmlhttp.status  Hi! I tried out the code I found here using the AJAX login page. However, instead of using PHP for the server... is that I am getting the status 404, instead of 200. thus, I am unable
Still have the same problem--First Example of Struts2 - Struts
Still have the same problem--First Example of Struts2  Hi I tried the example in the link. But still I am getting the same problem like as I... and full source code. For more information on struts visit to : http
Getting Error - Development process
Getting Error   Hi , i am getting error while executing this code. I just want to store date in to database. Dont mistake me for repeated questions. java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Number
Getting error java.lang.ClassNotFoundException: com.mysql.jdbc.Driver.
Getting error java.lang.ClassNotFoundException: com.mysql.jdbc.Driver.  I am doing project in JSP with database WampServer and glassfish as server .when i done database connection then i get an error
getting db in action class
getting db in action class  hi, Am usin struts in ma application...) but it gives me an error.. java.lang.NoSuchMethodError: LoginAction.getDataSource(Ljavax/servlet/http/HttpServletRequest;)Ljavax/sql/DataSource; LoginAction.execute
Error in using jstl tags
. tag statement in jsp page <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> but still i'm getting the error "CANNOT FIND THE TAG LIBRARY...Error in using jstl tags  I'm trying to use jstl tags in jsp.i've
error for getting the data from an api using br.readLine - Development process
error for getting the data from an api using br.readLine  hi the application is hanging while reading the data using readLine() function . actually...]=usercountry;user[mobile_phone]=userphone http://staging-orion.sabsebolo.com
error
error  i have 404 error in my program plz tell me yhe solution about
error
error  i have 404 error in my program plz tell me yhe solution about

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.