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!

Monday, April 27, 2015

Tutorial register and config Nexmo to send sms using java


Connect to Any Phone. Anytime. Anywhere. APIs for SMS, Voice & Phone Verification

To day i have a tutorial step by step for register and create small app by java to send sms free use Nexmo api

Below are info to details step to register.

Step 1:
Go website by link:
 Step 2:

 click button Try it for free

Step 3:

Enter all information: first name, last name, email...



and click button Done



Step 4: If your information is ok, Nexmo have message you check email to active account.


Step 5: mail support nexmo to active my account.



Step 6: When active account successful, Nexmo show form for you enter info: Country, Mobile Number


When enter success your info, click button Get Access Code.
Nexmo will send for you sms to enter code verify

Step 7:


You enter verification code and click button Verify to success the process register.


Next download sourcecode to build app send sms:

Go link here to choice:

Pre-built Libraries

https://docs.nexmo.com/index.php/pre-built-libraries

You can join and participate in our developer community to learn, contribute, and help make Nexmo available for more developers around the world.
Nexmo support language: Java, PHP,  Ruby, Node, Python, C#, Perl

this tutorial i will use java


You can download nexmo-java-sdk-v1.5 by link:
after download success, you extract all files
Structure sdk java 


 Step 1: Create Java Application for test

Step 2:  Project name: nexmowithjava


Step 3: and copy folder have name: "lib" to and paste to folder of project netbeans 

Step 4: Add Jar/Folder

 
Step 5: Open  folder of project netbeans and select all lib


 


Step 6: Open folder:
nexmo-java-sdk-v1.5/src


 Step 7: and copy folder have name: "com"

Step 8: and paste to your project netbeans










This here structure of project 



Step 9: Open package com.nexmo.messaging.sdk.examples and open file :
SendTextMessage.java to edit :


  • API_KEY
  • API_SECRET
  • SMS_FROM
  • SMS_TO
  • SMS_TEXT
Step 10: Before you must go link

https://dashboard.nexmo.com/private/dashboard
to get API_KEY and API_SECRET



You change API_KEY, API_SECRET, SMS_FROM, SMS_TO, SMS_TEXT for test send sms
     


 Step 11: Run file end see result



 Your phone received message from Nexmo


I'm very happy and create this tutorial for everybody can send sms, SendWapPush, SendTextMessageHttps.
This here sourcecode demo:
 https://drive.google.com/folderview?id=0B_joAwM58itefjZ0VXVHeksxemZRUzQ4dFBXMFBnbDdHbGtkOTV6d09LcGhzemFJbzVWU3M&usp=sharing
Goodluck!