J2EE Enterprise Design Patterns | how to configure web.xml (Or Deployment descriptor) | Java Application using MyEclipse Debugging | Scala Language

Java application using MyEclipse debugging

Posted on: August 17, 2009

Java Application with MyEclipse

Developing Java, J2EE application using available editors like MyEclipse, eclipse, NetBeans and other editor, I have always found so many developers wondering which editor good to develop any java application. After having 2 plus years experience, I found MyEclipse is best way to create new java application, maintain, debug, deploy web application, configure server hot deployment mode, install new plug-in, configure external server and using single click start and stop server is too easy.
My purpose to write this blog is to show you how to use editor effectively when you are developing Java application with MyEclipse. Below I have tried my level best to explain all basic features of MyEclipse.

Create web application and Configure Server with Eclipse

Below snap show you simple MyEclipse editor.1

Second snap show how to create web application.



Click on finish to create skeleton of sample web application.

MyEclipse inbuilt provide MyEclipse Tomcat, so no need to configure external server.


But what if you want to configure external server. See below snap for configure external server. After click on Configure Server show on above snap.Configure Server open window which shows different server and according to your requirement configure with eclipse.


Always launch you server in debug mode because debug mode server take instance changes from change in application so don’t need to restart your server after change in java code. So for hot deployment always launch your server debug mode.


Now after creating web application and configuring web server, now it’s time to deploy application with server. Deploy application with another editor is too massy and long process, but with MyEclipse web application deployment is too easy and with single click. For deploy web application with MyEclipse see below snap. Click on box show in red box. Which open another window and shows all projects, select project which you want to deploy. After select your project click on Add button. After click on add button open another window with configure all server with your MyEclipse IDE. Select one server and press Finish button and then click Ok button. Using these simple step you application successfully deployed with selected server. If you want to remove application from server simple click on Remove button. If you want to re-deploy your application click on Redeploy button. And if you want to look at deploy directory structure at server click on Browse button.






Now you are just some step behind to run your web application with your browser. Start your server just clicking single click.


After starting your server just open your browser and hit request
http://localhost:8080/ SampleApplication
You will get your index page.


Now you start to make web application according to your requirement. Just create package for Java classes at src folder and create jsp for your view part.

Debugging application with Eclipse

How to debug your application with your IDE. Debug will makes your life easy and provide you to fast solution of exception or error. You get direct idea about which variable contains wrong value and what is the reason behind variable contains wrong value.

First follow the basic step describe below.

  • Make sure your server start in debug mode.
  • Mark break point at java class.
  • Hit browser request to send control at your mark break point.
  • Remember F5, F6 and F8 three main keys to debug application.
  • F5:- F5 user for step into particular line.

    F6:- F6 use for execute line and get control to next line.

    F8:- F8 uses for resume you’re debugging from that point or go to next break point if next break point available.

    First mark break point where you want your application flow stops for you. After putting break point hit request your browser for test your java class. Now you saw in green color flow of control reached at given break point. Press F6 for execute that line and go to next line. Now if you want to inspect the value of you variable simple select variable and just press Ctrl+Shift+i (Short cut for Inspect). That will open window and show you value of your variable. Using inspect you can check your variable value and get idea about all variable contains correct value or not.






    If you want to step into particular statement Press F5. For example if you inspect your method execution press F5 at your method call, F5 transfer your debugging control to line where you press F5.



    At variable section you can also inspect your variable.



    If you still have any query and doubt please feel free to ask me question.

    Nishan Patel
    SCJP 1.5, SCWCD 1.5
    Java Developer
    Enterprise Design Patterns
    Configuring an Application with a Deployment Descriptor


    3 Responses to "Java application using MyEclipse debugging"


    The topic is nice.but i know how deploy the project now i want how to configure web.xml file in myeclipse.please send me the screen shots to the related topics.

    hello sir,

    when ctrl+shift+i(inspect) “result can’t be resolved”. I am unable to see the results. please let me know.



    Hi Sir,

    This topic is very helpful, but could you be a bit more specific about the usage of F5, as in which method to call

    Leave a Reply

    Fill in your details below or click an icon to log in:

    WordPress.com Logo

    You are commenting using your WordPress.com account. Log Out /  Change )

    Google+ photo

    You are commenting using your Google+ account. Log Out /  Change )

    Twitter picture

    You are commenting using your Twitter account. Log Out /  Change )

    Facebook photo

    You are commenting using your Facebook account. Log Out /  Change )


    Connecting to %s

    Blog Stats

    • 8,131 hits

    Top Clicks

    • None


    Enter your email address to follow this blog and receive notifications of new posts by email.

    Join 3 other followers

    %d bloggers like this: