Skip to content

Commit 7fb7b3d

Browse files
unknownunknown
authored andcommitted
init
0 parents  commit 7fb7b3d

File tree

16 files changed

+375
-0
lines changed

16 files changed

+375
-0
lines changed

app/controllers/Application.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package controllers;
2+
3+
import play.*;
4+
import play.mvc.*;
5+
6+
import java.util.*;
7+
8+
import models.*;
9+
10+
public class Application extends Controller {
11+
12+
public static void index() {
13+
render();
14+
}
15+
16+
}

app/views/Application/index.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#{extends 'main.html' /}
2+
#{set title:'Home' /}
3+
4+
#{welcome /}

app/views/errors/404.html

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!DOCTYPE html>
2+
3+
<html>
4+
<head>
5+
<title>Not found</title>
6+
<meta http-equiv="Content-Type" content="text/html; charset=${_response_encoding}"/>
7+
</head>
8+
<body>
9+
#{if play.mode.name() == 'DEV'}
10+
#{404 result /}
11+
#{/if}
12+
#{else}
13+
<h1>Not found</h1>
14+
<p>
15+
${result.message}
16+
</p>
17+
#{/else}
18+
</body>
19+
</html>

app/views/errors/500.html

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<!DOCTYPE html>
2+
3+
<html>
4+
<head>
5+
<title>Application error</title>
6+
<meta http-equiv="Content-Type" content="text/html; charset=${_response_encoding}"/>
7+
</head>
8+
<body>
9+
#{if play.mode.name() == 'DEV'}
10+
#{500 exception /}
11+
#{/if}
12+
#{else}
13+
<h1>Oops, an error occured</h1>
14+
#{if exception instanceof play.exceptions.PlayException}
15+
<p>
16+
This exception has been logged with id <strong>${exception.id}</strong>.
17+
</p>
18+
#{/if}
19+
#{/else}
20+
</body>
21+
</html>

app/views/main.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!DOCTYPE html>
2+
3+
<html>
4+
<head>
5+
<title>#{get 'title' /}</title>
6+
<meta charset="${_response_encoding}">
7+
<link rel="stylesheet" media="screen" href="@{'/public/stylesheets/main.css'}">
8+
#{get 'moreStyles' /}
9+
<link rel="shortcut icon" type="image/png" href="@{'/public/images/favicon.png'}">
10+
<script src="@{'/public/javascripts/jquery-1.5.2.min.js'}" type="text/javascript" charset="${_response_encoding}"></script>
11+
#{get 'moreScripts' /}
12+
</head>
13+
<body>
14+
#{doLayout /}
15+
</body>
16+
</html>

conf/application.conf

Lines changed: 217 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,217 @@
1+
# This is the main configuration file for the application.
2+
# ~~~~~
3+
application.name=whateverorigin
4+
5+
# Application mode
6+
# ~~~~~
7+
# Set to dev to enable instant reloading and other development help.
8+
# Otherwise set to prod.
9+
application.mode=dev
10+
%prod.application.mode=prod
11+
12+
# Secret key
13+
# ~~~~~
14+
# The secret key is used to secure cryptographics functions
15+
# If you deploy your application to several instances be sure to use the same key !
16+
application.secret=viZuiUEPrGWVsUBGVXzNJHK2OpJJ2Nbv6jia9ixSMVBzNIuV1BaR6aDjWEitrO7o
17+
18+
# i18n
19+
# ~~~~~
20+
# Define locales used by your application.
21+
# You can then place localized messages in conf/messages.{locale} files
22+
# application.langs=fr,en,ja
23+
24+
# Date format
25+
# ~~~~~
26+
date.format=yyyy-MM-dd
27+
# date.format.fr=dd/MM/yyyy
28+
29+
# Server configuration
30+
# ~~~~~
31+
# If you need to change the HTTP port, uncomment this (default is set to 9000)
32+
# http.port=9000
33+
#
34+
# By default the server listen for HTTP on the wilcard address.
35+
# You can restrict this.
36+
# http.address=127.0.0.1
37+
#
38+
# Use this if you don't host your Play application at the root of the domain
39+
# you're serving it from. This parameter has no effect when deployed as a
40+
# war, because the path will be handled by the application server.
41+
# http.path=/
42+
43+
# Session configuration
44+
# ~~~~~~~~~~~~~~~~~~~~~~
45+
# By default, session will be written to the transient PLAY_SESSION cookie.
46+
# The cookies are not secured by default, only set it to true
47+
# if you're serving your pages through https.
48+
# application.session.cookie=PLAY
49+
# application.session.maxAge=1h
50+
# application.session.secure=false
51+
52+
# Session/Cookie sharing between subdomain
53+
# ~~~~~~~~~~~~~~~~~~~~~~
54+
# By default a cookie is only valid for a specific domain. By setting
55+
# application.defaultCookieDomain to '.example.com', the cookies
56+
# will be valid for all domains ending with '.example.com', ie:
57+
# foo.example.com and bar.example.com
58+
# application.defaultCookieDomain=.example.com
59+
60+
# JVM configuration
61+
# ~~~~~
62+
# Define which port is used by JPDA when application is in debug mode (default is set to 8000)
63+
# jpda.port=8000
64+
#
65+
# Java source level => 1.5, 1.6 or 1.7 (experimental)
66+
# java.source=1.5
67+
68+
# Log level
69+
# ~~~~~
70+
# Specify log level for your application.
71+
# If you want a very customized log, create a log4j.properties file in the conf directory
72+
# application.log=INFO
73+
#
74+
# More logging configuration
75+
# application.log.path=/log4j.properties
76+
# application.log.system.out=off
77+
78+
# Database configuration
79+
# ~~~~~
80+
# Enable a database engine if needed.
81+
#
82+
# To quickly set up a development database, use either:
83+
# - mem : for a transient in memory database (H2 in memory)
84+
# - fs : for a simple file written database (H2 file stored)
85+
# db=mem
86+
#
87+
# To connect to a local MySQL5 database, use:
88+
# db=mysql://user:pwd@host/database
89+
#
90+
# To connect to a local PostgreSQL9 database, use:
91+
# db=postgres://user:pwd@host/database
92+
#
93+
# If you need a full JDBC configuration use the following :
94+
# db.url=jdbc:postgresql:database_name
95+
# db.driver=org.postgresql.Driver
96+
# db.user=root
97+
# db.pass=secret
98+
#
99+
# Connections pool configuration :
100+
# db.pool.timeout=1000
101+
# db.pool.maxSize=30
102+
# db.pool.minSize=10
103+
#
104+
# If you want to reuse an existing Datasource from your application server, use:
105+
# db=java:/comp/env/jdbc/myDatasource
106+
#
107+
# When using an existing Datasource, it's sometimes needed to destroy it when
108+
# the application is stopped. Depending on the datasource, you can define a
109+
# generic "destroy" method :
110+
# db.destroyMethod=close
111+
112+
# JPA Configuration (Hibernate)
113+
# ~~~~~
114+
#
115+
# Specify the custom JPA dialect to use here (default to guess):
116+
# jpa.dialect=org.hibernate.dialect.PostgreSQLDialect
117+
#
118+
# Specify the ddl generation pattern to use. Set to none to disable it
119+
# (default to update in DEV mode, and none in PROD mode):
120+
# jpa.ddl=update
121+
#
122+
# Debug SQL statements (logged using DEBUG level):
123+
# jpa.debugSQL=true
124+
#
125+
# You can even specify additional hibernate properties here:
126+
# hibernate.use_sql_comments=true
127+
# ...
128+
#
129+
# Store path for Blob content
130+
attachments.path=data/attachments
131+
132+
# Memcached configuration
133+
# ~~~~~
134+
# Enable memcached if needed. Otherwise a local cache is used.
135+
# memcached=enabled
136+
#
137+
# Specify memcached host (default to 127.0.0.1:11211)
138+
# memcached.host=127.0.0.1:11211
139+
#
140+
# Or you can specify multiple host to build a distributed cache
141+
# memcached.1.host=127.0.0.1:11211
142+
# memcached.2.host=127.0.0.1:11212
143+
#
144+
# Use plain SASL to authenticate for memcached
145+
# memcached.user=
146+
# memcached.password=
147+
148+
# HTTP Response headers control for static files
149+
# ~~~~~
150+
# Set the default max-age, telling the user's browser how long it should cache the page.
151+
# Default is 3600 (one hour). Set it to 0 to send no-cache.
152+
# This is only read in prod mode, in dev mode the cache is disabled.
153+
# http.cacheControl=3600
154+
155+
# If enabled, Play will generate entity tags automatically and send a 304 when needed.
156+
# Default is true, set it to false to deactivate use of entity tags.
157+
# http.useETag=true
158+
159+
# Custom mime types
160+
# mimetype.xpi=application/x-xpinstall
161+
162+
# WS configuration
163+
# ~~~~~
164+
# Default engine is Async Http Client, uncomment to use
165+
# the JDK's internal implementation
166+
# webservice = urlfetch
167+
# If you need to set proxy params for WS requests
168+
# http.proxyHost = localhost
169+
# http.proxyPort = 3128
170+
# http.proxyUser = jojo
171+
# http.proxyPassword = jojo
172+
173+
# Mail configuration
174+
# ~~~~~
175+
# Default is to use a mock Mailer
176+
mail.smtp=mock
177+
178+
# Or, specify mail host configuration
179+
# mail.smtp.host=127.0.0.1
180+
# mail.smtp.user=admin
181+
# mail.smtp.pass=
182+
# mail.smtp.channel=ssl
183+
184+
# Url-resolving in Jobs
185+
# ~~~~~~
186+
# When rendering templates with reverse-url-resoling (@@{..}) in Jobs (which do not have an inbound Http.Request),
187+
# ie if sending a HtmlMail, Play need to know which url your users use when accessing your app.
188+
# %test.application.baseUrl=http://localhost:9000/
189+
# %prod.application.baseUrl=http://www.yourdomain.com/
190+
191+
# Jobs executor
192+
# ~~~~~~
193+
# Size of the Jobs pool
194+
# play.jobs.pool=10
195+
196+
# Execution pool
197+
# ~~~~~
198+
# Default to 1 thread in DEV mode or (nb processors + 1) threads in PROD mode.
199+
# Try to keep a low as possible. 1 thread will serialize all requests (very useful for debugging purpose)
200+
# play.pool=3
201+
202+
# Open file from errors pages
203+
# ~~~~~
204+
# If your text editor supports opening files by URL, Play! will
205+
# dynamically link error pages to files
206+
#
207+
# Example, for textmate:
208+
# play.editor=txmt://open?url=file://%s&line=%s
209+
210+
# Testing. Set up a custom configuration for test mode
211+
# ~~~~~
212+
#%test.module.cobertura=${play.path}/modules/cobertura
213+
%test.application.mode=dev
214+
%test.db.url=jdbc:h2:mem:play;MODE=MYSQL;LOCK_MODE=0
215+
%test.jpa.ddl=create
216+
%test.mail.smtp=mock
217+

conf/dependencies.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Application dependencies
2+
3+
require:
4+
- play

conf/messages

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# You can specialize this file for each language.
2+
# For example, for French create a messages.fr file
3+
#

conf/routes

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Routes
2+
# This file defines all application routes (Higher priority routes first)
3+
# ~~~~
4+
5+
# Home page
6+
GET / Application.index
7+
8+
# Ignore favicon requests
9+
GET /favicon.ico 404
10+
11+
# Map static resources from the /app/public folder to the /public path
12+
GET /public/ staticDir:public
13+
14+
# Catch all
15+
* /{controller}/{action} {controller}.{action}

public/images/favicon.png

687 Bytes
Loading

0 commit comments

Comments
 (0)