This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
### re-direct to www | |
RewriteCond %{HTTP_HOST} ^example.com | |
RewriteRule (.*) http://www.example.com/$1 [R=301,L] | |
</IfModule> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scp -i {key} {user}@{domain}:{remote_path} {local_path} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<servlet> | |
<servlet-name>spring-mvc</servlet-name> | |
<servlet-class> | |
org.springframework.web.servlet.DispatcherServlet | |
</servlet-class> | |
<load-on-startup>1</load-on-startup> | |
</servlet> | |
<servlet-mapping> | |
<servlet-name>spring-mvc</servlet-name> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<bean id="VideoController" class="com.yourcompanyname.controller.HelloController" /> | |
<bean id="viewResolver" | |
class="org.springframework.web.servlet.view.InternalResourceViewResolver"> | |
<property name="prefix"> | |
<value>/views/</value> | |
</property> | |
<property name="suffix"> | |
<value>.jsp</value> | |
</property> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.yournamespace.controller; | |
import org.springframework.stereotype.Controller; | |
import org.springframework.ui.ModelMap; | |
import org.springframework.web.bind.annotation.PathVariable; | |
import org.springframework.web.bind.annotation.RequestMapping; | |
import org.springframework.web.bind.annotation.RequestMethod; | |
@RequestMapping(value="/hello") | |
public class HelloContoller { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<servlet> | |
<servlet-name>sitemesh-velocity</servlet-name> | |
<servlet-class>com.opensymphony.module.sitemesh.velocity.VelocityDecoratorServlet</servlet-class> | |
</servlet> | |
<servlet-mapping> | |
<servlet-name>sitemesh-velocity</servlet-name> | |
<url-pattern>*.vm</url-pattern> | |
</servlet-mapping> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<filter> | |
<filter-name>sitemesh</filter-name> | |
<filter-class>com.opensymphony.sitemesh.webapp.SiteMeshFilter</filter-class> | |
</filter> | |
<filter-mapping> | |
<filter-name>sitemesh</filter-name> | |
<url-pattern>/*</url-pattern> | |
<dispatcher>FORWARD</dispatcher> | |
<dispatcher>REQUEST</dispatcher> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<bean id="velocityConfig" | |
class="org.springframework.web.servlet.view.velocity.VelocityConfigurer"> | |
<property name="resourceLoaderPath" value="/velocity" /> | |
</bean> | |
<bean id="viewResolver" | |
class="org.springframework.web.servlet.view.velocity.VelocityViewResolver"> | |
<property name="cache" value="false" /> | |
<property name="prefix" value="" /> | |
<property name="suffix" value=".vm" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<sitemesh> | |
<property name="decorators-file" value="/WEB-INF/decorators.xml"/> | |
<excludes file="${decorators-file}"/> | |
<page-parsers> | |
<parser default="true" | |
class="com.opensymphony.module.sitemesh.parser.FastPageParser"/> | |
<parser content-type="text/html" | |
class="com.opensymphony.module.sitemesh.parser.FastPageParser"/> | |
</page-parsers> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<decorators defaultdir="/decorators"> | |
<decorator name="default" page="layout.vm"> | |
<pattern>/*</pattern> | |
</decorator> | |
</decorators> |
OlderNewer