Skip to content

Getting Started

Michael Delamere edited this page Mar 13, 2017 · 19 revisions

If you are an experienced Java webapp developer and just want to quickly paste the dependency into your POM, use the following configuration-snippet.

<dependency>
    <groupId>com.geetools.geemvc</groupId>
    <artifactId>geemvc</artifactId>
    <version>0.9.1</version>
</dependency>

Then register the geeMVC servlet as follows:

	<servlet>
		<!-- The main entry point to geeMVC. -->
		<servlet-name>geeMVC-Servlet</servlet-name>
		<servlet-class>com.geemvc.DispatcherServlet</servlet-class>
		<!-- Tell geeMVC in which folder JSPs or templates reside, relative to 
			the WEB-INF directory. -->
		<init-param>
			<param-name>view-prefix</param-name>
			<param-value>/jsp/pages</param-value>
		</init-param>
		<!-- Specifies the ending of JSP or template files. -->
		<init-param>
			<param-name>view-suffix</param-name>
			<param-value>.jsp</param-value>
		</init-param>
		<!-- Which locales are supported? Used to filter the incoming browser locales. -->
		<init-param>
			<param-name>supported-locales</param-name>
			<param-value>en, de</param-value>
		</init-param>
		<!-- Standard character encoding. Usually you should not need to change 
			this. -->
		<init-param>
			<param-name>default-character-encoding</param-name>
			<param-value>UTF-8</param-value>
		</init-param>
		<!-- What is the default content-type we send back to the client. Usually 
			you should not need to change this. -->
		<init-param>
			<param-name>default-content-type</param-name>
			<param-value>text/html</param-value>
		</init-param>
	</servlet>

	<!-- Map the geeMVC servlet to '/'. -->
	<servlet-mapping>
		<servlet-name>geeMVC-Servlet</servlet-name>
		<url-pattern>/</url-pattern>
	</servlet-mapping>

Although not recommended, there is of course nothing to stop you from just downloading the latest release and copying it manually into your WEB-INF/lib directory.

It is highly recommended however to follow our simple step by step guide - you should be able to open up the first page in your browser within 10 minutes.

Clone this wiki locally