Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
  • Piet Souris
  • Himai Minh

404 file not found error

Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i'm using Myeclipse 5.5.1 GA
i have created a login application
and i hav written a seperate servlet file too
after clicking in submit button its showing file not found
its is not finding class file of servlet
please do reply


Here is jsp

<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<base href="<%=basePath%>">

<title>Veeresh Gutti</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<link rel="stylesheet" type="text/css" href="styles.css">


<body bgcolor="#FFFFCC"><div><blockquote><blockquote><blockquote><font size="6" color="#339966">                                        <font color="#ffff00"> </font><font color="#339966"> </font><font color="#339966"><font face="Engravers MT">BDA</font> </font></font><font color="#ffff00"><br></font><div align="left"><font color="#339966">                                        <u><font face="Engravers MT"><strong><font size="3">Bangalore Development Authority</font></strong></font></u></font></div></blockquote></blockquote></blockquote></div><div align="center"><div align="left">
</div><div style="color:#00FF00"><div align="left">
</div><div align="left">
</div><h3 align="center"><img alt="" src="banner2.jpg" width="936" height="218"></h3>

<table width="100%" height="150px" bgcolor="#339999" border= "1">
<tr><td width="50%" height="100"><font size="5" color="#99CCCC"><u><strong><font face="Arial Narrow" color="#ffff00"> WelCome To BDA</font></strong><br></u></font><br><br><p>   
<font color="#ffff00">The work has been entrusted to M/s. U.P. State Bridge Corpn. Ltd.
at a contract cost of Rs. 2669.43 lakhs with the scheduled date of
completion as 30.04.2004. The main flyover is along IRR- Indiranagar 80 ft.
road with a 2-lane divided carriageway. Also 3 loops for providing free
tuning movements from Airport road to Indiranagar 80 ft. road, IRR to
Airport road and Airport road to IRR are provided. Also, 2 grade level bridges
</p> <div align="right"><font color="#0000ff"><a href="MyJsp.jsp"> Read more...</a></font></div></td>
<td bgcolor="#339999" width="35%"><font color="#ffff" size=5><font face="Arial Rounded MT Bold">
<u>Member Login</u> </font><br><br></font>                   
<form action="Authentication" method="post"><div align="left"><font color="#ffff">                   
User Name : <input type="text" name="user"> <br></div><br>                   
Password   :  <input type="Password" name="pass"> <br>  <br>

<center><input type= "submit" value="Login" size="15">        
<input type= "reset" value="reset"></center>


and servlet

import java.util.*;
import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;

public class Authentication extends HttpServlet{

private static final long serialVersionUID = 1L;
private ServletConfig config;

public void init(ServletConfig config)
throws ServletException{
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException,IOException{

PrintWriter out = response.getWriter();
String connectionURL = "jdbc:mysql://";
Connection connection=null;
ResultSet rs;
String userName=new String("");
String passwrd=new String("");
try {
// Load the database driver
// Get a Connection to the database
connection = DriverManager.getConnection(connectionURL, "MySQL", "admin");
//Add the data into the database
String sql = "select name,password from loginpass";
Statement s = connection.createStatement();
s.executeQuery (sql);
rs = s.getResultSet();
while ( ()){
rs.close ();
s.close ();
}catch(Exception e){
System.out.println("Exception is ;"+e);
if(userName.equals(request.getParameter("user")) &&
out.println("User Authenticated");
out.println("You are not an authentic person");

And i hav attached xml details
Ranch Hand
Posts: 466
IntelliJ IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please provide code snippet or exception trace...
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please UseCodeTags when posting code or configuration. Unformatted code and configuration is very difficult to read. You can edit your post to include them by using the button.

You may also need to disable HTML.

Welcome to JavaRanch!
Posts: 67634
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please be sure to post IDE problems in the IDEs forum. I have moved this post there for you.
We can fix it! We just need some baling wire, some WD-40, a bit of duct tape and this tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
    Bookmark Topic Watch Topic
  • New Topic