Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ARSnova Backend
Manage
Activity
Members
Labels
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Privacy
Imprint
Contact
Snippets
Groups
Projects
Show more breadcrumbs
Paul-Christian Volkmer
ARSnova Backend
Commits
18adfd55
Commit
18adfd55
authored
12 years ago
by
Julian Hochstetter
Browse files
Options
Downloads
Patches
Plain Diff
add welcome controller which redirects simply to index.html
parent
7a9cc5af
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/de/thm/arsnova/WelcomeController.java
+39
-0
39 additions, 0 deletions
src/main/java/de/thm/arsnova/WelcomeController.java
src/main/webapp/WEB-INF/web.xml
+0
-3
0 additions, 3 deletions
src/main/webapp/WEB-INF/web.xml
with
39 additions
and
3 deletions
src/main/java/de/thm/arsnova/WelcomeController.java
0 → 100644
+
39
−
0
View file @
18adfd55
/*
* Copyright (C) 2012 THM webMedia
*
* This file is part of ARSnova.
*
* ARSnova is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* ARSnova is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package
de.thm.arsnova
;
import
javax.servlet.http.HttpServletRequest
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.servlet.ModelAndView
;
@Controller
public
class
WelcomeController
{
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/"
)
public
ModelAndView
home
(
HttpServletRequest
request
)
{
String
referer
=
request
.
getHeader
(
"referer"
);
String
target
=
"index.html"
;
if
(
referer
!=
null
&&
referer
.
endsWith
(
"dojo-index.html"
))
{
target
=
"dojo-index.html"
;
}
return
new
ModelAndView
(
"redirect:/"
+
target
);
}
}
This diff is collapsed.
Click to expand it.
src/main/webapp/WEB-INF/web.xml
+
0
−
3
View file @
18adfd55
...
...
@@ -51,9 +51,6 @@
<filter-name>
characterEncodingFilter
</filter-name>
<url-pattern>
/*
</url-pattern>
</filter-mapping>
<welcome-file-list>
<welcome-file>
index.html
</welcome-file>
</welcome-file-list>
<listener>
<listener-class>
org.springframework.web.util.Log4jConfigListener
</listener-class>
</listener>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment