Struts/Dojo/Json question
Hello all. I am working with some AJAX stuff in Struts 2.1.8, specifically the Dojo toolkit. I have a Grid widget, which is Dojo's row-and-column displayer. The Grid expects data as a properly-formed JSON string. The Grid gives the very helpful "Sorry, an error occured" messge if the dojo result string exceeds the length of somewhere in the neighborhood of 24k. In scanning the Dojo message boards, there is apparently a "maxJsonLength" parameter that gets set somewhere. However, none of the responses are Struts responses. Does anyone know how to set this value? I assume it's in the "struts.properties" file, but does anyone know for sure? Thanks, Tom
Struts Dojo Question
Hello all. In working through some Dojo stuff, I have come to a roadblock, on which I hope someone will be able to shed some light. I have a page that displays a user's account info. If they press "update", Dojo pops up a dialog box which allows them to update their info. Opening a Dialog box in a web browser is very cool, and it's easy to do with Dojo. In the dialog, there is are three dropdown boxes, named "Continent", "Country", and "Locality". If the user chooses the continent of "North America", the "Country" box should show only the countries for North America. If the user chooses "Western Europe", the "Country" box should show only the countries for Western Europe. And so on; you get the idea. I am using the standard Json ItemFileReadStore attached to my Postgres database. The "Continent:" field gets filled properly. But when I select a different "Continent", and the call is made to the Action class to retrieve the list of countries for the new continent, the new continent's abbreviation is never passed in. My javascript reads like so: var selectedContinent ; function continentWasChanged() {selectedContinent = dijit.byId('continent').attr('value') ; console.log ('found selectedContinent as ' + selectedContinent) ; theStore.fetch(selectedContinent) ; } The "console.log" statement shows that selectedContinent DOES have the value I expect. The intention is to have the selectedContinent passed into my action class. My struts.xml snippet reads like so: #attr.selectedContinent In my LocationAction class, I have a "setContinent(String)" method, and the passed parameter is the string "#attr.selectedContinent", not "NA" when North America is selected. In going through the OGNL docs, I thought that "#attr" is the way of selecting data on a page, but maybe not in this case, because the LocationAction class is only used to serve up locations. The jsp is really "bound" to the UserDisplayAction class. I'm thinking if I move the Action logic into the UserDisplayAction class, it might work better, but I hope I can separate the logic in this fashion. I guess the question is whether it is possible to do what I am trying to do here, or not? Thanks, Tom
Strange behavior after upgrade
Hello all. I have upgraded a Struts 2.0.11 project to 2.1.8, and I have some strange behavior. The Struts stuff seems to work fine, and the Ajax stuff works fine as well. The Hibernate stuff works as far as reading data is concerned. But when I try to write a record, nothing happens on the database and I get no exception thrown, and I get no errors in the log. For instance, whenever a user logs in, a LoginHistory object is created, and subsequently written to the login_history table in Postgres. The application is using the EntityManager to persist a new object. The code is simple; the LoginHistoryService class says: public void persist(LoginHistory loginHistory) {try { System.out.println("About to insert login_history record") ; entityManager.persist(loginHistory); System.out.println("Done inserting login_history record") ; } catch (Exception ex) { System.out.println(ex.getMessage() ) ; } } I see the two logged messages, and in stepping through with a debugger, the persist statement *seems* to be done, but nothing appears in the database. Also, when changing a User's account data, nothing winds up in Postgres. The UserService class says: public void merge(User user) { try { entityManager.merge(user); } catch (Exception ex) { System.out.println(ex.getMessage() ) ; } } But the record is never changed. The Hibernate section of pom.xml says: org.hibernate hibernate 3.2.1.ga org.hibernate hibernate-annotations 3.2.1.ga org.hibernate hibernate-entitymanager 3.2.1.ga As I sit here pulling my hair out, does anyone remember having anything like this happen after an upgrade to 2.1.8? Or an any other circumstance? Thanks, Tom
Struts2Builder 0.4.0 has been released
Greetings all. Struts2Builder version 0.4.0 has been released. Struts2Builder is a Java code generation system that can automatically build a real, live, functioning Struts2 / Hibernate / Spring system for any existing PostgreSQL or MySQL database. Struts2Builder will log into the database, examine the metadata, and generate the source code necessary to create a CRUD (Create, Read, Update, Delete) application for every table in the target database. This is intended to serve as the "bones" of your database application, upon which you can build all the extra functionality that you require. === RELEASE NOTES Version 0.4.0 contains a number of enhancements: •UI: In the main screen, the scrolling of the Tables list box (as well as the Columns / Foreign Key list box) doesn't always work if there are a lot of items in the list. This has been fixed. •UI: In the Table list box, each table now contains a check box that you can check or uncheck as to whether that table should be included in the code generation, or ignored. Several people requested this feature, and we are happy to include it in this release. •UI: In the Columns / Foreign Key list box, the default for Foreign Key type is now “1 to Many”, not “1 to 1” as in previous versions. This was also done as a result of requests. •Base: The program has been updated to generate code compatible with Struts2 version 2.1 and later, which is an upgrade from 2.0.11 in version 0.3.0. As we write this, the current version of Struts 2 is version 2.3.4, but Maven does not have a struts2-archetype-starter available for that version. As Struts2 progresses, and the Maven archetypes progress, we will update accordingly. === Struts2Builder can be downloaded at http://struts2builder.sourceforge.net. Documentation is included as a pdf file in the released zip. Struts2Builder is released under the MIT license, and you are free to use this in any project, commercial or non-commercial. Enjoy! --Tom
Struts2Builder 0.4.1 has been released
Greetings all. Struts2Builder version 0.4.1 has been released. Struts2Builder is a Java code generation system that can automatically build a real, live, functioning Struts2 / Hibernate / Spring system for any existing PostgreSQL or MySQL database. Struts2Builder will log into the database, examine the metadata, and generate the source code necessary to create a CRUD (Create, Read, Update, Delete) application for every table in the target database. This is intended to serve as the "bones" of your database application, upon which you can build all the extra functionality that you require. === RELEASE NOTES Version 0.4.1 is a maintenance release with one change, which affects the User Interface. Version 0.4.0 and earlier would create a UI that is sized for a 1280x1024 monitor. If you are using a monitor that has a smaller vertical size, the "Build" buttons would not show at the bottom of the screen so it would not be possible to build an application. This has been fixed in the 0.4.1 release. Now, the initial screen is smaller, but can be resized for whatever screen resolution you have. Thanks to Rob Stone for the suggestion and testing. === Struts2Builder can be downloaded at http://struts2builder.sourceforge.net. Documentation is included as a pdf file in the released zip. Struts2Builder is released under the MIT license, and you are free to use this in any project, commercial or non-commercial. Enjoy! --Tom
Re: Struts CRUD generator
http://struts2builder.sourceforge.net On Thu, Jul 5, 2012 at 8:42 PM, Mitch Claborn wrote: > I thought I saw a reference fairly recently to a Struts CRUD generator - > generates a complete struts application for database manipulations. Can > someone point me in the right direction? > > mitch > > --**--**- > To unsubscribe, e-mail: > user-unsubscribe@struts.**apache.org > For additional commands, e-mail: user-h...@struts.apache.org > >
Struts2Builder 0.5.0 has been released - now with support for Oracle, Sybase, and MS SQL Server
Greetings all. Struts2Builder version 0.5.0 has been released. Struts2Builder is a Java code generation system that can automatically build a real, live, functioning Struts2 / Hibernate / Spring system for any existing Oracle, MySQL, PostgreSQL, Microsoft SQL Server, or Sybase database. Struts2Builder will log into the database, examine the metadata, and generate the source code necessary to create a CRUD (Create, Read, Update, Delete) application for every table in the target database. This is intended to serve as the "bones" of your Struts 2 application, upon which you can build all the extra functionality that you require. === RELEASE NOTES Version 0.5.0 contains some enhancements, and one bug fix: Enhancements: Other databases are now supported. Previous versions of Struts2Builder supported PostgreSQL and MySql only. This release adds support for Oracle, Sybase, and Microsoft SQL Server. Bug Fix: If a table has multiple complex foreign keys targeting the same base table, the Hibernate relationships based on those foreign keys were not created properly. This has been fixed. === We recommend that all users of Struts2Builder upgrade to this new release. Struts2Builder can be downloaded at http://struts2builder.sourceforge.net. Documentation is included as a pdf file in the released zip. Struts2Builder is released under the MIT license, and you are free to use this in any project, commercial or non-commercial. Enjoy! --Tom
Re: Struts2Builder 0.5.0 has been released - now with support for Oracle, Sybase, and MS SQL Server
Hello Bruce. Thanks for writing, and thanks for trying Struts2Builder. > It worked well generating a complete Struts 2 CRUD web application. I used on > Mac OS 10.8.1 and with MySQL. That's good to hear. I am glad you got it working on Mac. I have not tested it there, and I haven't heard of anyone else doing so either. There's little reason to think it wouldn't work on OSX, since OSX is basically BSD Unix, but I'm glad for the confirmation. > One change I would recommend is that in the dependencies you instruct the > user to add to pom.xml I think you've got an old version number for the > spring-aop. > > That could be. I am not using all the capabilities of Spring; just the dependency injection. That hasn't changed very much in quite a while, if I am not mistaken. > Also why cannot the maven compiler settings be set to generate Java 1.6 > instead of Java 1.5? > They certainly could be. When Maven generates the starter app, it generates it at 1.5. I think if you change the Maven compiler settings to 1.6, that would work. I just didn't see a reason to do so, since EE 1.5 is still prevalent in the world. > > Lastly, is it possible in this version to only use some of the columns in a > table for generating the Java classes? I sometimes need to use existing > tables that have dozens of columns but I only need a few of those columns > to > create/populate the state of my Java object (just to read from the table - > there is no update/create back to the table)? > The checkbox on each individual column is to tell Struts2Builder whether to include that column in the List application. All columns are used in creating the Java class. I did think of this during the initial design phase, but I thought it was better to include all columns. It doesn't hurt anything to include them, and it reduces the possibility of errors. For instance, Struts2Builder allows one to add records, and an add must contain all the not-null columns. If you leave out a not-null column, the add will fail. What if someone decides not to include a not-null column? Do I force that not-null column to be included, even though the person has specified otherwise? Do I obediently ignore that not-null column, knowing that adding a row will necessarily fail? What about the "display" screen? I am showing a display of all columns in the row. Ignoring columns would mean the display would not (and cannot) show those columns. So based on that, I decided early on in the project that I would include all columns in the domain class. Remember, this is intended to serve as the "bones" of a working Struts app, not the final product. And as an aside, in most of the cases where I have said "I'm not going to need that data", I usually end up needing it. --Tom
Re: [S2] Trouble getting started
try struts2builder.sourceforge.net On Sunday, September 27, 2015, Christopher Schultz < ch...@christopherschultz.net> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > Yaragalla, > > On 9/27/15 1:38 AM, Yaragalla Muralidhar wrote: > > Try the following. > > > > > > > *name="success"* >/WEB-INF/list.jsp > > No change. Note that I see nothing in the TRACE log for Struts (or, > really, anything) when I make the request to > http://localhost:8080/list.action. It's almost as if the Filter does > not run at all. > > What's the default value of 's "name" attribute? It's not > defined in the DTD: > > > name CDATA #IMPLIED > type CDATA #IMPLIED > > > > Thanks, > - -chris > > > On Sun, Sep 27, 2015 at 3:00 AM, Christopher Schultz < > > ch...@christopherschultz.net > wrote: > > > > All, > > > > I'm working on a fresh project and using Struts 2 for the first > > time. I've been using Struts 1 for more than 10 years and I > > generally know my way around web applications. > > > > I just can't seem to get a fairly simple setup working. I'm > > intending to use XML-based configuration and not annotation-based > > configuration. > > > > Here's what I've got: > > > > * Struts 2.3.24.1 * Tomcat 8.0.24 * A simple web app > > > > My web.xml looks like this: Struts 2 action > > filter. struts2 > > > > org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAnd > Ex > > > > > ecuteFilter > > actionPackages > > my.package.business > > > > struts2 > > /* > > > > My struts.xml looks like this: > > > > > "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" > > "http://struts.apache.org/dtds/struts-2.0.dtd";> > > > > > > > > > > > > /WEB-INF/list.jsp > > > > I have a class, my.package.business.ListAction which has a > > > > public String execute() > > > > method. I return "success" from this method (unless an exception > > is thrown). During startup, I can see that Struts/XWork is being > > initialize d: > > > > 26-Sep-2015 17:19:32.613 FINE [localhost-startStop-1] > > com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.debu > g > > > > > Loaded > > list in 'default' package:{ActionConfig //list > > (my.package.business.ListAction) - action - > > file:/path/to/deploy/webapps/ROOT/WEB-INF/classes/struts.xml: > > 9:68} > > > > When I try to access http://localhost:8080/list.action, I get a > > 404 response with nothing in the logs (except the access log: > > request to /list.action resulted in a 404). > > > > I'm sure I'm missing something super simple, here. Can anyone offer > > a suggestion? > > > > Thanks, -chris > >> > >> - > >> > >> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > >> For additional commands, e-mail: user-h...@struts.apache.org > > >> > >> > > > -BEGIN PGP SIGNATURE- > Comment: GPGTools - http://gpgtools.org > > iQIcBAEBCAAGBQJWB+T8AAoJEBzwKT+lPKRYvhIP/RTBeHWCeF9X30cOcOUZsWJG > /fYwTOVy3MFCBpdPuiOKwvB0WoketuobsV0T3Qm3qj6Frgi6gfBmeSZtXSV3Osug > RiYj64ZDeVI5UJE8axrp5uNyDySggBcgRxivL5OHkf5xjFGcTxdpVjGhF20/iUm8 > xJbkcRn6oXTKhC0xC7JxWAf2K8XI5se+BQAbl9aSPGacDHnseDasfFNsNiaWtAUF > 7aMg5Q5FNIS3EQP/1JMQwH5i1o6WDtBhTk2bjGXn31bw7bVG1Ab1ce+HIfB2V1uG > WDt7NuIicl0JiBswvHKeidDfs8LbeR3UyJC543fW2iC1MPKSstHK2voSf/u7jwNC > s1bULHC4ssupMcIh9HuVZWFecxfKO6/eSiAY2SHZ6SHHvaQAWvbjyQ+4+9rSnAwB > /tUIFqfhlR1ngPBdOVE4EnGctcck+TVFLso0MovDSXcbpIRyWUni66Ik4u8KFbpB > Y3HQONn0OGJfC6XymduwO1tyrMLrvKDA07KDpLrtRxHsr/gjSBD4rOswwepBpGUc > NfKhRWzLPPCnJQxHp/2Z5m4NPmW/hCyltonbQ007ho0LBt+OysisRxjRUAaKkx/Z > sxKjVbWoPWQ+l1wzGIeCh12e38dOhXUWXNj5g44TFYobAz3WCAmWdd7SPt4vr1If > ERHlhVfBfRI3YFuYxk17 > =Uji8 > -END PGP SIGNATURE- > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > > -- Sent from my iPhone
Struts2Builder version 2.0.0 has been released
Greetings all. Struts2Builder version 2.0.0 has been released. Struts2Builder is a Java code generation system that can automatically build a real, live, functioning Struts2 / Hibernate or MyBatis / Spring system for any existing Oracle, MySQL, PostgreSQL, Microsoft SQL Server, DB2, or Sybase database. Struts2Builder will log into the database, examine the metadata, and generate the source code necessary to create a CRUD (Create, Read, Update, Delete) application for every table in the target database. This is intended to serve as the "bones" of your Struts 2 application, upon which you can build all the extra functionality that you require. === RELEASE NOTES There are three major changes in this release: 1) After getting many, many questions along the lines of “How do I use this with iBatis?”, we are now pleased to support iBatis/myBatis as an alternate ORM. Full Hibernate support is still included, but in our consulting work, we have noticed many more companies moving to iBatis/myBatis, and we are pleased to support it in this release. 2) We now support IBM's DB2 as one of our target databases. 3) We upgraded the pertinent dependency libraries. Struts2Builder creates systems compatible with Struts2 2.5.5, Spring 4.3.5, and Hibernate 5.1.3. The latest version of iBatis/myBatis (3.4.2, as of this writing) is included. Additionally, we have made minor usability enhancements to the user interface. === We recommend that all users of Struts2Builder upgrade to this new release. Struts2Builder can be downloaded at http://struts2builder.sourceforge.net. Documentation is included as a pdf file in the released zip. Struts2Builder is released under the MIT license, and you are free to use it in any project, commercial or non-commercial. Enjoy! --Tom
Re: Auto generate Struts 2 CRUD functionality
Try Struts2Builder. http://struts2builder.sourceforge.net On Sun, Jun 7, 2009 at 1:13 PM, Roger wrote: > I'm experimenting with Struts 2 and OpenJPA. I've got the database set up > and > the Entity classes are all defined. I was wondering if there was a tool > available that would generate basic Struts 2 CRUD functionality for me. > > Regards > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > >
Struts2Builder 0.2.0 has been released
Greetings all. I have posted a new release of Struts2Builder over at SourceForge. Struts2Builder is a Java code generation system. It will log into an existing Postgres or MySql database, examine the metadata, and automatically generate a real, live, functioning Struts2 / Spring / Hibernate CRUD (Create, Read, Update, Delete) system for every table in that database, as well as automatically generate all the pertinent configuration files. It is intended to create a baseline, which you can build upon to create your final customized application. It can be downloaded (for free, of course) at http://struts2builder.sourceforge.net. I have provided it to the Struts community in hope it helps everyone get their projects done faster. Here are the changes for this release: 1) The system now recognizes foreign keys, and generates the Hibernate code necessary to build the complex hierarchy of objects based on those foreign keys. One-to-One and One-to-Many relationships are supported; Many-to-Many relationships are not. 2) Validation edits are now done on the Table list. All Class names must be capitalized and unique, all Plural names must be capitalized and unique, and each Class name must be different from its respective Plural name. These validation edits were not done in 0.1.0. 3) All metadata is now returned by the DatabaseMetaData class, instead of writing specific queries against the individual databases, which is how it worked in 0.1.0. This will allow other database products to be supported much more quickly and easily than if we had not made that change. Thanks to Dave Newton for the suggestion. 4) The default layout of the web page is wider now. The default width of 800 pixels looks and feels cramped on a modern 1280 x 1024 monitor, so we widened the default to 1100 pixels, giving more horizontal space to each application. 5) The “Local Nav Bar” list, on the left side of the screen, now contains live links for each table; you no longer have to hit “Return” from one table's data to go back to the Main Application in order to select a different table. Just click the link for a different table name. All feedback on Struts2Builder is appreciated. Currently. the project's status is set to "Alpha". I'd especially like to hear opinions from people about whether they think it's ready to be promoted to "Beta" status. --Tom
Re: New to Struts, a Question
In my struts.xml file, I have the UserDisplayAction class and a blank (no "name=") result for userDisplay.jsp. Does it pick up from there? On Wed, Jul 29, 2009 at 8:40 PM, Dave Newton wrote: > Dennis Atkinson wrote: > >> Dave, >> >> OK, I can make it work. I just don't understand WHY it works. >> >> If I change to this: My >> Acccount >> >> I get exactly what I expect; the screen loads with the data filled in >> properly. >> >> But what I don't understand is how Struts knows to load >> userDisplay.jsp. I assume it parses the "userDisplay" out of the url >> and appends the ".jsp" to the end, so as long as I have these names >> the same (other than the suffix), this will work? >> > > You don't have a user display action configured via XML or annotations? > > > Dave > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > >
Struts2Builder 0.3.0 has been released
Greetings all. I have posted a new release of Struts2Builder over at SourceForge. Struts2Builder is a Java code generation system. It will log into an existing Postgres or MySql database, examine the metadata, and automatically generate a real, live, functioning Struts2 / Spring / Hibernate CRUD (Create, Read, Update, Delete) system for every table in that database, as well as automatically generate all the pertinent configuration files. It is intended to create a baseline, which you can build upon to create your final customized application. It can be downloaded (for free, of course) at http://struts2builder .sourceforge.net. I have provided it to the Struts community in hope it helps everyone get their projects done faster. This is the third released version of Struts2Builder. ▪ 0.1.0 was an initial release, intended to get the product out in the hands of the community. Our goal was to “make it work”. ▪ 0.2.0 was a feature enhancement release, adding complex primary and foreign keys, as well as adding support for creating complex relationships based on foreign keys. ▪ 0.3.0 is a cleanup release, making the generated code cleaner and more readable. Bug Fixes in 0.3.0 1. Whenever a Date field is a component of a complex primary key, the primary key class will not compile due to a missing import. This has been fixed. As always, any and all feedback on Struts2builder is appreciated. Thanks, Tom
Re: Question about 'if' tag
I think Pawel omitted something in the original reply. You can't say: That won't work. Instead, you have to say: 2009/9/23 Paweł Wielgus > Hi again, > firstly You should read about OGNL basics because You are using it, > then if You write it works, why?, > because struts is treating it like a regular getter, > so it adds get and makes can to camel case Can and in result it > searches for getCanEditCustomer() method, and it finds it in action. > It is a general shortcut for dealing with fields which has getters and > setters. > > Now when You write struts sees this () > at the end and it searches for canEditCustomer() method and of course > it's not finding it anywhere. > > And last the method should be isCanEditCustomer(), but that is just my > habbit. > > Also keep in mind what Wes was writing about, hidding a link is not > suficient. > > Best greetings, > Paweł Wielgus. > > 2009/9/23 Dennis Atkinson : > > I have gone through Pawel's example and it is not working for me. > > > > Here is the iterator: > > > > > > > > I created three methods in my action class: > > > > public boolean getCanEditCustomer() > > { > >return false ; > > } > > > > public boolean getCanEditCustomer(Integer anInt) > > { > >return false ; > > } > > > > public boolean getCanEditCustomer(Customer aCustomer) > > { > >return false ; > > } > > > > These are dummy methods just to see if everything will work. I set an > Eclipse breakpoint on each return statement. So in theory, Eclipse should > stop on one of the statements whether I pass in nothing, an integer, or a > Customer object. > > > > The results are: > > > > (This stops in the first > method) > > (This never stops) > > (This never stops) > >(This never stops) > > > > So it seems like no parameters are being passed in; in fact when I use > the braces to indicate no parameter, that doesn't work either. > > > > > > > > > > > > > > > > > > From: Wes Wannemacher > > To: Struts Users Mailing List > > Sent: Wednesday, September 23, 2009 4:20:33 PM > > Subject: Re: Question about 'if' tag > > > > In addition to what Pawel is saying, be careful that you also check > > the 'canEditCustomer(target)' call in the target action since there is > > nothing to stop someone from figuring out the URL pattern and editing > > people they weren't intended to edit. > > > > -Wes > > > > 2009/9/23 Paweł Wielgus : > >> Hi Dennis, > >> You are nesting tags, it's not possible/permitted, > >> what You should do is something like: > >> or var="iter"> > >> > >> > >> > >> Which simply is naming your iterator variable to "iter" and use it in if > tag, > >> depending on struts2 version it will be id or var. > >> > >> Best greetings, > >> Paweł Wielgus. > >> > >> > >> 2009/9/23 Dennis Atkinson : > >>> Hi all. > >>> > >>> In my Struts2 application, I have a collection of Customer objects, and > various users have the rights to edit some of them and not others. I have > created a Struts iterator tag, and in the iterator, I put the various > Customer attributes into an HTML table. All this works. > >>> > >>> In one cell of the table, I have the string "Edit", and if it's > clicked, it goes to another Action class to edit that particular Customer > object. All that works too. > >>> > >>> What I want to do is only show the "Edit" string if the user has the > right to edit that Customer. I'm trying to set a " but I am sure I'm not doing it right (because it's not working). > >>> > >>> I am trying: > >>> > >>> > >>> > >>> hoping "property" is the current object in the iteration. But whatever > is happening, this doesn't do what I hope it does. Am I anywhere close to > the right solution here? > >>> > >>> Thanks, > >>> Dennis > >>> > >>> > >>> > >> > >> - > >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > >> For additional commands, e-mail: user-h...@struts.apache.org > >> > >> > > > > > > > > -- > > Wes Wannemacher > > > > Head Engineer, WanTii, Inc. > > Need Training? Struts, Spring, Maven, Tomcat... > > Ask me for a quote! > > > > - > > 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 > >
Re: execute() not getting executed
execute() is the *default* method for an Action class. It's not the *only* method. execute() will get called if you don't have a different method specified. You can basically call any method you want; leaving out the "method=" parameter is the same as specifying "method=execute". But you can specify any method. On Fri, Oct 16, 2009 at 2:38 PM, Lukasz Lenart wrote: > Typo? > > > Regards > -- > Lukasz > http://www.lenart.org.pl/ > http://dailylog.lenart.org.pl/ > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > >
Re: Struts2 / Hibernate Question
So it sounds like both the FullHibernatePlugin and the OpenSessionInViewFilter class work. Thanks for the quick replies. Do you remember how these are configured? The FullHibernatePlugin wiki says only a few lines of configuration are required, but it doesn't say what those lines are. With OpenSessionInView, I add it to my web.xml file, but I get an error that it can't find the class, even though I am fairly certain that the "spring-hibernate3-2.0.8.jar" file contains it, and I triple-check to make sure that jar is loaded. --Dennis On Fri, Oct 23, 2009 at 2:35 PM, Eduard Neuwirt < eduard.neuw...@googlemail.com> wrote: > Hi, > > Obviously there is a gap between Hibernate and Web-Application. > OpenSessionInViewFilter working well, almost. I am using this filter and in > the most cases it is enough. Sometimes I have to load Collection with > size(). The another solution is to store only keys in the session and load > the objects for every request from the Database/second level cash. The Eager > Initialization does not work for two or more Lists in the class :( > > Regards > Eduard > > > Dennis Atkinson schrieb: > > Hello all. >> >> I am running into the infamous "closed session" issue, whereby I get a >> LazyInitializationException on a lazy-initialized foreign key relationship. >> The issue, as I understand it, is that the session is closed before the >> lazy-initialized objects need to be read from the database, so there is no >> session when the read actually occurs, and the exception is thrown. It >> seems like any complex Struts / Hibernate system would eventually run into >> this issue, as I have. I could specify everything as "EAGER", but that >> would (eventually) load my entire database and that's far from an optimal >> solution. >> >> As suggestions for fixing this, I have found references to the >> FullHibernatePlugin, and also the OpenSessionInViewFilter class. Both claim >> that no code changes are required, and all that's needed are some >> configuration changes. The documentation on how to use these two solutions >> is sparse, at best. >> Has anyone used either of these two solutions? Is there any documentation >> floating around that I haven't found yet? Or is there another, better >> solution that someone has found? >> I know this is a Hibernate issue and not a Struts issue, but I think >> people here must have experience with this issue. >> >> Thanks in advance, >> Dennis >> >> >> >> > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > >
General Question About Creating Projects
Greetings. I am the developer of the "Struts2Builder" project. In the Struts2Builder documentation, I tell people to create projects using the "struts2-archetype-starter" Maven archetype. I have found this to be a solid, reliable method of initially creating Struts2 projects. However, I have noticed that struts2-archetype-starter is stuck at version 2.0.11, and hasn't been updated on Apache's web site since August of 2008, which is a lifetime in Web years. I've been waiting for it to get moved up to *any* of the 2.1 versions, but I'm still waiting. Since it is so out of date, I'm wondering if it is going to be updated at all, or if Apache is going in a different direction? What is the generally accepted way of creating 2.1.x projects? I notice that "struts2-archetype-portlet" is at 2.1.6; is that a reasonable alternative? Any insight would be greatly appreciated. Thanks, Tom