Re: Deploying Struts 2 Portlet Into Pluto 1.1.6 Portlet Container
On Fri, Dec 5, 2008 at 3:50 PM, Phillips, Bruce A [EMAIL PROTECTED] wrote: We have been using the Pluto 1.1.6 Portlet container (http://portals.apache.org/pluto/) to test our JSR-168 portlets. Our team needs help learning the correct way to setup a Struts 2 portlet to run within the Pluto 1.1.6 portlet container. We've studied the Struts 2 example portlet tutorial (http://struts.apache.org/2.0.11.1/docs/struts-2-portlet-tutorial.html ) in the Struts 2 documentation. However, that portlet is deployed using maven, jetty, and Pluto; which unfortunately is not our development environment. It's a very efficient development environment. You should try it out. portlet id=StrutsExamplePortlet description xml:lang=ENSimple hello world portlet using Struts 2/description portlet-nameStrutsExamplePortlet/portlet-name snip /init-param init-param param-nameportlet-guid/param-name param-value StrutsExample.StrutsExamplePortlet /param-value /init-param snip portlet context=/StrutsExample name=StrutsExample/ From what I can understand, your portlet name is StrutsExamplePortlet, not StrutsExample (which is your context). So try this: portlet context=/StrutsExample name=StrutsExamplePortlet/ I'm using pluto for all my portlet development and have never had any issues with Struts 2 support. Nils-H - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Deploying Struts 2 Portlet Into Pluto 1.1.6 Portlet Container
Well - after hours of trouble-shooting I finally figured out what my problem was. The error was in my web.xml: servlet servlet-nameStrutsExample/servlet-name servlet-classorg.apache.pluto.core.PortletServlet/servlet-class init-param param-nameportlet-class/param-name param-valueorg.apache.struts2.portlet.dispatcher.Jsr168Dispatcher/param-value /init-param init-param param-nameportlet-guid/param-name param-value StrutsExample.StrutsExamplePortlet /param-value /init-param /servlet servlet-mapping servlet-nameStrutsExample/servlet-name url-pattern/PlutoInvoker/StrutsExamplePortlet/url-pattern /servlet-mapping I was missing the portlet-name init-param. I didn't need the portlet-guid init-param. So using this servlet and servlet-mapping configuration in my web.xml I was able to successfully get my portlet to render using the Pluto 1.1.6 container: servlet servlet-nameStrutsExample/servlet-name servlet-classorg.apache.pluto.core.PortletServlet/servlet-class init-param param-nameportlet-class/param-name param-valueorg.apache.struts2.portlet.dispatcher.Jsr168Dispatcher/param-value /init-param init-param param-nameportlet-name/param-name param-valueStrutsExamplePortlet/param-value /init-param /servlet servlet-mapping servlet-nameStrutsExample/servlet-name url-pattern/PlutoInvoker/StrutsExamplePortlet/url-pattern /servlet-mapping Bruce phillips1021 wrote: Thanks for the quick reply. I changed: page name=Struts Portlet Example uri=/WEB-INF/themes/pluto-default-theme.jsp portlet context=/StrutsExample name=StrutsExamplePortlet/ /page per your suggestion. I still get the same error: INFO: Portlet Context '/StrutsExample' registered. Dec 5, 2008 9:48:48 AM org.apache.pluto.core.PortletContextManager register INFO: Registered portlet application with application id '/StrutsExample' Dec 5, 2008 9:48:48 AM org.apache.pluto.core.PortletContextManager register INFO: Registering 1 portlets for context /StrutsExample Dec 5, 2008 9:48:48 AM org.apache.pluto.core.PortletContextManager getPortletConfig INFO: Unable to locate portlet config [applicationId=/StrutsExample]/[null]. Dec 5, 2008 9:48:48 AM org.apache.catalina.core.ApplicationContext log SEVERE: StandardWrapper.Throwable java.lang.NullPointerException at org.apache.pluto.core.PortletServlet.init(PortletServlet.java:106) when trying to render the portlet in Pluto 1.1.6. If you have an example of a Struts 2 portlet that you've successfully deployed into Pluto 1.1.6 I'd love to see your struts.xml, portlet.xml, web.xml, and pluto-portal-driver-config.xml files to see if I've missed some setting. Bruce Nils-Helge Garli wrote: On Fri, Dec 5, 2008 at 3:50 PM, Phillips, Bruce A [EMAIL PROTECTED] wrote: We have been using the Pluto 1.1.6 Portlet container (http://portals.apache.org/pluto/) to test our JSR-168 portlets. Our team needs help learning the correct way to setup a Struts 2 portlet to run within the Pluto 1.1.6 portlet container. We've studied the Struts 2 example portlet tutorial (http://struts.apache.org/2.0.11.1/docs/struts-2-portlet-tutorial.html ) in the Struts 2 documentation. However, that portlet is deployed using maven, jetty, and Pluto; which unfortunately is not our development environment. It's a very efficient development environment. You should try it out. portlet id=StrutsExamplePortlet description xml:lang=ENSimple hello world portlet using Struts 2/description portlet-nameStrutsExamplePortlet/portlet-name snip /init-param init-param param-nameportlet-guid/param-name param-value StrutsExample.StrutsExamplePortlet /param-value /init-param snip portlet context=/StrutsExample name=StrutsExample/ From what I can understand, your portlet name is StrutsExamplePortlet, not StrutsExample (which is your context). So try this: portlet context=/StrutsExample name=StrutsExamplePortlet/ I'm using pluto for all my portlet development and have never had any issues with Struts 2 support. Nils-H - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Deploying-Struts-2-Portlet-Into-Pluto-1.1.6-Portlet-Container-tp20855416p20863164.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail:
Re: Deploying struts
Hi there, you should put it in the WEB-INF/lib directory. However the struts-documentation should run straight out of the box. I suspect you have a configuration failure somewhere. On 09/29/2004 08:39 PM Sanghamitra Roy wrote: I have Tomcat 3.3.1. I have downloaded the struts 1.2.2 and unzipped to the directory C:\struts. I have copied over the struts-examples.war files in the directory C:\struts\jakarta-struts-1.2.2\dist\webapps to the $TOMCAT_HOME\webapps directory as well as unjarred them to $TOMCAT_HOME\webapps\struts-examples. I have downloaded sax2r2.jar, unjarred it and added sax.jar to the classpath. Have also copied sax.jar to the $TOMCAT_HOME\webapps\struts-examples\WEB-INF directory. I can run the struts-documentation fine but when I try to run the struts-examples I get the following error Error: 500Location: /struts-examples/welcome.doInternal Servlet Error: java.lang.NoClassDefFoundError: org/xml/sax/SAXExceptionat java.lang.Class.newInstance0(Native Method) at java.lang.Class.newInstance(Class.java:232) at org.apache.tomcat.facade.ServletHandler.getServlet(ServletHandler.java:346) at org.apache.tomcat.facade.ServletHandler.preInit(ServletHandler.java:439) at org.apache.tomcat.facade.ServletHandler.init(ServletHandler.java:228)at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:472) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:917) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:833) at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10Interceptor.java:176) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:494) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:516) at java.lang.Thread.run(Thread.java:479) Please can someone help me run the examples? Thanks, WA. - Do you Yahoo!? Yahoo! Mail - You care about security. So do we. -- struts 1.2 + tomcat 5.0.19 + java 1.4.2 Linux 2.4.20 Debian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Deploying Struts ???
-Original Message- From: Lykins Don H Contr AFSAC/ITS [mailto:[EMAIL PROTECTED] Sent: Friday, August 20, 2004 7:57 AM To: '[EMAIL PROTECTED]' Subject: Deploying Struts ??? Looking for pointers on how to best deploy struts based, JSP applications. I am using JDeveloper 10G which ships with Struts source... deploying to Jrun. Scenario: I am one of 2 programmers, each developing a separate JSP , but sharing a common database When each JSP is developed and deployed a unique and separate WAR file is created and deployed to our app server. -- but it seems duplicative -- as each WAR contains all the struts code as well...??? any way to share the Struts source so we don't duplicate? May Still want to deploy each jsp app in separate WAR files, but find someway to deploy struts centrally??? Most containers hava container wide library you can put common libraries in... however you don't want to do this with struts because you will have serious issues with finding the struts-config.xml files. Don Lykins AFSAC 937-257-4295 x4539 [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Deploying Struts ???
so how do you suggest we deploy struts? each developer bundle struts in their own WAR files? -Original Message- From: Jim Barrows [mailto:[EMAIL PROTECTED] Sent: Friday, August 20, 2004 11:12 AM To: Struts Users Mailing List Subject: RE: Deploying Struts ??? -Original Message- From: Lykins Don H Contr AFSAC/ITS [mailto:[EMAIL PROTECTED] Sent: Friday, August 20, 2004 7:57 AM To: '[EMAIL PROTECTED]' Subject: Deploying Struts ??? Looking for pointers on how to best deploy struts based, JSP applications. I am using JDeveloper 10G which ships with Struts source... deploying to Jrun. Scenario: I am one of 2 programmers, each developing a separate JSP , but sharing a common database When each JSP is developed and deployed a unique and separate WAR file is created and deployed to our app server. -- but it seems duplicative -- as each WAR contains all the struts code as well...??? any way to share the Struts source so we don't duplicate? May Still want to deploy each jsp app in separate WAR files, but find someway to deploy struts centrally??? Most containers hava container wide library you can put common libraries in... however you don't want to do this with struts because you will have serious issues with finding the struts-config.xml files. Don Lykins AFSAC 937-257-4295 x4539 [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Deploying Struts ???
-Original Message- From: Lykins Don H Contr AFSAC/ITS [mailto:[EMAIL PROTECTED] Sent: Friday, August 20, 2004 8:25 AM To: 'Struts Users Mailing List' Subject: RE: Deploying Struts ??? so how do you suggest we deploy struts? each developer bundle struts in their own WAR files? Yes. Only way to do it. It's a classpath loader, and the way it gets defined by the J2EE spec on how things get loaded and from where. Believe me I've tried and tried and tried.. and it always comes back to the spec. Unfortunately, the spec is right... there could be worse issues if they did it differently. -Original Message- From: Jim Barrows [mailto:[EMAIL PROTECTED] Sent: Friday, August 20, 2004 11:12 AM To: Struts Users Mailing List Subject: RE: Deploying Struts ??? -Original Message- From: Lykins Don H Contr AFSAC/ITS [mailto:[EMAIL PROTECTED] Sent: Friday, August 20, 2004 7:57 AM To: '[EMAIL PROTECTED]' Subject: Deploying Struts ??? Looking for pointers on how to best deploy struts based, JSP applications. I am using JDeveloper 10G which ships with Struts source... deploying to Jrun. Scenario: I am one of 2 programmers, each developing a separate JSP , but sharing a common database When each JSP is developed and deployed a unique and separate WAR file is created and deployed to our app server. -- but it seems duplicative -- as each WAR contains all the struts code as well...??? any way to share the Struts source so we don't duplicate? May Still want to deploy each jsp app in separate WAR files, but find someway to deploy struts centrally??? Most containers hava container wide library you can put common libraries in... however you don't want to do this with struts because you will have serious issues with finding the struts-config.xml files. Don Lykins AFSAC 937-257-4295 x4539 [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Deploying Struts ???
What are you referring to as a classpath loader?? Won't this cause conflicts if each project has their own WAR with struts inside? What happens if they use different versions of Struts in each WAR file? -Original Message- From: Jim Barrows [mailto:[EMAIL PROTECTED] Sent: Friday, August 20, 2004 11:43 AM To: Struts Users Mailing List Subject: RE: Deploying Struts ??? -Original Message- From: Lykins Don H Contr AFSAC/ITS [mailto:[EMAIL PROTECTED] Sent: Friday, August 20, 2004 8:25 AM To: 'Struts Users Mailing List' Subject: RE: Deploying Struts ??? so how do you suggest we deploy struts? each developer bundle struts in their own WAR files? Yes. Only way to do it. It's a classpath loader, and the way it gets defined by the J2EE spec on how things get loaded and from where. Believe me I've tried and tried and tried.. and it always comes back to the spec. Unfortunately, the spec is right... there could be worse issues if they did it differently. -Original Message- From: Jim Barrows [mailto:[EMAIL PROTECTED] Sent: Friday, August 20, 2004 11:12 AM To: Struts Users Mailing List Subject: RE: Deploying Struts ??? -Original Message- From: Lykins Don H Contr AFSAC/ITS [mailto:[EMAIL PROTECTED] Sent: Friday, August 20, 2004 7:57 AM To: '[EMAIL PROTECTED]' Subject: Deploying Struts ??? Looking for pointers on how to best deploy struts based, JSP applications. I am using JDeveloper 10G which ships with Struts source... deploying to Jrun. Scenario: I am one of 2 programmers, each developing a separate JSP , but sharing a common database When each JSP is developed and deployed a unique and separate WAR file is created and deployed to our app server. -- but it seems duplicative -- as each WAR contains all the struts code as well...??? any way to share the Struts source so we don't duplicate? May Still want to deploy each jsp app in separate WAR files, but find someway to deploy struts centrally??? Most containers hava container wide library you can put common libraries in... however you don't want to do this with struts because you will have serious issues with finding the struts-config.xml files. Don Lykins AFSAC 937-257-4295 x4539 [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Deploying Struts ???
The container can manage multiple versions of the classes. Each one is living in its own environment. Lykins Don H Contr AFSAC/ITS wrote: What are you referring to as a classpath loader?? Won't this cause conflicts if each project has their own WAR with struts inside? What happens if they use different versions of Struts in each WAR file? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Deploying Struts ???
-Original Message- From: Lykins Don H Contr AFSAC/ITS [mailto:[EMAIL PROTECTED] Sent: Friday, August 20, 2004 8:47 AM To: 'Struts Users Mailing List' Subject: RE: Deploying Struts ??? What are you referring to as a classpath loader?? Sorry.. class loader. Won't this cause conflicts if each project has their own WAR with struts inside? Nope, not at all. What happens if they use different versions of Struts in each WAR file? Doesn't matter, since each war in essence has it's own class loader, and will load classes from the local war. If you really want to understand what's going on, I would highly recommend reading the J2EE spec yourself. I'm pretty much at the end of what I know about class loading withing a J2EE environment, and only know this because my boss wanted to do this and assigned me the task of doing it. After several weeks of pouring over documents and specs, I realized what I've just told you. You can, but with any jar file that has to read or write to anything in the webapp, you cannot do it if the class is loaded from anyplace but the war. -Original Message- From: Jim Barrows [mailto:[EMAIL PROTECTED] Sent: Friday, August 20, 2004 11:43 AM To: Struts Users Mailing List Subject: RE: Deploying Struts ??? -Original Message- From: Lykins Don H Contr AFSAC/ITS [mailto:[EMAIL PROTECTED] Sent: Friday, August 20, 2004 8:25 AM To: 'Struts Users Mailing List' Subject: RE: Deploying Struts ??? so how do you suggest we deploy struts? each developer bundle struts in their own WAR files? Yes. Only way to do it. It's a classpath loader, and the way it gets defined by the J2EE spec on how things get loaded and from where. Believe me I've tried and tried and tried.. and it always comes back to the spec. Unfortunately, the spec is right... there could be worse issues if they did it differently. -Original Message- From: Jim Barrows [mailto:[EMAIL PROTECTED] Sent: Friday, August 20, 2004 11:12 AM To: Struts Users Mailing List Subject: RE: Deploying Struts ??? -Original Message- From: Lykins Don H Contr AFSAC/ITS [mailto:[EMAIL PROTECTED] Sent: Friday, August 20, 2004 7:57 AM To: '[EMAIL PROTECTED]' Subject: Deploying Struts ??? Looking for pointers on how to best deploy struts based, JSP applications. I am using JDeveloper 10G which ships with Struts source... deploying to Jrun. Scenario: I am one of 2 programmers, each developing a separate JSP , but sharing a common database When each JSP is developed and deployed a unique and separate WAR file is created and deployed to our app server. -- but it seems duplicative -- as each WAR contains all the struts code as well...??? any way to share the Struts source so we don't duplicate? May Still want to deploy each jsp app in separate WAR files, but find someway to deploy struts centrally??? Most containers hava container wide library you can put common libraries in... however you don't want to do this with struts because you will have serious issues with finding the struts-config.xml files. Don Lykins AFSAC 937-257-4295 x4539 [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Deploying Struts ???
If you deploy two different war to a jboss server, the one that is deployed the latest will be used. I am experiencing this problem. Maybe Jboss classloader is does not support hierarchies? - Original Message - From: Jim Barrows [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, August 20, 2004 12:54 PM Subject: RE: Deploying Struts ??? -Original Message- From: Lykins Don H Contr AFSAC/ITS [mailto:[EMAIL PROTECTED] Sent: Friday, August 20, 2004 8:47 AM To: 'Struts Users Mailing List' Subject: RE: Deploying Struts ??? What are you referring to as a classpath loader?? Sorry.. class loader. Won't this cause conflicts if each project has their own WAR with struts inside? Nope, not at all. What happens if they use different versions of Struts in each WAR file? Doesn't matter, since each war in essence has it's own class loader, and will load classes from the local war. If you really want to understand what's going on, I would highly recommend reading the J2EE spec yourself. I'm pretty much at the end of what I know about class loading withing a J2EE environment, and only know this because my boss wanted to do this and assigned me the task of doing it. After several weeks of pouring over documents and specs, I realized what I've just told you. You can, but with any jar file that has to read or write to anything in the webapp, you cannot do it if the class is loaded from anyplace but the war. -Original Message- From: Jim Barrows [mailto:[EMAIL PROTECTED] Sent: Friday, August 20, 2004 11:43 AM To: Struts Users Mailing List Subject: RE: Deploying Struts ??? -Original Message- From: Lykins Don H Contr AFSAC/ITS [mailto:[EMAIL PROTECTED] Sent: Friday, August 20, 2004 8:25 AM To: 'Struts Users Mailing List' Subject: RE: Deploying Struts ??? so how do you suggest we deploy struts? each developer bundle struts in their own WAR files? Yes. Only way to do it. It's a classpath loader, and the way it gets defined by the J2EE spec on how things get loaded and from where. Believe me I've tried and tried and tried.. and it always comes back to the spec. Unfortunately, the spec is right... there could be worse issues if they did it differently. -Original Message- From: Jim Barrows [mailto:[EMAIL PROTECTED] Sent: Friday, August 20, 2004 11:12 AM To: Struts Users Mailing List Subject: RE: Deploying Struts ??? -Original Message- From: Lykins Don H Contr AFSAC/ITS [mailto:[EMAIL PROTECTED] Sent: Friday, August 20, 2004 7:57 AM To: '[EMAIL PROTECTED]' Subject: Deploying Struts ??? Looking for pointers on how to best deploy struts based, JSP applications. I am using JDeveloper 10G which ships with Struts source... deploying to Jrun. Scenario: I am one of 2 programmers, each developing a separate JSP , but sharing a common database When each JSP is developed and deployed a unique and separate WAR file is created and deployed to our app server. -- but it seems duplicative -- as each WAR contains all the struts code as well...??? any way to share the Struts source so we don't duplicate? May Still want to deploy each jsp app in separate WAR files, but find someway to deploy struts centrally??? Most containers hava container wide library you can put common libraries in... however you don't want to do this with struts because you will have serious issues with finding the struts-config.xml files. Don Lykins AFSAC 937-257-4295 x4539 [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Deploying Struts ???
-Original Message- From: Lucas Gonzalez Pearson [mailto:[EMAIL PROTECTED] Sent: Friday, August 20, 2004 10:15 AM To: Struts Users Mailing List Subject: Re: Deploying Struts ??? If you deploy two different war to a jboss server, the one that is deployed the latest will be used. I am experiencing this problem. Maybe Jboss classloader is does not support hierarchies? It's possible. from http://java.sun.com/developer/technicalArticles/Servlets/servletapi2.3/ I found this: Class Loaders Here's a small change with a big impact: In API 2.3, a servlet container (a.k.a. the server) will ensure that classes in a Web application not be allowed to see the server's implementation classes. In other words, the class loaders should be kept separate. That doesn't sound like much, but it eliminates the possibility of a collision between Web application classes and server classes. That had become a serious problem because of XML parser conflicts. Each server needs an XML parser to parse web.xml files, and many Web applications these days also use an XML parser to handle reading, manipulation, and writing of XML data. If the parsers supported different DOM or SAX versions, that could cause an irreparable conflict. The separation of class scope solves this issue nicely. Which would indirectly support Jboss not being client, It's Serlvet 2.3 though... so maybe not. My understanding is that all web apps should have different class loaders. - Original Message - From: Jim Barrows [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, August 20, 2004 12:54 PM Subject: RE: Deploying Struts ??? -Original Message- From: Lykins Don H Contr AFSAC/ITS [mailto:[EMAIL PROTECTED] Sent: Friday, August 20, 2004 8:47 AM To: 'Struts Users Mailing List' Subject: RE: Deploying Struts ??? What are you referring to as a classpath loader?? Sorry.. class loader. Won't this cause conflicts if each project has their own WAR with struts inside? Nope, not at all. What happens if they use different versions of Struts in each WAR file? Doesn't matter, since each war in essence has it's own class loader, and will load classes from the local war. If you really want to understand what's going on, I would highly recommend reading the J2EE spec yourself. I'm pretty much at the end of what I know about class loading withing a J2EE environment, and only know this because my boss wanted to do this and assigned me the task of doing it. After several weeks of pouring over documents and specs, I realized what I've just told you. You can, but with any jar file that has to read or write to anything in the webapp, you cannot do it if the class is loaded from anyplace but the war. -Original Message- From: Jim Barrows [mailto:[EMAIL PROTECTED] Sent: Friday, August 20, 2004 11:43 AM To: Struts Users Mailing List Subject: RE: Deploying Struts ??? -Original Message- From: Lykins Don H Contr AFSAC/ITS [mailto:[EMAIL PROTECTED] Sent: Friday, August 20, 2004 8:25 AM To: 'Struts Users Mailing List' Subject: RE: Deploying Struts ??? so how do you suggest we deploy struts? each developer bundle struts in their own WAR files? Yes. Only way to do it. It's a classpath loader, and the way it gets defined by the J2EE spec on how things get loaded and from where. Believe me I've tried and tried and tried.. and it always comes back to the spec. Unfortunately, the spec is right... there could be worse issues if they did it differently. -Original Message- From: Jim Barrows [mailto:[EMAIL PROTECTED] Sent: Friday, August 20, 2004 11:12 AM To: Struts Users Mailing List Subject: RE: Deploying Struts ??? -Original Message- From: Lykins Don H Contr AFSAC/ITS [mailto:[EMAIL PROTECTED] Sent: Friday, August 20, 2004 7:57 AM To: '[EMAIL PROTECTED]' Subject: Deploying Struts ??? Looking for pointers on how to best deploy struts based, JSP applications. I am using JDeveloper 10G which ships with Struts source... deploying to Jrun. Scenario: I am one of 2 programmers, each developing a separate JSP , but sharing a common database When each JSP is developed and deployed a unique and separate WAR file is created and deployed to our app server. -- but it seems duplicative -- as each WAR contains all the struts code as well...??? any way to share the Struts source so we don't duplicate? May Still want to deploy each jsp app in separate WAR files, but find someway to deploy struts centrally??? Most containers hava container wide library you can put common libraries in... however you don't want to do this with struts because you will have serious issues with finding the struts-config.xml
Re: Deploying Struts ???
I thought so, but try renaming a .war file, and redeploying it, we had Smith.war and John.war, and whenever Smith deployed his war, all his classes would replace the ones that John had deployed before... The only solution we found was to split tomcat and jboss, and smith and john now have each one a local tomcat that connects to the JBOSS server using jndi.. it´s not the best.. but at least we don´t keep getting collision with the jsps Lucas - Original Message - From: Jim Barrows [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, August 20, 2004 2:19 PM Subject: RE: Deploying Struts ??? -Original Message- From: Lucas Gonzalez Pearson [mailto:[EMAIL PROTECTED] Sent: Friday, August 20, 2004 10:15 AM To: Struts Users Mailing List Subject: Re: Deploying Struts ??? If you deploy two different war to a jboss server, the one that is deployed the latest will be used. I am experiencing this problem. Maybe Jboss classloader is does not support hierarchies? It's possible. from http://java.sun.com/developer/technicalArticles/Servlets/servletapi2.3/ I found this: Class Loaders Here's a small change with a big impact: In API 2.3, a servlet container (a.k.a. the server) will ensure that classes in a Web application not be allowed to see the server's implementation classes. In other words, the class loaders should be kept separate. That doesn't sound like much, but it eliminates the possibility of a collision between Web application classes and server classes. That had become a serious problem because of XML parser conflicts. Each server needs an XML parser to parse web.xml files, and many Web applications these days also use an XML parser to handle reading, manipulation, and writing of XML data. If the parsers supported different DOM or SAX versions, that could cause an irreparable conflict. The separation of class scope solves this issue nicely. Which would indirectly support Jboss not being client, It's Serlvet 2.3 though... so maybe not. My understanding is that all web apps should have different class loaders. - Original Message - From: Jim Barrows [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, August 20, 2004 12:54 PM Subject: RE: Deploying Struts ??? -Original Message- From: Lykins Don H Contr AFSAC/ITS [mailto:[EMAIL PROTECTED] Sent: Friday, August 20, 2004 8:47 AM To: 'Struts Users Mailing List' Subject: RE: Deploying Struts ??? What are you referring to as a classpath loader?? Sorry.. class loader. Won't this cause conflicts if each project has their own WAR with struts inside? Nope, not at all. What happens if they use different versions of Struts in each WAR file? Doesn't matter, since each war in essence has it's own class loader, and will load classes from the local war. If you really want to understand what's going on, I would highly recommend reading the J2EE spec yourself. I'm pretty much at the end of what I know about class loading withing a J2EE environment, and only know this because my boss wanted to do this and assigned me the task of doing it. After several weeks of pouring over documents and specs, I realized what I've just told you. You can, but with any jar file that has to read or write to anything in the webapp, you cannot do it if the class is loaded from anyplace but the war. -Original Message- From: Jim Barrows [mailto:[EMAIL PROTECTED] Sent: Friday, August 20, 2004 11:43 AM To: Struts Users Mailing List Subject: RE: Deploying Struts ??? -Original Message- From: Lykins Don H Contr AFSAC/ITS [mailto:[EMAIL PROTECTED] Sent: Friday, August 20, 2004 8:25 AM To: 'Struts Users Mailing List' Subject: RE: Deploying Struts ??? so how do you suggest we deploy struts? each developer bundle struts in their own WAR files? Yes. Only way to do it. It's a classpath loader, and the way it gets defined by the J2EE spec on how things get loaded and from where. Believe me I've tried and tried and tried.. and it always comes back to the spec. Unfortunately, the spec is right... there could be worse issues if they did it differently. -Original Message- From: Jim Barrows [mailto:[EMAIL PROTECTED] Sent: Friday, August 20, 2004 11:12 AM To: Struts Users Mailing List Subject: RE: Deploying Struts ??? -Original Message- From: Lykins Don H Contr AFSAC/ITS [mailto:[EMAIL PROTECTED] Sent: Friday, August 20, 2004 7:57 AM To: '[EMAIL PROTECTED]' Subject: Deploying Struts ??? Looking for pointers on how to best deploy struts based, JSP applications. I am using JDeveloper 10G which ships with Struts source... deploying to Jrun. Scenario: I am one of 2 programmers, each developing a separate JSP , but sharing a common database When
Re: Deploying Struts ???
May or may not be related, but... http://www.mail-archive.com/[EMAIL PROTECTED]/msg08398.html -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: Lucas Gonzalez Pearson [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, August 20, 2004 1:29 PM Subject: Re: Deploying Struts ??? I thought so, but try renaming a .war file, and redeploying it, we had Smith.war and John.war, and whenever Smith deployed his war, all his classes would replace the ones that John had deployed before... The only solution we found was to split tomcat and jboss, and smith and john now have each one a local tomcat that connects to the JBOSS server using jndi.. it´s not the best.. but at least we don´t keep getting collision with the jsps Lucas - Original Message - From: Jim Barrows [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, August 20, 2004 2:19 PM Subject: RE: Deploying Struts ??? -Original Message- From: Lucas Gonzalez Pearson [mailto:[EMAIL PROTECTED] Sent: Friday, August 20, 2004 10:15 AM To: Struts Users Mailing List Subject: Re: Deploying Struts ??? If you deploy two different war to a jboss server, the one that is deployed the latest will be used. I am experiencing this problem. Maybe Jboss classloader is does not support hierarchies? It's possible. from http://java.sun.com/developer/technicalArticles/Servlets/servletapi2.3/ I found this: Class Loaders Here's a small change with a big impact: In API 2.3, a servlet container (a.k.a. the server) will ensure that classes in a Web application not be allowed to see the server's implementation classes. In other words, the class loaders should be kept separate. That doesn't sound like much, but it eliminates the possibility of a collision between Web application classes and server classes. That had become a serious problem because of XML parser conflicts. Each server needs an XML parser to parse web.xml files, and many Web applications these days also use an XML parser to handle reading, manipulation, and writing of XML data. If the parsers supported different DOM or SAX versions, that could cause an irreparable conflict. The separation of class scope solves this issue nicely. Which would indirectly support Jboss not being client, It's Serlvet 2.3 though... so maybe not. My understanding is that all web apps should have different class loaders. - Original Message - From: Jim Barrows [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, August 20, 2004 12:54 PM Subject: RE: Deploying Struts ??? -Original Message- From: Lykins Don H Contr AFSAC/ITS [mailto:[EMAIL PROTECTED] Sent: Friday, August 20, 2004 8:47 AM To: 'Struts Users Mailing List' Subject: RE: Deploying Struts ??? What are you referring to as a classpath loader?? Sorry.. class loader. Won't this cause conflicts if each project has their own WAR with struts inside? Nope, not at all. What happens if they use different versions of Struts in each WAR file? Doesn't matter, since each war in essence has it's own class loader, and will load classes from the local war. If you really want to understand what's going on, I would highly recommend reading the J2EE spec yourself. I'm pretty much at the end of what I know about class loading withing a J2EE environment, and only know this because my boss wanted to do this and assigned me the task of doing it. After several weeks of pouring over documents and specs, I realized what I've just told you. You can, but with any jar file that has to read or write to anything in the webapp, you cannot do it if the class is loaded from anyplace but the war. -Original Message- From: Jim Barrows [mailto:[EMAIL PROTECTED] Sent: Friday, August 20, 2004 11:43 AM To: Struts Users Mailing List Subject: RE: Deploying Struts ??? -Original Message- From: Lykins Don H Contr AFSAC/ITS [mailto:[EMAIL PROTECTED] Sent: Friday, August 20, 2004 8:25 AM To: 'Struts Users Mailing List' Subject: RE: Deploying Struts ??? so how do you suggest we deploy struts? each developer bundle struts in their own WAR files? Yes. Only way to do it. It's a classpath loader, and the way it gets defined by the J2EE spec on how things get loaded and from where. Believe me I've tried and tried and tried.. and it always comes back to the spec. Unfortunately, the spec is right... there could be worse issues if they did it differently. -Original Message- From: Jim Barrows [mailto:[EMAIL PROTECTED] Sent: Friday, August 20, 2004 11:12 AM To: Struts Users Mailing List Subject: RE: Deploying
Re: Deploying Struts ???
On Fri, 20 Aug 2004 14:14:46 -0300, Lucas Gonzalez Pearson [EMAIL PROTECTED] wrote: If you deploy two different war to a jboss server, the one that is deployed the latest will be used. I am experiencing this problem. Maybe Jboss classloader is does not support hierarchies? I am not a JBoss user so this is hearsay, but my understanding is that the *default* JBoss configuration (the unified class loader) does not support hierarchies, but that there is a configuration option that turns this off -- and restores Tomcat's hierarchical class loader scheme. FYI, the way Tomcat does class loaders is not identical to all the other servers, but it's a useful example in understanding what servlet containers do for individual web apps: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/class-loader-howto.html Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]