Commit 4084aa93 by Tuukka Kivilahti

moyaterminalweb ottamista käyttöön uudelleen

1 parent 5533d232
...@@ -74,5 +74,8 @@ ...@@ -74,5 +74,8 @@
<dependent-module archiveName="commons-logging-1.1.1.jar" deploy-path="/lib" handle="module:/classpath/var/M2_REPO/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar"> <dependent-module archiveName="commons-logging-1.1.1.jar" deploy-path="/lib" handle="module:/classpath/var/M2_REPO/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar">
<dependency-type>uses</dependency-type> <dependency-type>uses</dependency-type>
</dependent-module> </dependent-module>
<dependent-module archiveName="moya-terminal-web-0.2.0.war" deploy-path="/" handle="module:/resource/MoyaTerminalWeb/MoyaTerminalWeb">
<dependency-type>uses</dependency-type>
</dependent-module>
</wb-module> </wb-module>
</project-modules> </project-modules>
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/application_7.xsd" version="7">
xmlns="http://xmlns.jcp.org/xml/ns/javaee" <display-name>moya-ear</display-name>
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/application_7.xsd" <module>
version="7"> <ejb>moya-beans-0.2.0.jar</ejb>
<display-name>moya-ear</display-name> </module>
<module> <module>
<ejb>moya-beans-0.2.0.jar</ejb> <web>
</module> <web-uri>moya-web-0.2.0.war</web-uri>
<module> <context-root>/MoyaWeb</context-root>
<web> </web>
<web-uri>moya-web-0.2.0.war</web-uri> </module>
<context-root>/MoyaWeb</context-root> <module>
</web> <web>
</module> <web-uri>moya-mgmt-web-0.2.0.war</web-uri>
<module> <context-root>/EventMgmt</context-root>
<web> </web>
<web-uri>moya-mgmt-web-0.2.0.war</web-uri> </module>
<context-root>/EventMgmt</context-root>
</web> <module>
</module> <web>
<library-directory>lib</library-directory> <web-uri>moya-terminal-web-0.2.0.war</web-uri>
<context-root>/MoyaTerminalWeb</context-root>
</web>
</module>
<library-directory>lib</library-directory>
</application> </application>
\ No newline at end of file
...@@ -97,6 +97,12 @@ ...@@ -97,6 +97,12 @@
<artifactId>commons-digester</artifactId> <artifactId>commons-digester</artifactId>
<version>2.1</version> <version>2.1</version>
</dependency> </dependency>
<dependency>
<groupId>fi.codecrew.moya</groupId>
<artifactId>moya-terminal-web</artifactId>
<version>0.2.0</version>
<type>war</type>
</dependency>
</dependencies> </dependencies>
<repositories> <repositories>
......
...@@ -5,6 +5,6 @@ ...@@ -5,6 +5,6 @@
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/> <wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>
<property name="java-output-path" value="/MoyaEventMgmtWeb/build/classes"/> <property name="java-output-path" value="/MoyaEventMgmtWeb/build/classes"/>
<property name="context-root" value="moya-mgmt-web"/> <property name="context-root" value="moya-mgmt-web"/>
<property name="component.inclusion.patterns" value="WEB-INF/lib/javamelody-core*,WEB-INF/lib/primefaces*,**/*.xml,**/*.xhtml,**/*.properties,**/*.class,**/*.png,**/*.css,**/*.js,resources/*"/> <property name="component.inclusion.patterns" value="WEB-INF/lib/prettyfaces-core*,WEB-INF/lib/javamelody-core*,WEB-INF/lib/primefaces*,**/*.xml,**/*.xhtml,**/*.properties,**/*.class,**/*.png,**/*.css,**/*.js,resources/*"/>
</wb-module> </wb-module>
</project-modules> </project-modules>
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0"> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
<display-name>MoyaTerminalWeb</display-name> <display-name>MoyaTerminalWeb</display-name>
<context-param>
<param-name>javax.faces.FACELETS_SKIP_COMMENTS</param-name>
<param-value>true</param-value>
</context-param>
<welcome-file-list> <welcome-file-list>
<welcome-file>index.html</welcome-file> <welcome-file>index.html</welcome-file>
<welcome-file>index.wtf</welcome-file> <welcome-file>index.jsf</welcome-file>
</welcome-file-list> </welcome-file-list>
<session-config> <session-config>
<session-timeout>30</session-timeout> <session-timeout>30</session-timeout>
...@@ -15,7 +19,7 @@ ...@@ -15,7 +19,7 @@
</servlet> </servlet>
<servlet-mapping> <servlet-mapping>
<servlet-name>Faces Servlet</servlet-name> <servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.wtf</url-pattern> <url-pattern>*.jsf</url-pattern>
<url-pattern>/faces/*</url-pattern> <url-pattern>/faces/*</url-pattern>
</servlet-mapping> </servlet-mapping>
<context-param> <context-param>
...@@ -26,15 +30,19 @@ ...@@ -26,15 +30,19 @@
<param-name>javax.faces.FACELETS_SKIP_COMMENTS</param-name> <param-name>javax.faces.FACELETS_SKIP_COMMENTS</param-name>
<param-value>true</param-value> <param-value>true</param-value>
</context-param> </context-param>
<filter>
<display-name>PrimefacesFileupload</display-name> <!--
<filter-name>PrimeFacesFileupload</filter-name> <filter>
<filter-class>org.primefaces.webapp.filter.FileUploadFilter</filter-class> <display-name>PrimefacesFileupload</display-name>
</filter> <filter-name>PrimefacesFileupload</filter-name>
<filter-class>org.primefaces.webapp.filter.FileUploadFilter</filter-class>
</filter>
<filter-mapping> <filter-mapping>
<filter-name>PrimeFacesFileupload</filter-name> <filter-name>PrimefacesFileupload</filter-name>
<servlet-name>Faces Servlet</servlet-name> <servlet-name>Faces Servlet</servlet-name>
</filter-mapping> </filter-mapping>
-->
<login-config> <login-config>
<auth-method>CLIENT-CERT</auth-method> <auth-method>CLIENT-CERT</auth-method>
<realm-name>certificate</realm-name> <realm-name>certificate</realm-name>
...@@ -44,7 +52,7 @@ ...@@ -44,7 +52,7 @@
<web-resource-collection> <web-resource-collection>
<web-resource-name>BortalTerminalWebResource</web-resource-name> <web-resource-name>BortalTerminalWebResource</web-resource-name>
<url-pattern>/faces/*</url-pattern> <url-pattern>/faces/*</url-pattern>
<url-pattern>*.wtf</url-pattern> <url-pattern>*.jsf</url-pattern>
</web-resource-collection> </web-resource-collection>
<auth-constraint> <auth-constraint>
<role-name>TERMINAL</role-name> <role-name>TERMINAL</role-name>
......
...@@ -39,5 +39,15 @@ ...@@ -39,5 +39,15 @@
<artifactId>moya-beans-client</artifactId> <artifactId>moya-beans-client</artifactId>
<version>0.2.0</version> <version>0.2.0</version>
</dependency> </dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>4.0</version>
</dependency>
</dependencies> </dependencies>
</project> </project>
\ No newline at end of file
...@@ -17,7 +17,7 @@ import fi.codecrew.moya.clientutils.BortalLocalContextHolder; ...@@ -17,7 +17,7 @@ import fi.codecrew.moya.clientutils.BortalLocalContextHolder;
import fi.codecrew.moya.enums.apps.IAppPermission; import fi.codecrew.moya.enums.apps.IAppPermission;
import fi.codecrew.moya.model.EventUser; import fi.codecrew.moya.model.EventUser;
@Named() @Named(value="terminalSessionHandler")
@RequestScoped @RequestScoped
public class SessionHandler { public class SessionHandler {
......
package fi.codecrew.moya.terminal.view; package fi.codecrew.moya.terminal.view;
import javax.ejb.EJB; import javax.ejb.EJB;
import javax.enterprise.context.RequestScoped;
import javax.faces.context.FacesContext; import javax.faces.context.FacesContext;
import javax.inject.Named; import javax.inject.Named;
...@@ -8,10 +9,11 @@ import fi.codecrew.moya.beans.PermissionBeanLocal; ...@@ -8,10 +9,11 @@ import fi.codecrew.moya.beans.PermissionBeanLocal;
import fi.codecrew.moya.enums.apps.TerminalPermission; import fi.codecrew.moya.enums.apps.TerminalPermission;
@Named @Named
@RequestScoped
public class RedirectView { public class RedirectView {
@EJB @EJB
PermissionBeanLocal permissionBean; private PermissionBeanLocal permissionBean;
public void redirectByPermissions() throws Exception { public void redirectByPermissions() throws Exception {
FacesContext fcont = FacesContext.getCurrentInstance(); FacesContext fcont = FacesContext.getCurrentInstance();
...@@ -27,4 +29,4 @@ public class RedirectView { ...@@ -27,4 +29,4 @@ public class RedirectView {
} }
} }
} }
package fi.codecrew.moya.terminal.view;
import java.io.Serializable;
import javax.ejb.EJB;
import javax.enterprise.context.RequestScoped;
import javax.inject.Named;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import fi.codecrew.moya.beans.PermissionBeanLocal;
@Named
@RequestScoped
public class TestView implements Serializable {
private static final long serialVersionUID = -2872232867536069020L;
private static final Logger logger = LoggerFactory.getLogger(TestView.class);
@EJB
private transient PermissionBeanLocal permissionBean;
public String getPrincipal() {
logger.debug("PermissionBean: {}", permissionBean);
return permissionBean.getPrincipal();
}
}
...@@ -22,6 +22,5 @@ ...@@ -22,6 +22,5 @@
<attribute name="owner.project.facets" value="jst.web"/> <attribute name="owner.project.facets" value="jst.web"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
<classpathentry kind="output" path="target/classes"/> <classpathentry kind="output" path="target/classes"/>
</classpath> </classpath>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!