Re: S2-portlet and spring integration

2009-07-21 Thread Edwin Quita
hi Norris,

i have here a portlet archetype that has spring integration:

http://edwin.quita.googlepages.com/portlet-archetype.zip
http://edwin.quita.googlepages.com/service-archetype.zip
http://edwin.quita.googlepages.com/Maven2HowTo.doc

you can use the project pom files as reference.

HTH,
/kits

On Tue, Jul 21, 2009 at 5:43 PM, Norris Sheltonnorrisshel...@yahoo.com wrote:
 I have a Struts2-portlet application that works.  The correct action is 
 executed, but I get a NPE when I try to access my spring-injected beans.  The 
 logs do show that the spring beans were constructed correctly.  I do have the 
 struts2-spring-plugin included.


 Norris Shelton
 Software Engineer
 Sun Certified Java 1.1 Programmer
 Shelton Consulting, LLC
 ICQ# 26487421
 AIM NorrisEShelton
 YIM norrisshelton





-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Maven and Struts 2 Stack

2009-01-31 Thread Edwin Quita
hi Scott,

this is what i typically do for creating a skeleton struts2 project:

1. create a blank web application project from the generic maven
archetype listing (mvn archetype:generate)

2. i select the appropriate POM dependencies from struts2's sample
application http://struts.apache.org/2.1.2/docs/tutorials.html
(if you need hibernate and tiles features, find an example that
uses these dependencies and copy it in the pom file)

3. create an archetype based on this skeleton project so i can have a
template to start off with (optional)

regarding maven's eclipse plugin, there is one that i used before
M2eclipse (m2eclipse.sonatype.org)
i'm not sure if there's a POM builder app or plugin that exists sorry.

cheers,
Edwin

On Sat, Jan 31, 2009 at 10:31 PM,  stanl...@gmail.com wrote:
 Thanks boyz --

 Are any of you using the Eclipse Maven  plug-in?  Also, is
 http://mvnrepository.com an aggregate source for POM's?  Lastly, is there a
 buffet line POM builder where you can select the stack you desire and click
 GO?  It seems to me the combination/permutation of POMs spread across the
 planet will quickly grow stale and invalid.  Am I missing something here?

 P.S. Will the freshest and most accurate POM for Struts II 2.1.6 with Tiles,
 Hibernate, etc. please rise!

 Scott

 On Fri, Jan 30, 2009 at 2:56 PM, Wes Wannemacher w...@wantii.com wrote:

 http://code.google.com/p/struts2inpractice/source/browse/#svn/trunk

 Scott, you should have been able to find that ;)

 -Wes

 On Fri, Jan 30, 2009 at 12:22 PM, Musachy Barroso musa...@gmail.com
 wrote:
  This should(might) also help:
  http://struts.apache.org/2.x/docs/struts-maven-archetypes.html
 
  musachy
 
  On Fri, Jan 30, 2009 at 12:20 PM, Musachy Barroso musa...@gmail.com
 wrote:
  Wes has a bunch of examples that you can use as templates. I am trying
  to find the link, but failing so far. Wes, are you out there?
 
  musachy
 
  On Fri, Jan 30, 2009 at 12:14 PM, Edwin Quita edwin.qu...@gmail.com
 wrote:
  hi Scott,
 
  here's the first project i created using struts2 and Maven...  just
  adjust the versions to your liking.
 
  here's a version that exists in maven's central repository
 !-- Struts 2 --
 dependency
 groupIdorg.apache.struts/groupId
 artifactIdstruts2-core/artifactId
 version2.0.6/version
 /dependency
 dependency
 groupIdorg.apache.struts/groupId
 artifactIdstruts2-spring-plugin/artifactId
 version2.0.6/version
 /dependency
 
 
  while the latest you can pull out from sonatype's repo :)
 
  cheers,
  Edwin
 
  On Sat, Jan 31, 2009 at 1:05 AM, stanlick stanl...@gmail.com wrote:
 
  Greetings --
 
  I am SO DONE with mucking around in dependencies that I am about to
 scream!
  Until recently, I thought real developers were in control of jars
 and the
  classpath, but as another year passes me by, I'm starting to rethink
 this
  whole deal.  I installed the Maven 2 plug-in for Eclipse this morning
 and
  should begin by telling you that beyond appreciating the idea of
 Maven, I
  don't understand it intimately well!  Create new Maven Project is
 prompting
  me for bits and pieces I don't fully understand.  Moreover, I'm only
  guessing that http://mvnrepository.com is the place I should specify
 to have
  my dependencies resolved in building a Struts-2/Tiles-2/Spring-2 web
  project.  I have been reading about the archetypes and this must be a
 fancy
  name for what kind of sandwich do you want.  Can someone please tell
 me
  how to decode these prompts so I can get about the business of writing
 code?
  I realize some of the inputs are my web-app name, but several others
 must be
  version and contents values.
 
  P.S. Cloning my last know Struts 2 sandwich and making the necessary
 build
  path tweaks for a bump to 2.1.6 no longer passes the tummy test.
 
  Peace,
  Scott
 
 
  --
  View this message in context:
 http://www.nabble.com/Maven-and-Struts-2-Stack-tp21751296p21751296.html
  Sent from the Struts - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
  For additional commands, e-mail: user-h...@struts.apache.org
 
 
 
  -
  To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
  For additional commands, e-mail: user-h...@struts.apache.org
 
 
 
 
  --
  Hey you! Would you help me to carry the stone? Pink Floyd
 
 
 
 
  --
  Hey you! Would you help me to carry the stone? Pink Floyd
 
  -
  To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
  For additional commands, e-mail: user-h...@struts.apache.org
 
 



 --
 Wes Wannemacher
 Author

Re: new to Struts

2008-09-09 Thread Edwin Quita
I would suggest you go straight towards Struts 2, it's simpler, you're
shielded from the dirty stuffs involved with the request and response
objects.  It also has spring integration and so make it easier for you
to integrate the model layer for your web app.

On Mon, Sep 8, 2008 at 7:25 AM, gbattine [EMAIL PROTECTED] wrote:

 Hello guys,
 I need an information.
 I'm going to learn struts..
 I need some info, please help me:

 1) what do you hint to me, to start from Struts 1.1 and later move to Struts
 2.0, or starting from Struts 2.0?
 2) I usually use Netbeans. Is there an editor WYSIWHG for Netbeans, to use
 Struts?
 3) I know ASP.NET technology and I used lot of already developed components,
 like editable grid, dropdown list and so on...does exists such component for
 struts?where I can download them?

 Thanks,
 Regards
 --
 View this message in context: 
 http://www.nabble.com/new-to-Struts-tp19370925p19370925.html
 Sent from the Struts - User mailing list archive at Nabble.com.


 -
 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: Struts2 with JPA/Hibernate using Spring

2008-08-28 Thread Edwin Quita
you can create a separate project for your pesistence layer and
another project for the view.

you then add the persistence layer project as a dependecy to other projects.

i have here an example although this one didn't use JPA, i just used
Spring's JdbcTemplate for persistence.

http://edwin.quita.googlepages.com/Maven2HowTo.doc

and the project archetypes here:

http://edwin.quita.googlepages.com/portlet-archetype.zip
http://edwin.quita.googlepages.com/service-archetype.zip

here's a snippet how to add the persistence layer project as a
dependency (pom.xml of the view project):

!-- Add sampleservice as a dependency --
dependency
groupIdcom.persistence/groupId
artifactIdsampleservice/artifactId
version1.0-SNAPSHOT/version
/dependency

HTH,
/kits









On Wed, Aug 27, 2008 at 1:29 PM, Håkan Jacobsson
[EMAIL PROTECTED] wrote:
 Hi,

 I have a Struts2 web application. I'm using Spring (for autowiring of
 dependency injection) to integrate JPA and Hibernate in the web app.
 It's working fine.
 Now I need to separate the JPA/Hibernate classes into a
 separate jar file (the web app will have this jar file as a dependency).
 How should I configure this? So far, I have my applicationContext.xml and
 persistence.xml files in the web app. Should those files now be put in the
 separate jarfile? Do I need to make other configuration changes to the web 
 app?

 I'm a newbie to both Spring and web app configuration. Any help much
 appreciated!

 /best regards, Hakan Jacobsson - System developer in Sweden


 /MVH, Håkan Jacobsson

 

 Torsvikssvängen 52, 1/2 tr.
 181 34 Lidingö
 tel:08-765 84 37
 mob: 076-272 53 85

 


 -
 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: struts-core-2.0.11.2 in two places on the server, causing exceptions

2008-08-18 Thread Edwin Quita
what we did with our deployment was to have the class loading setup to
load on a per module basis.
we have two struts2 portlet deployed with liferay5.1 on WAS. we had a
modules first and parent last setting for class loading.

you should check on your EAR deployment descriptor how class loading
was setup for your .ear application.

HTH,
/kits

On Thu, Aug 7, 2008 at 5:32 AM, Ylva Degerfeldt
[EMAIL PROTECTED] wrote:
 Hi, dear Struts users!

 I'm trying to learn and use Struts 2 (actually migrating from Struts 1
 to 2) and I have written lots of java and xml code, which should be
 working. I just can't run the application! When I try to, I get this
 exception:

 Caused by: Bean type class com.opensymphony.xwork2.ObjectFactory with
 the name xwork has already been loaded by bean -
 jar:file:/C:/Sun/AppServer/domains/domain1/applications/j2ee-apps/Extract_to_cv_2/struts2-core-2.0.11.2.jar!/struts-default.xml:30:72
 - bean - 
 jar:file:/C:/Sun/AppServer/domains/domain1/applications/j2ee-apps/Extract_to_cv_2/Extract_to_cv_2-war_war/WEB-INF/lib/struts2-core-2.0.11.2.jar!/struts-default.xml:30:72

 As the exception said, I found that the struts-core-2.0.11.2.jar file
 was located in two places under my application on the server. I tried
 to remove the topmost copy of the file but when I tried running the
 app. again I got the same exception, and found that the file had been
 put back there. Then I tried to remove the struts-core.. file that was
 further down, but the same thing happened! (the same exception and the
 file had been returned to that location as well).

 I'm using NetBeans 5.5.1 and Sun Java System Application Server 9 and
 my application is an enterprise application with a web module and an
 ejb module. I'm wondering whether this problem is due to that I have
 the struts2 jars in both the lib directory of the ejb module and the
 lib directory of the web module. This might be stupid, but I needed
 the ejb module to know about the struts classes as well and didn't
 know how to make them visible to the whole application.

 But then again, this (having struts jars in both modules) actually
 worked when I was using Struts 1.

 I'm really confused about this and I'm hoping that someone can help
 me! Maybe this is mostly a NetBeans issue so if someone who has used
 NetBeans could answer it would be great.
 I feel completely lost when it comes to this kind of things (what's
 happening behind the scenes in NetBeans and the app. server) but I'm
 willing to learn from anyone who wants to explain it to me. But please
 explain it very thoroughly then.

 Please help me! I'm stuck.

 /Ylva

 -
 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: struts-core-2.0.11.2 in two places on the server, causing exceptions

2008-08-18 Thread Edwin Quita
here's the snippet for our deployment:

?xml version=1.0 encoding=UTF-8?
appdeployment:Deployment xmi:version=2.0
xmlns:xmi=http://www.omg.org/XMI;
xmlns:appdeployment=http://www.ibm.com/websphere/appserver/schemas/5.0/appdeployment.xmi;
xmi:id=Deployment_1218223750906
  deployedObject xmi:type=appdeployment:ApplicationDeployment
xmi:id=ApplicationDeployment_1218223750906 startingWeight=10
modules xmi:type=appdeployment:WebModuleDeployment
xmi:id=WebModuleDeployment_1218223750906 startingWeight=1
uri=liferay-portal-5.0.1.war classloaderMode=PARENT_LAST/
modules xmi:type=appdeployment:WebModuleDeployment
xmi:id=WebModuleDeployment_1218223750907 startingWeight=1
uri=Theme-theme.war classloaderMode=PARENT_LAST/
modules xmi:type=appdeployment:WebModuleDeployment
xmi:id=WebModuleDeployment_1218223750908 startingWeight=1
uri=PortalAdmin.war classloaderMode=PARENT_LAST/
modules xmi:type=appdeployment:WebModuleDeployment
xmi:id=WebModuleDeployment_1218223750909 startingWeight=1
uri=SysConf.war classloaderMode=PARENT_LAST/
classloader xmi:id=Classloader_1218223750906 mode=PARENT_LAST/
  /deployedObject
/appdeployment:Deployment


On Mon, Aug 18, 2008 at 1:52 PM, Edwin Quita [EMAIL PROTECTED] wrote:
 what we did with our deployment was to have the class loading setup to
 load on a per module basis.
 we have two struts2 portlet deployed with liferay5.1 on WAS. we had a
 modules first and parent last setting for class loading.

 you should check on your EAR deployment descriptor how class loading
 was setup for your .ear application.

 HTH,
 /kits

 On Thu, Aug 7, 2008 at 5:32 AM, Ylva Degerfeldt
 [EMAIL PROTECTED] wrote:
 Hi, dear Struts users!

 I'm trying to learn and use Struts 2 (actually migrating from Struts 1
 to 2) and I have written lots of java and xml code, which should be
 working. I just can't run the application! When I try to, I get this
 exception:

 Caused by: Bean type class com.opensymphony.xwork2.ObjectFactory with
 the name xwork has already been loaded by bean -
 jar:file:/C:/Sun/AppServer/domains/domain1/applications/j2ee-apps/Extract_to_cv_2/struts2-core-2.0.11.2.jar!/struts-default.xml:30:72
 - bean - 
 jar:file:/C:/Sun/AppServer/domains/domain1/applications/j2ee-apps/Extract_to_cv_2/Extract_to_cv_2-war_war/WEB-INF/lib/struts2-core-2.0.11.2.jar!/struts-default.xml:30:72

 As the exception said, I found that the struts-core-2.0.11.2.jar file
 was located in two places under my application on the server. I tried
 to remove the topmost copy of the file but when I tried running the
 app. again I got the same exception, and found that the file had been
 put back there. Then I tried to remove the struts-core.. file that was
 further down, but the same thing happened! (the same exception and the
 file had been returned to that location as well).

 I'm using NetBeans 5.5.1 and Sun Java System Application Server 9 and
 my application is an enterprise application with a web module and an
 ejb module. I'm wondering whether this problem is due to that I have
 the struts2 jars in both the lib directory of the ejb module and the
 lib directory of the web module. This might be stupid, but I needed
 the ejb module to know about the struts classes as well and didn't
 know how to make them visible to the whole application.

 But then again, this (having struts jars in both modules) actually
 worked when I was using Struts 1.

 I'm really confused about this and I'm hoping that someone can help
 me! Maybe this is mostly a NetBeans issue so if someone who has used
 NetBeans could answer it would be great.
 I feel completely lost when it comes to this kind of things (what's
 happening behind the scenes in NetBeans and the app. server) but I'm
 willing to learn from anyone who wants to explain it to me. But please
 explain it very thoroughly then.

 Please help me! I'm stuck.

 /Ylva

 -
 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: Select tag questions

2008-08-18 Thread Edwin Quita
there is a struts2-showcase-2.0.11.1.war included in the struts2
download bundle...

you can find a reference about the select tag in the UI Tags section

http://localhost:8010/struts2-showcase-2.0.11.1/tags/ui/

HTH,
/kits


On Fri, Aug 15, 2008 at 8:12 AM, David Barron [EMAIL PROTECTED] wrote:
 I'm not exactly a newbie with struts but I do have what probably amount
 to newbie questions about the select tag and how to populate it.
 My action form contains fields called selectedTabs and unselectedTabs,
 both of which are arrays of Strings.  I'd like to build a jsp page that
 displays the contents of those fields in select tags where I can select
 multiple rows.  There are some somewhat helpful examples of single
 select tags but I haven't found any for multiple select.

 Here is my jsp code, greatly abbreviated:
 html:form action=/SaveTabs.action
 table
 tr
 td
 br/
 bUnavailable Tabs:/bbr/
 html:select style=width:350 property=unselectedTabs size=10
 multiple=true
 /html:select
 /td
 td
 br/br/
 td
 br/
 bAvailable Tabs:/bbr/
 html:select style=width:350 property=selectedTabs size=10
 multiple=true
 /html:select
 /td
 /tr
 /table
 /html:form

 The action form is getting populated before the jsp is displayed but how
 do I populate the select tags?  Do I use option tags or optioncollection
 tags?

 If there are any web sites that contain some good SIMPLE examples that
 would help too.

 Thanks

 David Barron
 Consultant
 Zencos Consulting
 [EMAIL PROTECTED]
 www.zencos.com
 work: 919-459-4600 x 119
 mobile: 919-995-2356
 fax: 919-287-2335
 __
 The information in this e-mail and any attached files is confidential.
 It is intended solely for the use of the addressee. Any unauthorized
 disclosure or use is prohibited. If you are not the intended recipient
 of the message, please notify the sender immediately and do not disclose
 the contents to any other person, use it for any purpose, or store or
 copy the information in any medium. The views of the author may not
 necessarily reflect those of the company.


 -
 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: Liferay Struts2 Portlets, ParametersInterceptor Exception, struts.portlet.action, struts.portlet.mode cannot be set

2008-08-13 Thread Edwin Quita
here's the link for the attachment:
http://edwin.quita.googlepages.com/Maven2HowTo.doc

hi Nils,

just want to say good job on your s2 portlet jetty-pluto plugin =)
because it boosted my productivity during my portlet development.

in fact, i've written a short tutorial for portlet project management
using struts2, spring, and your plugin =)
i have attached the tutorial here for reference.

i've successfully deployed 2 portlets (in Liferay 5.x) that used a
datasource to display tabular data.

keep up the good work!

regards,
/kits

On Wed, Aug 13, 2008 at 6:19 AM, Nils-Helge Garli Hegvik
[EMAIL PROTECTED] wrote:
 Those can safely be ignored but feel free to register a JIRA issue so
 we can see if we can do something to prevent these messages to appear
 in the log. One way to do it is to filter them with your logging
 configuration.

 Nils-H

 On Wed, Aug 13, 2008 at 1:12 PM, Torsten Krah
 [EMAIL PROTECTED] wrote:
 Deploying a struts2 example app to liferay (5.1.1) i am facing this error
 output:

 13:07:39,410 INFO  [STDOUT] 13:07:39,410 ERROR
 [com.opensymphony.xwork2.interceptor.ParametersInterceptor]
 ParametersInterceptor - [setParameters]: Unexpected Exception caught
 setting 'struts.portlet.action' on 'class
 com.opensymphony.xwork2.ActionSupport: Error setting
 expression 'struts.portlet.action' with value '[Ljava.lang.String;@71e80e4d'

 13:07:39,410 INFO  [STDOUT] 13:07:39,410 ERROR
 [com.opensymphony.xwork2.interceptor.ParametersInterceptor]
 ParametersInterceptor - [setParameters]: Unexpected Exception caught
 setting 'struts.portlet.mode' on 'class
 com.opensymphony.xwork2.ActionSupport: Error setting
 expression 'struts.portlet.mode' with value '[Ljava.lang.String;@3a031ba7'

 Whats going wrong here? Any hints what might cause this? Should this work?
 struts.portlet.mode and ...action, for what are they used?

 --
 Bitte senden Sie mir keine Word- oder PowerPoint-Anhänge.
 Siehe http://www.gnu.org/philosophy/no-word-attachments.de.html

 Really, I'm not out to destroy Microsoft. That will just be a
 completely unintentional side effect.
-- Linus Torvalds


 -
 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]



struts2 portlet deployment in WAS 6.1

2008-08-01 Thread Edwin Quita
we have successfully deployed a struts2 portlet that used a jndi
datasource in WAS.
our EAR file had the portlet as one of it's module.

we had issues with the jndi datasource when we added another struts2 portlet.

anybody here who encountered the same problem and found a solution?

thanks,
/kits

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]