IntelliJ IDEA QuickStart Guide

This quickstart is a small guide to get you up and running to start using Wicket within minutes. This project is meant to be a starting point for your first project. If you are looking for examples, please look at the example projects.

This document and project assume you have no special plugins or application servers installed on your machine. In the final section of this document some hints are given to speed up your development even further.

Summary

For the more seasoned developers here's a short list of steps to quickstart your Wicket development. All these steps are explained in more detail below.

  • download the quickstart project (follow the link in the navigation menu)
  • unzip in your projects directory
  • rename the directory to the name of your project
  • start IDEA and load the project file
  • rename the project and the module
  • edit the module settings to select the Java SDK you wish to use
  • create a new Application configuration using Start as the main class
  • run the Application
  • open browser to http://localhost:8081/quickstart
At the end of this document we suggest some next steps to take.

Setting Up

Prerequisites

We assume you have the following already installed:
  • Java SDK 1.4 (or newer)
  • IntelliJ IDEA 4.5 (or newer)
It is assumed, but not obligatory, that you have installed IntelliJ IDEA in the following (Windows) directory:
  • C:\IntelliJ-IDEA
and that your project resides in the default location:
  • %USERPROFILE%\IdeaProjects
Like stated before, it is not obligatory to use these settings, but if your installation does not match this one, please substitute your setup for these assumptions.

The QuickStart Project

Next you need to download the quickstart distribution project from our sourceforge site. Unzip the distribution into your IntelliJ IDEA project directory (which is typically located under %USERPROFILE%\IdeaProjects ). Rename the directory that was just created to your required project name. In the following the directory name is renamed to 'foobar'.

Running IntelliJ IDEA

Configuring IntelliJ IDEA

Now it is time to start IntelliJ IDEA, if you haven't done so already. In order to get IDEA working with the project you need to open the project file supplied with the Quickstart distribution.
  • Select 'File -> Open Project' from the menu bar in IDEA.
  • Navigate to the project directory, select the wicket-kickstart.ipr and click open.
  • On the project tab, right click on 'wicket-kickstart' and select 'Refactor -> Rename' from the popup menu. Change the name to match that of your project (e.g. foobar) and click ok.
  • On the project tab, right click on the new project name (e.g. foobar) and select 'Module Settings' from the popup menu. Select the 'Libraries (Classpath)' tab and then select the 'Target JDK' from those that you have added to IDEA (or add a JDK if necessary). Select ok to close the module settings dialog.

Running the Application

The application has an internal webserver ( Jetty ) which can be used to quickly develop webapplications. All you need to do is to run the application and point your browser to the webserver running from within IntelliJ IDEA.
  • From the IDEA toolbar select the run dropdown and then the 'Edit Configurations' option.
  • Select the 'Application' tag and create a new application configuration, using the Start as the main class.
  • Close the dialog and run the Quickstart application configuration from the IDEA toolbar.
  • Start your browser
  • Point the browser to the local Jetty server: http://localhost:8081/quickstart .

Next Steps

This section gives some pointers on where to go now.
  • take a look at the examples
  • find more information in the manual
  • find more information on the wiki

Jetty Configuration

The Jetty configuration file is located in the project directory:
src/main/resources/jetty-config.xml
Jetty is started on port 8081 in order to avoid conflicts with other installed application servers (for instance Tomcat). This way it is easier to test with different application servers. This can be configured in the configuration file. See the Jetty documentation for information on how to configure Jetty. Jetty is started in the main -method of the wicket.quickstart.Start class.

Customizing the Application

The main page definitions can be found in the src/main/java/Index.html HTML file and the src/main/java/wicket.quickstart.Index.java class.

Other Application Servers

Even though this project is aimed at Jetty, it is not prohibited to develop using other application servers. If you have another setup, please leave a note on how you set up your environment on the wiki.