comp.lang.java.programmer http://groups-beta.google.com/group/comp.lang.java.programmer [EMAIL PROTECTED]
Today's topics: * Simple question about GUI - 3 messages, 3 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/b45ee198b1c9b650 * JBOSS deployment problem - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/1b5e12808c898fec * AXIS to emit SoapHeader in WSDL - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2c6572aa0541c7f8 * java socket vs tcp stack parameters in XP - 4 messages, 3 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/618106fcb3a21f92 * Why pay for VS.NET when JAVA is Free? - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/3375ad9fa31f8e34 * Help: What is a .do web page extension? - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/399bdb61556ff2ca * learning Java - 3 messages, 3 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/618f7cdb06ff4e63 * Telnet client - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/34b0931dc564995f * Sort an ArrayList? - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/258e7fc15eb38cb8 * How to find file descriptor leak - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/c324f3cfb9bae16b * J2ee example in Jboss - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d283362ec4397f86 * NoClassDefFoundError on UNIX, but not on PC - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/fcd4321ef5ca8215 * how to use binary tree - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5300aab5d4e1846e * New P2P , Java&Randezvous based .. OpenSource - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d88f1ad5c7a44b3d * Struts workflow - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5a8184e8f76705c9 * Wonderful Laptop for Java Programmer - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/c12d5b3538fa2322 ============================================================================== TOPIC: Simple question about GUI http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/b45ee198b1c9b650 ============================================================================== == 1 of 3 == Date: Wed, Dec 15 2004 11:12 pm From: "Ann" "HS1" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello > > I have window application. In this application I have a button (inside a > JPanel of a JFrame). When I click on this button, a JDialog will be shown. I > want to have this JDialog appearing in the centre of this application. Could > you please tell me how to do that > > I look in the manual but did not find you > Thank you > SH1 > Dimension myScreenSize = Toolkit.getDefaultToolkit().getScreenSize(); == 2 of 3 == Date: Wed, Dec 15 2004 11:37 pm From: [EMAIL PROTECTED] (Lee Weiner) In article <[EMAIL PROTECTED]>, "HS1" <[EMAIL PROTECTED]> wrote: >I have window application. In this application I have a button (inside a >JPanel of a JFrame). When I click on this button, a JDialog will be shown. I >want to have this JDialog appearing in the centre of this application. Could >you please tell me how to do that > Look up <JDialog>.setLocationRelativeTo() Lee Weiner lee AT leeweiner DOT org == 3 of 3 == Date: Wed, Dec 15 2004 11:48 pm From: Bill Tschumy On Wed, 15 Dec 2004 15:17:17 -0600, HS1 wrote (in article <[EMAIL PROTECTED]>): > Hello > > I have window application. In this application I have a button (inside a > JPanel of a JFrame). When I click on this button, a JDialog will be shown. I > want to have this JDialog appearing in the centre of this application. Could > you please tell me how to do that > > I look in the manual but did not find you > Thank you > SH1 > > Here's the code I use. It centers over the parent window if one is specified, and over the screen if the parent is null. Actually it positions it 1/3 of the way down vertically because I think this looks better than actually centering vertically. public static void centerWindow(Window window, Window parent) { Rectangle centerRect; Rectangle windowRect = window.getBounds(); if (parent != null) centerRect = parent.getBounds(); else { Dimension size = Toolkit.getDefaultToolkit().getScreenSize(); centerRect = new Rectangle(0, 0, size.width, size.height); } window.setLocation( centerRect.x + (centerRect.width - windowRect.width) / 2, centerRect.y + (centerRect.height - windowRect.height) / 3); } -- Bill Tschumy Otherwise -- Austin, TX http://www.otherwise.com ============================================================================== TOPIC: JBOSS deployment problem http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/1b5e12808c898fec ============================================================================== == 1 of 1 == Date: Wed, Dec 15 2004 3:17 pm From: [EMAIL PROTECTED] (Frank Gerlach) Hello, I have trouble deploying a simple application on JBOSS. This is my *.ear file: META-INF/ META-INF/MANIFEST.MF META-INF/application.xml.bak META-INF/application.xml.backup META-INF/application.xml HelloWorld.jar Helloworld.jar also contains a ejb-jar.xml. The following log indicates that "No xml files found". Does anybody know what to do ? Thanks for your help ! 2004-12-16 00:05:46,718 DEBUG [org.jboss.deployment.JARDeployer] No xml files found 2004-12-16 00:05:46,718 DEBUG [org.jboss.deployment.MainDeployer] No deployer found for url: file:/C:/franksordner/dev/jboss-3.2.7RC1/server/minimal/deploy/HelloWorld.ear 2004-12-16 00:05:46,718 DEBUG [org.jboss.deployment.MainDeployer] deployment waiting for deployer: file:/C:/franksordner/dev/jboss-3.2.7RC1/server/minimal/deploy/HelloWorld.ear 2004-12-16 00:05:46,718 DEBUG [org.jboss.deployment.MainDeployer] Watching new file: file:/C:/franksordner/dev/jboss-3.2.7RC1/server/minimal/deploy/HelloWorld.ear 2004-12-16 00:05:46,718 DEBUG [org.jboss.deployment.MainDeployer] Deployment of package: file:/C:/franksordner/dev/jboss-3.2.7RC1/server/minimal/deploy/HelloWorld.ear is waiting for an appropriate deployer. 2004-12-16 00:05:46,718 DEBUG [org.jboss.deployment.scanner.URLDeploymentScanner] Watch URL for: file:/C:/franksordner/dev/jboss-3.2.7RC1/server/minimal/deploy/HelloWorld.ear -> file:/C:/franksordner/dev/jboss-3.2.7RC1/server/minimal/deploy/HelloWorld.ear 2004-12-16 00:05:46,728 ERROR [org.jboss.deployment.scanner.URLDeploymentScanner] Incomplete Deployment listing: Packages waiting for a deployer: [EMAIL PROTECTED] { url=file:/C:/franksordner/dev/jboss-3.2.7RC1/server/minimal/deploy/HelloWorld.ear } deployer: null status: null state: INIT_WAITING_DEPLOYER watch: file:/C:/franksordner/dev/jboss-3.2.7RC1/server/minimal/deploy/HelloWorld.ear lastDeployed: 1103151946718 lastModified: 1103151948000 mbeans: Incompletely deployed packages: [EMAIL PROTECTED] { url=file:/C:/franksordner/dev/jboss-3.2.7RC1/server/minimal/deploy/HelloWorld.ear } deployer: null status: null state: INIT_WAITING_DEPLOYER watch: file:/C:/franksordner/dev/jboss-3.2.7RC1/server/minimal/deploy/HelloWorld.ear lastDeployed: 1103151946718 lastModified: 1103151948000 mbeans: ============================================================================== TOPIC: AXIS to emit SoapHeader in WSDL http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2c6572aa0541c7f8 ============================================================================== == 1 of 2 == Date: Wed, Dec 15 2004 3:16 pm From: "bangeye" Google groups was screwing with me yesterday - appologies to all. -dc == 2 of 2 == Date: Wed, Dec 15 2004 3:34 pm From: Steve Sobol bangeye wrote: > Google groups was screwing with me yesterday - appologies to all. > -dc Apology accepted. Sorry about the (undeserved) rant. -- JustThe.net Internet & New Media Services, http://JustThe.net/ Steven J. Sobol, Geek In Charge / 888.480.4NET (4638) / [EMAIL PROTECTED] PGP Key available from your friendly local key server (0xE3AE35ED) Apple Valley, California Nothing scares me anymore. I have three kids. ============================================================================== TOPIC: java socket vs tcp stack parameters in XP http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/618106fcb3a21f92 ============================================================================== == 1 of 4 == Date: Wed, Dec 15 2004 11:30 pm From: Esmond Pitt antoine wrote: > > it looks like the box is waiting for some kind of TCP ACK or heartbeat > before sending the second and third messages. Not quite, it is coalescing packets up to a timeout when there is an outstanding ACK. This is the Nagle algorithm, and it is an important TCP/IP optimization. You can turn it off if you want but your throughput will drop significantly if your writes are small. == 2 of 4 == Date: Wed, Dec 15 2004 4:41 pm From: "antoine" messages are small, but client & server are on the same LAN, so I believe throughput should not be an issue... do you know how to turn the nagle algorithm off on XP ? or better yet, do you know how I could modify the timeout ? simply setting it to a lower value should be sufficient, no ? == 3 of 4 == Date: Wed, Dec 15 2004 9:30 pm From: Sudsy > messages are small, but client & server are on the same LAN, so I > believe throughput should not be an issue... > > do you know how to turn the nagle algorithm off on XP ? > or better yet, do you know how I could modify the timeout ? simply > setting it to a lower value should be sufficient, no ? Again, with the information you've been provided to date you should have been able to find the answer in your system documentation. Look for a socket option usually named TCP_NODELAY. This is something you should have been able to discover on your own. Are you not familiar with the term RTFM? Did you not perform your own search on the archives? Should we have provided the precise search terms? Sheesh! == 4 of 4 == Date: Thurs, Dec 16 2004 5:56 am From: Esmond Pitt antoine wrote: > messages are small, but client & server are on the same LAN, so I > believe throughput should not be an issue... > > do you know how to turn the nagle algorithm off on XP ? > or better yet, do you know how I could modify the timeout ? simply > setting it to a lower value should be sufficient, no ? Socket.setTcpNoDelay(). Setting it to TRUE *disables* Nagle's algorithm. Use with great care. ============================================================================== TOPIC: Why pay for VS.NET when JAVA is Free? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/3375ad9fa31f8e34 ============================================================================== == 1 of 1 == Date: Wed, Dec 15 2004 6:42 pm From: "Sylvain Lafontaine" It was not my intention to demonstrate that the .NET framework is a better (or not) development plaftorm than Java or that there are no competent Java programmers around here. My statement was only about the fact that taking only the price of a piece of software (any software) into consideration when choosing a development solution is a rather limited and misleading point of view and that making the statement (or decision) that *free* softwares are the ultimate solution for everybody - only because it's free - can lead to serious damages. In fact, in my opinion, most of the times this aspect should be treated only as a relatively minor point to take into consideration. However, you have also a good point by stating that Java is 9-year old. I remember the first time I've tried 5-6 years ago, with other people in a big company, to install a multi-users Java platform development system. Java was then at about the same age as the .NET platform is now; however, only the simple fact of making it run correctly, without to much problems, required a lot of discussion, research time and testing of various versions running on different platforms and operating systems. And this - more or less - successfull installation was only the beginning of our problems. S. L. "Tim Tyler" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > In comp.lang.java.programmer Steve Sobol <[EMAIL PROTECTED]> wrote or > quoted: >> Sylvain Lafontaine wrote: > >> > Simply because the costs of the software is only a part of the whole >> > equation. You may say that Java is free, but if it take a programmer 6 >> > months with Java instead of 3 with .NET to develop a piece of code; >> > then the >> > real cost to the company who pay him is much, much higher than 0$. >> >> > I won't enter into the discussion to know if doing a project with Java >> > will >> > really double the required time or not. >> >> It's not something that can be answered without figuring out who will do >> the >> work. There are plenty of competent Java programmers out there, as well >> as >> plenty of competent .NET programmers, so if you're using someone who >> knows what he or she is doing, there shouldn't be that much difference >> in development time... regardless of development platform. > > The chances of the software you need to write already existing beneath > the 9-year old Java platform are of course much higher - so the chances > are much bigger that little or no work will need to be performed in the > first place. > -- > __________ > |im |yler http://timtyler.org/ [EMAIL PROTECTED] Remove lock to reply. ============================================================================== TOPIC: Help: What is a .do web page extension? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/399bdb61556ff2ca ============================================================================== == 1 of 1 == Date: Wed, Dec 15 2004 5:58 pm From: "Ryan Stewart" "Joona I Palaste" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > [EMAIL PROTECTED] scribbled the following: >> Since I am new to Java web development, I was stummped when one of my >> clients asked me if I could do some web page maintenance to a ".do" web >> page file. He tells me that this page was written in Java. > >> Can someone explain to me what a ".do" file is and where I can find >> information on it's structure and syntax? > > It can be anything it wants. Really. Filename extensions do not mandate > the format of the file, or how it is used. At least not generally. ".do" > is none of the extensions I've heard Java ever define for anything, so > it must be defined by some other thing. This thing, then, can be your > client, one of their clients, a third party, the FBI, aliens, whatever. > ".do" is the "standard" extension mapped to for Struts. ============================================================================== TOPIC: learning Java http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/618f7cdb06ff4e63 ============================================================================== == 1 of 3 == Date: Wed, Dec 15 2004 4:22 pm From: "[EMAIL PROTECTED]" Hey peeps, wats up. I am a CS student from Chicago. The thing is, I am in MS now, but didnt have Java in my undergrad. So now have to learn it from scratch. I know C, C++. So people told me it should not be hard for me. Lets see. Can I have some guidelines on how should I approach the learning? I have a 'Complete Reference: Java 2'. Does anyone know have any e-books or something that is better than a Book? OKay Frienz... See You, keep in touch. -raj. == 2 of 3 == Date: Wed, Dec 15 2004 8:41 pm From: "hilz" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hey peeps, wats up. > I am a CS student from Chicago. The thing is, I am in MS now, but didnt > have Java in my undergrad. So now have to learn it from scratch. I know > C, C++. So people told me it should not be hard for me. Lets see. > Can I have some guidelines on how should I approach the learning? I > have a 'Complete Reference: Java 2'. Does anyone know have any e-books > or something that is better than a Book? > OKay Frienz... See You, keep in touch. > -raj. > http://java.sun.com/ on the left side of the page: Learning > New to Java Center == 3 of 3 == Date: Wed, Dec 15 2004 7:48 pm From: "Ryan Stewart" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hey peeps, wats up. > I am a CS student from Chicago. The thing is, I am in MS now, but didnt > have Java in my undergrad. So now have to learn it from scratch. I know > C, C++. So people told me it should not be hard for me. Lets see. > Can I have some guidelines on how should I approach the learning? I > have a 'Complete Reference: Java 2'. Does anyone know have any e-books > or something that is better than a Book? > OKay Frienz... See You, keep in touch. > -raj. > Welcome to the world of Java. With previous programming experience, you should pick up Java pretty quick. It's very structured, hard to break (compared to C/C++), and very good at giving explicit error messages. I got started here: http://java.sun.com/docs/books/tutorial/index.html Then I read a good, thick book: Java 2 Primer Plus from Sams Publishing. Then I worked with it for a year. A lot of that was learning to think object-oriented. If you've got that under your belt, you'll take to Java like a leech to liposuction. Always feel free to come here and ask questions and for help with problems you're having. Use comp.lang.java.help for beginner stuff and this group for advanced issues. One thing we *don't* do here is write homework assignments. Show us code that has a problem, and we'll show you how to make it work. Good luck! ============================================================================== TOPIC: Telnet client http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/34b0931dc564995f ============================================================================== == 1 of 1 == Date: Thurs, Dec 16 2004 12:31 am From: Andrew Thompson On Wed, 15 Dec 2004 21:12:59 GMT, Jani Jalkala wrote: > I'm guessing that it is something in the implementation of > NVTInputStream class, but I don't want to spend too much time investigating > what it could be. If you don't, why should we? -- Andrew Thompson http://www.PhySci.org/codes/ Web & IT Help http://www.PhySci.org/ Open-source software suite http://www.1point1C.org/ Science & Technology http://www.LensEscapes.com/ Images that escape the mundane ============================================================================== TOPIC: Sort an ArrayList? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/258e7fc15eb38cb8 ============================================================================== == 1 of 2 == Date: Wed, Dec 15 2004 5:43 pm From: "Jaba" Is there a clean way to sort an ArrayList loaded with Objects of a class based on a variable within that object? == 2 of 2 == Date: Wed, Dec 15 2004 7:54 pm From: "Ryan Stewart" "Jaba" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Is there a clean way to sort an ArrayList loaded with Objects of a > class based on a variable within that object? > See java.lang.Comparable, java.util.Comparator, and java.util.Collections. Collections.sort(List) takes a list of objects that implement the Comparable interface. Collections.sort(List, Comparator) takes a list of anything and a Comparator that knows how to compare them. ============================================================================== TOPIC: How to find file descriptor leak http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/c324f3cfb9bae16b ============================================================================== == 1 of 1 == Date: Wed, Dec 15 2004 9:20 pm From: Sudsy > Now why didn't I think of that? It's a windows app but I have a Linux > development environment at home. It's a pretty sad statement when your > home is better equipped to do your job then your office. I don't know about that. I've had a richer, more powerful development environment at home for /years/! Multiple servers with various J2EE development and deployment platforms, production, test and QA environments, etc. Plus multiple RDBMS implementations, Eclipse with XDoclets, Apache/Tomcat... I feel that I'd be more productive using the tools I have available here than I would be in an office environment. That's why I'm a huge fan of the remote development model. Easier for me to package a tested ear and transmit to a client than to occupy expensive real-estate and incur the overhead such as a telephone and other administrative costs. But that's just me. YMMV. ============================================================================== TOPIC: J2ee example in Jboss http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d283362ec4397f86 ============================================================================== == 1 of 1 == Date: Wed, Dec 15 2004 9:34 pm From: Sudsy <snip> > I try to find a solution there , but I find only questions not reply, I > read Jboss documentation , and ,perhaps , I had to add something into > jndi.properties, but I don't' know other. > I'm very confusing, if I read again I became more confuse, I need to sleep, > I hope to solve this problem tomorrow :-) Sorry, but I'm all out of spoons! If you weren't able to find solutions with the search string I so generously provided then you weren't trying very hard. I'll purchase a spoon as soon as you remit project funding via PayPal... ;-) ============================================================================== TOPIC: NoClassDefFoundError on UNIX, but not on PC http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/fcd4321ef5ca8215 ============================================================================== == 1 of 1 == Date: Thurs, Dec 16 2004 2:43 am From: Lee Fesperman clay wrote: > > Morning, > > Created a program with Eclipse which pulls in data, formats it, and > sends to a web service. Having no trouble getting everything to run on > the PC side. > > Trouble comes up when moving to UNIX. Seems that any way I run the > program I get the error: Exception in thread "main" > java.NoClassDefFoundError: com/supplychain/DemandForecast, whether I > execute from inside the directory with no classpath, using the > classpath, or using the script below. > > The script file I am using to run the program sets up the file path and > the classpath as follows: > > #!/bin/ksh > export PROG_HOME=/opt/c20/batch/lib > java -cp > .:$PROG_HOME/c20.jar:$PROG_HOME:$PROG_HOME/rt.jar:$PROG_HOME/classes12.zip:$PROG_HOME/log4j-1.2.9.jar:$PROG_HOME/soap.jar:$PROG_HOME/mail.jar:$PROG_HOME/activa > com.supplychain.DemandForecast $1 > > I have checked the jar file and the Manifest contains the correct > location of main and I have included all of the libraries that were > included by eclipse. > Any help you can provide would be most appreciated. You didn't list the actual directory structure for the class file, but I would guess that the problem is that UNIX file systems are case-sensitive for file/directory names. -- Lee Fesperman, FFE Software, Inc. (http://www.firstsql.com) ============================================================== * The Ultimate DBMS is here! * FirstSQL/J Object/Relational DBMS (http://www.firstsql.com) ============================================================================== TOPIC: how to use binary tree http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5300aab5d4e1846e ============================================================================== == 1 of 1 == Date: Wed, Dec 15 2004 8:01 pm From: "Beginner" I don't know how to use the binary group could you please help me ============================================================================== TOPIC: New P2P , Java&Randezvous based .. OpenSource http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d88f1ad5c7a44b3d ============================================================================== == 1 of 1 == Date: Thurs, Dec 16 2004 4:18 am From: Lawrence I'm sorry, i have already posted in comp.lan.java.help but I think that this is more appropriate. Hi All, I have started studing Java at the uni .. and i really like it! I just explain the situation : Do you know iTunes ? And its function share ? From my point of view is really cool!! : Pratically, once activeted one option in preference, iTunes will go to search ( take a look to Rendezvous project for specification) in all the subnet computer that offer the same library sharing and music streaming service. This make able people to listen music of all computers at home from an other pc without configuring anything! iTunes is limited to 5 max users for time, and also to just music streaming and not downloading ..but there is some programs that make able also to download (like myTunes). Explained a bit what it do, I want to explain what i want to do : I think that this program is limited, is not possible to share all kind of files so i want to write a program in java that permit to share all kind of files (with download and not straming) and because we are already in here add also a chat service. Here there is the page (Ufficial i believe) of the used system : http://developer.apple.com/macosx/rendezvous/ And here look like something already done in java that already use that system but seems to be for a different use of what i want to do : http://sourceforge.net/projects/rendezvous/ Here there is the class of that protocol/system: http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/Rendezvous.java And here it javadoc compatible documentation : http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/Rendezvous.html Scope of the program and functions : -Sharing of all files type. -Search for file, with option like file type and size. -Download resuming (just use chunks) -Including in the list of files also files of iTunes hosts (ovviously just music) -Chat betweeen users (the identifier will be the IP not the NickName in all the program) -The program will be made for small,medium,big lans (so universities, halls of residencies, offices, homes, stuff like that cause i don't think that it can keep more then 1000 users considering that every single host must manage all librarys of all pcs) Pratically, I search : -Someone that want to work with me in this project (open source, i think gpl but i want to take a look to other open licences) -Any suggestion about everything in the program ( about the structure of the program, and the files list manage that i think must be in every single pc .. and without database like mySQL .. at moust files) -What do you think .. -If you know something already done using that technlogy (rendezvous) even in an other language .. From now i must say thanks for you attention ! cheers, Lawrece Lawrence ============================================================================== TOPIC: Struts workflow http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5a8184e8f76705c9 ============================================================================== == 1 of 1 == Date: Wed, Dec 15 2004 8:40 pm From: "John" Daniel, You are making this first attempt at Struts more difficult that you need it to be. Drop the tile for now, and factor it in later. You first need to get a simple app up and running. Here is the workflow you requested: 1. A request comes in with a .do extension, the container maps it to the ActionServlet. 2. The ActionServlet acts like a front end controller and dispatches control to a RequestProcessor. 3. The RequestProcessor finds an action tag with a path attribute that matches the incoming request 4. Then the RequestProcessor looks for a form-bean tag that has a name attribute that matched the action tags name attribute. 5. RequestProcessor instantiates a FormBean of the of based on the type attribute 6. RequestProcessor calls populates the FormBeans fields from the incoming request, then calls its reset method, then its validate method 7. RequestProcessor instantiates an Action based on the action tags type attribute 8. RequestProcessor calls the action's execute method which returns an ActionForward. 9. The RequestProcessor finds a matching ActionForward first within the nested forward tags, then from within the global-forwards tag. Note: if the validate method returns an ActionMessage then the RequestProcessor forward the request to the resource specified in the action's input attribute Again start with the basics: http://www.reumann.net/struts/main.do -- all meat, no the bs has been trimmed out. Do not skip this, you will give you a great jump start. "Mastering Jakarta Struts" - again all meet, no bs. This book goes into more detail. It also has a complete app with database calls. I highly recomend this book to people, by the time you finish this you will understand Struts. Good luck! --------------------- Daniel wrote: > Hi, > > I'm trying to understand the workflow in struts, and have some > difficulties. I want to load a form and submit it. Then I want to go > to one of several pages (which are also part of the form). > > In the form I have some data that needs to be loaded in selects and > multiple checkboxes. To do this, it seems I should use beans. > First question, how do I define this in the struts-config.xml? > > I'm using tiles, so in the tiles-config it looks like this: > <definition name=".testForm" extends=".main.layout"> > <put name="left" value="/pages/left.jsp" /> > <put name="body" value="/pages/test.jsp" /> > </definition> > > In the struts-config.xml: > <forward > name="testForm" > path="/testForm.do"/> > ... > > <action > path="/testForm" > forward=".testForm"/> > > Where do I add the beans I need. And where do I load the data into > them? > If I add an action type, how do I forward it? > <action > path="/testForm" > type="test.TestAction" > forward=".testForm"/> > > In the test action class I can load the data into beans, I suppose; > public ActionForward execute( > ActionMapping mapping, > ActionForm form, > HttpServletRequest request, > HttpServletResponse response) { > HashMap items = getItems(); > //request.setAttribute("items", items); > //servlet.getServletContext().setAttribute("items", items); > HttpSession session = request.getSession(); > session.setAttribute("items", items); > > return mapping.findForward("testForm"); > } > > I could connect to the database and populate a HashMap in the getItems > method. > But what about the findForward? Doesn't that lead back to the very > same action - like an iternal loop? > If so, do I need to create a new action, that forwards to this one? > > <action > path="/testForm" > type="test.TestAction" > forward=".testForm"/> > .. > <action > path="/testForm2" > forward=".testForm2"/> > .. > return mapping.findForward("testForm2"); > > > I guess there is no use to continue before I got these things sorted > out. > > > Thanks in advance for your help! ============================================================================== TOPIC: Wonderful Laptop for Java Programmer http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/c12d5b3538fa2322 ============================================================================== == 1 of 1 == Date: Wed, Dec 15 2004 10:09 pm From: Joona I Palaste Morten Alver <[EMAIL PROTECTED]> scribbled the following: >> Everyone here makes well over a 100 grand a year, >> so we already have everything we need... > 100 grand? In what currency? Turkish liras? -- /-- Joona Palaste ([EMAIL PROTECTED]) ------------- Finland --------\ \-------------------------------------------------------- rules! --------/ "'It can be easily shown that' means 'I saw a proof of this once (which I didn't understand) which I can no longer remember'." - A maths teacher ============================================================================== You received this message because you are subscribed to the Google Groups "comp.lang.java.programmer" group. To post to this group, send email to [EMAIL PROTECTED] or visit http://groups-beta.google.com/group/comp.lang.java.programmer To unsubscribe from this group, send email to [EMAIL PROTECTED] To change the way you get mail from this group, visit: http://groups-beta.google.com/group/comp.lang.java.programmer/subscribe To report abuse, send email explaining the problem to [EMAIL PROTECTED] ============================================================================== Google Groups: http://groups-beta.google.com
