[mud4j-commit] SF.net SVN: mud4j: [141] trunk/mud4j-web
Status: Pre-Alpha
Brought to you by:
mpurland
|
From: <mpu...@us...> - 2007-09-29 21:56:21
|
Revision: 141
http://mud4j.svn.sourceforge.net/mud4j/?rev=141&view=rev
Author: mpurland
Date: 2007-09-29 14:56:16 -0700 (Sat, 29 Sep 2007)
Log Message:
-----------
Update with login and logout controllers
Modified Paths:
--------------
trunk/mud4j-web/.classpath
trunk/mud4j-web/.project
trunk/mud4j-web/pom.xml
trunk/mud4j-web/src/java/net/sf/mud4j/web/Mud4jServer.java
trunk/mud4j-web/src/java/net/sf/mud4j/web/UserSession.java
trunk/mud4j-web/src/site/xdoc/ideas.xml
trunk/mud4j-web/src/webapp/WEB-INF/faces-config.xml
trunk/mud4j-web/src/webapp/WEB-INF/spring-config.xml
trunk/mud4j-web/src/webapp/WEB-INF/web.xml
Added Paths:
-----------
trunk/mud4j-web/resources/hsqldb/
trunk/mud4j-web/resources/hsqldb/data.log
trunk/mud4j-web/resources/hsqldb/data.properties
trunk/mud4j-web/resources/hsqldb/data.script
trunk/mud4j-web/src/java/net/sf/mud4j/web/controller/
trunk/mud4j-web/src/java/net/sf/mud4j/web/controller/LoginController.java
trunk/mud4j-web/src/java/net/sf/mud4j/web/controller/LogoutController.java
trunk/mud4j-web/src/test/functional/net/sf/mud4j/web/WebFunctionalTestSuite.java
trunk/mud4j-web/src/webapp/login.jsp
Removed Paths:
-------------
trunk/mud4j-web/src/java/net/sf/mud4j/web/LoginController.java
trunk/mud4j-web/src/java/net/sf/mud4j/web/LogoutController.java
trunk/mud4j-web/src/webapp/hello.jsp
trunk/mud4j-web/src/webapp/index.jsp
Modified: trunk/mud4j-web/.classpath
===================================================================
--- trunk/mud4j-web/.classpath 2007-09-29 21:42:59 UTC (rev 140)
+++ trunk/mud4j-web/.classpath 2007-09-29 21:56:16 UTC (rev 141)
@@ -3,6 +3,7 @@
<classpathentry kind="src" path="src/java"/>
<classpathentry kind="src" path="src/test/unit"/>
<classpathentry kind="src" path="src/test/functional"/>
+ <classpathentry kind="src" path="src/webapp"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry combineaccessrules="false" kind="src" path="/mud4j-core"/>
<classpathentry kind="var" path="MAVEN_REPO/org.mortbay.jetty/jars/jetty-6.1.0rc3.jar" sourcepath="/OPT_JAVA/jetty-6.1.0rc3-src.zip"/>
@@ -20,5 +21,12 @@
<classpathentry kind="var" path="M2_REPO/org/mortbay/jetty/servlet-api-2.5/6.1-SNAPSHOT/servlet-api-2.5-6.1-SNAPSHOT.jar"/>
<classpathentry kind="var" path="M2_REPO/ant/ant/1.6.5/ant-1.6.5.jar"/>
<classpathentry kind="var" path="M2_REPO/commons-lang/commons-lang/2.1/commons-lang-2.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/myfaces/tomahawk/tomahawk/1.1.5-SNAPSHOT/tomahawk-1.1.5-SNAPSHOT.jar"/>
+ <classpathentry kind="var" path="M2_REPO/hsqldb/hsqldb/1.8.0.7/hsqldb-1.8.0.7.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-dbcp/commons-dbcp/1.2/commons-dbcp-1.2.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-pool/commons-pool/1.3/commons-pool-1.3.jar"/>
+ <classpathentry kind="var" path="M2_REPO/dom4j/dom4j/1.6/dom4j-1.6.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javax/transaction/jta/1.0.1B/jta-1.0.1B.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate/3.2.0.cr5/hibernate-3.2.0.cr5.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: trunk/mud4j-web/.project
===================================================================
--- trunk/mud4j-web/.project 2007-09-29 21:42:59 UTC (rev 140)
+++ trunk/mud4j-web/.project 2007-09-29 21:56:16 UTC (rev 141)
@@ -3,6 +3,7 @@
<name>mud4j-web</name>
<comment></comment>
<projects>
+ <project>mud4j-core</project>
</projects>
<buildSpec>
<buildCommand>
@@ -10,8 +11,14 @@
<arguments>
</arguments>
</buildCommand>
+ <buildCommand>
+ <name>tk.eclipse.plugin.jsf.JSFProjectBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>tk.eclipse.plugin.jsf.JSFProjectNature</nature>
</natures>
</projectDescription>
Modified: trunk/mud4j-web/pom.xml
===================================================================
--- trunk/mud4j-web/pom.xml 2007-09-29 21:42:59 UTC (rev 140)
+++ trunk/mud4j-web/pom.xml 2007-09-29 21:56:16 UTC (rev 141)
@@ -81,6 +81,26 @@
<artifactId>commons-digester</artifactId>
<version>1.8</version>
</dependency>
+ <dependency>
+ <groupId>commons-dbcp</groupId>
+ <artifactId>commons-dbcp</artifactId>
+ <version>1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-pool</groupId>
+ <artifactId>commons-pool</artifactId>
+ <version>1.3</version>
+ </dependency>
+ <dependency>
+ <groupId>hsqldb</groupId>
+ <artifactId>hsqldb</artifactId>
+ <version>1.8.0.7</version>
+ </dependency>
+ <dependency>
+ <groupId>dom4j</groupId>
+ <artifactId>dom4j</artifactId>
+ <version>1.6</version>
+ </dependency>
</dependencies>
<build>
Added: trunk/mud4j-web/resources/hsqldb/data.log
===================================================================
--- trunk/mud4j-web/resources/hsqldb/data.log (rev 0)
+++ trunk/mud4j-web/resources/hsqldb/data.log 2007-09-29 21:56:16 UTC (rev 141)
@@ -0,0 +1,5 @@
+/*C1*/SET SCHEMA PUBLIC
+CONNECT USER SA
+DISCONNECT
+/*C2*/SET SCHEMA PUBLIC
+CONNECT USER SA
Added: trunk/mud4j-web/resources/hsqldb/data.properties
===================================================================
--- trunk/mud4j-web/resources/hsqldb/data.properties (rev 0)
+++ trunk/mud4j-web/resources/hsqldb/data.properties 2007-09-29 21:56:16 UTC (rev 141)
@@ -0,0 +1,17 @@
+#HSQL Database Engine 1.8.0.5
+#Sat Jun 23 16:24:40 CDT 2007
+hsqldb.script_format=0
+runtime.gc_interval=0
+sql.enforce_strict_size=false
+hsqldb.cache_size_scale=8
+readonly=false
+hsqldb.nio_data_file=true
+hsqldb.cache_scale=14
+version=1.8.0
+hsqldb.default_table_type=memory
+hsqldb.cache_file_scale=1
+hsqldb.log_size=200
+modified=yes
+hsqldb.cache_version=1.7.0
+hsqldb.original_version=1.8.0
+hsqldb.compatible_version=1.8.0
Added: trunk/mud4j-web/resources/hsqldb/data.script
===================================================================
--- trunk/mud4j-web/resources/hsqldb/data.script (rev 0)
+++ trunk/mud4j-web/resources/hsqldb/data.script 2007-09-29 21:56:16 UTC (rev 141)
@@ -0,0 +1,4 @@
+CREATE SCHEMA PUBLIC AUTHORIZATION DBA
+CREATE USER SA PASSWORD ""
+GRANT DBA TO SA
+SET WRITE_DELAY 10
Deleted: trunk/mud4j-web/src/java/net/sf/mud4j/web/LoginController.java
===================================================================
--- trunk/mud4j-web/src/java/net/sf/mud4j/web/LoginController.java 2007-09-29 21:42:59 UTC (rev 140)
+++ trunk/mud4j-web/src/java/net/sf/mud4j/web/LoginController.java 2007-09-29 21:56:16 UTC (rev 141)
@@ -1,55 +0,0 @@
-/**
- * Copyright 2006 Matthew Purland (m.p...@gm...)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package net.sf.mud4j.web;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import net.sf.mud4j.account.Account;
-
-import org.springframework.web.servlet.ModelAndView;
-import org.springframework.web.servlet.mvc.Controller;
-
-/**
- * Login controller to handle incoming login requests.
- *
- * @author Matthew Purland
- */
-public class LoginController implements Controller {
-
- /**
- * {@inheritDoc}
- */
- public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {
- String username = request.getParameter("username");
- String password = request.getParameter("password");
-
- return null;
-
-// if (account == null) {
-// return new ModelAndView("Error", "message",
-// "Invalid username or password. Login failed." );
-// }
-// else {
-// UserSession session = new UserSession(account);
-//
-// request.getSession().setAttribute("userSession", session);
-//
-// return new ModelAndView("index");
-// }
- }
-
-}
Deleted: trunk/mud4j-web/src/java/net/sf/mud4j/web/LogoutController.java
===================================================================
--- trunk/mud4j-web/src/java/net/sf/mud4j/web/LogoutController.java 2007-09-29 21:42:59 UTC (rev 140)
+++ trunk/mud4j-web/src/java/net/sf/mud4j/web/LogoutController.java 2007-09-29 21:56:16 UTC (rev 141)
@@ -1,44 +0,0 @@
-/**
- * Copyright 2006 Matthew Purland (m.p...@gm...)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package net.sf.mud4j.web;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.springframework.web.servlet.ModelAndView;
-import org.springframework.web.servlet.mvc.Controller;
-
-/**
- * Controller to control logging out and ending a user session.
- *
- * @author Matthew Purland
- */
-public class LogoutController implements Controller {
-
- /**
- * {@inheritDoc}
- */
- public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {
- UserSession session = (UserSession) request.getAttribute("userSession");
-
- if (session != null) {
-
- }
-
- return null;
- }
-
-}
Modified: trunk/mud4j-web/src/java/net/sf/mud4j/web/Mud4jServer.java
===================================================================
--- trunk/mud4j-web/src/java/net/sf/mud4j/web/Mud4jServer.java 2007-09-29 21:42:59 UTC (rev 140)
+++ trunk/mud4j-web/src/java/net/sf/mud4j/web/Mud4jServer.java 2007-09-29 21:56:16 UTC (rev 141)
@@ -45,7 +45,7 @@
webServer.start();
}
catch (IOException e) {
- System.out.println(e);
+ System.err.println(e);
}
}
}
Modified: trunk/mud4j-web/src/java/net/sf/mud4j/web/UserSession.java
===================================================================
--- trunk/mud4j-web/src/java/net/sf/mud4j/web/UserSession.java 2007-09-29 21:42:59 UTC (rev 140)
+++ trunk/mud4j-web/src/java/net/sf/mud4j/web/UserSession.java 2007-09-29 21:56:16 UTC (rev 141)
@@ -39,7 +39,7 @@
}
/**
- * Get the account.
+ * Get the account that owns the session.
*
* @return the account.
*/
Copied: trunk/mud4j-web/src/java/net/sf/mud4j/web/controller/LoginController.java (from rev 117, trunk/mud4j-web/src/java/net/sf/mud4j/web/LoginController.java)
===================================================================
--- trunk/mud4j-web/src/java/net/sf/mud4j/web/controller/LoginController.java (rev 0)
+++ trunk/mud4j-web/src/java/net/sf/mud4j/web/controller/LoginController.java 2007-09-29 21:56:16 UTC (rev 141)
@@ -0,0 +1,92 @@
+/**
+ * Copyright 2006 Matthew Purland (m.p...@gm...)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package net.sf.mud4j.web.controller;
+
+import org.springframework.dao.DataAccessException;
+
+import net.sf.mud4j.dao.AccountDao;
+
+/**
+ * Login controller to handle incoming login requests.
+ *
+ * @author Matthew Purland
+ */
+public class LoginController {
+ // Username for the login
+ private String username;
+ // Password for the login
+ private String password;
+
+ // Account dao for verifying login
+ private AccountDao accountDao;
+
+ public LoginController(AccountDao accountDao) {
+ this.accountDao = accountDao;
+ }
+
+ /**
+ * Verify login to the delegated account.
+ * @return
+ */
+ public String verifyLogin() {
+ try {
+ //accountDao.loadAccount(username, password);
+ }
+ catch (DataAccessException e) {
+ return "failure";
+ }
+
+ return "success";
+ }
+
+
+ /**
+ * Get the username.
+ *
+ * @return the username.
+ */
+ public String getUsername() {
+ return this.username;
+ }
+
+
+ /**
+ * Set the username.
+ *
+ * @param username the username to set.
+ */
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+ /**
+ * Get the password.
+ *
+ * @return the password.
+ */
+ public String getPassword() {
+ return this.password;
+ }
+
+ /**
+ * Set the password.
+ *
+ * @param password the password to set.
+ */
+ public void setPassword(String password) {
+ this.password = password;
+ }
+}
Copied: trunk/mud4j-web/src/java/net/sf/mud4j/web/controller/LogoutController.java (from rev 117, trunk/mud4j-web/src/java/net/sf/mud4j/web/LogoutController.java)
===================================================================
--- trunk/mud4j-web/src/java/net/sf/mud4j/web/controller/LogoutController.java (rev 0)
+++ trunk/mud4j-web/src/java/net/sf/mud4j/web/controller/LogoutController.java 2007-09-29 21:56:16 UTC (rev 141)
@@ -0,0 +1,46 @@
+/**
+ * Copyright 2006 Matthew Purland (m.p...@gm...)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package net.sf.mud4j.web.controller;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import net.sf.mud4j.web.UserSession;
+
+import org.springframework.web.servlet.ModelAndView;
+import org.springframework.web.servlet.mvc.Controller;
+
+/**
+ * Controller to control logging out and ending a user session.
+ *
+ * @author Matthew Purland
+ */
+public class LogoutController implements Controller {
+
+ /**
+ * {@inheritDoc}
+ */
+ public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {
+ UserSession session = (UserSession) request.getAttribute("userSession");
+
+ if (session != null) {
+
+ }
+
+ return null;
+ }
+
+}
Modified: trunk/mud4j-web/src/site/xdoc/ideas.xml
===================================================================
--- trunk/mud4j-web/src/site/xdoc/ideas.xml 2007-09-29 21:42:59 UTC (rev 140)
+++ trunk/mud4j-web/src/site/xdoc/ideas.xml 2007-09-29 21:56:16 UTC (rev 141)
@@ -23,6 +23,8 @@
the form of JSF components</li>
<li>Will provide functional testing of mud4j-web through
Selenium tests.</li>
+
+ <li>Use Jabber HTTP bindings for separate method for connection to server</li>
</ul>
</body>
</document>
\ No newline at end of file
Added: trunk/mud4j-web/src/test/functional/net/sf/mud4j/web/WebFunctionalTestSuite.java
===================================================================
--- trunk/mud4j-web/src/test/functional/net/sf/mud4j/web/WebFunctionalTestSuite.java (rev 0)
+++ trunk/mud4j-web/src/test/functional/net/sf/mud4j/web/WebFunctionalTestSuite.java 2007-09-29 21:56:16 UTC (rev 141)
@@ -0,0 +1,23 @@
+/**
+ * Copyright 2006 Matthew Purland (m.p...@gm...)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package net.sf.mud4j.web;
+
+/**
+ * Web functional test suite using SRC.
+ */
+public class WebFunctionalTestSuite {
+
+}
Modified: trunk/mud4j-web/src/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/mud4j-web/src/webapp/WEB-INF/faces-config.xml 2007-09-29 21:42:59 UTC (rev 140)
+++ trunk/mud4j-web/src/webapp/WEB-INF/faces-config.xml 2007-09-29 21:56:16 UTC (rev 141)
@@ -5,13 +5,29 @@
"http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
<!-- JSF Myfaces configuration -->
<faces-config>
+
+ <application>
+ <variable-resolver>
+ org.springframework.web.jsf.DelegatingVariableResolver
+ </variable-resolver>
+ </application>
+
+
+<!--
+<managed-bean>
+ <description>Login controller</description>
+ <managed-bean-name>login</managed-bean-name>
+ <managed-bean-class>net.sf.mud4j.web.controller.LoginController</managed-bean-class>
+ <managed-bean-scope>application</managed-bean-scope>
+</managed-bean>
+-->
+
<navigation-rule>
- <from-view-id>/index.jsp</from-view-id>
+ <from-view-id>/login.jsp</from-view-id>
<navigation-case>
<from-outcome>login</from-outcome>
- <to-view-id>/hello.jsp</to-view-id>
+ <to-view-id>/login.jsp</to-view-id>
</navigation-case>
-
</navigation-rule>
</faces-config>
\ No newline at end of file
Modified: trunk/mud4j-web/src/webapp/WEB-INF/spring-config.xml
===================================================================
--- trunk/mud4j-web/src/webapp/WEB-INF/spring-config.xml 2007-09-29 21:42:59 UTC (rev 140)
+++ trunk/mud4j-web/src/webapp/WEB-INF/spring-config.xml 2007-09-29 21:56:16 UTC (rev 141)
@@ -1,11 +1,68 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- mud4j spring configuration -->
<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:util="http://www.springframework.org/schema/util"
- xmlns:aop="http://www.springframework.org/schema/aop"
- xsi:schemaLocation="
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:util="http://www.springframework.org/schema/util"
+ xmlns:aop="http://www.springframework.org/schema/aop"
+ xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
+ <!-- DataSource Property -->
+ <bean id="hsqlDataSource" class="org.apache.commons.dbcp.BasicDataSource">
+ <property name="driverClassName">
+ <value>org.hsqldb.jdbcDriver</value>
+ </property>
+ <property name="url">
+ <value>jdbc:hsqldb:file:resources/hsqldb/data</value>
+ </property>
+ <property name="username">
+ <value>sa</value>
+ </property>
+ <property name="password">
+ <value></value>
+ </property>
+ </bean>
+
+ <!-- Database Property -->
+ <bean id="hsqlHibernateProperties"
+ class="org.springframework.beans.factory.config.PropertiesFactoryBean">
+ <property name="properties">
+ <props>
+ <prop key="hibernate.hbm2ddl.auto">update</prop>
+ <prop key="hibernate.dialect">
+ org.hibernate.dialect.HSQLDialect</prop>
+ <prop key="hibernate.query.substitutions">true 'T', false 'F'</prop>
+ <prop key="hibernate.show_sql">false</prop>
+ <prop key="hibernate.c3p0.minPoolSize">5</prop>
+ <prop key="hibernate.c3p0.maxPoolSize">20</prop>
+ <prop key="hibernate.c3p0.timeout">600</prop>
+ <prop key="hibernate.c3p0.max_statement">50</prop>
+ <prop key="hibernate.c3p0.testConnectionOnCheckout">false</prop>
+ </props>
+ </property>
+ </bean>
+
+ <!-- Hibernate SessionFactory -->
+ <bean id="hibernateSessionFactory"
+ class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
+ <property name="dataSource">
+ <ref local="hsqlDataSource"/>
+ </property>
+ <property name="hibernateProperties">
+ <ref bean="hsqlHibernateProperties"/>
+ </property>
+
+ </bean>
+
+ <bean name="accountDao"
+ class="net.sf.mud4j.dao.hibernate.AccountDaoHibernate">
+ <property name="sessionFactory" ref="hibernateSessionFactory"/>
+ </bean>
+
+ <bean name="login" class="net.sf.mud4j.web.controller.LoginController">
+ <constructor-arg>
+ <ref bean="accountDao"/>
+ </constructor-arg>
+ </bean>
</beans>
\ No newline at end of file
Modified: trunk/mud4j-web/src/webapp/WEB-INF/web.xml
===================================================================
--- trunk/mud4j-web/src/webapp/WEB-INF/web.xml 2007-09-29 21:42:59 UTC (rev 140)
+++ trunk/mud4j-web/src/webapp/WEB-INF/web.xml 2007-09-29 21:56:16 UTC (rev 141)
@@ -6,11 +6,13 @@
<listener>
<listener-class>
- org.springframework.web.context.ContextLoaderListener</listener-class>
+ org.springframework.web.context.ContextLoaderListener
+ </listener-class>
</listener>
<listener>
<listener-class>
- org.springframework.web.context.request.RequestContextListener</listener-class>
+ org.springframework.web.context.request.RequestContextListener
+ </listener-class>
</listener>
<description>web.xml</description>
@@ -21,6 +23,11 @@
<param-value>/WEB-INF/spring-config.xml</param-value>
</context-param>
+ <context-param>
+ <param-name>javax.faces.application.CONFIG_FILES</param-name>
+ <param-value>/WEB-INF/faces-config.xml</param-value>
+ </context-param>
+
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
@@ -29,10 +36,6 @@
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
- <url-pattern>*.faces</url-pattern>
- </servlet-mapping>
- <servlet-mapping>
- <servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
</web-app>
\ No newline at end of file
Deleted: trunk/mud4j-web/src/webapp/hello.jsp
===================================================================
--- trunk/mud4j-web/src/webapp/hello.jsp 2007-09-29 21:42:59 UTC (rev 140)
+++ trunk/mud4j-web/src/webapp/hello.jsp 2007-09-29 21:56:16 UTC (rev 141)
@@ -1,16 +0,0 @@
-<html>
- <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
- <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
-
- <f:view>
- <head>
- <title>A Simple JavaServer Faces Application (login)</title>
- </head>
- <body>
- Hi there!
- <h:form>
- <h:commandButton value="Back" action="index"/>
- </h:form>
- </body>
- </f:view>
-</html>
\ No newline at end of file
Deleted: trunk/mud4j-web/src/webapp/index.jsp
===================================================================
--- trunk/mud4j-web/src/webapp/index.jsp 2007-09-29 21:42:59 UTC (rev 140)
+++ trunk/mud4j-web/src/webapp/index.jsp 2007-09-29 21:56:16 UTC (rev 141)
@@ -1,32 +0,0 @@
-<html>
- <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
- <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
-
- <f:view>
- <head>
- <title>A Simple JavaServer Faces Application (login)</title>
- </head>
- <body>
- <h:form>
- <h3>Please enter your name and password.</h3>
- <table>
- <tr>
- <td>Name:</td>
- <td>
-
- </td>
- </tr>
- <tr>
- <td>Password:</td>
- <td>
- </td>
- </tr>
- </table>
- <p>
- <h:commandButton value="Login" action="login"/>
- </p>
- <b>
- </h:form>
- </body>
- </f:view>
-</html>
\ No newline at end of file
Copied: trunk/mud4j-web/src/webapp/login.jsp (from rev 119, trunk/mud4j-web/src/webapp/hello.jsp)
===================================================================
--- trunk/mud4j-web/src/webapp/login.jsp (rev 0)
+++ trunk/mud4j-web/src/webapp/login.jsp 2007-09-29 21:56:16 UTC (rev 141)
@@ -0,0 +1,22 @@
+<%@ page contentType="text/html; charset=UTF-8"%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title></title>
+ </head>
+ <body>
+ <f:view>
+ <h:form>
+ <h:inputText id="username" value="#{login.username}" required="true" />
+ <h:inputSecret id="password" value="#{login.password}" required="true"/>
+ <h:commandButton id="loginCmd" value="Login" action="#{login.verifyLogin}" />
+ <h:message for="username" styleClass="errorText"/>
+ <h:message for="password" styleClass="errorText"/>
+ </h:form>
+ </f:view>
+ </body>
+</html>
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|