Thursday, April 23, 2009

Running a servlet using jsdk2.1

How to run a Servlet?

STEPS:

STEP 1: DOWNLOADING JSDK2.1
STEP 2: SETTING UP THE JSDK
STEP 3: CREATING A HTML FILE
STEP 4: CREATING A SERVLET CLASS
STEP 5: STARTING THE SERVER
STEP 6: BROWSER INTERPRETATION OF THE SERVER STARTED
STEP 7: VIEWING THE HTML FILE FROM THE BROWSER
STEP 8: STOPPING THE SERVER




STEP 1:DOWNLOADING JSDK2.1

Type this url in your browser to download the J2SDK(JAVA 2 SERVLET DEVELOPMENT KIT)

http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/jsdk2_1-win.zip?BundledLineItemUUID=iCpIBe.m248AAAEgVllHfNHo&OrderID=9MFIBe.mvEQAAAEgRllHfNHo&ProductID=Mx3ACUFB4OIAAAEY1wI5AXis&FileName=/jsdk2_1-win.zip


STEP 2:SETTING UP THE JSDK

Extract the contents from the zip file
The folder name is jsdk2.1.
Copy this folder into the disk drive you want(I have used C: drive)

STEP 3:CREATING A HTML FILE

Type a html file (which invokes a servlet).
Store the html file in the directory(C:\jsdk2.1\examples\servlets)

Note:
Form tag in the html should look like
form action="http://localhost:8080/examples/servlet/yourservletclassname"


STEP 4:CREATING A SERVLET CLASS

Type the servlet class
Compile it
Copy the class file
Paste the class file in the directory(C:\jsdk2.1\examples\WEB-INF\servlets)


STEP 5:STARTING THE SERVER

Go to the directory C:\jsdk2.1

Double click startserver.bat
a command window will open (just minimize it)

STEP 6:BROWSER INTERPRETATION OF THE SERVER STARTED

Open ur browser
Type "http://localhost:8080" in the address bar and press Enter

You will see the Introduction page with Documentation and Examples link
(Success there is a server running on port 8080)

STEP 7: VIEWING THE HTML FILE FROM THE BROWSER

Type "http://localhost:8080/examples/servlets/yourfile.html"
Press Enter

the html contents will be displayed

The servlet wil be invoked according to your actions.

STEP 8: STOPPING THE SERVER

To stop ur server go to C:\jsdk2.1
double click stopserver.bat



Have a nice Servlet Programming Experience
Cheers :)

Wednesday, April 22, 2009

copied song in kadhalil vilundaen


This song is copied by vijay antony in kadhalil vilundaen..unakena naan..







Now surf faster and smarter ! Check out the new Firefox 3 - Yahoo! Edition * Click here!

Thursday, April 9, 2009

Udp echo program using broadcast

In this program the client broadcasts the message which is received by 3 servers n echoed backed to the client.The client receives 3 echo response from all 3 servers.click enter to get response from each server..download thefile from the link below..

Saturday, April 4, 2009

packages to be installed for running rpc

install the packages using the following commands inorder to run rpc in ubuntu
  • ubuntu@ubuntu:~$ sudo apt-get install g++
  • ubuntu@ubuntu:~$ sudo apt-get install quota
  • ubuntu@ubuntu:~$ sudo apt-get install nfs-kernel-server
after installing the packages you can use g++ and can run the server too..

The following is the error screen i encountered and the actions taken..

ubuntu@ubuntu:~$ g++ -c rand_client.c
The program 'g++' can be found in the following packages:
* g++
* pentium-builder
Try: sudo apt-get install
bash: g++: command not found
ubuntu@ubuntu:~$ sudo apt-get install g++

ubuntu@ubuntu:~$ ./rand_server

Cannot register service: RPC: Unable to receive; errno = Connection refused
unable to register (RAND_PROG, RAND_VERS, udp).ubuntu@ubuntu:~$ ./rand_server
Cannot register service: RPC: Unable to receive; errno = Connection refused
unable to register (RAND_PROG, RAND_VERS, udp).ubuntu@ubuntu:~$ netstat -a|grep nfs


ubuntu@ubuntu:~$ sudo apt-get install quota
[sudo] password for ubuntu:


ubuntu@ubuntu:~$ sudo apt-get install nfs-kernel-server

ubuntu@ubuntu:~$ ./rand_server

Translate This Page

My Mom's blog

If u are a person interested in crafts and fabric stuffs pls check out this link.. http://www.fabriccraft.blogspot.com/

Blog Rankings

Personal Blogs - Blog Rankings