Differences
This shows you the differences between two versions of the page.
|
java:new-app [06/03/2015 14:36] Anthony Arents [JSP Pages] |
java:new-app [04/10/2017 11:37] (current) Anthony Arents [New Java Web Applications] |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== New Java Web Applications ====== | ====== New Java Web Applications ====== | ||
| + | |||
| + | End of life December 2016. | ||
| If you are making a company project : | If you are making a company project : | ||
| Line 14: | Line 16: | ||
| * Tomcat 7 | * Tomcat 7 | ||
| * Use Java 7 for compiling, I recommend Java 8 for running tomcat (no permgen errors) ;-). | * Use Java 7 for compiling, I recommend Java 8 for running tomcat (no permgen errors) ;-). | ||
| + | |||
| + | Tomcat settings \\ | ||
| + | <code>-Xmx2048m -Xms512m -XX:MaxPermSize=768m -Dcom.sun.xml.ws.transport.http.client.HttpTransportPipe.dump=true</code> | ||
| ====== Package structure : ====== | ====== Package structure : ====== | ||
| Line 1299: | Line 1304: | ||
| <property name="methodNameResolver" ref="paramResolver" /> | <property name="methodNameResolver" ref="paramResolver" /> | ||
| <property name="loginService" ref="loginService" /> | <property name="loginService" ref="loginService" /> | ||
| + | </bean> | ||
| + | |||
| + | <bean id="indexController" class="org.springframework.web.servlet.mvc.ParameterizableViewController"> | ||
| + | <property name="viewName" value="app" /> | ||
| </bean> | </bean> | ||
| <bean id="urlFileViewer" class="org.springframework.web.servlet.mvc.UrlFilenameViewController"></bean> | <bean id="urlFileViewer" class="org.springframework.web.servlet.mvc.UrlFilenameViewController"></bean> | ||
| + | |||
| + | <bean id="jspViewResolver" | ||
| + | class="org.springframework.web.servlet.view.InternalResourceViewResolver"> | ||
| + | <property name="prefix" value="/WEB-INF/jsp/"/> | ||
| + | <property name="suffix" value=".jsp" /> | ||
| + | </bean> | ||
| <bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"> | <bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"> | ||
| Line 1307: | Line 1322: | ||
| <property name="mappings"> | <property name="mappings"> | ||
| <props> | <props> | ||
| - | <prop key="/login.html">loginController</prop> | ||
| <prop key="/login.json">loginController</prop> | <prop key="/login.json">loginController</prop> | ||
| + | <prop key="/">indexController</prop> | ||
| </props> | </props> | ||
| </property> | </property> | ||
| Line 1350: | Line 1365: | ||
| </div> | </div> | ||
| </form> | </form> | ||
| - | </div> | + | </div></div> |
| </body> | </body> | ||
| </html> | </html> | ||
| </code> | </code> | ||
| + | You are free to change the implementation of the loginpage, \\ | ||
| + | you'll find it easier to rely on an old fashioned form submit to login a user, the system will then redirect to app.html (app.jsp) | ||
| + | ===== App ===== | ||
| + | |||
| + | Add ''app.jsp'' to ''/WEB-INF/jsp'' \\ | ||
| + | |||
| + | this should be the index.html of your extjs application | ||
| ====== Static resources (javascript, css, ...) ====== | ====== Static resources (javascript, css, ...) ====== | ||