• 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 ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Getting 405 resource not allowed error in WebLogic server help!!!

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello all...
I am developing a password verification servlet. Which takes in emplyee id & pw from users & authenticates them from the DB
but when I take the parameters from a web pae it gives me an error saying 405 resource not allowed
here is the code: this is just a test servlet I want to mdify it after it has done the authentication....
import java.io.*;
import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.util.*;
public class PWTest extends HttpServlet
{

String tpw ="";
String temp_id = "";
String query="";
String demp_id="";
String demp_pw="";
Connection con;
Statement st;

public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
{
temp_id = req.getParameter("emp_id");
tpw = req.getParameter("pw");
query = "Select emp_pw from Emp_PW where emp_id = "+temp_id;

try
{

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con = DriverManager.getConnection("Jdbc:Odbc:scomm");
st = con.createStatement();
ResultSet rs = st.executeQuery(query);
while (rs.next())
{
demp_pw = rs.getString(1);
}

con.close();
}

catch(Exception e)
{
e.printStackTrace();
}

if(demp_pw.equals(tpw))
{
System.out.println("Password Correct");
}

else
System.out.println("Password incorrect");
System.out.println(demp_pw);
}
}
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic