[Tomcat, HTTPD, Servlets & JSP] - "struts forward.setPath" problem:
by augustfox
I have a project which has been develped by WSAD5.1.2(ibm).
Now I want to import this project into eclipse3.1.2+jboss4.0.1sp1+myeclipse4.1.1.
All has runned well,except one problem as follows:
In my DispatchAction when forward.setPath(url);
the url must begin with "/",
such as forward.setPath("/success.jsp"),not forward.setPath("success.jsp").
But all is well in WSAD,I searched some struts/servlet source code,but have
no idea of it.
My project uses lots of DispatchActions,all as above,and not want add "/"
for every forward.setPath().
Any help is appreciated,thanks all.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3995787#3995787
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3995787
19 years, 4 months
[JBoss Seam] - Re: Project setup with Icefaces
by PatrickMadden
I would download the latest 1.1.0.GA of Seam. I too was just using the CR2 version. As with any software there are a few other hoops you will have to jump through.
My faces-config.xml has the following:
|
| <faces-config>
|
| <managed-bean>
| <managed-bean-name>highlight</managed-bean-name>
| <managed-bean-class>com.icesoft.faces.context.effects.Highlight</managed-bean-class>
| <managed-bean-scope>application</managed-bean-scope>
| </managed-bean>
|
| <application>
| <message-bundle>messages</message-bundle>
| <!-- view-handler>com.sun.facelets.FaceletViewHandler</view-handler -->
| <view-handler>com.icesoft.faces.facelets.D2DSeamFaceletViewHandler</view-handler>
| </application>
|
| <!-- Seam transaction management -->
| <lifecycle>
| <phase-listener>org.jboss.seam.jsf.TransactionalSeamPhaseListener</phase-listener>
| </lifecycle>
| </faces-config>
|
My application.xml has the following:
|
| <application>
| <display-name>Seam Generated Application</display-name>
| <description>created by seam-gen</description>
|
| <module>
| <web>
| <web-uri>CloosterWeb20.war</web-uri>
| <context-root>/Clooster</context-root>
| </web>
| </module>
| <module>
| <java>jboss-seam.jar</java>
| </module>
| <module>
| <ejb>CloosterWeb20.jar</ejb>
| </module>
| <module>
| <java>icefaces.jar</java>
| </module>
| <module>
| <java>icefaces-facelets.jar</java>
| </module>
| <module>
| <java>icefaces-comps.jar</java>
| </module>
| <module>
| <java>jbpm-3.1.2.jar</java>
| </module>
| <module>
| <java>el-api.jar</java>
| </module>
| <module>
| <java>el-ri.jar</java>
| </module>
| </application>
|
And here is my web.xml
|
| <?xml version="1.0" ?>
| <web-app version="2.5"
| xmlns="http://java.sun.com/xml/ns/j2ee"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd">
|
| <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>
| -->
|
| <!-- propogate seam context to servlets (pvm) addition -->
| <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>/servlet/*</url-pattern>
| </filter-mapping>
| <!-- end seam context to servlets -->
|
| <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>
|
| <!-- End Seam -->
|
|
| <!-- 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>
|
| <!-- 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>
|
| <!-- MyFaces -->
| <listener>
| <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
| </listener>
| <!-- End MyFaces -->
|
| <!-- JSF RI -->
| <!--
| <listener>
| <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
| </listener
| -->
| </web-app>
|
|
When upgrading from CR2 to GA I just made sure to copy my seam-gen/build.properties to from my CR2 to GA directory. I also then copied the GA jboss-seam*.jar (minus the sem-gen.jar) to my own eclipse project's lib directory.
I'm no expert, in fact I'm a seam newbie. Only been using it for 2 weeks max. Regardless, I was able to get my project running with Icefaces. You'll notice a pretty significant difference when jboss starts up. I'm using 4.0.5 GA.
Hope this is of help.
PVM
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3995781#3995781
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3995781
19 years, 4 months
[Messaging, JMS & JBossMQ] - JBoss doesnt release threads after executing MDB (out of Mem
by suhail
Hi,
I am using JBoss AS jboss-4.0.2.
I am getting OutOfMemoryError when I send the messages to an MDB. It happens after i send 30-40 messages. What I have observed on the web-console of Jboss is that #Threads increases by some 30 whenever I sent one message to a queue. Even though message is getting consumed instantly, the thread count doesn?t come down but keep on increasing by a factor of approx 30 or more with each message. After sometime it reaches some 2000 figure and server starts giving out of memory error. If I make process synchronous (I mean not use MDB) , thread count doesnt increase.
It implies that each message is adding approx. 30 threads and threads are not released after messages are getting consumed. Can anybody explain it and give a fix ?
Please find the stack of errors below. I get either of these two stacks.
Any help will be appreciated.
Thank you
Suhail
20 Dec 2006 16:20:10,176 WARN (UILServerILService Accept Thread:) [org.jboss.mq.il.uil2.UILServerILService] Unexpected error in setup of client connection
java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start0(Native Method)
at java.lang.Thread.start(Thread.java:574)
at org.jboss.mq.il.uil2.SocketManager.start(SocketManager.java:147)
at org.jboss.mq.il.uil2.UILServerILService.run(UILServerILService.java:162)
at java.lang.Thread.run(Thread.java:595)
20 Dec 2006 13:18:35,031 ERROR (TimeoutFactory-0:) [org.jboss.logging.Log4jService$ThrowableListenerLoggingAdapter] Unhandled Throwable
org.jboss.util.threadpool.ThreadPoolFullException: java.lang.OutOfMemoryError: unable to create new native thread
at org.jboss.util.threadpool.BasicThreadPool.execute(BasicThreadPool.java:417)
at org.jboss.util.threadpool.BasicThreadPool.runTaskWrapper(BasicThreadPool.java:192)
at org.jboss.util.threadpool.BasicThreadPool.run(BasicThreadPool.java:212)
at org.jboss.util.threadpool.BasicThreadPool.run(BasicThreadPool.java:206)
at org.jboss.util.timeout.TimeoutFactory.doWork(TimeoutFactory.java:223)
at org.jboss.util.timeout.TimeoutFactory.access$000(TimeoutFactory.java:41)
at org.jboss.util.timeout.TimeoutFactory$1.run(TimeoutFactory.java:136)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3995779#3995779
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3995779
19 years, 4 months