JSP-JSF-Bean and Source Package : web Module

Objective

 

Step: 1 Create new Project Netbean 6.8/ Glassfish / at workstation Manas8x

a. Choose Project: java web : Web Application (Go Back to TOP )

b. Name and Location

c. Server and Setting

The default server was not started, was manually stopped, simple go back on the above screen and start GlassFish Web-Server supporting JEE applications.

after Starting  the server, Click Next,

Browse to the folder where you installed your server

Click On Finish

The Server and Setting Step will show Server Option as shown above. Now click Next to proceed to the next step.

d. Now choose Frame Work , note we have several frame works available to test. But we will go with default and won't choose any framework from the list. (TOP)

Window Ultimate will show the scanner

Step : 2 Create a custom class and editing the class (Back to TOP )

Now name the class and package as suits you the best, (please make a note of it, that Source Package folder won't be created when You use Tomcat 6.0 and 6.9 , the folder like "src" will be one where you store this source code)

C:\NetBeansProjects\Cplus\Intro1\WebAppMod1\src\java\ex1\Wmb1\Webmodule1.java class_webmodule1.txt

Now you will be relieved to see some known script, ( as you fill confident with codes than figures and tools)

Edit the class "WebModule" , class_webmodule1.txt to class_webmodule1_final.txt

To view the final codes in the class: class_webmodule1_final.txt

Step : 3 Creating Web Component :  Back to index page, turn on the Palette (Go Back To TOP )

Drag a Form "Web-Component"

Then add a "Text Input"  and "Button" from the tool pane.

We will have some codes added on the index page, the added code can be seen with this link index2.txt

This page can be viewed over a browser and would appear like the one shown below. (Caution please don't submit this form, as its responder page is not created yet. ( FYI: action is set to "response.jsp");

Intranet User  http://manas8x:8080/WebAppMod1/

 

Step: 3 Creating responder page (TOP )

The best suited name is response as it is going to respond to a string

path : C:\NetBeansProjects\Cplus\Intro1\WebAppMod1\web\ex1.wmb1\response.jsp

I just altered some text to display different than the index.jsp

Step; 4 Using Bean from the palette pane.(Go Back to TOP)

Nice about the IDE, it was prompt to detect any error

Setting Get properties

The final code in response.jsp may appear like this. To viw the code, use this link response.jsp.txt

 

Step: 5 Run time View intranet users http://manas8x:8080/WebAppMod1/  ( Back To TOP )

http://manas8x:8080/WebAppMod1/