servlet not working properly ...pls help me out....its really urgent

servlet not working properly ...pls help me out....its really urgent

Hi, Below is the front page of my project

1)enty.jsp

</form> </body> </html>

</form> </body> </html>> <html> <body>
> 
>   <form method="post" action="get">
>   <b><div
> style="text-align:center"><font
> size="6"><font
> color="red"></font><font
> color="blue">B-E FORM:</font></div>   
>   <b><font color="marron"
> size="4">ENTER PIS NO.:</font>
>           <input type= "text" name="pis"><br><br>     <input
> type="submit" value="Submit">
> 
> </form> </body> </html></form> </body> </html>

</form> </body> </html>


Now as the user click submit button he will reach to updation.java servlet through WEB.XML

2)**WEB.XML**

<web-app>
<servlet>
        <servlet-name>updation</servlet-name>
        <servlet-class>updation</servlet-class>
    </servlet>

    <servlet-mapping>
        <servlet-name>updation</servlet-name>
        <url-pattern>/updation</url-pattern>
    </servlet-mapping>
</web-app>



3)**updation.java**


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

public class updation extends HttpServlet {     protected void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException     {

            int pisNo =Integer.parseInt( req.getParameter("pis") );
         List list=new ArrayList();
            try
                 {
                                    Class.forName("com.mysql.jdbc.Driver");
                        Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/drona","root","daemons");

                        Statement st = con.createStatement();
                        ResultSet rs = st.executeQuery("select * from dronadb2 where pisNo=" +  pis );



                 do{
                            list.add(rs.getString("b1"));
                    list.add(rs.getString("b2"));

                    list.add(rs.getString("pyr1"));
                    list.add(rs.getString("univ1"));
                    list.add(rs.getString("subject1"));
                    list.add(rs.getString("gradeyr1"));

                    list.add(rs.getString("pyr2"));
                    list.add(rs.getString("univ2"));
                    list.add(rs.getString("subject2"));
                    list.add(rs.getString("gradeyr2"));

                    list.add(rs.getString("pyr3"));
                    list.add(rs.getString("univ3"));
                    list.add(rs.getString("subject3"));
                    list.add(rs.getString("gradeyr3"));

                    list.add(rs.getString("qual1"));
                    list.add(rs.getString("pyr4"));
                    list.add(rs.getString("univ4"));
                    list.add(rs.getString("subject4"));
                    list.add(rs.getString("gradeyr4"));

                    list.add(rs.getString("qual2"));
                    list.add(rs.getString("pyr5"));
                    list.add(rs.getString("univ5"));
                    list.add(rs.getString("subject5"));
                    list.add(rs.getString("gradeyr5"));

                    list.add(rs.getString("title"));
                    list.add(rs.getString("day6"));
                    list.add(rs.getString("month6"));
                    list.add(rs.getString("yr6"));
                    list.add(rs.getString("gradeyr3"));
                    list.add(rs.getString("day7"));
                    list.add(rs.getString("month7"));
                    list.add(rs.getString("yr7"));
                    list.add(rs.getString("inst"));
                }while(rs.next());
                        req.setAttribute("data", list);
                RequestDispatcher rqd = req.getRequestDispatcher("b-e(1).jsp");
                rqd.forward(req, res);



             rs.close();
                        st.close();
                        con.close();

                }


                catch (Exception e)
                {

                }


                } }


Now the servlet should pass the value retrieve from the database to the text boxes of
 b-e(1).jsp ,

4)**b-e(1).jsp**
Hre radio buttons are also used and i dont know whether i used the correct method to display the data from database via servlet to radio buttons f jsp is correct or not



<%@page language="java" import="java.util.*" %>
<html>
<body>
    <form method="post" action="servlet">
        <% Iterator itr;
             List data=(List)request.getAttribute("data");
            for(itr=data.iterator(); itr.hasNext(); ){
             %>

        <table>
            <tr>
                <fieldset>
                    <div style="text-align:center">
                        <font size="3">
                            <font color="red">* 
                            </font>
                                <font color="blue">
                                    EDUCATION QUALIFICATION
                                </font>
                        </font>
                    </div>
                </fieldset>
                <br>
            </tr>

            <tr>
                <td><font color="blue">Degree</td>
                <td><font color="blue">Passing Year</td>
                <td><font color="blue">Â Â Â Â University/Institute</td>
                <td><font color="blue">Â Â Â Â Â Subject</td>
                <td><font color="blue">Div/Class/Grade</td></font>
            </tr>

            <tr>
                <td>
                <font color="red">*</font><font size="3"><b>Graduation</font><br>
                <fieldset>
                <font color="red"><input type="radio" name="rd1"  value="<%=itr.next()%>" /> Engg.
                <input type="radio" name="rd2"  value="<%=itr.next()%>" /> Non-Engg.</font>
                </fieldset>
                    </td>


                <td>
                    <input type="text" cols="5" value="<%=itr.next()%>" name="year1">
                </td>

                <td>
                    <input type="text" cols="5" value="<%=itr.next()%>" name="inst1">
                </td>

                <td>
                    <input type="text" value="<%=itr.next()%>" name="sub1">
                </td>

                <td>
                    <input type="text" value="<%=itr.next()%>" name="year1.1">
                </td>
            </tr>

            <tr>
                <td>
                    Post Graduation
                </td>

                <td>
                    <input type="text" value="<%=itr.next()%>" name="year2">
                </td>

                <td>
                    <input type="text" value="<%=itr.next()%>" name="inst2">
                </td>

                <td>
                    <input type="text" value="<%=itr.next()%>" name="sub2">
                </td>

                <td>
                    <input type="text" value="<%=itr.next()%>" name="year2.2">
                </td>
            </tr>

            <tr>
                <td>
                    <font color="red">(Compulsary for Science Graduates)</font>
                </td>
            </tr>

            <tr>
                <td>
                    Ph D/Post doctrate
                </td>

                <td>
                    <input type="text" value="<%=itr.next()%>" name="year3">
                </td>

                <td>
                    <input type="text" value="<%=itr.next()%>" name="inst3">
                </td>

                <td>
                    <input type="text" value="<%=itr.next()%>" name="sub3">
                </td>

                <td>
                    <input type="text" value="<%=itr.next()%>" name="year3.1">
                </td>

            </tr>

            <tr>
                <td>
                    <input type="text" value="<%=itr.next()%>" name="qualfi1">
                </td>

                <td>
                    <input type="text" value="<%=itr.next()%>" name="year4">
                </td>

                <td>
                    <input type="text" value="<%=itr.next()%>" name="inst4">
                </td>

                <td>
                    <input type="text" value="<%=itr.next()%>" name="sub4">
                </td>

                <td>
                    <input type="text" value="<%=itr.next()%>" name="year4.1">
                </td>
            </tr>

            <tr>
                <td>
                    <input type="text" value="<%=itr.next()%>" name="qualfi2">
                </td>

                <td>
                    <input type="text" value="<%=itr.next()%>" name="year5">
                </td>

                <td>
                    <input type="text" value="<%=itr.next()%>" name="inst5">
                </td>

                <td>
                    <input type="text" value="<%=itr.next()%>" name="sub5">
                </td>

                <td>
                    <input type="text" value="<%=itr.next()%>" name="year5.1">
                </td>
            </tr>

        </table>

        <br><br>

        <table>
            <tr>
                <fieldset>
                    <b>
                        <div style="text-align:center">
                            <font size="3">
                                <font color="red">* 
                                </font>

                                <font color="DarkGreen">
                                    DETAILS OF SERVICE
                                </font>
                            </font>                     
                    </b>
                        </div>
                </fiedset>
                <br>
            </tr>

            <tr>
                <td><font color="DarkGreen">Grade/Post</td></font>
                <td><td><td><td><td><font color="DarkGreen">Â Â From</td></font>
                <td><td><td><td><td><td><font color="DarkGreen">Â Â To</td></font>
            </tr>

            <tr>
                <td>
                    <input type="text" name="grade">
                </td>

                <td>
                </td>

                <td>
                </td>

                <td>
                    <input type="text"  name="day6">
                </td>

                <td>
                    <input type="text" name="month6">
                </td>

                <td>
                    <input type="text"  name="year6">
                </td>

                <td>
                </td>

                <td>
                </td>

                <td>
                    <input type="text"  name="day7">
                </td>

                <td>
                    <input type="text"  name="month7">
                </td>

                <td>
                    <input type="text"  name="year7">
                </td>

                <td>
                </td>

                <td>
                <td>

                <td>                
                    <input type="text" name="lb">
                </td>
            </tr>
        </table>

        <br>



    <table>
        <tr><tr><tr>
            <div align="left">
        <div style="background-color:lightgray; border: 1px solid black;padding: 7spx;              text-align: center;width: 300px;">
         <span style="color: blue;">Add New Record Of Service</span>
        </div></div>
            </td>


        </tr>


    </table><br>




    <table>


        <tr><fieldset>
        <div style="text-align:center"><font size="3"><font color="red">* </font><font color="blue">TRAINING COURSES ATTENDED IN THE PRESENT GRADE (including CEP)</font></div>
        </tr></fiedset>

        <br><tr>
            <input type="checkbox" name="" value=""> <font color="red">NIL</font><br>

        </tr>



        <tr>
            <td>Course Title</td>
            <td><td><td><td><td>Â Â From</td>
            <td><td><td><td><td><td>Â Â To</td>
            <td><td><td><td><td>Â Â Institution</td>


        </tr>

        <tr>
            <td>
                <input type="text" value="<%=itr.next()%>" name="title">
            </td>

            <td><td><td><td>
                <input type="text" value="<%=itr.next()%>" name="day8">
            </td>

            <td>
                <input type="text" value="<%=itr.next()%>" name="month8">

            </td>

            <td>
                <input type="text" value="<%=itr.next()%>" name="year8">
            </td>


            <td><td><td><td>
                <input type="text" value="<%=itr.next()%>" name="day9">
            </td>

            <td>
                <input type="text" value="<%=itr.next()%>" name="month9">

            </td>

            <td>
                <input type="text" value="<%=itr.next()%>" name="year9">
            </td>

            <td><td><td><td>
                <input type="text" value="<%=itr.next()%> name="inst">

            </td>
        </tr>


    </table><br>


    <table>
        <tr>
            <tr><tr>
            <div align="left">
        <div style="background-color:lightgray; border: 1px solid black;padding: 7spx;              text-align: center;width: 300px;">
         <span style="color: blue;">Add New Training Course</span>
        </div></div>
            </td>


        </tr>



    <tr>
        <td><input type="submit" value="SAVE AND PROCEED"></td>
        </tr>
<%}%>
    </table>



</form>
</body>
</html>
View Answers

July 21, 2011 at 10:19 AM

Please go through the following link:

Servlet Tutorials









Related Tutorials/Questions & Answers:
servlet not working properly ...pls help me out....its really urgent
servlet not working properly ...pls help me out....its really urgent  ... as the user click submit button he will reach to updation.java servlet through WEB.XML 2)**WEB.XML** <web-app> <servlet> <servlet
pls help me it urgent
pls help me it urgent  hey, pls help me i want to know that can we call java/.bat file from plsql/proceudre /trigger
Advertisements
pls help me it urgent
pls help me it urgent  hey, pls help me i want to know that can we call java/.bat file from plsql/proceudre /trigger
pls help me it urgent
pls help me it urgent  hey, pls help me i want to know that can we call java/.bat file from plsql/proceudre /trigger
pls help me sir its urgent
pls help me sir its urgent  thanks for reply, but i am getting this error pls help me its urgent type Exception report message description The server encountered an internal error () that prevented it from
pls help me with this question
pls help me with this question  how to write a program in C++ using encapsulation,polymorphism,inheritance and abstraction?(all these concepts should come in a single program
Pls help me with strings
Pls help me with strings  To reverse a every other word in a string. Example :- If the input is "This is a line of message" the output should be "sihT is a line fo message
Pls help me with strings
Pls help me with strings  To reverse a every other word in a string. Example :- If the input is "This is a line of message" the output should be "sihT is a line fo message
Pls help me...........
Pls help me...........  how to use the text file as input to insert the values injdbc?   Please visit the following link: Insert text file data into database
Please help me urgent...........
Please help me urgent...........  For what kind of a problem would use a Tree Set and not a Tree Map For what kind of a problem would use a Tree Map and not a Tree Set   Hello Friend,ADS_TO_REPLACE_1 If you want
urgent...pleAse help me.....please!
urgent...pleAse help me.....please!  please help me urgent! how can i do dictionary with the use of array code in java, where i will type the word then the corresponding meaning for that word will appear...thanks
pls. help me - Java Beginners
pls. help me  please help me i do need now if its okay... Consider the method headings: void funcOne(int[] alpha, int size) int funcSum(int x,int y) void funcTwo(int[] alpha, int[] beta) and the declarations: int
Ple help me its very urgent
Ple help me its very urgent  Hi.. I have one string 1)'2,3,4' i want do like this '2','3','4' ple help me very urgent
Programming Help URGENT - JSP-Servlet
Programming Help URGENT  Respected Sir/Madam, I am R.Ragavendran. I am in urgent need of the coding. My requirement is as follows: Beside... URGENT
its very urgent please help me
its very urgent please help me  how can i retrieve all images from ms access database and display in jsp pages
help me - JSP-Servlet
help me   how to open one compiled html file by clicking one button from jsp
Please help me... its very urgent
Please help me... its very urgent  Please send me a java code to check whether INNODB is installed in mysql... If it is there, then we need to calculate the number of disks used by mysql
CAN ANYONE SOLVE THIS FOR ME. URGENT HELP NEEDED. PLEASE HELP
CAN ANYONE SOLVE THIS FOR ME. URGENT HELP NEEDED. PLEASE HELP   ... name, this studentâ??s coursework mark (out of 100 )and this studentâ??s exam mark (out of 100). The marks will be a positive
CAN ANYONE SOLVE THIS FOR ME. URGENT HELP NEEDED. PLEASE HELP
CAN ANYONE SOLVE THIS FOR ME. URGENT HELP NEEDED. PLEASE HELP   Write a class whose objects will represent students.The class should have three... coursework mark (out of 100)and this studentââ?¬â?¢s exam mark (out of 100
i want to retriev and update in same form but its not working pls help....
i want to retriev and update in same form but its not working pls help....  <p><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html></p> <p>
plz help me!!!!!!!! - JSP-Servlet
plz help me!!!!!!!!  i`ve set the environment varaibles for tomcat as well as jdk.. but i`m not understanding where i`ve to save my servlet..i.e.... there are compilation errors.. plz do help me.   make sure that you did
i have a problem to do this question...pls help me..
i have a problem to do this question...pls help me..  Write a program that prompts the user to input an integer and the output the number with the digits reversed. For example if the input is 12345, the output should be 54321
pls help me!!!!!!!
do the combinations in java, pls help me its urhent - Development process
do the combinations in java, pls help me its urhent  import java.util.*; interface Expression { public void interpret(ArrayList exp); } class... one help me: action when condition1 and condition3 action when condition1
Programming help Very Urgent - JSP-Servlet
Please please its very urgent.. Thanks/Regards, R.Ragavendran..  ...Programming help Very Urgent  Respected Sir/Madam, Actually my code shows the following output: There is a combo box which contains all the ID's
Help Very Very Urgent - JSP-Servlet
requirements.. Please please Its Very very very very very urgent... Thanks...Help Very Very Urgent  Respected Sir/Madam, I am sorry..Actually the link u have sent was not my actual requirement.. So,I send my requirement
I really need help with this assignment question Please help me out Please
I really need help with this assignment question Please help me out Please  * Description* You are hired to develop a laptop inventory information system for Sheridan College in order to keep track of the information about
code not working properly
code not working properly  protected void doPost(HttpServletRequest...("text/html"); PrintWriter out=response.getWriter(); HttpSession..... please help
on-line examination project?(urgent pls)
on-line examination project?(urgent pls)  Hello friends... not getting how to transfer the values or how to disable the form ...please help me...... Thanks in advance
very urgent : Iam unable to code this program plz help me - RMI
very urgent : Iam unable to code this program plz help me  Write a Multi-user chat server and client.  Hi friend, Chat server is a standlone application that is made up the combination of two-application, server
help me on jstl- <c:url> - JSP-Servlet
help me on jstl c:url  what is jstl in java
Plz reply me sir Its urgent - JSP-Servlet
Plz reply me sir Its urgent  Respected Sir/madam, I am R.Ragavendran..Actuaaly,I request you to remember the code which you have provided for me using radio buttons.. You have used the following syntax for checking whether
Pls anyboby tell me...
Pls anyboby tell me...  which book easy to learn spring
help me
help me  hi sir pls tell me how to use ajax form validatin from very simple way with two ot three text field pls help me use ajax in php my email id is:- [email protected] pls sir give me some vasic information i know
hi , i cant make this programmer , can any one help me to make it pls - Java Beginners
hi , i cant make this programmer , can any one help me to make it pls  ... program. i cant find delete records or update records  pls can someone make this program for me
help me
help me  MY GLASSFISH SERVER NOT START PROPERLY help me warning shows DPL5404:Specification-Version for the optional package [ GNUJAXP ] in the jarfile [ C:\Program Files\Java\jdk1.7.0_02\jre\lib\ext\gnujaxp.jar
displaying List of records from database in a jsp using ajax, onclick it should display the results ?? its urgent can u help me
displaying List of records from database in a jsp using ajax, onclick it should display the results ?? its urgent can u help me   displaying List... ?? its urgent can u help me
Hi.. how to write more than one sheets in a excel file... pls anybody help me....
Hi.. how to write more than one sheets in a excel file... pls anybody help me....  i can write only one sheet in a excel file.. but i want to write... go to second sheet... pls help me.. here my code.. import
Help me
Help me  Hi, LWUIT is working in eclipse j2me for Symbian OS
I am trying to develop a Image Sliding application but unfortunately its not working... Can any one help me in this
I am trying to develop a Image Sliding application but unfortunately its not working... Can any one help me in this  Can Anyone Help Me In This import java.awt.*; import javax.swing.*; import java.awt.event.*; class SlideShow
help me
help me  pls... xplain dis code:- function go() { window.location.replace("logout.jsp",'window','toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1'); self.close
help me
help me  i have done as u directed but nothing happens gud to me..... . i am using netbeans is that matter at all help me and take me out from trouble where to store jfree api to use it for j2ee based project
help me
help me  HI. Please help me for doing project. i want to send control from one jsp page to 2 jsp pages... is it possible? if possible how to do
help me
help me  please send me the java code to count the number of similar words in given string and replace that word with new one
help me..
help me..   what are the component needed by grid computing, cloud computing and ubiquitous computing? discuss about the security of above computing. difference between that 3 computing
help me...
help me...  Write a program that inputs four words and them displays all possible permutations of the words. So, for example, if the words mad, dog, bites and man are entered, then the following are output : man bites mad dog
help me..
help me..  Write a program that inputs four words and them displays all possible permutations of the words. So, for example, if the words mad, dog, bites and man are entered, then the following are output : man bites mad dog mad
help me
button, and nationality I'm using dropdown list. Please help me. your kindness...help me  Hi I'm loges. I'm doing my final year project now, I have some problem in my project and i need some help on it. NowI'm doing a site
help me...
help me...  there is the picture given - cat - dog - rabbit - mouse a. create a class name b. create its attributes (at least 3 attributes) : species, size, leg c. create its methods ( at least 3 methods) : walk, eat, sleep
Help me
Help me  HI I am using Tomcat6.0 this is the problem i got wen i run.../html&amp;quot;); PrintWriter out=response.getWriter(); String name...-file-list> <servlet> <servlet-name>ZmgrVal</servlet

Ads