Sunday, 23 June 2013

16. Assume that the information regarding the marks for all the subjects of a student in the last exam are available in a database, Develop a Servlet which takes the enrollment number of a student as a request parameter and displays the marksheet for the student.

0 comments
WTAD Practical - 16
Assume that the information regarding the marks for all the subjects of a student in
the last exam are available in a database, Develop a Servlet which takes the
enrollment number of a student as a request parameter and displays the marksheet for the student.
index.html


<HTML>
<HEAD>
<TITLE>WTAD.practical-16 @iAmLearningHere </TITLE>

</HEAD>
<BODY bgcolor="YellowGreen">
<h3> Result  </h3>
<hr>
<form name="frm1" action="display">
Enter Enrolment No :: <input type="text" name="en"> 
<input type="submit" Value="Get Result"">
</form>
</BODY>
</HTML>

Saturday, 22 June 2013

15. Assume that we have got three pdf files for the MCA-1 Syllabus, MCA-2 Syllabus and MCA-3 Syllabus respectively, Now write a Servlet which displays the appropriate PDF file to the client, by looking at a request parameter for the year (1, 2 or 3).

1 comments
WTAD Practical - 15
Write a Servlet to display parameters available on request.
index.html


<HTML>
<HEAD>
<TITLE>WTAD.practical-15 @iAmLearningHere </TITLE>
</HEAD>
<BODY bgcolor="YellowGreen">
<h3>DISPLAY Syllabus in pdf</h3>
<hr>
<form name="f1" action="display" method="get" >
MCA-1<br>
MCA-2<br>
MCA-3<br>
<input type="text" name="MCA" value="" />
<input type="submit" value="Show Syllabus" />
</form>
</BODY>
</HTML>

14. Write a Servlet which displays a message and also displays how many times the message has been displayed (how many times the page has been visited).

0 comments
WTAD Practical - 14
Write a Servlet which displays a message and also displays how many times the
message has been displayed (how many times the page has been visited).
WEB-INF/web.xml


<web-app>
<servlet>
<servlet-name>s14</servlet-name>
<servlet-class>VisitCount</servlet-class>
</servlet>
<!-- Servlet Mapping -->
<servlet-mapping>
<servlet-name>s14</servlet-name>
<url-pattern>/visit</url-pattern>
</servlet-mapping>
</web-app>

12. Write a Servlet to display parameters available on request.

0 comments
WTAD Practical - 12
Write a Servlet to display parameters available on request.
index.html


<HTML>
<HEAD>
<TITLE>WTAD.practical-12 @iAmLearningHere </TITLE>
</HEAD>
<BODY bgcolor="YellowGreen">
<h3>Display parameters available on request.</h3>
<hr>
<form name="f1" action="display" method="get" >
<!-- Enter Three Parameters Here -->
Source Name:<input type="text" name="nm"/><br />
Subject 1 &nbsp;&nbsp;&nbsp; : <input type="text" name="sub1" /><br />
Subject 2 &nbsp;&nbsp;&nbsp; : <input type="text" name="sub2" /><br />

<input type="submit" value="Send Parameters" />
</form>
</BODY>
</HTML>

Friday, 21 June 2013

11. Write a Servlet to display all the headers available from request.

1 comments
WTAD Practical - 11
Write a Servlet to display all the headers available from request.
WEB-INF/web.xml


<web-app>
<servlet>
<servlet-name>s11</servlet-name>
<servlet-class>RequestHeaders</servlet-class>
</servlet>
<!-- Servlet Mapping -->
<servlet-mapping>
<servlet-name>s11</servlet-name>
<url-pattern>/requestheaders</url-pattern>
</servlet-mapping>
</web-app>

10.Write a Servlet to display “Hello World” on browser.

0 comments
WTAD Practical - 10
Write a Servlet to display “Hello World” on browser.
WEB-INF/web.xml


<web-app>
<servlet>
<servlet-name>s10</servlet-name>
<servlet-class>Hello</servlet-class>
</servlet>
<!-- Servlet Mapping -->
<servlet-mapping>
<servlet-name>s10</servlet-name>
<url-pattern>/hello</url-pattern>
</servlet-mapping>
</web-app>

Monday, 17 June 2013

9. Write a JavaScript to show a pop up window with a message Hello and background color lime and with solid black border.

0 comments
WTAD Practical - 9
Write a JavaScript to show a pop up window with a message Hello and background
color lime and with solid black border.




<HTML>
<html>
<HEAD>
<TITLE>WTAD.practical-9 @iAmLearningHere </TITLE>
</HEAD>
<body bgcolor="YellowGreen">
    <form name="f1">
            <input type="button" value="Pop Up"    onclick="window.open('w1.html','PopUpWindow','width=2s00',
            'height=50')">
    </form>
</body>
</HTML>

8. Write a JavaScript to find a string from the given text. If the match is found then replace it with another string.

0 comments
WTAD Practical - 8
Write a JavaScript to find a string from the given text. If the match is found then
replace it with another string.




<HTML>
<html>
<HEAD>
<TITLE>WTAD.practical-8 @iAmLearningHere </TITLE>
</HEAD>
<body bgcolor="YellowGreen">
        <font size="4">
        <script language="javascript" type="text/javascript">
        var c = prompt("Enter Text :");
        var searchtxt = prompt("Enter Search Text :");
        document.write("<br>Text is :: " + c );
        document.write("<br>Search text is :: " + searchtxt);
        var r = new RegExp(searchtxt);
        if ( c.search() == -1)
        {
            alert("Match Not Found");
            var searchtxt = prompt("Enter Search Text Again:");
        }
        else
        {
            alert("Match Found !");
            var rtext = prompt("Enter  Text To replace With:");
            document.write("<br>Replace text is :: " + rtext);
            document.write("<br>Replaced Text :: " + c.replace(r,rtext));
        }
    </script>
    </body>
</HTML>

7. Write a JavaScript to convert Celsius to Fahrenheit.

0 comments
WTAD Practical - 7
Write a JavaScript to generate two random numbers and find out maximum and
minimum out of it.




<HTML>
<html>
<HEAD>
<TITLE>WTAD.practical-7 @iAmLearningHere </TITLE>
</HEAD>
<body bgcolor="YellowGreen">
        <center><font size=5>
        <script language="JavaScript">
            var a,b;
            a=parseFloat(prompt("enter the Celsius:",""));
            document.write("Celsius value is: "+a+"<br><br>");
            b=32+(a*1.8);
            alert("Celsius to Fehrenheit "+b);
            document.write("Fehrenheit value is: "+b);
        </script>
    </body>
</HTML>

6. Write a JavaScript to remove the highest element from the array and arrange the array in ascending order.

0 comments
WTAD Practical - 6
 Write a JavaScript to remove the highest element from the array and arrange the array in ascending order.

<HTML>
<html>
<HEAD>
<TITLE>WTAD.practical-6 @iAmLearningHere </TITLE>
</HEAD>
<BODY bgcolor="YellowGreen">
    <script language="JavaScript">
            var i,size,j,temp;
            var arr=new Array();
            size=parseInt(prompt("enter the size of array",""));
            for(i=0;i<size;i++)
            {
                arr[i]=parseInt(prompt("enter the element of array",""));
            }
            document.write("array is:-<br>");
            for(i=0;i<size;i++)
            {
                document.write(arr[i]+", ");
            }
            for(i=0;i<size;i++)
            {
                for(j=i+1;j<size;j++)
                {
                    if(arr[i]>arr[j])
                    {
                        temp=arr[i];
                        arr[i]=arr[j];
                        arr[j]=temp;
                    }
                }
            }
            document.write("<br><br>sorted array is:-<br>");
            for(i=0;i<size;i++)
            {
                document.write( arr[i] + ", ");
            }
            document.write("<br><br>after delete large element array is:-<br>");
            arr.pop();
            for(i=0;i<arr.length;i++)
            {
                document.write(arr[i]+", ");
            }
        </script>
</BODY>
</HTML>
 

Recent Post

Recent Comments

© 2010 IamLearningHere Template by MBT