• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Jj Roberts
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Himai Minh
  • Carey Brown
  • salvin francis

404 file not found error

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
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


Thanks

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">
<html>
<head>
<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">
-->

</head>

<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>


</div>
<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>
</font></form></td></tr>
</table>

</body>
</html>

and servlet

import java.io.*;
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{
this.config=config;
}
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException,IOException{

PrintWriter out = response.getWriter();
String connectionURL = "jdbc:mysql://192.168.6.49/logindetails";
Connection connection=null;
ResultSet rs;
String userName=new String("");
String passwrd=new String("");
response.setContentType("text/html");
try {
// Load the database driver
Class.forName("com.mysql.jdbc.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.next ()){
userName=rs.getString("name");
passwrd=rs.getString("password");
}
rs.close ();
s.close ();
}catch(Exception e){
System.out.println("Exception is ;"+e);
}
if(userName.equals(request.getParameter("user")) &&
passwrd.equals(request.getParameter("pass"))){
out.println("User Authenticated");
}
else{
out.println("You are not an authentic person");
}
}
}

And i hav attached xml details
Thanku
 
Ranch Hand
Posts: 466
1
IntelliJ IDE Oracle Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please provide code snippet or exception trace...
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • 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!
 
Marshal
Posts: 67478
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please be sure to post IDE problems in the IDEs forum. I have moved this post there for you.
 
reply
    Bookmark Topic Watch Topic
  • New Topic