Tricks in Creating Web Application with Eclipse

research

1.Check if there is intalled JRE-jdk
Windows-preferences-Java-Installed JREs
If there is not add one

2.Check if there is server runtime environment set
Windows-preferences-Server-Runtime Environments
If there is not add one

3. Now start developing application
Create project
New-Web-DynamiC Web Project-give a name
4.Add application to tomcat server and run/stop the server
R-click on Server
R-Click-New-Server to add a server to the application

then right clik and select start to run
second way to run
R-click on the JSP page Run As-Run on server-select server

//==========How to create servelt:
R-Click on the project name-New-Servlet-give package name-Give servlet name

In order to invoke servlet …projectName/ServletName
//==========How to export the application as War file
File-Export-Web-War File-Give a name
Then you can run this application developed in Eclipse under webapp directory of any tomcat installations
java source files will be going into “Java Resources: src”
jsp, html go to WebContent
jars go to WebContent/lib

No Comments

Development of Java Web Services with Eclipse

research

Web Service applications require a couple of libraries such as axis, servlet-container and java software development kits. If you want to build a Web Service application on the Eclipse IDE, you have to be careful. Below you will see the basic steps when you go through any tutorial you find on the web.

Before starting, please download/install the below list.
Please do NOT use any other versions of these software/library packages. In other case you will encounter many debugging problems that you can not cope with in eclipse.

0.
Get the below packages with the right versions

axis2-1.2
Dynamic web module 2.4 (you dont need to download it is already in eclipse)
apacxhe tomcat 5.5
java 5
1. Setting axis2 runtime env
Window-preferences-WebServices-Axis2 Preferences
C:Program Filesaxis2-1.5 and ok

2.
Next we need to create a project with the support of Axis2 features. Open File -> New -> Other… -> Web -> Dynamic Web Project

Give the project a name
set the target runtime Apache Tomcat v5.5
Dynamic Web Module version 2.4
Add java 1.4 and set

3.
Right click on the project name and select Project facets
click “Axis2 Web Services”

4.
Select Converter.java, open File -> New -> Other… -> Web Services -> Web Service
-chose web service runtime first
Apache Axis2

5.
TEST:
http://localhost:8080/Axis2WSTest/

No Comments

Some hints making your life easier with Eclipse

academic, research

//========
Scrapbook: Funtions similar to JUnit test classes.

Creating Scrapbook page:
Right click on the project name + new + Other+ Java + JavaRun/Debug + Scrapbook Page

Examle: write down 2+2 and then Run+Inspect -> see the answer
When you work on scrapbook page its default tools will be shown in toolbar.

You can also run Java statements without needing main function/statement.
In order to run a java class or parts of it, you need to import the related package.
select import package button and import the package

In order to run a specific part of java statement
just select the code you want to run and select “execute the selected text” from Scrapbook toolbars.

//========
Keep the seperate source folder for the test classes such as JUnit and scrapbook pages

To do this:
File-new-source folder-name it “test”-finish
we want test classes to  be in the same package as the classes to be tested

after creating test foulder, create a package with the same name in which there are classes to be tested.

Now lets create first JUnit test class:
Right click on package-new-JUnit Test case-name it to class being tested_Test-
You might need to add the path to the JUnit library….

Class under test’e de test edilecek class ismini yaz

How to run JUnit test class:
Run-Run As- JUnit Test

Not: you have to implement test methods before running actual tests. In other case, you will get error messages.

 

//=======For Java
Source + <generate setters and getters methods>
Automatically creates get and set methods for all the predefined variables.
//=========quick fix
problems tabinda (asagida) problemin uzerinde right clik yap sec
Ctrl+1 enable you to fix the problem in the edit page – during coding.
//=======how to configure add/edit project’s build path
right clik on the name of the project  – Build path – Configure Build path -
//==========Object initialization in shortcut
Write “New” then Ctrl+spacebar, then update the Object’s type and name.
//==========creating main method in shortcut
Write “main” then Ctrl+spacebar

//===========System.out in shortcut
after writing the text/statement to be displayed, highlight it and then Ctrl+Spacebar
//========== creating jar from the source files
File-export-Java-Jar file

 

//============Importing a project
Since eclipse is based on standards we can work on any project developed by someone else
File-Import-General-Existing projects into Workspace-(select archive file)-open
//==========How to open multiple files at once
Select the files from the project pane and then drag&drop in to the edit pane.
//======finding out the places where commands are defined or set
Ctrl+3
ex. write Web Services and see all the related settings wizards and etc.

It is a very handy way to quickly find commands, menu choces or resources.
//=============Keyboard shurtcuts
Window-preferences-Keys
OR
Ctrl+Shift+L : keyboard shurtcut key assist
ex.
Ctrl+S  Save the document
Ctrl+F : Find / replace
CTRL+Space : yardimci menuyu acar kelimeyi tamamlamak icin
Ctrl+D: Delete the current line
Ctrl+Shift+Delete:
Ctrl+Z: Undo
Ctrl+right: move to the next word
Ctrl+left: move to the prev word
Ctrl+Shift+right: add next word to selection
Ctrl+Shift+left: add prev word to selection
Ctrl+J: Incremental Find next
Alt + /: word completion
Ctrl_Shift+F: Format  <default formats are defined in Windows-preferences. for ex. xml file: XML-XML Files-Editor>

//=========Creating your own shurtcut
Window-preferences-Keys-<click on “include unbound comments”>type binding
//=====export/import preferences from one project to another

File-Export-preferences-browse to find/name a file- save

In new workspace
File-import- browse file-open
//=========Compare editor (comparing different versions of the same file)
Right Click-Compare with-Local History-select one from the list
left column shows the current version of the file
Right column shows the earlier version of the file

Eclipse save our editing history automatically each time we save the file.
/=========Compare editor (comparing different files)
select the files from package explorer pane and then
right clik and select compare with.. – each other
//=======Bring back the deleted files
Right click on the project name in package explorer
select Restro from Local History
then restore

//======================
Use import and export with archive files to
-share a project with anothe person or computer
-take a snapshot of a project for later use

No Comments

Bilinen markalar ve ulkeleri

personel

Turkiye:
Vestel, Arcelik, YU-MA-TU
Japonya:
Sony, Seiko, Panasonic, Nec, Toshiba, Pioneer, Mitsubishi, Nissan, Toyota, Isizu, Honda, JVC, Casio, Fijutsi, Canon, Apple, Aiwa,
Tayvan:
Asus
ABD:
Nike, Creative, AMD, Dell, IBM, Sun, Kodak, Levis, HP, Ford, Coco Cola, Marlbora,
Almanya:
Mercdes, BMW, Audi, VW, Adidas, Puma, Grundig, Schaub&Lorenz, Blaupunkt, Porsche, Siemens, AEG, Bosch, Profilo, Opel, Skoda,
Ingiltere:
Reebok
Kore:
Lg, Premier, Samsung, Hyndai, Kia,
Fransa:
Alcatel, Renault, Danone, Peugeut,
Hollanda:
Philips
Italya:
Ferrari,
Finlandiya:
Nokia
Rusya:
Lada
Isvicre:
Milka

No Comments

Some Tools To Manage All Your Passwords

academic

The advent of Web 2.0 and the rise of social networking sites and other web services has compelled most of us to create dozens of new accounts – each requiring a username and a password.

While the easier option would be to maintain a single username and password for all your online accounts, it is not advisable from a security point of view. Lack of strong passwords makes it easy for hackers to break into your accounts. Hence it is better to have a unique and strong password for every online account

Continue Reading »

No Comments
« Older Posts