Posts Tagged form

Wicket Tutorial, part 3 – first form in our application

Tags: , , , , ,

Hello Visitor :) In previous posts we created base project and added common layout to ItemDirectory Wicket application. Today we are going to add first form to allow users to insert some data into our application.

As main feature of ItemDirectory is to manage information where items (books, movies, music, postage stamps) are stored in our home/work, the first data we need to know are locations where we actually can store those things. So we start with adding table, entity and form to manage locations of our precious items.

Database, entity and DAO

First thing we need is locations table in database and entity mapping class:

- sql create table script listing:

create table locations (
	id bigint(20) not null auto_increment,
	name varchar(255) not null,
        PRIMARY KEY (id),
	UNIQUE KEY unique_name (name)
);

- entity class listing:

@javax.persistence.Entity
@Table(name = "locations")
public class Location extends AbstractEntity {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;
   @Column(length=255, nullable=false)
    private String name;
        protected Location() {
		super();
	}
	public Location(String name) {
		super();
		this.name = name;
	}
	// getters, setters omitted
}

As you can see, Location class is very simple: only one field, but the only thing we want at the moment from this entity is a name describing where item is stored. Is it “Bookcase in living room, second drawer from the top” or “Cabinet in the saloon, top bookshelf”.

Continue reading this post …


Be Sociable, Share!

Submitting SSL and no-SSL html forms using JMeter

Tags: , , , , ,

JMeter is well-known tool for testing performance of web applications, databases and many other things (check project official site for more). Today I am going to show how to test web application with JMeter when user needs to be logged-in to take some actions (JMeter must fill and submit login form at first).

Im my diploma thesis which involves comparison between Struts 2 and Wicket, I need to take some tests about how fast are both frameworks. For this purpose I used mentioned above tool. In this post I will show and describe how form submitting can be done from JMeter depending on application architecture and security level.

Simple sending post-data to login form

SMS gateway siteExample site: http://ebramka.ath.cx/ – polish free sms gateway
Use case: login user and then check if main page rendered properly.

This one is pretty simple. No HTTPS protocol, no SSL, just pure post data sent to login form. Continue reading this post …


Be Sociable, Share!