Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



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

Have Programming Question? Ask it here!
 
 
 


Karen
Still getting the http 404 error
2 Answer(s)      3 years and 11 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...:-(

Advertisement
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 Tutorials/Questions & Answers:
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
Advertisements
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 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
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
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 -
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
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
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
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
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
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   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=DriverManager.getConnection("jdbc:mysql://localhost:3306/test","root","admin"); } catch(Exception e
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 - /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
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 - /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
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
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
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
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
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
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
error "HTTP Status 500"
error "HTTP Status 500"  How to solve this error "HTTP Status 500
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
How do I throw a 404 error from within a java servlet?
How do I throw a 404 error from within a java servlet?  How you can write code in Servlet for throwing the httpd error 404? How to add...-code>404</error-code> <location>/WEB-INF/views/notfound.jsp<
how to ignore http 500 error?
how to ignore http 500 error?  In XML data parsing while connecting to many server through URL if one does not connect gives the error. Is there any process to ignore that URL connection and get data from other connection which
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
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
getting an error when set classpath
getting an error when set classpath  Hello Everyone! i have used hssf model for reading excel sheet in my project & i have set classpath... run it, it gives an error "could not find or load main" please help me
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
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 in your login form code
getting error in your login form code  i tried your code for login form but i am getting an error.the error is undefined index userid and password.the code is $fuser=$POST["userid"];. how to solve this problem please help me
data type used to store name.(getting an error)
data type used to store name.(getting an error)    Statement stm=con.createStatement(); String query="select * from employee where ename... getting an error like dis: "ename cannot be resolved to a variable" whats
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
why i'm getting this error?The import javax.servlet.http cannot be resolved
why i'm getting this error?The import javax.servlet.http cannot... getting this error, why i'm getting this error and how to solve this error., Have... for this is following link : ** http://tech.amikelive.com/node-269/eclipse
Im getting this error while running JPA project
Im getting this error while running JPA project  Exception in thread "main" javax.persistence.PersistenceException: [PersistenceUnit: examplePersistenceUnit] Unable to configure EntityManagerFactory
Getting File path error - JSP-Servlet
Getting File path error  I have a requirement where i need to get certain properties on application login page start itself. I an currently using String str = request.getRealPath("/")+"a" + System.getProperty( "file.separator
 

 

 

DMCA.com