Need help finding whats wrong with my servlet

I've been trying to create a simple login page following the tutorial found http://www.roseindia.net/mysql/loginauthentication.shtml
There is a single JSP (AuthenticateLogin.jsp) and a servlet (LoginAuthentication.java). Basically what has to happen is the user enters the login information in the JSP which sends these info to the servlet. The servlet checks whether the username and password exist in the table and if they do it displays the user if not it says to that the username and/or password is invalid. I'm using IntelliJ IDEA as the IDE, Tomcat as the application server and MySQL 5.0.18 for the database. I'm also using Ant as a build tool.
The following are my code:
AuthenticateLogin.jsp
<head>
     <title>Login Page</title>
     <script type="text/javascript">
          function validate() {
               var user = document.frm.user
               var pass = document.frm.pass
               if ((user == null) || (user == "")) {
                    alert("Please enter a username")
                    user.focus()
                    return false
               if ((pass == null) || (pass == "")) {
                    alert("Please enter a password")
                    pass.focus()
                    return false
     </script>
</head>
<body>
<form name="frm" action="LoginAuthentication" method="post" onsubmit="return validate()">
     Name:       <input type="text" name="user"/>
     <br/>
     Password:   <input type="text" name="pass" />
     <br />
     <input type="submit" value="Sign in"/>     
     <input type="reset" value="Reset"/>
</form>
</body>
</html>{code}
LoginAuthentication.java
{code:java}import java.io.*;*
*import java.sql.*;
import javax.servlet.*;*
*import javax.servlet.http.*;
public class LoginAuthentication extends HttpServlet {
     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.0.95:3306/loginTester";
          Connection connection = null;
          ResultSet rs;
          String userName = new String("");
          String passwrd = new String("");
          response.setContentType("text/html");
          try {
               Class.forName("com.mysql.jdbc.Driver");
               connection = DriverManager.getConnection(connectionUrl, "root", "");
               String sql = "select user, password from user";
               Statement s = connection.createStatement();
               s.executeQuery(sql);
               rs = s.getResultSet();
               while (rs.next()) {
                    userName = rs.getString("user");
                    passwrd = rs.getString("password");
               rs.close();
               s.close();
          } catch (Exception e){
               System.out.println("Exception thrown: ["+e+"}");
          if (userName.equals(request.getParameter("user")) && passwrd.equals(request.getParameter("pass"))) {
//               response.sendRedirect("http://localhost:8080/xplanner_reports/");
               out.println("Hello"+userName);
          } else {
               out.println("Please enter a valid username and password");
               out.println("<a href='AuthenticateLogin.jsp'><br/>Login again</a>");
}{code}
web.xml
{code:java}<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
            http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
             version="2.5">
     <welcome-file-list>
          <welcome-file>AuthenticateLogin.jsp</welcome-file>
     </welcome-file-list>
     <servlet>
          <servlet-name>LoginAuthentication</servlet-name>
          <servlet-class>LoginAuthentication</servlet-class>
     </servlet>
     <servlet-mapping>
          <servlet-name>LoginAuthentication</servlet-name>
          <url-pattern>/LoginAuthentication</url-pattern>
     </servlet-mapping>
</web-app>
</web-app>{code}
The problem I'm facing is the validation (checking whether the username and password match to those in the database) isn't working properly. No matter what I enter as the username and password (even if it is the correct pair) it always shows as my username and/or password is invalid. When I check the tomcat (catalina) log the following entry was found:
{code:java}Exception thrown: [java.lang.ClassNotFoundException: com.mysql.jdbc.Driver}{code}
Could someone please show me what I could be doing wrong here? It would be a great help.  Spent a day trying to figure this out :no:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

How could I add it to my classpath from Idea?
By the way the following is my build.xml (ant build file)
<project name="LoginForm" basedir=".">
    <property name="app.name" value="LoginForm"/>
    <property name="src.dir" location="src"/>
    <property name="build.dir" location="build"/>
    <property name="build.webinf.classes.dir" location="${build.dir}/WEB-INF/classes"/>
    <property name="web.dir" location="web"/>
    <property name="dist.dir" location="dist"/>
    <property name="lib.dir" location="lib"/>
    <property name="tomcat.home" location="/home/ruzaik/software/tomcat/apache-tomcat-5.5.20"/>
    <property name="tomcat.url" value="http://localhost:8080/manager"></property>
    <property name="tomcat.username" value="tomcat"/>
    <property name="tomcat.passward" value="tomcat"/>
    <property name="appserver.deploy.dir" location="${tomcat.url}/webapps"></property>
    <property name="war.file" value="${app.name}.war"/>
    <import file="${tomcat.home}/bin/catalina-tasks.xml"/>
    <path id="project.classpath">
        <dirset dir="${build.dir}"/>
        <fileset dir="${lib.dir}">
            <include name="**/*.jar"/>
        </fileset>
    </path>
    <target name="clean" description="Cleans directories">
        <delete dir="${build.dir}"/>
        <delete dir="${dist.dir}"/>
    </target>
    <target name="init" depends="clean" description="Creates directories">
        <mkdir dir="${build.dir}"/>
        <mkdir dir="${build.webinf.classes.dir}"/>
        <mkdir dir="${dist.dir}" />
    </target>
    <target name="compile" depends="init">
        <javac srcdir="${src.dir}" destdir="${build.webinf.classes.dir}">
            <classpath refid="project.classpath"/>
        </javac>
    </target>
    <target name="copy" description=" : Copy the content of web in to build directoy">
        <copy todir="${build.dir}" preservelastmodified="yes" overwrite="yes">
            <fileset dir="${web.dir}">
                <include name="**/*"/>
                <exclude name="**/*.bak"/>
            </fileset>
        </copy>
    </target>
    <target name="war" depends="compile, copy" description=" : Create a war file for deploying">
        <jar destfile="${dist.dir}/${app.name}.war" update="false" compress="true">
            <fileset dir="${build.dir}">
                <include name="**/*"/>
            </fileset>
        </jar>
    </target>
    <target name="install">
        <deploy url="${tomcat.url}" username="tomcat" password="tomcat" path="/LoginForm"
                war="${dist.dir}/${war.file}">
        </deploy>
    </target>
    <target name="uninstall">
        <undeploy url="${tomcat.url}" username="tomcat" password="tomcat" path="/LoginForm">
        </undeploy>
    </target>
</project>and my directory structure could be found here http://img407.imageshack.us/img407/1594/tempf.png
I think I"ve added it to the classpath.

Similar Messages

  • Need help understanding whats wrong with ASP checking for empty fields.

    Can anyone tell me whats wrong with these if statements: If i
    sumbit the
    form providing everything except the dream_inscript field it
    gives me this
    error:
    =================================================
    Microsoft OLE DB Provider for ODBC Drivers error '80040e57'
    [Microsoft][ODBC Microsoft Access Driver]Invalid string or
    buffer length
    /purch_confirm_mail.asp, line 67
    =================================================
    If i submit the form and provide just that field along with
    the first 4
    which are automatically passed from the DB the form submits
    fine and no
    problem.. I know it has something to do with my If
    Statements..
    Basically i want to check the 4 fields:
    dream_inscript If this one is -1 then pass N/A to the db
    dream_price If dream_inscript <> -1 then pass 45 to the
    db
    dream_comm if dream_comm is empty then pass N/A to the db
    custom_inscript if custom_inscript is empty then pass N/A to
    the db
    custom_wanted if this is Y then pass 45 to the db
    custom_comm if this is empty then pass N/A to the db
    MM_editCmd.CommandText = "INSERT INTO tbMailOrders
    (item_number,
    item_summary, item_price, shipping_cost, dream_price,
    dream_inscript,
    dream_comm, custom_comm, custom_price, video_wanted,
    video_price,
    grandtotal, cs_name, pp_email, c_email) VALUES (?, ?, ?, ?,
    MM_editCmd.Prepared = true
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param1", 202,
    1, 10, Request.Form("item_number")) ' adVarWChar
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param2", 202,
    1, 255, Request.Form("item_summary")) ' adVarWChar
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param3", 202,
    1, 10, Request.Form("itemprice")) ' adVarWChar
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param4", 202,
    1, 10, Request.Form("shippingcost")) ' adVarWChar
    If cStr(Request.Form("dream_inscript"))<> "-1" Then
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param5", 202, 1,
    10, "45") ' adVarWChar
    Else
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param5", 202,
    1, 10, "0.00") ' adVarWChar
    End If
    If cStr(Request.Form("dream_inscript"))<> "-1" Then
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param6", 203, 1,
    1073741823, Request.Form("dream_inscript")) ' adLongVarWChar
    Else
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param6", 203,
    1, 1073741823, "N/A") ' adLongVarWChar
    End If
    If Len(cStr(Request.Form("dream_comm")))= "0" Then
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param7", 203,
    1, 1073741823, "N/A") ' adLongVarWChar
    Else
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param7", 203,
    1, 1073741823, Request.Form("dream_comm")) ' adLongVarWChar
    End If
    If Len(cStr(Request.Form("custom_inscript")))= "0" Then
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param8", 203,
    1, 1073741823, "N/A") ' adLongVarWChar
    Else
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param8", 203, 1,
    1073741823, Request.Form("custom_inscript")) ' adLongVarWChar
    End If
    If Request.Form("custom_wanted")= "Y" Then
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param9", 202,
    1, 10, "45") ' adVarWChar
    Else
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param9", 202,
    1, 10, "0.00") ' adVarWChar
    End If
    If Request.Form("video_wanted")= "Y" Then
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param10", 202,
    1, 10, "Yes") ' adVarWChar
    Else
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param10", 202,
    1, 10, "No") ' adVarWChar
    End If
    If Request.Form("video_wanted")= "Y" Then
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param11", 202, 1,
    10, "15") ' adVarWChar
    Else
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param11", 202,
    1, 10, 0.00) ' adVarWChar
    End If
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param12", 202,
    1, 10, Request.Form("grand")) ' adVarWChar
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param13", 202,
    1, 255, Request.Form("name")) ' adVarWChar
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param14", 202,
    1, 255, Request.Form("email")) ' adVarWChar
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param15", 202,
    1, 255, Request.Form("email2")) ' adVarWChar
    MM_editCmd.Execute
    MM_editCmd.ActiveConnection.Close
    ASP, SQL2005, DW8 VBScript, Access

    issue corrected.
    ASP, SQL2005, DW8 VBScript, Visual Studio 2005, Visual Studio
    2008
    "Daniel" <[email protected]> wrote in message
    news:[email protected]...
    > Can anyone tell me whats wrong with these if statements:
    If i sumbit the
    > form providing everything except the dream_inscript
    field it gives me this
    > error:
    > =================================================
    > Microsoft OLE DB Provider for ODBC Drivers error
    '80040e57'
    > [Microsoft][ODBC Microsoft Access Driver]Invalid string
    or buffer length
    >
    > /purch_confirm_mail.asp, line 67
    > =================================================
    > If i submit the form and provide just that field along
    with the first 4
    > which are automatically passed from the DB the form
    submits fine and no
    > problem.. I know it has something to do with my If
    Statements..
    >
    > Basically i want to check the 4 fields:
    >
    > dream_inscript If this one is -1 then pass N/A to the db
    > dream_price If dream_inscript <> -1 then pass 45
    to the db
    > dream_comm if dream_comm is empty then pass N/A to the
    db
    >
    > custom_inscript if custom_inscript is empty then pass
    N/A to the db
    > custom_wanted if this is Y then pass 45 to the db
    > custom_comm if this is empty then pass N/A to the db
    >
    >
    >
    >
    > MM_editCmd.CommandText = "INSERT INTO tbMailOrders
    (item_number,
    > item_summary, item_price, shipping_cost, dream_price,
    dream_inscript,
    > dream_comm, custom_comm, custom_price, video_wanted,
    video_price,
    > grandtotal, cs_name, pp_email, c_email) VALUES (?, ?, ?,
    > ?, ?, ?, ?, ?, ?)"
    > MM_editCmd.Prepared = true
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param1", 202,
    > 1, 10, Request.Form("item_number")) ' adVarWChar
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param2", 202,
    > 1, 255, Request.Form("item_summary")) ' adVarWChar
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param3", 202,
    > 1, 10, Request.Form("itemprice")) ' adVarWChar
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param4", 202,
    > 1, 10, Request.Form("shippingcost")) ' adVarWChar
    > If cStr(Request.Form("dream_inscript"))<> "-1"
    Then
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param5", 202, 1,
    > 10, "45") ' adVarWChar
    > Else
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param5", 202,
    > 1, 10, "0.00") ' adVarWChar
    > End If
    > If cStr(Request.Form("dream_inscript"))<> "-1"
    Then
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param6", 203, 1,
    > 1073741823, Request.Form("dream_inscript")) '
    adLongVarWChar
    > Else
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param6", 203,
    > 1, 1073741823, "N/A") ' adLongVarWChar
    > End If
    > If Len(cStr(Request.Form("dream_comm")))= "0" Then
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param7", 203,
    > 1, 1073741823, "N/A") ' adLongVarWChar
    > Else
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param7", 203,
    > 1, 1073741823, Request.Form("dream_comm")) '
    adLongVarWChar
    > End If
    > If Len(cStr(Request.Form("custom_inscript")))= "0" Then
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param8", 203,
    > 1, 1073741823, "N/A") ' adLongVarWChar
    > Else
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param8", 203, 1,
    > 1073741823, Request.Form("custom_inscript")) '
    adLongVarWChar
    > End If
    > If Request.Form("custom_wanted")= "Y" Then
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param9", 202,
    > 1, 10, "45") ' adVarWChar
    > Else
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param9", 202,
    > 1, 10, "0.00") ' adVarWChar
    > End If
    > If Request.Form("video_wanted")= "Y" Then
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param10", 202,
    > 1, 10, "Yes") ' adVarWChar
    > Else
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param10", 202,
    > 1, 10, "No") ' adVarWChar
    > End If
    > If Request.Form("video_wanted")= "Y" Then
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param11", 202, 1,
    > 10, "15") ' adVarWChar
    > Else
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param11", 202,
    > 1, 10, 0.00) ' adVarWChar
    > End If
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param12", 202,
    > 1, 10, Request.Form("grand")) ' adVarWChar
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param13", 202,
    > 1, 255, Request.Form("name")) ' adVarWChar
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param14", 202,
    > 1, 255, Request.Form("email")) ' adVarWChar
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param15", 202,
    > 1, 255, Request.Form("email2")) ' adVarWChar
    > MM_editCmd.Execute
    > MM_editCmd.ActiveConnection.Close
    >
    > --
    > ************************************************
    > ASP, SQL2005, DW8 VBScript, Access
    >

  • HELP PLEASE - WHATS WRONG WITH THIS CODE

    Hi. I get this message coming up when I try to compile the code,
    run:
    java.lang.NullPointerException
    at sumcalculator.SumNumbers.<init>(SumNumbers.java:34)
    at sumcalculator.SumNumbers.main(SumNumbers.java:93)
    Exception in thread "main"
    Java Result: 1
    BUILD SUCCESSFUL (total time: 2 seconds)
    I am not sure whats wrong with the code. Any assistance would be nice. The code is below.
    package sumcalculator;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class SumNumbers extends JFrame implements FocusListener {
    JTextField value1;
    JTextField value2;
    JLabel equals;
    JTextField sum;
    JButton add;
    JButton minus;
    JButton divide;
    JButton multiply;
    JLabel operation;
    public SumNumbers() {
    SumNumbersLayout customLayout = new SumNumbersLayout();
    getContentPane().setFont(new Font("Helvetica", Font.PLAIN, 12));
    getContentPane().setLayout(customLayout);
    value1.addFocusListener(this);
    value2.addFocusListener(this);
    sum.setEditable(true);
    value1 = new JTextField("");
    getContentPane().add(value1);
    value2 = new JTextField("");
    getContentPane().add(value2);
    equals = new JLabel("label_1");
    getContentPane().add(equals);
    sum = new JTextField("");
    getContentPane().add(sum);
    add = new JButton("+");
    getContentPane().add(add);
    minus = new JButton("-");
    getContentPane().add(minus);
    divide = new JButton("/");
    getContentPane().add(divide);
    multiply = new JButton("*");
    getContentPane().add(multiply);
    operation = new JLabel();
    getContentPane().add(operation);
    setSize(getPreferredSize());
    addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) {
    System.exit(0);
    public void focusGained(FocusEvent event){
    try {
    float total = Float.parseFloat(value1.getText()) +
    Float.parseFloat(value2.getText());
    sum.setText("" + total);
    } catch (NumberFormatException nfe) {
    value1.setText("0");
    value2.setText("0");
    sum.setText("0");
    public void focusLost(FocusEvent event){
    focusGained(event);
    public static void main(String args[]) {
    SumNumbers window = new SumNumbers();
    window.setTitle("SumNumbers");
    window.pack();
    window.show();
    class SumNumbersLayout implements LayoutManager {
    public SumNumbersLayout() {
    public void addLayoutComponent(String name, Component comp) {
    public void removeLayoutComponent(Component comp) {
    public Dimension preferredLayoutSize(Container parent) {
    Dimension dim = new Dimension(0, 0);
    Insets insets = parent.getInsets();
    dim.width = 711 + insets.left + insets.right;
    dim.height = 240 + insets.top + insets.bottom;
    return dim;
    public Dimension minimumLayoutSize(Container parent) {
    Dimension dim = new Dimension(0, 0);
    return dim;
    public void layoutContainer(Container parent) {
    Insets insets = parent.getInsets();
    Component c;
    c = parent.getComponent(0);
    if (c.isVisible()) {c.setBounds(insets.left+24,insets.top+48,128,40);}
    c = parent.getComponent(1);
    if (c.isVisible()) {c.setBounds(insets.left+256,insets.top+48,128,40);}
    c = parent.getComponent(2);
    if (c.isVisible()) {c.setBounds(insets.left+408,insets.top+48,56,40);}
    c = parent.getComponent(3);
    if (c.isVisible()) {c.setBounds(insets.left+488,insets.top+48,152,40);}
    c = parent.getComponent(4);
    if (c.isVisible()) {c.setBounds(insets.left+128,insets.top+136,72,40);}
    c = parent.getComponent(5);
    if (c.isVisible()) {c.setBounds(insets.left+248,insets.top+136,72,40);}
    c = parent.getComponent(6);
    if (c.isVisible()) {c.setBounds(insets.left+368,insets.top+136,72,40);}
    c = parent.getComponent(7);
    if (c.isVisible()) {c.setBounds(insets.left+488,insets.top+136,72,40);}
    c = parent.getComponent(8);
    if (c.isVisible()) {c.setBounds(insets.left+176,insets.top+48,56,40);}
    }

    Thank you. How do i amend this? I have defined value1though.Yes, you did - but after the call to addFocusListener(...). It needs to be before it.
    BTW, you did the same thing with "value2.addFocusListener(this)" and "sum.setEditable(true)" on the next two lines. You're attempting to call a method on an object that doesn't exist yet (i.e., you haven't called new yet).

  • Whats wrong with this servlet code..?no error in log

    hello guys..hope one of you can help....
    i have 2 servlet classes. one receives form data sent from a jsp page, then create a form object containing all the inputs.. that object is then added to the session ..
    also, it construct a User object containing info about the present user and add it to the session.. IUser and Form are inner to the main class.
    the first servlet (check) seems to work fine.. but the problem occurs with the second servlet...i have inserted some printl statements to help me identify how far it goes and it seems that the whole code of the second servlet(update) is almost redundant....I dont get any error message ..simply a blank page which is of course of no help to me...
    I hate inserting long code here but i would be pleased if anyone could tell me of a way to find out about the actual problem..program compiles fine but..it just freezes at runtime
    ..here is part of the code..whats wrong?
    HttpSession session=request.getSession();
         User user2=(User)session.getAttribute("person");
         Form fr=(Form)session.getAttribute("form");
         System.out.println("User and Form created");
         int uid=user2.getId(); //class User contain the getId method
         String uname=user2.getName();
         System.out.println("Data for user retrieved");
         String goTo=fr.getC();
         String password = fr.getP();
    String email=fr.getE();
    String newName=fr.getN();
    System.out.println("data from form retrieved");
    thanks

    the first servlet was indeed supposed to ass all those attributes...
    but the thing is that the data being retrieved later were not of the type expected...
    i have now decided to proceed differently but I am a bit curious to lean more about something that you mentionned in relation to servlet listeners..i never thought of the need to remove all those attribute when the session times out...
    I thought that it was doned automatically with a call to session.invalidate().
    is that not the case?
    thanks

  • Need help finding MiniDV camcorder with AV in

    Hi,
    I'm shopping for a MiniDV camcorder. Besides using it to make movies with iMovie, I want to be able to transfer analog video (i.e., VHS) into the unit. I understand that some MiniDV camcorders have an AV/in port for this. I'm having trouble finding such a unit. I'm looking to spend up to $500. Can you please lead me to one or two? Thanks.

    James,
    Here's a popular model by Sony. (Ya can't go wrong with a Sony).
    Sony DCR-HC96 MiniDV 3.3MP Digital Handycam Camcorder with 10x Optical Zoom (Includes Handycam Station)
    http://www.amazon.com/Sony-DCR-HC96-Digital-Handycam-Camcorder/dp/B000E0I5AI
    Analog-to-Digital Converter: Yes (with Pass Through)
    http://www.sonystyle.com/is-bin/INTERSHOP.enfinity/eCS/Store/en/-/USD/SYDisplayProductInformation-Start;sid=vrAxLbfxkpEx6vHUN9I7Jvj_-OYqrs5CuzY=?Categor yName=dcc_DICamcordersMiniDVHandycamCamcorders&ProductSKU=DCRHC96&TabName=specs&var2=
    from Sony $649,
    from PricGrabber.com $515 - $937 (depending on merchant)
    Above all things, do your homework on camcorder model (features) and price.

  • Really need help on finding whats wrong with my internet please

    Ok I now have Sky BB (not fibre normal). I have a black Sky hub, connected to my Apple Time Capsule (the flat type, think its 3rd Gen), the TC is in bridge mode, the Sky hub has wireless switched off.
    I also use Powerline adapters from the TC to my iMac, also use numerous WiFi devices, iPhones, Apple TVs, iPads etc.
    I keep getting intermittent "blips", drop outs, no connection, slow use etc, and I just can't get to the bottom of it. Really really appreciate some solid advice and help. Overtime its dropped (or I think it is), I can check Airport utility on my iPhone or iMac and shows all green, and internet connected, physically iy shows green to. The sky hi also shows connection on the hub, and if I goto the home page.
    I've just had a drop/connection loss now, I've been into the logs on sky hub and nothing is shown, only form yesterday. I can't check the TC logs now, I have the old Airport utility that did used to show you, but it won't open now on 10.10.3.
    I've reset powerline etc, but it doesn't seem to be that, as although iPhone shows connected to WiFi it doesnt connect to internet.
    I believe the actual Sky end is ok, I goto into the sky hub home page 192.168.0.1, and shows connected, Sky have ran tests etc and all seems ok. What I'm wondering is if its the TC? I've had a few times now where the TC says has to restart backup as been a problem
    thanks

    Why down grade the firmware? What will that do/give me?
    On the older units i find the earlier firmware more reliable.. The 7.6.4 introduced a number of new functions that work poorly on older AE and TC so it is simple to revert to older firmware and see..
    It is a 3min exercise.. and might do nothing.. but you are trying to prove where an issue is.. this is part of that testing.
    If I factory restore what will that do? I take it I can't use the backup settings to restore afterwards?
    All routers need the occasional reset. Wrong settings creep in.. and particularly in situations where there is power outages or OS that works poorly (read Yosemite) then strange and wonderful things happen.
    A backup of settings is only useful if it was taken before the problems started.. did you?? If not forget it and configure from scratch.. that is a key part of getting things to work.
    Not sure what is meant by the use LAN port instead, thought I had to use the WAN if I connect it to my Sky hub?
    When the TC is bridged.. it has no WAN port. There is no routing.. but I have found the LAN ports are more reliable than the WAN port.
    With you saying about "only lasts a while" is it worth buying a new shape one refurbished from Apple? Are the newer shape any better reliability?
    I would not buy a refurbished.. I doubt this model is understood very well and its issues happen in some situations and not others.. I think a lot of them are put back in stock without any sort of repair. They are tested .. found working and hence resold.. but the situation in people's homes is not a test lab. When people connect them to modems and routers that the device has issues with it fails again.
    I find it hard to recommend the new one.. especially as it has now been out more than a year.. and firmware has not improved.
    It is about refresh time and I would wait to see if a new one is coming.
    If you need wireless buy a wireless router.. if you need backup use a local USB drive.
    Repair of the TC is complicated.
    See https://sites.google.com/site/lapastenague/a-deconstruction-of-routers-and-modem s/apple-time-capsule-repair/new-issue-with-a1355-gen-3-tc
    I figured this out long ago so they were already showing up with issues within 3 years.. if you get 4 or more years out of modern equipment.. that is beyond its design lifespan.

  • Whats wrong with skype?????????

    Im online on skype. Suddenly it logs out. Then i cant log in again. That happened in three accounts. Im really angry with this situation. Anyone qcan help? Whats wrong with ur service? Jesus! Please help its unacceptable

    yes they just **bleep** stoped working with skype 5. and 3.8 versions.  they just closed those servers >  what **bleep** why did u disabled 3.8 version.  how about skypeME option ?  how about old computers that doesnt able to install 6.x versions ?
    im actualy thinking to change this piece of **bleep** software and find somting else.
    Use of profanity in posts does not conform conform with the Community Guidelines or Skype's Etiquette Policy.

  • My iPhone 4S won't turn on it's been off for two days now. I tried charging it but it makes a noise every 8 seconds,holding the buttons down and also plugging it to a computer. I need help on what to do or if anybody can tell me what's wrong with my phone

    My iPhone 4S won't turn on it's been off for two days now. I tried charging it but it makes a noise every 8 seconds,holding the buttons down and also plugging it to a computer. I need help on what to do or if anybody can tell me what's wrong with my phone

    Yes ive tried a different charger and it also nothing shows when i plug it in just makes a noise

  • HT201210 I have the Iphone 3gs and it said update required and i needed to connect to itunes so i did al that and now everytime i go to restore everything it just says error and then i have to do it again?whats wrong with it?

    I have the Iphone 3gs and it said update required and i needed to connect to itunes so i did al that and now everytime i go to restore everything it just says error and then i have to do it again?whats wrong with it?

    Are you getting an error message number with your error message? If so, what number are you getting?

  • I have misplaced my iPod Touch 4th Generation. According to Find my iPhone, it should show up in offline mode. I need help on locating it with a software or some other way. Help?

    I have misplaced my iPod Touch 4th Generation. According to Find my iPhone, it should show up in offline mode. I need help on locating it with a software or some other way. Help?

    There is no other way.
    Sorry

  • I have been trying to open itunes that has already been installed. But, the thing is it never opens and when i do right click and trouble shoot also, it doesnt open. I dont whats wrong with itunes and my comp is 64 bit windows 7. Can somebody please help

    I have been trying to open itunes that has already been installed. But, the thing is it never opens and when i do right click and trouble shoot also, it doesnt open. I dont whats wrong with itunes and my comp is 64 bit windows 7. Can somebody please help

    no its 64 bit version of itunes. Can you please help me. I am not able to sync my iphone.

  • HT5622 I need help finding a movie that I downloaded, can anyone help me with this?

    Hello, I need help finding a movie that I downloaded, can anyone help me with this?

    If you downloaded it to your iTunes library it will be in the Movies folder.  If you downloaded it to an iOS device you will find it in the Videos app.  This explains how to redownload previously purchased videos (available in some locations as long as the studio permits it): http://support.apple.com/kb/PH12283.

  • Help Me With This Error I Don't Know What Wrong With It Please

    Whats wrong with my program every time I compile it it has an error saying that ')' expected I don't know whats wrong with it someone help me, thank you.
    //   Robins.java
    //   Demonstrate the different behaviors of the + operator
    public class Robins
        // main prints some expressions using the + operator
        public static void main (String[] args)
         System.out.println ("Ten robins plus " + 13 canaries is + 23 birds);
    }

    System.out.println ("Ten robins plus " + "13 canaries is" + "23 birds");You can't type regular text that is not inside of " and " or it will be treated as a number / variable / something else.

  • TS1702 i if use "search" in music on my ipod touch 5th gen the result just show only album and playlist but nothing song result.whats wrong with it?please help

    i if use "search" in music on my ipod touch 5th gen the result just show only album and playlist but nothing song result.whats wrong with it?please help

    The users guide says:
    Spotlight searches the following:
    Contacts—All content
    Apps—Titles
    Music—Names of songs, artists, and albums, and the titles of podcasts and videos
    Podcasts—Titles
    Videos—Titles
    Audiobooks—Titles
    Notes—Text of notes
    Calendar (Events)—Event titles, invitees, locations, and notes
    Mail—To, From, and Subject fields of all accounts (the text of messages isn’t searched)
    Reminders—Titles
    Messages—Names and text of messages
    Try:
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Unsynce all music and resync
    - Reset all settings
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup
    - Restore to factory settings/new iOS device.
    - Make an appointment at the Genius Bar of an Apple store.
    Apple Retail Store - Genius Bar

  • Whats wrong with this query.can anyone help me......

    select CASE WHEN TO_NUMBER(SUBSTR(TO_CHAR(START_TIME_TIMESTAMP,'DDMMYYYY HH24:MM:SS'),13,2))>0 AND TO_NUMBER(SUBSTR(TO_CHAR(START_TIME_TIMESTAMP,'YYYYMMDD HH24:MM:SS'),13,2)) <14
    THEN TO_DATE(CONCAT(SUBSTR(TO_CHAR(START_TIME_TIMESTAMP,'YYYYMMDD HH24:MM:SS'),13,2)||'00',SUBSTR(TO_CHAR(START_TIME_TIMESTAMP,'YYYYMMDD HH24:MI:SS'),16)||'00'),'DD-MM-YYYY HH24:MI:SS') end
    from table;
    i have written this query.whats wrong with this query..........
    the error is "literal does not match format string"
    Reegards soumen

    Why does your date_format loose, ununify and not fix ?
    And what is your exact requirement?
    >>
    CASE WHEN
    TO_NUMBER(SUBSTR(TO_CHAR(START_TIME_TIMESTAMP,'DDMMYYYY HH24:MM:SS'),13,2))>0
    AND TO_NUMBER(SUBSTR(TO_CHAR(START_TIME_TIMESTAMP,'YYYYMMDD HH24:MM:SS'),13,2)) <14
    <<
    This is
    CASE WHEN TO_CHAR(START_TIME_TIMESTAMP,'MM') between '01' and '13'
    >>
    THEN TO_DATE(CONCAT(SUBSTR(TO_CHAR(START_TIME_TIMESTAMP,'YYYYMMDD HH24:MM:SS'),13,2)
    ||'00',
    SUBSTR(TO_CHAR(START_TIME_TIMESTAMP,'YYYYMMDD HH24:MI:SS'),16)||'00'),
    'DD-MM-YYYY HH24:MI:SS')
    <<
    This is
    TO_DATE(
    TO_CHAR(START_TIME_TIMESTAMP,'MM"00"SS"00"),
    'DD-MM-YYYY HH24:MI:SS')
    Obviously, format is not matching !
    SQL> select to_char(sysdate,'MM"00"SS"00') from dual;
    TO_CHAR(
    06004900
    SQL> select to_date('06004900','DD-MM-YYYY HH24:MI:SS') from dual;
    select to_date('06004900','DD-MM-YYYY HH24:MI:SS') from dual
    ERROR at line 1:
    ORA-01861: literal does not match format string

Maybe you are looking for