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



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

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


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

 

 

DMCA.com