[JBoss Seam] - Re: Eclipse, JBoss & exploded deployment
by tony.herstellï¼ gmail.com
This work for MyEclipse.
Create an ear project
Create a jar project
Create a war project
Add in jars to the Ear area first
Where your Jar and War needs a jar thats in the ear create a reference to a jar in another project (the EAR).. you should only have 1 copy of a jar in the whole project.
Edit you ear project properties to tell it NOT to update the application.xml as its not seam compatible!
use MyElcipse menu on the ear and tell it deploy exploded to your JBoss server.
click run on the JBoss Server.
bingo... and your console in MyEclipse will show JBoss running up...
Any changes to xhtml/code will be instantly visible (No deploy restart of the server).
Never touch Ant (unless MyEclispe does under the hood)!!
I am going to upload an example of a MyEclipse project but am waiting for a stable IceFaces. email me if you want a copy of what I have got so far so you can nosy around it.
In case it helps...
my application.xml looks like:
| <application>
| <display-name>risingstars</display-name>
|
| <module>
| <web>
| <web-uri>risingstars_war.war</web-uri>
| <context-root>/risingstars</context-root>
| </web>
| </module>
|
| <module>
| <ejb>risingstars_jar.jar</ejb>
| </module>
|
| <!-- Seam -->
|
| <module>
| <java>jboss-seam.jar</java>
| </module>
|
| <!-- Icefaces -->
| <module>
| <java>icefaces.jar</java>
| </module>
|
| <module>
| <java>icefaces-comps.jar</java>
| </module>
|
| <module>
| <java>el-api.jar</java>
| </module>
|
| <module>
| <java>el-ri.jar</java>
| </module>
|
| <module>
| <java>icefaces-facelets.jar</java>
| </module>
|
| <module>
| <java>commons-fileupload.jar</java>
| </module>
|
| <!-- Seam - Rules (Security and jBPM) -->
|
| <module>
| <java>drools-compiler-3.0.5.jar</java>
| </module>
|
| <module>
| <java>drools-core-3.0.5.jar</java>
| </module>
|
| <module>
| <java>commons-jci-core-1.0-406301.jar</java>
| </module>
|
| <module>
| <java>commons-jci-janino-2.4.3.jar</java>
| </module>
|
| <module>
| <java>commons-lang-2.1.jar</java>
| </module>
|
| <module>
| <java>janino-2.4.3.jar</java>
| </module>
|
| <module>
| <java>stringtemplate-2.3b6.jar</java>
| </module>
|
| <module>
| <java>antlr-2.7.6.jar</java>
| </module>
|
| <module>
| <java>antlr-3.0ea8.jar</java>
| </module>
|
| </application>
|
components.xml
| <components xmlns="http://jboss.com/products/seam/components"
| xmlns:core="http://jboss.com/products/seam/core"
| xmlns:security="http://jboss.com/products/seam/security"
| xmlns:drools="http://jboss.com/products/seam/drools"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://jboss.com/products/seam/core http://jboss.com/products/seam/core-1.1.xsd
| http://jboss.com/products/seam/components http://jboss.com/products/seam/components-1.1.xsd
| http://jboss.com/products/seam/security http://jboss.com/products/seam/security-1.1.xsd
| http://jboss.com/products/seam/drools http://jboss.com/products/seam/drools-1.1.xsd">
|
| <component name="org.jboss.seam.core.init">
| <property name="debug">true</property>
| <property name="myFacesLifecycleBug">false</property>
| <property name="jndiPattern">
| risingstars/#{ejbName}/local
| </property>
| </component>
|
| <!-- 120 second conversation timeout -->
| <component name="org.jboss.seam.core.manager">
| <property name="conversationTimeout">120000</property>
| </component>
|
| <component class="org.jboss.seam.core.Ejb" installed="false" />
|
| <!-- Security -->
| <security:identity
| authenticate-method="#{authenticationController.authenticate}" />
|
| <drools:rule-base name="securityRules">
| <drools:rule-files>
| <value>/META-INF/security-rules.drl</value>
| </drools:rule-files>
| </drools:rule-base>
|
| <factory name="basePath"
| value="#{facesContext.externalContext.request.scheme}://#{facesContext.externalContext.request.serverName}:#{facesContext.externalContext.request.serverPort}#{facesContext.externalContext.request.contextPath}/" />
|
| </components>
|
|
web.xml
| <?xml version="1.0" encoding="UTF-8"?>
|
| <web-app version="2.5"
| xmlns="http://java.sun.com/xml/ns/javaee"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
|
| <!-- TODO
| <context-param>
| <param-name>javax.faces.CONFIG_FILES</param-name>
| <param-value>/WEB-INF/navigation.xml</param-value>
| </context-param>
| -->
|
| <!-- Seam -->
|
| <listener>
| <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
| </listener>
|
| <!-- Propagate conversations across redirects -->
| <!--
| <filter>
| <filter-name>Seam Redirect Filter</filter-name>
| <filter-class>org.jboss.seam.servlet.SeamRedirectFilter</filter-class>
| </filter>
|
| <filter-mapping>
| <filter-name>Seam Redirect Filter</filter-name>
| <url-pattern>*.seam</url-pattern>
| </filter-mapping>
| -->
| <filter>
| <filter-name>Seam Exception Filter</filter-name>
| <filter-class>org.jboss.seam.servlet.SeamExceptionFilter</filter-class>
| </filter>
|
| <filter-mapping>
| <filter-name>Seam Exception Filter</filter-name>
| <url-pattern>*.seam</url-pattern>
| </filter-mapping>
|
| <!-- JSF -->
|
| <context-param>
| <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
| <param-value>client</param-value>
| </context-param>
|
| <context-param>
| <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
| <param-value>.xhtml</param-value>
| </context-param>
|
| <context-param>
| <param-name>facelets.DEVELOPMENT</param-name>
| <param-value>true</param-value>
| </context-param>
|
| <context-param>
| <param-name>com.icesoft.faces.actionURLSuffix</param-name>
| <param-value>.seam</param-value>
| </context-param>
|
| <context-param>
| <param-name>com.icesoft.faces.synchronousUpdate</param-name>
| <param-value>true</param-value>
| </context-param>
|
| <servlet>
| <servlet-name>Faces Servlet</servlet-name>
| <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
| <load-on-startup>1</load-on-startup>
| </servlet>
|
| <!-- Added as trail from http://support.icesoft.com/jive/servlet/KbServlet/download/623-102-847/Se...
| <context-param>
| <param-name>com.icesoft.faces.doJSFStateManagement</param-name>
| <param-value>true</param-value>
| </context-param>
| -->
|
| <!-- Faces Servlet Mapping -->
| <!--
| <servlet-mapping>
| <servlet-name>Faces Servlet</servlet-name>
| <url-pattern>*.seam</url-pattern>
| </servlet-mapping>
|
| -->
|
| <servlet>
| <servlet-name>Blocking Servlet</servlet-name>
| <servlet-class>com.icesoft.faces.webapp.xmlhttp.BlockingServlet</servlet-class>
| <load-on-startup> 1 </load-on-startup>
| </servlet>
|
| <servlet>
| <servlet-name>Persistent Faces Servlet</servlet-name>
| <servlet-class>com.icesoft.faces.webapp.xmlhttp.PersistentFacesServlet</servlet-class>
| <load-on-startup>1</load-on-startup>
| </servlet>
|
| <servlet-mapping>
| <servlet-name>Persistent Faces Servlet</servlet-name>
| <url-pattern>/xmlhttp/*</url-pattern>
| </servlet-mapping>
|
| <servlet-mapping>
| <servlet-name>Persistent Faces Servlet</servlet-name>
| <url-pattern>/xmlhttp/*</url-pattern>
| </servlet-mapping>
|
| <servlet-mapping>
| <servlet-name>Persistent Faces Servlet</servlet-name>
| <url-pattern>*.iface</url-pattern>
| </servlet-mapping>
|
| <!-- Blocking Servlet Mapping -->
| <servlet-mapping>
| <servlet-name>Blocking Servlet</servlet-name>
| <url-pattern>/block/*</url-pattern>
| </servlet-mapping>
|
| <!-- Faces Servlet Mapping -->
| <servlet-mapping>
| <servlet-name>Persistent Faces Servlet</servlet-name>
| <url-pattern>*.seam</url-pattern>
| </servlet-mapping>
|
| <!-- Content Servlet -->
|
| <servlet>
| <servlet-name>Content Servlet</servlet-name>
| <servlet-class>nz.co.risingstars.content.ContentServlet</servlet-class>
| </servlet>
|
| <servlet-mapping>
| <servlet-name>Content Servlet</servlet-name>
| <url-pattern>/content/*</url-pattern>
| </servlet-mapping>
|
| <filter>
| <filter-name>Seam Servlet Filter</filter-name>
| <filter-class>org.jboss.seam.servlet.SeamServletFilter</filter-class>
| </filter>
|
| <filter-mapping>
| <filter-name>Seam Servlet Filter</filter-name>
| <url-pattern>/content/*</url-pattern>
| </filter-mapping>
|
| <!-- file upload Servlet -->
| <servlet>
| <servlet-name>uploadServlet</servlet-name>
| <servlet-class>com.icesoft.faces.component.inputfile.FileUploadServlet</servlet-class>
| <load-on-startup> 1 </load-on-startup>
| </servlet>
|
| <servlet-mapping>
| <servlet-name>uploadServlet</servlet-name>
| <url-pattern>/uploadHtml</url-pattern>
| </servlet-mapping>
|
| <!-- MyFaces -->
| <listener>
| <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
| </listener>
|
| <!-- JSF RI -->
| <!--
| <listener>
| <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
| </listener>
| -->
|
| <session-config>
| <session-timeout>15</session-timeout>
| </session-config>
|
| </web-app>
|
|
pages.xml
| <!DOCTYPE pages PUBLIC
| "-//JBoss/Seam Pages Configuration DTD 1.2//EN"
| "http://jboss.com/products/seam/pages-1.2.dtd">
|
| <pages no-conversation-view-id="/mainmenu.xhtml">
| <page view-id="/userCRUD.xhtml" timeout="300000">
| Reason: #{cRUDUserController.mode} User ( #{user.username} )
| </page>
| <page view-id="/userConfirm.xhtml" timeout="300000">
| Reason: Confirm #{cRUDUserController.mode} User
| (#{user.username} )
| </page>
| <page view-id="/userRegistration.xhtml" timeout="300000">
| Reason: Registration of new User
| </page>
|
| <page view-id="/organisationCRUD.xhtml" timeout="300000">
| Reason: #{cRUDOrganisationController.mode} Organisation (
| #{organisation.name} )
| </page>
| <page view-id="/organisationConfirm.xhtml" timeout="300000">
| Reason: Confirm #{cRUDOrganisationController.mode} Organisation
| (#{organisation.name} )
| </page>
|
| <page view-id="/upload.xhtml" timeout="300000">
| Reason: Upload Image
| </page>
|
| <!-- Security -->
|
| <page view-id="/userRegistration.xhtml">
| <restrict>#{!identity.loggedIn}</restrict>
| </page>
|
| <page view-id="/userFind.xhtml">
| <restrict>#{identity.loggedIn}</restrict>
| </page>
| <page view-id="/userCRUD.xhtml">
| <restrict>#{identity.loggedIn}</restrict>
| </page>
| <page view-id="/userConfirm.xhtml">
| <restrict>#{identity.loggedIn}</restrict>
| </page>
|
| <page view-id="/organisationFind.xhtml">
| <restrict>#{identity.loggedIn}</restrict>
| </page>
| <page view-id="/organisationCRUD.xhtml">
| <restrict>#{identity.loggedIn}</restrict>
| </page>
| <page view-id="/organisationConfirm.xhtml">
| <restrict>#{identity.loggedIn}</restrict>
| </page>
|
| <page view-id="/upload.xhtml">
| <restrict>#{identity.loggedIn}</restrict>
| </page>
|
| <exception class="org.jboss.seam.security.NotLoggedInException">
| <end-conversation />
| <redirect view-id="/securityError.xhtml">
| <message>#{messages.security_not_logged_in}</message>
| </redirect>
| </exception>
|
| <exception class="org.jboss.seam.security.AuthorizationException">
| <end-conversation />
| <redirect view-id="/securityError.xhtml">
| <message>#{messages.security_permission}</message>
| </redirect>
| </exception>
|
| </pages>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4025978#4025978
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4025978
19Â years, 1Â month
[JBossWS] - Getting access to X509Certificate
by gray727
My configuration:
JDK 1.5
JBoss AS 4.0.5
JBossWS 1.2.0
WS-Security
The configuration of my web service requires an incoming SOAP message to be digitally signed (using Message Level Security; not BASIC authentication over SSL), and this works fine. However, I have an audit requirement to log the credentials of the client trying to access the service, whether successful or not. In the past (using JWSDP and JSR-109 style web services), I've used security callback functions to meet these sort of requirements.
Is there a way to interact with WS-Security during authentication and authorization and obtain the X509Certificate, Subject, Principal, etc. to log security related events? I've experimented with the WebServiceContext.getUserPrincipal(), but it seems that this is only useful for BASIC authentication, which I'm not using.
thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4025975#4025975
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4025975
19Â years, 1Â month
[Beginners Corner] - Re: Setting up database authentication in JBoss using JAAS
by PeterJ
Not sure if this is the cause, but under < security-constraint >, the role name is upgradebundle, while in < security-role >, it is user. I think these two should be the same.
Are the password store in the database in plain text?
The DatabaseServerLoginModule does support logging at the TRACE level, but it probably doesn't tell you want you want to know. It will, for instance, state what SQL statement it is using for getting the password, but then doesn't say what it got, only if it matched. Similarly, it doesn't tell you what roles it found. What I did was added more logging to that class to debug my access (actually, I did this with the LDAP login module, but the same thing would work for database).
Finally, you should have started a new topic rather than appending to a 3 year old topic.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4025969#4025969
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4025969
19Â years, 1Â month