Wednesday, June 17, 2015

How to install plugin struts2 for netbeans




The first you need open a browser and enter keyword: "struts2 plugin for netbeans", and have list results same below. 

We are click the first link to go website or click here to go direct website.
You can see photo below.



Ok! This here we can see button "Download" on tab Netbeans 7.4. and click this button to download file zip.


When you download successful, you can extract file same photo below.



And here files we are extract

Next step you open your IDE Netbeans (this tutorial i use version 8.0.2)
And choice on menu: Tools > Plugins


when you click button Plugins will show dialog same photo below, and chocie: Downloaded tab 
and click button Add Plugins...


This step, you open folder contain files we are extract in step above.
And select three files same photo below and click button Open


Result and click button Install


And you can do something same with photos below








In finally step Netbeans will request Restart IDE, therefore you click button Finish to complete the installation process

When reopen IDE will window Netbeans updater and we wait for update.


OK, therefore we complete the installation process, next step i will create a example to demo.

Step 1: Click File menu > Choice New Project 


Step 2: Choice Java Web project and choice Web Application, click button Next



Step 3: Enter Project Name and click button Next



 Step 4: In dropbox Server  i used GlassFish Server 4.1 (you can use other servers: Tomcat...)
and click button Next
                                    

Step 5: Select Struts2 framework and netbeans recommended on configuration tab checkbox Create example page
and finally click button Finish

This here is structure of project struts2 when use netbeans.


We can test this project by click right mouse on project and choice Run to start server.




Waiting to see fruition :)





Ending finished this tutorial, when you try do same and have some errors you can comment, i will reply coming soon!
Thank for view and cheer!

Monday, June 15, 2015

hello world with websphere portal


Today I will teach you how to create a project with webphere portal use jsf.
Below is step by step to create new a project ( use tool Rational Application Developer for WebSphere 9.0).

Step 1:  Click File > New > Other

Step 2: Typing "Por" and choice "Portlet Project" and click "Next"


Step 3: Enter project name: "WSPortalEx1"

Note:
- Target runtime: this here i use WebSphere Portal v8.0
- Create a portlet with portlet name: "WSPortalEx1"
    


Step 4: Change configuration to JSR286: click button Modify


Step 5: Change Portlet API JSR 168 Portlet to JSR 286 Portlet






and portlet type: use Faces Portlet (Use JSF to code)


> Click button OK




Step 6: Click button Next to change Portlet Settings: change package name, position  of class...

continue you click button Finish to final step to create new portlet project.




Here is interface project when create successful 





I change text to "Hello world!"


Step 7: Run project
You click right mouse on your project and choice Run As > Run on Server




here i use WebSphere portal v8.0 Server

and click button Finish.


waiting for some minutes


and result
Therefore i finish my tutorial for create project portlet use WebSphere portal. 
If have any question you can comment i will support now.

Thank and Cheer!

Friday, June 5, 2015

IE8 not support Object.keys(), how to fix


Only need add this method  to your sourcecode.
Object.keys = Object.keys || function(
    o, // object
    k, // key
    r  // result array
) {
    // initialize object and result
    r = [];
    // iterate over object keys
    for (k in o)
        // fill result array with non-prototypical keys
        r.hasOwnProperty.call(o, k) && r.push(k);
    // return result
    return r;
};
Cheers!