Re: new line char in xml
You can also try using the xml new line character " " (possibly with the carriage return too if you need it- " "). I like this better than \n as the & and ; really set off that you are using a special character. Retain this document in your official grant file. "/> BAL From: temp temp <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" To: Struts Users Mailing List Subject: Re: new line char in xml Date: Thu, 26 Oct 2006 10:53:25 -0700 (PDT) Here is my xml could you tell me how to put new line char?. Here is my xml Retain this document in your official grant file. "/> Li <[EMAIL PROTECTED]> wrote: have you tried "\n"? it should work On 10/27/06, temp temp wrote: > > I have some text in xml file which I will show in a text area to > edit . I don't know how to specify a new line char in xml. Currently I am > using tag instead of a new line char .Using works in jsp > but a text area displays them as which would confuse user > .So I need to put the new line char in xml which will be understood by > the browser as new line .Please somebody guide me how to put new line char > in xml. > regards > Miro > > > > - > Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great > rates starting at 1¢/min. > -- When we invent time, we invent death. - Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: banned
Good point, assuming that what Mark says is true, that he was fired, this is all bad. I recognize your need to ban people and if it helps improve the signal to noise ratio on this list, I'm all for it. I also recognize that we are all responsible for what we say here. Both the first time around through email and the second time around in the archives. But in this instance, Mark doesn't have only himself to blame. Someone sent his comments to his workplace and resulted in him being fired. I've worked will some major jerks over the years who wrote great code, slung great servers, etc etc. Just because someone's has unpopular views or is terribly annoying or extremely frustrating or whatever does not justify maliciously alerting their employers. This just leaves a bad taste in my mouth. All you need to do is to create a filter and individuals can ban anyone they want. The email to MD dept of elections is spiteful and childish and way more damaging to the struts community than any bigoted and/or stupid posts. BAL From: Craig McClanahan <[EMAIL PROTECTED]> To: Struts Users Mailing List CC: Niall Pemberton <[EMAIL PROTECTED]> Subject: Re: banned Date: Wed, 6 Jul 2005 20:24:14 -0700 On 7/6/05, Brian Lee <[EMAIL PROTECTED]> wrote: > Wow, this is shockingly lame. Like amazingly lame. To mess with someone's > livlihood because you think they are an jerk is inexcusable. > Keep in mind that, if Mark indeed did get fired (he has *no* credibility with me, so I don't believe anything he says without corroboration) then he has only himself, and his own behavior, to blame. Acting the way he does, on a public mailing list (which is certainly accessible to his boss whether or not someone points him at it) is incredibly stupid, and doing so from his employer's email system is way beyond stupid -- and it was only a matter of time before he got called on it. I didn't forward the email trail, but I can absolutely understand Niall's frustration with the behavior of an idiot. I'll take Niall with one "fit of frustration" lapse *any* day over several of the people that think the Struts user mailing list is their private playground to have a "I can be more outrageous and infantile than you can" pissing contest. The next time around, I'm going to be inclined to ban people soon after a spate of continuous crap like this (assuming requests to change behavior don't work). It's a losing battle against a determined jerk (because its easy to just get a new address) -- but (since Mark got it wrong yet again) -- I didn't ban him, but I would not complain if one of the other mailing list moderators had (they didn't ban his gmail address, or you wouldn't have been able to see his latest comment). Actually, as I told him, it would suit me just fine if he simply went away. I know there are a few people here who find Mark to be funny (I'm *not* a part of that group). That's fine ... it's a free world ... but please go find him funny somewhere else. There are ***lots*** of people who find him annoying and disruptive instead of helpful -- and, to the extent that this behavior encourages others to leave the list, it harms the Struts community as a whole. Craig McClanahan - 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: banned
Wow, this is shockingly lame. Like amazingly lame. To mess with someone's livlihood because you think they are an jerk is inexcusable. BAL From: "Niall Pemberton" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Subject: Re: banned Date: Thu, 7 Jul 2005 03:10:08 +0100 I cc'd them on the message I sent to this list in a moment of madness at the rubbish arriving in my inbox and which I now regret. http://www.mail-archive.com/user%40struts.apache.org/msg29119.html Niall - Original Message - From: "blah blah blah" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Thursday, July 07, 2005 2:06 AM Subject: Re: banned I am absolutely NOT kidding. The point is NOT that I was using my government email address to subscribe to a technical mail list. Nor is it that I was posting irreverent nonsense. The point is that somebody on this list copied selective posts with my government email address in the subject line and then notified the State agency in which I was employed. The archive clearly show who did this, and was a dispicable act and violation of Net ethos. Never before in 20 years of using the Internet for communication have I heard of anybody doing something like this. I signed back on to struts-user to find out what is happening with struts these days. Those of you who have known me on this list (and others, and personally) for years know that my sense of humor (or lack thereof) is abrasive, but never was any harm meant. What is next? DOS attacks on IP addresses by people who disagree with the committers? I was helping people learn struts on this list before most of the present subscribers knew Java; I have an acknowledgement in Chuck Cavaness' O'Reilly book, "Programming Struts;" I'm the one who started the [FRIDAY] humor posts, remember? Look in the archive for the subject with "[EMAIL PROTECTED]" in it and you can see for yourself who did this. Watch what you say and where you say it from - you could be next. It looks like I have been banned from the list; Craig says he approves. ~mark James Mitchell wrote: > You are kidding right? > > > -- > James Mitchell > Software Engineer / Open Source Evangelist > Consulting / Mentoring / Freelance > EdgeTech, Inc. > http://www.edgetechservices.net/ > 678.910.8017 > AIM: jmitchtx > Yahoo: jmitchtx > MSN: [EMAIL PROTECTED] > Skype: jmitchtx > > > > On Jul 6, 2005, at 10:19 AM, Mark Galbreath wrote: > >> Thanks to whomever emailed last weeks nonsense thread to the Director >> of the Board of Elections. It made me look like a racist and I was >> fired this morning. The State is also looking into whether my use of >> an official email address for that discussion is in violation of state >> law. You did your work well, you low-life bastard. >> >> Signing off >> Mark >> >> On 6/30/05, Thai Dang Vu <[EMAIL PROTECTED]> wrote: >> >>> 3) "Struts! It's not just for H-1Bs!" >>> >>> So, I can get a H1B just by learning Struts and use it decently? :) - 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: [OT] Re: Fired???? was...Re: Struts Books Recommendations [OT]
Actually, in the US we have laws against age discrimination or discrimination based on race, religion, creed or nationality. These are termed "protected groups" under US labor law. If you were fired for one of these reasons, gather up some evidence and sue your way to wealth in the civil courts. BAL From: "Martin Gainty" <[EMAIL PROTECTED]> Reply-To: "Martin Gainty" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Subject: Re: [OT] Re: Fired was...Re: Struts Books Recommendations [OT] Date: Wed, 6 Jul 2005 20:14:51 -0400 Unfortunately in the US you can be canned for being too old or having the wrong religious views we have a ton of laws on the books but they are unenforced My question is how do I (an older engineer with politically incorrect views) get work in Germany Vielen Danke, Martin- - Original Message - From: "Christian Bollmeyer" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Wednesday, July 06, 2005 7:31 PM Subject: Re: [OT] Re: Fired was...Re: Struts Books Recommendations [OT] On Wednesday 06 July 2005 19:48, Rick Reumann wrote: Hi, Daniel Perry wrote the following on 7/6/2005 12:49 PM: > Hah, it's the business use of web/email they fire you for. Go read > your terms of employment, and the reference to "IT acceptible use > policy" that you inadvertantly agreed to. (the below has nothing to do with Mark).. For the record, I'm not against an employer firing an employee for 'whatever' reason they deem fit. If they don't like the way you wear your hair, I think they should have the right to fire you if they want. (The public also has a right to know about it based on the use of the press etc). Now though I'm clearly not in the position to get fired anytime soon, I still think as long as I'm doing my job right and don't blame the company I work for, what I do in my leisure time is not my employer's business. Including my haircut, age, religious beliefs or whatever. What I sell are my skills, work performance and last but not least a significant part of my lifetime, but neither my soul nor my private life. In Germany, it's not quite that easy to get rid of someone who, lets say, just got older because of working for you. And I think this is just. Stealing silver spoons, including deliberately breaking company rules in terms of e-mail usage and the like is another issue. Personally, if I owned a company and someone was using the company email domain name to post on sites such as "swingers" or "transvestitepride," I think I should have right to terminate his or her's employment. What I have a problem with is ... 1) The inconsistency in what is protected. For example everyone today talks about "tolerance." But what does this mean? What it ends up meaning is "There are no moral absolutes so the only valid belief system protected is one that doesn't espouse moral judgments." But what about being tolerant to the idea that someone might feel otherwise? Why is state sanctioned secularism the only valid religion (and yes secularism is a belief system - a religion). It's sort of funny that those whom often claim to be the most 'tolerant' are often the most vicious when it comes to attacking someone that disagrees with their view of "tolerance." There are many views I could state that would get me labeled as being 'intolerant,' yet, somehow it's supposedly not offensive to state "All views on X,Y,orZ are equally acceptable." To me, and many others, that later position can be considered extremely offensive. Why is only one view (secular humanism) considered 'non offensive' but other religious views are some how bigoted and intolerant. It's pure hypocrisy. In Germany, in a major part thanks to the US (I mean it!), religious freedom, for instance, is granted to everyone in our Constitutional Law (Art. 4 GG). Getting fired just because of one's religious views is impossible by law. So I, who believes in Jesus Christ as my personal saviour and follows the Bible as his above-all-worldly-wisdom guide can happily work together with Hindus and common atheists, in- cluding my boss. I can even tell them if they're on the road to eternal doom, the same as they may tell me I'm ridiciously wrong, and still keep my job. And in fact, the Bible is quite intolerant when confronted with modern secularism, but what's my choice? As for general opinions and secular beliefs, we have Art. 5 GG which grants freedom of speech. So there's no need for hypocrisy here at all. On the other hand, I definitely never would use a company e-mail address for anything other than business communication, and whoever deliberately chooses to do otherwise may just have to face the fruits of his dauntness. Or his dumbness, if you will. 2) Someone taking the time on the list to 'complain' to someone's employer. Sure you have the right to do so, but I think it's lame. Quality never goes out of style, but good manners may. Possibly a matter of education and attitude. I won't judge. -- Chri
RE: [OT] Stinking IDEs
I've noticed over the years that people who start IDE threads are unappreciated. I've also noticed that programmers who talk about how other programmers are the worst, are the worst programmers. Real programmers are too busy fixing the worst programmers to complain. BAL From: "Mark Galbreath" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Subject: [OT] Stinking IDEs Date: Wed, 29 Jun 2005 16:06:18 -0400 I have noticed over the years that those who are the most adamant about the virtues of IDEs are the worst programmers...and think emacs is a kid's meal from McDonalds. ~mark -Original Message- From: Yan Hu [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 29, 2005 1:33 PM To: Struts Users Mailing List Subject: Re: Is there any Jsp template like Smarty template ? > > http://uab.blogspot.com/2005/06/ides-we-dont-need-no-stinking-ides.html It is the most stupid blog I have ever seen. Go back to the cave where you belong to. Maybe we should ask MS guys to use vi and Emacs too. Why do some people call them "real programmers" just because they do not like IDEs? Why 85% of the Java developers use Eclipse? You think they are all wrong and you are right? You should be thankful since Eclipse is such a good IDE and it is free. Haa. I know when you get too old, you tend to hate anything new due to uncertainty that the new technologies might bring to you Hey that is understable that you might still want to use Cobol or even assembly.. Why do you want to program in java anyway? You could do a lot more(control) using assembly than Java as you could program in the stinking text editors such as vi and Emacs. They suck big time. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] *** This email and any file transmitted with it may be confidential and is intended solely for the use of the individual or entity to whom it is addressed. If you received this email in error please notify the DBM Service Desk by forwarding this message to [EMAIL PROTECTED] This email has been scanned by networkMaryland Antivirus Service for the presence of computer viruses. This email and any file transmitted with it may be confidential and is intended solely for the use of the individual or entity to whom it is addressed. If you received this email in error please notify the DBM Service Desk by forwarding this message to [EMAIL PROTECTED] This email has been scanned by networkMaryland Antivirus Service for the presence of computer viruses. - 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: [FRIDAY] package naming nonsense
Nope, this guy was from San Diego. He had many other pearls of wisdom. My favorite was when he designed a system that would dynamically load an EJB bean implementation at run-time. He wasn't using delegates or proxies or anything coded, he wanted to use deployment descriptors. That was a fun one to peer review. BAL From: [EMAIL PROTECTED] To: "Struts Users Mailing List" CC: [EMAIL PROTECTED],user@struts.apache.org Subject: Re: [FRIDAY] package naming nonsense Date: Fri, 17 Jun 2005 10:32:29 -0400 By chance, was his name "Adam Hardy"? ;) "Brian Lee" <[EMAIL PROTECTED]> 06/17/2005 09:52 AM Please respond to "Struts Users Mailing List" To [EMAIL PROTECTED], user@struts.apache.org cc Subject Re: [FRIDAY] package naming nonsense That's pretty much the reasoning I always got behing. This remings me of a funny time a consultant suggested removing all the "com." from our package names in order to "save 4 bytes" from each class file. BAL >From: Hubert Rabago <[EMAIL PROTECTED]> >To: Struts Users Mailing List >Subject: Re: [FRIDAY] package naming nonsense >Date: Fri, 17 Jun 2005 07:09:24 -0500 > >IIRC, it really was the possibility of mix-ups that was the idea >behind using TLDs for package names. At least with TLDs, one can >reasonably assume that the groups sharing the same TLD could work out >organizing package naming conventions amongst themselves. Without the >convention, the IT groups of widget.com and widget.org would just have >to hope that they never have a common customer, or they never work on >any package with the same name. > >The problem about unique names doesn't apply to JAR files because you >can just rename them. > >Let's at least be thankful we don't have to use URIs >(http://www.xml.com/pub/a/2005/04/13/namespace-uris.html). :) > >Hubert > > >On 6/17/05, Adam Hardy <[EMAIL PROTECTED]> wrote: > > Since it's Friday and I'm just about to start a new project, I thought > > I'd ask everyone what they think about something that's always bugged >me. > > > > Package names in Java. Why do we all have com.blah.blah or > > org.apache.stuff.xxx instead of just plain blah.blah.blah and > > apache.stuff.xxx? > > > And even if there is, why is the mix-up possibility so important when it > > comes to package names, when it's not considered when it comes to jar > > naming conventions. If there ever was a com.apache.struts, what would > > they call their jar? Would they have to use com_struts-1.2.7.jar > > > >- >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: [FRIDAY] package naming nonsense
That's pretty much the reasoning I always got behing. This remings me of a funny time a consultant suggested removing all the "com." from our package names in order to "save 4 bytes" from each class file. BAL From: Hubert Rabago <[EMAIL PROTECTED]> To: Struts Users Mailing List Subject: Re: [FRIDAY] package naming nonsense Date: Fri, 17 Jun 2005 07:09:24 -0500 IIRC, it really was the possibility of mix-ups that was the idea behind using TLDs for package names. At least with TLDs, one can reasonably assume that the groups sharing the same TLD could work out organizing package naming conventions amongst themselves. Without the convention, the IT groups of widget.com and widget.org would just have to hope that they never have a common customer, or they never work on any package with the same name. The problem about unique names doesn't apply to JAR files because you can just rename them. Let's at least be thankful we don't have to use URIs (http://www.xml.com/pub/a/2005/04/13/namespace-uris.html). :) Hubert On 6/17/05, Adam Hardy <[EMAIL PROTECTED]> wrote: > Since it's Friday and I'm just about to start a new project, I thought > I'd ask everyone what they think about something that's always bugged me. > > Package names in Java. Why do we all have com.blah.blah or > org.apache.stuff.xxx instead of just plain blah.blah.blah and > apache.stuff.xxx? > And even if there is, why is the mix-up possibility so important when it > comes to package names, when it's not considered when it comes to jar > naming conventions. If there ever was a com.apache.struts, what would > they call their jar? Would they have to use com_struts-1.2.7.jar > - 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: How to make HttpSession thread-safe????
You can put an object in session and lock on it using synchronized. But this won't work over a cluster. BAL From: "leonnewsgroup" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Subject: How to make HttpSession thread-safe Date: Sat, 9 Apr 2005 15:26:30 -0400 Hi All, Quick question, What is the strategies to make HttpSession thread-safe? Thanks. Leon - 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: image challenge?
Check out the gmail.com link for attach file. It gives the functionality through a link. If you can figure that out then you can replace the link text with an image. BAL From: Michael McGrady <[EMAIL PROTECTED]> To: Struts Users Mailing List <[EMAIL PROTECTED]> Subject: image challenge? Date: Tue, 28 Sep 2004 20:11:09 -0700 There is, I understand, a challenge on the Internet to get code to allow the use of images with , or the famous "browse" button. I don't know if this is true, but, if it is, there is a solution at www.michaelmcgrady.com under "coding ideas". Any feedback would be appreciated. There is some code on the sample page that is peculiar to my applications and my application taglibs. However, they are easily replaced by standard Struts tags which do less but work fine for this example. The cool thing is that this problem actually IS unsolvable, and, once you realize that, a solution is easy. He he he! An honorable member of these lists, who will remain unnamed, has vowed to bow at the altar of my greatness, if I did this. Shoot, and here I am without such an altar. I have a cereal bowl? Would that do? He he he! Cheers, Micheal McGrady - 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: Read only iterate?
Lists work, but you have to write your own set(int index) method to set the correct object from the List. BAL From: "Jim Barrows" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>,<[EMAIL PROTECTED]> Subject: RE: Read only iterate? Date: Fri, 13 Aug 2004 09:40:27 -0700 > -Original Message- > From: Mike Elliott [mailto:[EMAIL PROTECTED] > Sent: Friday, August 13, 2004 9:33 AM > To: [EMAIL PROTECTED] > Subject: Read only iterate? > > > I've been totally defeated in my attempt to alter an html:text > element inside a logic:iterate tag. There must be a way to > accomplish this, but I've been beating my head against the wall > for three days now without making progress. > > I have simplified the problem substantially from the initial page. > What I have now looks like this: from http://struts.apache.org/userGuide/struts-html.html#text I'm guessing that a List won't work and you need to have an array. > >- > [ Submit ] >Problematic Input [0 ] >Problematic Input [1 ] >Functioning Input [A Value ] >- > > The lines containing "Problematic Input" were generated by a > logic:iterate tag, which successfully fetched the list of objects from > the form bean. The last line, containing "Functioning Input", was > generated outside of the logic:iterate tag. Actual contents of the > jsp page, bean, etc., are attached. > > What happens at runtime is that when the JSP page is rendered, the > text fields for all three rows are successfully and correctly fetched > from the form bean, but only the last row can be changed. As the log > shows: > > > INFO [org.apache.struts.util.PropertyMessageResources] > Initializing, > config='org.apache.struts.taglib.html.LocalStrings', returnNull=true > INFO [problem.ProblemBean] initializing entries > INFO [problem.ProblemBean$ProblemItem] setInteger_value to 0 > INFO [problem.ProblemBean$ProblemItem] setInteger_value to 1 > INFO [problem.ProblemAction] show > INFO [org.apache.struts.util.PropertyMessageResources] > Initializing, > config='org.apache.struts.taglib.logic.LocalStrings', returnNull=true > INFO [problem.ProblemBean] getEntries > INFO [problem.ProblemBean$ProblemItem] getInteger_value > INFO [problem.ProblemBean$ProblemItem] getInteger_value > INFO [problem.ProblemBean] getWorking_perfectly > > INFO [problem.ProblemBean] setWorking_perfectly to 'mutated' > INFO [problem.ProblemAction] update > INFO [problem.ProblemBean] getEntries > INFO [problem.ProblemBean$ProblemItem] getInteger_value > INFO [problem.ProblemBean$ProblemItem] getInteger_value > INFO [problem.ProblemBean] getWorking_perfectly > > The page is initialized properly. All three values are fetched from > the form bean via the expected get methods. The html form is properly > populated and displays the expected values (0, 1, and "A Value"). > > The three fields are then changed (to 5, 5, and "mutated") and the > submit button is selected at the point in the log file where I have > inserted the annotation. > > This causes the form to be submitted to the Action, causing the set > method for the field "working_perfectly" to be invoked (as it should > be), but the set method for the two fields in the logic:iterate tag is > not invoked. And I don't know why. And I can't seem to get them to > be invoked, either. > > So . . . the magic isn't working. Something must be needed to tell > the generated servlet not to treat these two properties (inside the > logic:iterate tag) as read-only. What should it be? How can I get > these properties to be updated in the form bean as the > "working_perfectly" property is? > > Like I said -- I've been beating my head against this problem for > three days now. There's just got to be a way! > > -- > struts-config.xml > -- > > >"-//Apache Software Foundation//DTD Struts > Configuration 1.0//EN" > > "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";> > > > > > name="problemBean" > type="problem.ProblemBean"/> > > > > path="/problemPage" > type="problem.ProblemAction" > name="problemBean" > validate="false" > input="/pages/problem.jsp"/> > > > > > -- > problem.jsp: > -- > <%@ taglib uri="/taglib/struts-logic" prefix="logic" %> > <%@ taglib uri="/taglib/struts-html" prefix="html" %> > > > Problem page > > > > >method="post"> > cellpadding="0"> > >
Re: [OT] how to calculate the size of an object
If you run this from a simple console test app, the JVM won't allocate any extra objects between 2 and 4. Unfortunatly, this is the most exact way to find out memory usage (serialization size doesn't necessarily mean in memory size). Just wait til those slackers at Sun at a Object.sizeof() method in jdk1.9 or something lame. BAL From: Navjot Singh <[EMAIL PROTECTED]> To: Struts Users Mailing List <[EMAIL PROTECTED]> Subject: Re: [OT] how to calculate the size of an object Date: Thu, 08 Jul 2004 22:16:12 +0530 hi, Thanks for the link but this is very naive way of doing it. I am leaving it to the mercy of gc. What this method is doing 1. run gc() manually (AND hope it wont run automatically again soon.) 2. free memory 3. create and object. 4. free memory and now just wish that JVM wont allocate any memory in it's heap between steps 2 & 4. so that one can assume that whatsoever output comes belongs to my object. I am at something better. Jim you are absolutely right, this technique may return a negative number. navjot singh [EMAIL PROTECTED] wrote: http://www.google.com/search?hl=en&lr=&ie=UTF-8&q=size+java+object The first one looks promising. Dennis *Navjot Singh <[EMAIL PROTECTED]>* 07/08/2004 11:57 AM Please respond to "Struts Users Mailing List" <[EMAIL PROTECTED]> To Struts Users Mailing List <[EMAIL PROTECTED]> cc Subject [OT] how to calculate the size of an object hi, I use SAX parser to load an LDIF file into memory. Whatsoever data i read, i fill into an object. I need to know *the size of LDIFData object* at runtime. How to do that? Well the class structure is something like this public class LDIFData{ ArrayList cards; // collection of Card String filename; long lastLoadedTime; } public class Card{ String name; String email String mobile; } -- regards Navjot Singh When you jump for joy, beware that no-one moves the ground from beneath your feet. -- Stanislaw Lem, "Unkempt Thoughts" - 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] -- regards Navjot Singh When you jump for joy, beware that no-one moves the ground from beneath your feet. -- Stanislaw Lem, "Unkempt Thoughts" - 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: Theoretical debate
I think struts' concept of separating your actions from your data is admirable and should be followed. The concept of your value/transfer objects (basically the form) also having business logic sounds acceptable at first but rapidly becomes a nightmare when you try to use the same value/transfer objects in multiple processes. I think it's a generally accepted practice that separating data from logic is a "Good Thing"(tm). BAL From: "Hookom, Jacob" <[EMAIL PROTECTED]> To: 'Struts Users Mailing List' <[EMAIL PROTECTED]> Subject: RE: Theoretical debate Date: Thu, 17 Jun 2004 14:57:31 -0500 I completely agree with what Crysalis is trying to push, also a framework called VRaptor (vraptor.org) also pushes the same idea of moving away from the procedural weight that Struts promotes. Look at JSF, do you have actions? No, JSF just updates your POJO beans and calls methods on them. Why have an ActionForm or have to create all of these Actions that are simply getter/setter adapters? Please don't be too quick to retort to my supposed anti-struts mindset, but there are other frameworks out there that allow direct interaction with my business objects and don't require a heck of a lot of framework specific coding. --- Example: To have a multi-page form with JSF, I just create a bean that sits in Session scope that has a series of getters and setters. JSF will also allow me to pre-set relationships to other objects at creation time. Then, when I'm ready to submit the multi-page form, I just put in the jsp #{myFormBean.submit}. No action mappings, only a managed bean entry. With Struts, I have to create an ActionForm objects (can't just use a business object I already have), and then create separate Action objects to manipulate that ActionForm. --- -Jacob Hookom -Original Message- From: Frank Zammetti [mailto:[EMAIL PROTECTED] Sent: Thursday, June 17, 2004 2:29 PM To: [EMAIL PROTECTED] Subject: Theoretical debate Last night I was Googling for something and I stumbled across the Crysalis framework. I was actualyl intrigued by the underlying premise of it and I wanted to see what others thought about it. In a nutshell and in my own words, Crysalis (http://chrysalis.sourceforge.net/) has the underlying idea that when you develop in most MVC frameworks, Struts chief among them, you are actually doing something unnatural and in a way at odds with basic OOP design. Think about a shopping cart example... If you were going to write that in straight Java, not for the web or anything, how would you model it? Most likely you would have a ShoppingCart class with a number of methods in it, things like addItem(), removeItem(), totalPrice(), etc. In Struts, although you aren't FORCED to, what you GENERALLY do is create three different Action classes like addItemAction, removeItemAction and totalPriceAction, and each is called in response to a form submission. But isn't it kind of odd that your object model isn't following what you probably think in your head is the right way, i.e., one class with multiple related methods? Proper encapsulation and all that jazz, right? Well, Crysalis does just that. It's controller elements are regular Java classes with multiple methods. What you wind up with is something that resembles Remote Procedure Calls instead of numerous servlets as controllers. In other words, you would create the ShoppingCart object just as I described above, with all three methods. Then, when you submit a form, the action is something along the lines of "ShoppingCart.addItem.cmd". ShoppingCart is the class to execute, addItem the method and cmd is a suffix to direct the request, just like extensions in your Struts apps map requests to ActionServlet. The elements of the submitted form are treated as the parameters of the method being called, making it rather elegant. I haven't gotten into any real detail on Crysalis, but I was interested in getting other peoples' thoughts on the underlying principal (which I *THINK* I've stated properly!). It was rather interesting to me because I'd never reall considered looking at it that way, and certainly it's not the way you typically approach a Struts-based application. It was also interesting to me because I've for about four years now been preaching here at work that we should write our applications as a collection of services that are executed to form a coherent larger application, which is very much along the lines of this (so I guess I actually HAVE looked at it this way in a sense, but not exactly). Any thoughts? Frank _ Watch the online reality show Mixed Messages with a friend and enter to win a trip to NY http://www.msnmessenger-download.click-url.com/go/onm00200497ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: struts is giving error on weblogic81
What exception do you see in the myserver.log or in the console out? Do you have the dbcp and oracle classes jar in your weblogic classpath? BAL From: Jignesh Patel <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: struts is giving error on weblogic81 Date: Mon, 17 May 2004 20:18:33 +0530 We are trying to deploy struts1.1 based application on weblogic8.1 which is already working fine on tomcat5.19. But it is giving problem because of following datasource code, if we remove it then we are not able to get the oracle database connection and if keep it, the code is not deploying ActionServlet. Does any body is having same kind of problem? Data source code in struts-config.xml - 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: Storing global data in the servletContext
OK, that makes a bit more sense. I guess I got thrown by your "It sounds like you are the use case for EJB!" statement that I thought when you said bean in the next sentence you meant EJB. Also, I believe that some application servers will cluster the servlet context along with the httpsessions. BAL From: Joe Germuska <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Subject: Re: Storing global data in the servletContext Date: Sun, 9 May 2004 09:05:13 -0500 At 9:37 AM -0400 5/9/04, Brian Alexander Lee wrote: That's interesting, so you recommend having an EJB (running in the ejb container) to manage data put into user sessions and servlet contexts (running in the web container)? I wouldn't go that far -- but then again, I'm not much of an EJB developer either. Never needed 'em. What's the advantage to this technique? It's shared between clusters, and the ServletContext is not. That was the original question -- how to share things that are "application scoped" in a clustered environment. Looking back at the original email, I would guess that the things read from XML config files could pretty safely be stored in each ServletContext -- assuming they don't change after initialization -- drop down menus seem to fit that description. My other statement, about "using one bean to manage everything in an application context" certainly didn't mean one *enterprise java* bean. Like I said, I don't use 'em. But if you have a bunch of things that go into the application context, you may find it cleaner to make one "Application" bean which goes into the application context and which stores all those other things as properties. Then you never have to worry about making sure all accesses into the context use the right name, except for one object, and you get type-safety as much as you want it, and you have a clear interface for your application object which you could use in testing, etc. Joe -- Joe Germuska[EMAIL PROTECTED] http://blog.germuska.com "Imagine if every Thursday your shoes exploded if you tied them the usual way. This happens to us all the time with computers, and nobody thinks of complaining." -- Jef Raskin - 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: forwarding to a pop-up window
For your tag, set the target to a window name, then when you submit, call a javascript function that opens a new window with the same name. This will submit all the values from the current page into the targetted new window. I think you can also just do and it will submit into a new blank html window but you won't be able to set the size or the properties of the new window like you can with window.open(). BAL From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: forwarding to a pop-up window Date: Mon, 3 May 2004 09:49:45 -0500 Hi, I'm new to struts. I have a JSP form which when submitted, needs to open a pop-up window that will display a confirmation message after processing is complete. How would I do this? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Check out the coupons and bargains on MSN Offers! http://youroffers.msn.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
I18N problems
I've got a site that we're trying to deploy in Japanese. We're using struts message tags everywhere with property resource bundles for all the labels and text. The only text that doesn't come from the resource bundles comes from the database. The problem is that IE doesn't display the text properly. When we don't set the content-type to UTF-8, the text from the database shows up properly but all of the text from the message tags shows up garbled. Also, if we put japanese characters directly in the JSP outside of scriplet tags, it is displayed as garbled in both the browser and view source. When we do set the content-type to UTF-8, all of the text from the message tags shows up properly but all of the text from the database shows us garbled (html tags are also screwed up because the browser thinks part of the Japanese is a "<" so instead of "" view source only shows "/a>"). We tried running the properties files through the native2ascii utility from the jdk to convert all the japanese characters to \u but IE treats that as the literal text and tries to display "\u". We need to get both the message tag text and other text to show up properly as japanese. Has anyone else experienced this problem? If so how did you solve it? Thanks, BAL _ Tax headache? MSN Money provides relief with tax tips, tools, IRS forms and more! http://moneycentral.msn.com/tax/workshop/welcome.asp - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Calling one action from another - removing request parameters
Note that redirecting is less efficient than forward as it involves a additional http response and request. So forward will be faster and less processor intensive. BAL From: "Daniel Perry" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Subject: RE: Calling one action from another - removing request parameters Date: Mon, 5 Apr 2004 16:05:45 +0100 If you forward between actions without actually redirecting the browser, then the parameters remain intact! If you set redirect to true, then the request will be redirected at the browser level, and parameters will be cleared. Daniel. -Original Message- From: James MacKenzie [mailto:[EMAIL PROTECTED] Sent: 05 April 2004 16:01 To: [EMAIL PROTECTED] Subject: Calling one action from another - removing request parameters Hi All, I am having a small problem with Struts. If my application calls say something1.do?row=10 and the result of this calls another action servlet ie something2.do with no request parameters, something2Action is still able to see request.getParameter("row"). Does anyone know why is this happening and is there a way of fixing it? Thanks! - 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] _ Get rid of annoying pop-up ads with the new MSN Toolbar FREE! http://toolbar.msn.com/go/onm00200414ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]