Friday, October 2, 2009

Java 2 Enterprise Edition..... An Introduction...


Java 2 Enterprise Edition (J2EE)
a) Software Required: 
         · Web Server 
            · Apache Tomcat Server 6.0
b) Steps for installing Apache Tomcat:
· Go to the link : http://tomcat.apache.org/download-60.cgi#6.0.20
· Run the file : “apache-tomcat-6.0.20.exe”
· Follow the instruction for installation.
· Copy the file called “com.sysdeo.eclipse.tomcat_3.2.1” from the Tomcat folder and paste it inside the plugins folder under the eclipse where the eclipse is installed.
· For the installation of Tomcat server 6.0 refer the link: http://www.roseindia.net/web-application-server/tomcat/install-configure.shtml
· Go to the WINDOWS tab in the Menu bar and select "Preferences"
· Select "server" option on the left of the window and add the "Tomcat Installation Directories path" in the option provided.


c) Setting up Environment variables:
For example if the Apache Tomcat server is installed in the directory “D:” then, The Environment variables are set as follows.


















d) Configuring Tomcat to be used with Eclipse Externally:
· How to configure Tomcat server in Eclipse?
Here i have taken an example of the configuring the “Apache Tomcat version 5.5”, in this example the Tomcat server is installed in the “C:\” directory.










· How to create a Web application in eclipse?
































·     How to create servlet?




 


 







 


 





·         How to execute Web applications in Eclipse?





















                  
Example: If the following code is written in the index.jsp (Created as mentioned earlier)

"GreetingServlet" method="POST">
        First Name: "text" name="firstName" size="20">
        Surname: "text" name="surname" size="20">       
        "submit" value="Submit">
  
 
When we run the index.jsp on server , The following page will be seen




                 Suppose the doPost() method is written as follows,




On Clicking the “Submit” button the following page will be seen 

Wednesday, September 30, 2009

Patience


Hi pals… :-)

Here I am with a new blog..… Now this is one of the important things in life which is taken very lightly by the people around this world. Yes I’m talking about the term called “PATIENCE”
Patience…………. sound very polite is it? :-)

This word is properly understood by most of the people around world however they give less importance to such things…. As always the quality which we have in us will be neglected and people only look around and try to be like some other personality. :-)

Here am gonna talk about the word Patience, and I must say am writing this blog very patiently :-)
As I have seen the people around me they always say a common sentence which is “Am very impatient” Am sure even u guys have heard this from many of your friends. But do u think its an drawback in your life?
When you talk about this topic, lots of questions arise in our minds, such as….

1. Are we really impatient??
2. Is patience necessary to lead a happy and cheerful life??
3. Is there any way to be patient?
4. What can I do to improve my patience level?? Etc….

Well as far as my knowledge is concerned, I can define patience as follows,
PATIENCE is the capability or capacity of a person to tolerate the unexpected things happening around him/her. It has a slight touch of Love. It means slow to anger, or far from anger. It also means that whatever you do to me, you cannot make me hate you and not even get angry on you.
We have came across many kinds of people as we grow up, in the long run we have met people who are very kind and patient and even interacted with people who are very impatient.

I consider and strongly believe that a guy who is very patient can survive or rather avoid many disgusting situations in his/her life. Patience is a thing which can avoid lots of misunderstandings too. Usually people don’t have the patience to listen to what others say, they just act impatiently and then finally repent for their act in future. Instead of repenting in later part of the incidence, we can try to avoid such situations by simply cultivating a habit of being patient. In other way trying to listen completely what other person /people are talking about.

Nowadays the technology is growing day by day and the busy life which we all lead makes our lives very fast and stressful. So this condition itself makes us impatient in one or the other way. As u all know arguing with the people around us (Its quiet natural…) but sometimes these arguments can change the perspective of the person with whom we interact, which can lead to lots of misunderstandings and misbehavior most of the times.
I won’t say that one has to be so patient that even if he is in worst situations, he must be patient and shouldn’t react in a harsh manner. There is a limit for everything.(even sea has got limit…..!!) Similarly there is a limit for the patience level too. We can just try to increase our patience level by behaving patiently and avoiding unnecessary risks.
I am actually a very patient guy.(Hope my friends will agree…he he... ;-)) As far as I remember I hardly lost my patience at any time till now. This is because of the situations that happened or may be am brought up in an environment where it came to me naturally.Well I would like to say one thing…. “Even when you see things absolutely crush your feelings… be strong and never act out of character
This is how the patience can be improved; try to control the anger in you and one or the other day you will achieve what you really desired. It’s difficult to cultivate this habit but as people say nothing is impossible…:-) We will never achieve anything by behaving rudely or aggressively but you can win hearts of the people around you just by being patient…Patience can also be considered as the behavior of a person when he/she is made to wait for something for a long period of time.
As an example to mention, you can observe how your friend reacts with you when you make him to wait for you for an hour by saying you will meet in 5minutes and that 5minutes ends in an hour..!!!! Naturally your friend will be frustrated and he’ll blast at you for sure for your excellent time sense, by loosing his patience …!! :-D
As we can observe here each and every small things depend on our patience, it relies on how good we are in tolerating things….
so here I conclude by requesting you guys to improve your patience level by trying some little things carefully… that’s it… you wont lose anything but might gain few good friends at least… :-)
Have you observed something guys..!!! You read this lengthy blog patiently…!! have you ever thought you will read this…!! Common buddy keep going…;-) Have a peaceful future ahead….. Enjoy your life… Patientlyyyyy…………Take care..  :-)

Tuesday, September 1, 2009

Getting started with java

Hi friends...
Here i tried to write whatever i came across in java if u guys wanna start learning java and J2EE then this might help u little bit. I'll try to add more in coming days. so here i go.....


1) Java
a) Software Required:     
“jdk-6-windows-i586.exe”
In the path “http://java.sun.com/javase/downloads/index.jsp”
b) Steps for Installing Java Tool:
·         Run the “jdk-6-windows-i586.exe”, it steps through to complete the installation.
c) Setting up environment variables:
Path:  For example If the “jdk” is installed in “C” drive then the path will be
C:\Program Files\Java\jdk1.6.0\bin”
Java_Home:

 
  
  
 
         Classpath: While setting the classpath we need to mention the paths of both “bin” and “lib” folders locations separated by semicolon (“;”).

  
  
  
 



2) Development Environment:
a) Software Required:
·         Eclipse 3.5
b) Steps for installing Eclipse:
·         Copy the file “eclipse-jee-galileo-win32.zip” into one of the directory of your hard drive.
·         Extract the copied file
·         Run the file “eclipse.exe

NOTE: Eclipse 3.5 is 162MB software.
c) Getting started with Eclipse:
For Example:
·         How to create a new java project in eclipse?
 
 
 How to create a "Package" ?
 
  
Steps to create new Class..
  
  
Executing java application: