Showing posts with label J2EE. Show all posts
Showing posts with label J2EE. Show all posts

Tuesday, April 28, 2009

Running JMeter on HTTP


1. Download latest JMeter to GMOnline Computer
Goto http://jakarta.apache.org/site/downloads/index.html
Click “JMeter”
Select the zip file under “Binary” (Current version is 2.3.2.zip)
2. Unzip the downloaded zip file
3. Go to “jakata-jmeter-2.3.2/bin” folder and click “jmeter.bat”. If an error is displayed, you may not have JRE installed, go to step 4; otherwise go to step 5.
4. Install JRE
Go to http://java.com/en/download/index.jsp
Click “Free Java Download” button
Follow the instruction to download and install latest JRE
5. After “jmeter.bat” is clicked, the application is displayed


6. Right-click the Test Plan element and select Add and then Thread Group. JMeter will create a thread group element under Test Plan element.
7. In this page, you can set the following properties:
Name -- the name of this thread group. You can give a descriptive name to this property such as “ERMS Applet Test”.
Number of Threads -- the number of threads created. Each thread represents a single user. Therefore, if you want to simulate a load test with 10 concurrent users, enter 10 as the value for this property.
Ramp-Up Period -- the number of seconds JMeter will take to accelerate to create all of the threads needed. If the number of threads used is 10 and the ramp-up period is 20 seconds, JMeter will take 20 seconds to create those 10 threads, creating one new thread every two seconds. If you want all threads to be created at once, put 0 in this box.
Forever -- if clicked, this option tells JMeter to keep sending requests to the tested application indefinitely. If disabled, JMeter will repeat the test for the number of times entered in the Loop Count box.
Loop Count --this property value only has an effect if the Forever check box is unchecked. It tells JMeter the number of times it has to repeat the test.
8. Right-click the Thread Group element, and select Add, Sampler, and then HTTP Request. An HTTP Request element will be added to the Thread Group element. Click the HTTP Request element to select it.
9. On the HTTP Request screen, you configure the HTTP requests that will be used to "hit" your application. Here, you can set the following properties.
Name -- the name of this HTTP request. The name should be descriptive such as “Request ERMS Applet”; it is common to have multiple HTTP Request elements in a thread group.
Server Name or IP -- the server name or the IP address of the machine running the application being tested. (“erms.nam.gm.com”)
Port Number -- the port number used by the application. Normally, a Web application runs on port 80.
Protocol -- the protocol used, either HTTP or HTTPS. (ERMS uses HTTP)
Method -- the request method, either GET or POST.
Path -- the path to the resource that will handle this request. (e.g. “/aptest”)
Follow Redirects -- follows redirections sent by the Web application, if any.
Use KeepAlive -- if checked, sends the Connection = Keep-Alive request header. By default, an HTTP 1.1 browser uses Keep-Alive as the value of the Connection header. Therefore, this checkbox should be checked.
Parameters -- the list of parameters sent with this request. Use the Add and Delete buttons to add and remove parameters. (none)
Send a file with a request -- simulate a file upload to the Web application. (none)
Retrieve All Embedded Resources from HTML Files -- download embedded content including Applet. Make sure this option is checked
10. The last element that we need to add to our test plan is a listener, which in JMeter is the same as a report. JMeter comes with various reports to choose from. A report can be a table or a graph. For this testing, use the easiest report available: a table.
11. To add a listener, right-click the Thread Group element, select Add, and then Listener and View Results in Table. Now you are ready to run the test plan.
12. Before you run your test plan, however, you are advised to save the test plan just in case JMeter crashes the system (an occasional occurrence with higher numbers of threads and loop counts).
13. Select Start from the Run menu to execute the test plan.
14. Click on ”View Results in Table” to view the result.

Monday, April 20, 2009

JSR 168 (Portlet Specification)

What is The Portlet Specification?
The Java™ Specification Request 168 Portlet Specification (JSR 168) standardizes how components for portal servers are to be developed. This standard has industry backing from major portal server vendors.

• The portlet container contract and portlet life cycle management
• The definition of window states and portlet modes
• Portlet preferences management
• User information
• Packaging and deployment
• Security
• JSP tags to aid portlet development
















Container Contract
•init()
•destroy()
•processAction()
•render()
GenericPortlet can be extended (called by render())
•doView()
•doEdit()
•doHelp()

The processAction(), render(), and specialized methods called by render() accept portlet requests and response objects similar to those passed to the Servlet service() method. Using these objects, the portlet class can do the following:
• Maintain state and communicate with other portlets, servlets, and JSP’s using the portlet session facilities.
• Receive user input from forms displayed in the portlet.
• Create the content for display by the Portal desktop that is sent back to the client via the response object.
• Query portal and portlet state information.

Portlet Mode and Window State
•Portlet Mode – current mode (View, Edit, Help)
•Window state – Amount of portal page space assigned to a portlet (minimized, maximized, normal)

Portlet Preferences
•Name-value pairs.
•Access - PortletPreferences interface, getValues(), setValues()
•Validate – PreferencesValidator interface, store() method invokes validate()

User Information
•In deployment descriptor; unmodifiable Map object (retrieved through USER_INFO in Request interface)
•Packaging and deployment as WAR
•In addition to web.xml, has portlet.xml

Security
•Flag to restrict to HTTPS
•Authentication (user, role)

JSP Tag Library
•A JSP Tag library is included to help display portlet pages with JSP technology.
•For example, a custom JSP tag automatically declares the portlet request and response objects so they can be used within the JSP
•Another JSP tag helps construct URL’s that refer back to the portlet.

Initialization Sequence Diagram

Thursday, March 26, 2009

Install Crystal Reports XI Developer

Open zip file “CrystalRptXI Install.zip”

1. Run setup.exe

1.1 Splash Screen-
Select 'English" and click "Install'

2.Welcome screen-
Click 'Next"

3. License Agreement Screen-

Check button "I Accept"
Click "Next"

4. User Information screen-Enter following at prompts.

Full Name: <Your Name>
Organization: <Your Company>
Product Key Code: < Get it from Business Objects Sales >

Click "Next"

5. Select Installation Type screen-

Check button "Typical"

Enter following at prompts.
Destination Folder: "e:\program files\business objects\"
Common Files Folder: "e:\program files\common files\business objects\3.0\"

Click "Next"

6. Start Installation screen.

Click "Next"

Note: Install check disk for space. If not enough disk space you will be prompted. Adjust space and proceed"

7. Crystal Reports Install in progress screen.

Wait until finished
If Prompted for Disk 2 - Click "OK"

8. Register Now screen-

Don't register!

Click "Register Later"

9. Crystal Reprots XI Installed screen -

UNCheck button "Check for Updates"
Click "Finish"

Main software Install is done.
OK - Now there are updates. Perform in this order.


Perform XI SP2 Install:

10. Run “crXIwin_sp2.exe” self extracting zip

11. Winzip Self-Extractor “This File will” screen -

Click “OK”

12. Winzip Self-Extractor - crXIwin_sp2.exe screen-

Enter following at prompts.
Unzip to folder: E:\Program Files\Business Objects\Crystal Reports 11\Patches\SP2

Keep Overwrite? And When done checked.

Click “Unzip”
Wait……


13. Winzip Extractor “17 files unzipped” screen -

Click “OK”

Install starts….
14. Choose Setup Screen -

Click “OK”

Run crXIwin_mhf.exe

Tuesday, March 17, 2009

Java Server Faces (JSF)

Java Server Faces (JSF)
- JSF is Sun’s standard Java Model View Controller framework
- Included in the JEE5 specification.
- Allows for robust tool support
- Specifically supports the Controller and View tiers
- Offers a component based event driven programming model
- View rendering with JSP and component Taglibs

MVC JSP Model 2












JSF Application Flow