Sunday, March 31, 2013

How to import web application from one system to another system

| 0 comments
How to import  web application from one system to another without any error.One method is to just copy the project from one Workspace to another ,but some time it's not successfully deploy and Tomcat(Catalina Container) will not synch with that project.Best way to deploy the web application from one system to another is, creating a WAR file(Web application ARchive) from web application ,Same as jar file in java Project.
Steps to Create War File
  • Open Web Application Right click on Deployment Descriptor-->Export->War file


  •  Set the path where to save and name given to war file,here,I change the war filename because if i give same name then it conflict with existing Project,But you can put the same name if you are deploying it on another system.
  •  Click on Finish 
  • Now how to deploy War file on another system.Click on File-->Import 
                            

  • Select Web-->War Next.                                                                                                           
              
  •  Browse the War file where it is saved and click on Finsh
          
  • Now it successfully import the Web Application without any Error

Friday, March 29, 2013

Several Port(8080, 8009) Error how to remove without restarting eclipse

| 0 comments
We all got this error many time but we just simply restart the eclipse to avoid.Now why this error occur



  1. Because there is already one tomcat server is running and we try to run another tomcat server.It seem Previous tomcat is out of synch or not stopped.
  2. What happen when we restart the eclipse ,it destroy the running tomcat from memory 

 Is it possible to handle this error without restarting eclipse ???
  1. Yes
  2. How?
  3. delete the running tomcat from memory.
  4. what i have to do for this?
  5. open  task manager in Process bar find the process called javaw.exe and just end this process,this delete the running tomcat from memory
  6. Now go back run your application ,It's working fine now.

Friday, March 15, 2013

Behind the scene of First Program

| 4 comments
Running a java program give the output on console.but to analysis the detail of java program ,need to debug using Breakpoint,on which line we  have to pause the execution of running java program,just simply Toggle Breakpoint on that line .Right Click on corresponding line as show below

   Here Toggle Breakpoint on Main function and then click on debug  button as shown below
  
   Chosse yes for Debug perspective
               
Overview of Debug perspective .It Contain the debug Section where current thread on execution is shown
and variable section show the stack of current java program (local variable).Debug current Instruction pointer indicate that upto which line processing has been done and on which line it point has to be done

press f6 button to go on next line and it will show the output on console section .f6 is used to step over.

abstraction is naked in next post ,this post just give idea that how to run the debug perspective.

Tuesday, March 12, 2013

Setup System to run java programs

| 0 comments
To run a java program we first need a jdk install on our machine,So download Jdk and Eclipse Juno from  http://www.eclipse.org/downloads/packages/release/indigo/sr2



Chosse your downloading option according to operating system.If your operating system is 32-bit the choose operating system 32 Bit else choose operating system 64 Bit.After Download just Extract the eclipse-jee-indigo-SR2-winXX-XX_.XX.zip.No need of installation




Click on the eclipse.exe 
After that it required the workspace where all the project will be save .Give path to the WorkSpace

 Click on Java Project


Next->Give Project name

 Click Finish and make it default perspective

Right Click on src >new>class


Give Class Name ,Check the method Stub to public staic void main(String[] args) and Finish

Create the first basic Program  and click on arrowed button to run the program

Output display in Console.Now you successfully create your first program.In next post discussion on the what happen when we run the Program behind the scene.