comp.lang.java.programmer http://groups-beta.google.com/group/comp.lang.java.programmer [EMAIL PROTECTED]
Today's topics: * Sockets - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/edecab678cd31cd6 * [OT] Using hobby source code in your job ? - 4 messages, 3 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a60dfe865a7807c4 * Java method - 3 messages, 3 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/7e41087585d0c108 * Blackberry and web services - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/568d012c03001dd4 * Can Java Programmer Learn C++ Quickly? - 3 messages, 3 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/7c7a28aa864e41ec * Beginning EJB - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d49babfdb472b21c * Thoughtsworks Job Interview? - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/65e47be2d93e5821 * "static" prefix - to parallel "this" prefix - 2 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f5dde10882ac2157 * how to compile applet checking plugin ver - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f43ee7ba8993160a * Tomcat 5, EL Expressions in jsp:inlcude - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/4da7307e1d9d37b9 * can't find class file - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/41f61eb9d8c24f1c * How to initialize a big (String-)Array fast? - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/7a849e4e56de0eae * JOB: J2EE / J2ME platform development in LA - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2343840e9f8b5848 ============================================================================== TOPIC: Sockets http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/edecab678cd31cd6 ============================================================================== == 1 of 1 == Date: Mon, Dec 6 2004 10:21 pm From: "FunkyKarma" > But what will be the *content* of the communication? > C programmers tend to want to just send structs, which is not portable. The content doesn't matter. Sending a struct is not a problem. On the receiving end you just have to know what bytes were written onto the wire. It doesn't matter at all if those bytes where part of a struct data structure on the sending side. The "struct" doesn't get sent, but the bytes that make up the struct does. ============================================================================== TOPIC: [OT] Using hobby source code in your job ? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a60dfe865a7807c4 ============================================================================== == 1 of 4 == Date: Mon, Dec 6 2004 10:23 pm From: Mark McIntyre On Mon, 06 Dec 2004 01:10:09 GMT, in comp.lang.c , "Andrew Koenig" <[EMAIL PROTECTED]> wrote: > >If your employer changed their mind about this policy, there wouldn't be >much you could do about it short of leaving. Under UK and EU law, they can't do that without asking you to sign a new contract, and you have no obligation to do so. Furthermore they can't dismiss you for refusing. >So it's not really your time--it's time that they are letting you have at >their discretion. When you have children, you realise that there is no such concept as "your" time..... -- Mark McIntyre CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html> CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt> == 2 of 4 == Date: Mon, Dec 6 2004 3:26 pm From: Jim P Martin Harvey (Demon account) wrote: > On Sun, 05 Dec 2004 00:17:36 -0800, Jim P <[EMAIL PROTECTED]> > wrote: > > > >>You are only one part of the company and a small part of it. > > > This is true, but the previous poster does have a point. People's > remuneration is *not* linked to how much they contribute to the > company. It's just like any good old "dominance" social heirarchy - > because actual contribution and value is downright impossible to > quantify, you end up having a career ladder & pay scales, and all of a > sudden they right conditions exist for something like the Peter > principle to apply. > > He has another point which is that you are always paid less than you > are really worth. Why? Because if everyone was paid what their > contribution is really worth, the company would never make a profit. > It's that simple. > > Anyway, ditching all the rhetoric, it boils down to this: > > There is a tradeoff. The tradeoff is *risk*. You may say that your > employer is screwing you, but, the assumption is that a decent sized > organisation is less likely to have to ditch you than you are to make > a hash of your own start up. Not only that, but if things go belly up, > in a big company, you're not likely to be personally liable for > losses. > > Now, the reason the people at the top get paid loads is that > (ostensibly!) they're meant to have the market and financial judgement > to be able to chart a course for the company that keeps the numbers in > the black and the employees employed and paid - and here's the point: > if they *do* do that, then they're *worth* the (comparitively) large > salaries they're paid. > > What really annoys me is when they screw it up or show obvious signs > of having *no clue*, and *still* get paid that much. > > Anyways - practical advice: If you don't like being an "underpaid > minion", then start up your own company, and see what the other side > of the coin is like. Oh yeah, and be prepared to work 100 hour weeks > for the next 4-5 years. > > MH. I like that concept of 100 hours a week for the next 4 to 5 years. That is part of what the manager does. My dad owned his own business. and he would spend a lot of time simply thinking. and not all of during the work hours. - - - Believe me the good manager is thinking about cause and effect, schedules and that - - and not just 8 to 5. and the legal wording seems good and is what it should be. It has to be clearly done not on company time and not with company tools. and not something that relates to company business - - and that means that the compiler you used, at home - - is it your copy or one from work? But most will not go to that point. - - - but that is a tool. I also would not hide this from the boss or make an issue of it with the boss. To me an employee that has enough on the ball to be thinking and pondering other things besides work. - - is a good employee. I talked with an out of work engineer last spring. Asked him a couple of questions and decided that I would not hire the person. Only what he learned at school was he using. Asked about an other langauge such as VB and said he took C in school. As if you have to go to school to learn a langauge. And VB is easy to learn. This said a lot about the type of person and what his interest level is - - does he think of the job as 8 - 5 only or will he be pondering problems and issues after work also. Or does he totally turn off at 5. This is my job only. I person that is doing extra on his own time - for his hobby and other interest. That is a person that is of more interest to me as a programmer or engineer. Jim P. == 3 of 4 == Date: Mon, Dec 6 2004 3:30 pm From: Jim P Mark McIntyre wrote: > On Mon, 06 Dec 2004 01:10:09 GMT, in comp.lang.c , "Andrew Koenig" > <[EMAIL PROTECTED]> wrote: > >>If your employer changed their mind about this policy, there wouldn't be >>much you could do about it short of leaving. > > > Under UK and EU law, they can't do that without asking you to sign a new > contract, and you have no obligation to do so. Furthermore they can't > dismiss you for refusing. > > >>So it's not really your time--it's time that they are letting you have at >>their discretion. > > > When you have children, you realise that there is no such concept as "your" > time..... > AH, not quite but you are close on that. I have a great kid that I spend a lot of time with. Girl friends kid. and we work as a team. really a bright boy. 9 years old and already learning VB. I got him a book called Beginning programming for Dummies and he is reading it on his own and playing on the computer doing code. Asks questions and learns. - I do not live with his mother. SO a lot is done on his own. He wants to come over and spend a day watching me program in Delphi. - - I am going - ah huh. He is a quick learner. Show him once and he has it. and understands it. - - Jim P. == 4 of 4 == Date: Mon, Dec 6 2004 5:49 pm From: RCollins Andrew Koenig wrote: > "RCollins" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > >>Hmmm ... my company (Raytheon) has a well-defined and documented policy >>on what constitutes "my time" and "their time". This is contained >>within the "conflict of interest" company practices, and referenced by >>the company's "ethics standards" that all employees are required to >>learn (we are also required to get 'refresher' training in these >>subjects each year). > > >>Some weeks, my job requires me to work considerably more than the >>standard 40 hours ... but no one there would even *think* about taking >>my "hobby programming" from me without (a more than generous) >>compensation. > > > If your employer changed their mind about this policy, there wouldn't be > much you could do about it short of leaving. > So it's not really your time--it's time that they are letting you have at > their discretion. > > Not likely... most U.S. busniness are *not* the evil overlords that most science-fiction writers would have you believe. A modern engineering company (such as Raytheon) tries very hard to keep it's engineering staff happy and "well fed" with intersting projects. If I create something "on my own time" that the company wants, they will truly make me a very generous offer for that product. In 20 years, I have never heard of the company "comandeering" a hobby project from an employee. (Although I personally know of several people who earned an outstanding bonus or 'perk' due to hobby research they were pursueing on their own.) -- Ron Collins Raytheon Air Defense/RTSC/BCS ============================================================================== TOPIC: Java method http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/7e41087585d0c108 ============================================================================== == 1 of 3 == Date: Mon, Dec 6 2004 2:29 pm From: [EMAIL PROTECTED] (Ah Ming) Dear all, The following two cases are showing "same" method. If aMethod are defined as public and private, how can I implement it? At the same time, if both aMethod are public, how can I do? What is the difference when they are public or they are public and private? Kai Ming CASE 1: class ABC { public int aMethod(int a) { ...... } private void aMethod(int a) { ...... } } CASE 2: class ABC { public int aMethod(int a) { ...... } public void aMethod(int a) { ...... } } == 2 of 3 == Date: Mon, Dec 6 2004 5:58 pm From: "Rhino" "Ah Ming" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Dear all, > > The following two cases are showing "same" method. If aMethod are > defined as public and private, how can I implement it? At the same > time, if both aMethod are public, how can I do? What is the > difference when they are public or they are public and private? > > Kai Ming > > CASE 1: > > class ABC { > public int aMethod(int a) { > ...... > } > private void aMethod(int a) { > ...... > } > } > > CASE 2: > > class ABC { > public int aMethod(int a) { > ...... > } > public void aMethod(int a) { > ...... > } > } Neither of your two scenarios is possible. The documentation I have which discusses overloading methods within the same class says: "The overloading type of polymorphism occurs when you have the same method names with a class. You are allowed to do this as long as the methods have different numbers of parameters or different types of parameters. Having different return types does not count toward 'disambiguating' methods and won't help you if you need two methods that have the same names and parameters but return different types." In both of your cases, your methods have the SAME number AND type of parameters. In Case 1, the only difference between the two methods is the public/private and I don't see anything in the documentation that says the Java compiler uses that to distinguish between your first 'aMethod' and your second one. In Case 2, the return type is the only thing that distinguishes your first 'aMethod' and your second one but the documentation clearly states that the return type is not sufficient to distinguish between the two methods. As a result, the Java compiler is not going to let you create either case. You need to change your design so that you don't need to have two methods with exactly the same name and parameters. That shouldn't be too hard; just add a second parameter to one of the 'aMethod's and the compiler will stop complaining. Rhino == 3 of 3 == Date: Mon, Dec 6 2004 6:55 pm From: "Ryan Stewart" "Rhino" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "Ah Ming" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> Dear all, >> >> The following two cases are showing "same" method. If aMethod are >> defined as public and private, how can I implement it? At the same >> time, if both aMethod are public, how can I do? What is the >> difference when they are public or they are public and private? [...] > Neither of your two scenarios is possible. The documentation I have which > discusses overloading methods within the same class says: [...] As was explained by Joona some nine hours plus earlier. OP: Please keep discussion of the same problem in the same thread. You have now started three threads concerning the same topic. ============================================================================== TOPIC: Blackberry and web services http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/568d012c03001dd4 ============================================================================== == 1 of 2 == Date: Mon, Dec 6 2004 2:32 pm From: "nzpcmad" I want to extend my Blackberry application to access a back-end server via web services / SOAP. This doesn't seem to be part of the Blackberry IDE. Any 3rd party implementations? Any suggestions? Many thanks == 2 of 2 == Date: Mon, Dec 6 2004 6:16 pm From: "Darryl L. Pierce" nzpcmad wrote: > I want to extend my Blackberry application to access a back-end server > via web services / SOAP. This doesn't seem to be part of the Blackberry > IDE. > > Any 3rd party implementations? Any suggestions? Look at kSOAP for a MIDP solution. -- Darryl L. Pierce <[EMAIL PROTECTED]> Visit my webpage: <http://mcpierce.multiply.com> "By doubting we come to inquiry, through inquiry truth." - Peter Abelard ============================================================================== TOPIC: Can Java Programmer Learn C++ Quickly? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/7c7a28aa864e41ec ============================================================================== == 1 of 3 == Date: Mon, Dec 6 2004 11:40 pm From: Martin Demberger Hi, I think you would be able to program in C++ in a few days. But I a C++ programer sees this code you would say: Thats not C++ thats Java. C++-Programer have another pholosophy (don't know how to write this in english). You will even be able to write a simple C++ program before you can read a difficult one. An writing a good and real C++ program would take a very lot of time if it's not impossible. The problem of you wouldn't be the HOW, this can be read by any book, but the WHY NOT. Java has a lot of good (and also a little bad) contructs in the library. And the STL (Thats the JDK of C++) is a awfull in my opinion. The other problem is the memory concept. But if you can handle C you will be able to learn that very fast. It's easier than in C but you can also use more hacks. cu Martin P.S. I came from Pascal over C over C++ to Java. I wrote my diploma about C++ and Java, so I think I can write a little about those two languages. == 2 of 3 == Date: Mon, Dec 6 2004 5:05 pm From: Sudsy Rhino wrote: <snip> > I'd be very curious to know how long it took people here who were fluent in > Java to get fairly fluent in C++ if they started with approximately the same > skills I have today. I taught myself the fundamentals in a weekend. Weird stuff like templates took a bit longer. Granted, I had seen C++ many years ago but didn't like it as it didn't FORCE you to use object orientation. I wasn't surprised when Forester Research suggested that some 85% of "C++" was actually procedural C. -- Java/J2EE/JSP/Struts/Tiles/C/UNIX consulting and remote development. == 3 of 3 == Date: Mon, Dec 6 2004 6:50 pm From: "Ryan Stewart" "Rhino" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I realize that this is not entirely a Java question but I am hoping that > some of the people reading this newsgroup are Java programmers who went on > to learn C++. [...] > I'd be very curious to know how long it took people here who were fluent > in > Java to get fairly fluent in C++ if they started with approximately the > same > skills I have today. I've been using Java constantly for about a year and a half. I feel that I could pass the SCJP at any time without studying in advance (an opinion supported by some coworkers who have taken the exam). That said, a couple months ago I picked up a good sized C++ book and read it through in a week (with some hands-on interspersed throughout, of course). After that I felt comfortable reading some simple and not so simple C and C++ source code and writing my own simple little things. If you want an eyeful, download the Quake 2 source code (C only, I believe). If you can even begin to untangle that I'd say you're doing fairly well. For a quick start IDE, check out Dev-C++: <http://www.bloodshed.net/devcpp.html> Granted I'm biased as that's the only one I've used :) ============================================================================== TOPIC: Beginning EJB http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d49babfdb472b21c ============================================================================== == 1 of 2 == Date: Mon, Dec 6 2004 6:04 pm From: "Darryl L. Pierce" Collin VanDyck wrote: >> What, specifically, would you consider to be painful about 2.x? >> Especially with 2.1, I find it to be a breath of very useful fresh >> air. 1.x was painful, sure, but 2.x has been quite useful and IMO >> powerful a tool to use. > > I was not around for 1.x, and with regards to 2.x the home/remote stubs, > interface implementation, etc.. What way would you define, then, for working with a remote object? -- Darryl L. Pierce <[EMAIL PROTECTED]> Visit my webpage: <http://mcpierce.multiply.com> "By doubting we come to inquiry, through inquiry truth." - Peter Abelard == 2 of 2 == Date: Mon, Dec 6 2004 11:27 pm From: Collin VanDyck Darryl L. Pierce wrote: > Collin VanDyck wrote: > >>> What, specifically, would you consider to be painful about 2.x? >>> Especially with 2.1, I find it to be a breath of very useful fresh >>> air. 1.x was painful, sure, but 2.x has been quite useful and IMO >>> powerful a tool to use. >> >> >> I was not around for 1.x, and with regards to 2.x the home/remote >> stubs, interface implementation, etc.. > > > What way would you define, then, for working with a remote object? > I did not say that I know of a better way. From what I understand 3.0 will be much simpler. ============================================================================== TOPIC: Thoughtsworks Job Interview? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/65e47be2d93e5821 ============================================================================== == 1 of 1 == Date: Mon, Dec 6 2004 6:09 pm From: "Gary Labowitz" "Eric Sosman" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Virgil Green wrote: > > "Anzime" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > > > >>Nus wrote: > >> > >>>How was the interview with Thoughtworks? > >>> > >>>MarathonMan wrote: > >>> > >>> > >>>>Hi, > >>>> > >>>>Any one interviewed with Thoughtworks for a Java position? Whats been > >>>>your experience? And how tough are their coding tests during > >>> > >>>interview > >>> > >>> > >>>>process. Im thinking about applying to Thoughtworks. > >>>> > >>>>Thanks, > > The "coding tests" question intrigues me. Since I haven't interviewed for a > > job in over 15 years, I'm curious to know what kind of coding test typically > > would be used for a Java position. Are the interviewers interested in your > > ability to write good code in a timely fashion using the tools of your > > choice (or similar), or are they interested in whether you've memorized > > every class and every method signature in the standard libraries and can > > crank out code in Notepad? > > > > What kinds of experiences have readers encountered? We used coding tests ("Programmer Aptitude Test") at IBM many years ago. It was actually pretty simple and tested logical thinking. However, it ran into legal problems. A test used to select or reject candidates must be shown to be predictive of the work to be done; i.e. does the outcome of the test actually reflect the ability of the candidate to do the actual work? Unless there is some formal proof, the test can be deemed predujicial and restrictive. The burden of proof falls on the employer to show that those persons who do well on the test actually do well at the job. I have found that chatting with a candidate, his hobbies, and previous experience was more useful in evaluating several things, only one of which was how he would do with the work. Work assignments can be tailored, monitored, mentored, and trained for. More interesting is what personality traits I could detect -- would this person "fit in," be interested in solving puzzles, have the temperment to put up with frustration? Granted, it is hard to evaluate with one sitting; thus, we had several persons do interviews, and have call-backs to explore deeper. I still think a person who can solve puzzles and enjoy them can become a good programmer. Anyway, most job positions are so nebulously defined that many levels of skill and experience can fit into them if need be. I always laugh at the "requirements" the HR department puts on openings. Their job is to eliminate candidates from the mix, but they cover the ground so thoroughly that there is never anyone who could fit their requirements. They seem to think an entry level programmer should know C++, Java, Enterprise Editions, XML, UML, SQL Server, Oracle, SAP, and sometimes COBOL and assembly language. Go figure. Here's an example I just pulled from Monster: Requirements for a Java programmer: - 2 years experience working with Documentum products (version 5 preferred). - Knowledge of Documentum APIs, DFCs, DQL, WDK, Application Builder/ Developer Studio, Workflows, and Lifecycles. - Programming experience in Java, JSP, XML, XSL and COM. - Web development skills with knowledge of databases. And this one almost looks possible! Am I wrong? -- Gary ============================================================================== TOPIC: "static" prefix - to parallel "this" prefix http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f5dde10882ac2157 ============================================================================== == 1 of 2 == Date: Mon, Dec 6 2004 6:11 pm From: "Darryl L. Pierce" Tim Tyler wrote: > I already indicated the problems with using the class name: > > ``The rationale is that using the class name all over the place > hinders refactoring and code readability, and violates the > prinicple of specifying each fact in one place.'' > > If the class name is a rather LongOneWithManyCharacters the approach > becomes unweildy. How does it hinder refactoring? Search-and-replace the old class name for the new class name in one source file and it's done. Not a problem. And, what do you mean by "specifying each fact in one place"? Sorry, I'm not familiar with that phrase with regards to software development. What fact is being specified all over the place that wouldn't also be specified all over the place by the "static" keyword? >>>Avoiding bending names out of shape is a significant concern if >>>those names appear in your public interface - e.g. this: >>> >>>class Point { >>> public int m_x; >>> public int m_y; >>>} >>> >>>....would be painful. >> >>I never have these problems. Even when an argument is the same as a >>static variable, I have no problems like the above: >> >>public class FooRuntime >>{ >> private static void FooMidlet instance = null; >> >> public static void setMidletInstance(MIDlet instance) >> { >> FooRuntime.instance = instance; >> } >>} >> >>Crystal clear exactly what I'm doing without needing a new keyword to >>achieve that goal. > > You are apparently not using a convention to distinguish static, instance > and local variables No, I don't. They clutter things up most of the time. > - and so from my point of view it will often not > be crystal clear what is going on - without consulting the class > definition. The above is amazingly clear. Like any (lack of) convention, you just have to be used to it. -- Darryl L. Pierce <[EMAIL PROTECTED]> Visit my webpage: <http://mcpierce.multiply.com> "By doubting we come to inquiry, through inquiry truth." - Peter Abelard == 2 of 2 == Date: Mon, Dec 6 2004 6:13 pm From: "Darryl L. Pierce" Tim Tyler wrote: >>Try using the latest Eclipse version. It can highlight local, instance, >>static and even final variables in a different color. This is probably a >>better idea than uglifying your code, or introducing new language syntax. > > I'm using the latest stable version of Eclipse - 3.0.1. > > The feature is not present there. It's an advanced editing feature. Window->Preferences->Java->Editor->Syntax->Enable advanced highlighting -- Darryl L. Pierce <[EMAIL PROTECTED]> Visit my webpage: <http://mcpierce.multiply.com> "By doubting we come to inquiry, through inquiry truth." - Peter Abelard ============================================================================== TOPIC: how to compile applet checking plugin ver http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f43ee7ba8993160a ============================================================================== == 1 of 2 == Date: Mon, Dec 6 2004 3:14 pm From: [EMAIL PROTECTED] (Artur Mironczuk) Hello, I am new with java. I need to know how to compile applet (which jsdk version or which parameters) that determines all plugin version (microsoft also). I wrote sth like that: import java.applet.*; import java.awt.*; public class Test extends Applet { public String javaVendor() { return java.lang.System.getProperty("java.vendor"); } public String javaVersion() { return java.lang.System.getProperty("java.version"); } } I call the javaVersion() from html javascript function. The only problem is that if i compile the source by jvm 1.3 then applet resolve every higher plugin version but don't microsoft (1.1.4) or lower. How to fix this problem, how compile this applet? Please help! With regards Artur == 2 of 2 == Date: Tues, Dec 7 2004 12:11 am From: Andrew Thompson On 6 Dec 2004 15:14:19 -0800, Artur Mironczuk wrote: > ..How to fix this problem, how compile this applet? javac -target 1.1 *.java <http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/javac.html#crosscomp-options> HTH BTW - An X-posting* of .. comp.lang.java.programmer,comp.lang.java.security,comp.lang.java.help is too wide for this simple problem. c.l.j.s. is off-topic, and it is unwise to x-post between c.l.j.p. and c.l.j.h. . I will set the follo-ups to c.l.j.help. Please restrict your posts to that group for the moment. * <http://www.physci.org/codes/javafaq.jsp#xpost> -- 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: Tomcat 5, EL Expressions in jsp:inlcude http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/4da7307e1d9d37b9 ============================================================================== == 1 of 1 == Date: Mon, Dec 6 2004 5:26 pm From: The Abrasive Sponge Mark F wrote: > Tomcat 5 > > I would like to create my JSPs as all XML like so: > > <?xml version="1.0" ?> > <jsp:root version="2.0" > xmlns:jsp="http://java.sun.com/JSP/Page" > xmlns:f="http://java.sun.com/jsf/core" > xmlns:h="http://java.sun.com/jsf/html"> > <f:view> > <f:verbatim><![CDATA[<!DOCTYPE html > PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">]]> > </f:verbatim> > <html xmlns="http://www.w3.org/1999/xhtml"> > <jsp:include flush="false" page="../inc/head.jspf"> > <jsp:param name="title" value="Logout"/> > </jsp:include> > <body> > <f:loadBundle basename="general" var="msg"/> > <f:loadBundle basename="logout" var="logoutmsg"/> > <jsp:include flush="true" page="../inc/topnav.jspf"/> > <jsp:include flush="true" page="../inc/header.jspf"/> > <h:form> > <h:panelGrid> > <h:outputText value="#{logoutmsg.loggedout}"/> > <h:outputText value="#{logoutmsg.closebrowser}"/> > </h:panelGrid> > </h:form> > <jsp:include flush="true" page="../inc/footer.jspf"/> > </body> > </html> > </f:view> > </jsp:root> > > Unfortunately the EL code in the included JSPs is not being evaluated. > > It works fine if I use the <[EMAIL PROTECTED]> directive but this is not XML > compatible. > > Any help would be appreciated. > > thanks, > -Mark > It's a JSF issue. http://java.sun.com/j2ee/javaserverfaces/faq.html#includes Looks like you will have to do <f:subview><jsp:include /></f:subview> Please let me know what you find out! ============================================================================== TOPIC: can't find class file http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/41f61eb9d8c24f1c ============================================================================== == 1 of 2 == Date: Mon, Dec 6 2004 5:23 pm From: "zpetero" I got that and have since set up and tested Log4j, The tricky part is getting it to output to the file I want. Would you by chance know to set it up to send logging info to a file? I have this class as part of a web app, package app.model; //import java.util.*; import org.apache.log4j.Logger; import org.apache.log4j.BasicConfigurator; public class Log4j { static Logger logger = Logger.getLogger(Log4j.class); // debug, info, warn, error, fatal public String logMessage(String sText, String level) { BasicConfigurator.configure(); if (level.equals("debug")) { logger.debug(sText); } if (level.equals("info")) { logger.info(sText); } return("yes") ; } } ...and I modified the original LogonAction.java file with this(instead of getDegug()) String sText ="LogonAction: User " + username + " logged on in session " + session.getId(); Log4j log = new Log4j(); log.logMessage(sText, "debug"); This code compiles and runs but I can't figure out where the output is going. This is the log4j.properties file, which is located in the same directory as the class file. log4j.rootCategory=DEBUG, dest1 log4j.appender.dest1=org.apache.log4j.FileAppender #log4j.appender.dest1.layout=org.apache.log4j.PatternLayout # Appender dest1 writes to the file "test" in user's home. log4j.appender.dest1.File=${CATALINA_HOME}/webapps/EP/WEB-INF/classes/app/log # Truncate 'test' if it aleady exists. log4j.appender.dest1.Append=false Thanks, Peter == 2 of 2 == Date: Mon, Dec 6 2004 7:39 pm From: "Ryan Stewart" "zpetero" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I got that and have since set up and tested Log4j, > > The tricky part is getting it to output to the file I want. > > Would you by chance know to set it up to send logging info to a file? [...] > This code compiles and runs but I can't figure out where the output is > going. This is the log4j.properties file, which is located in the same > directory as the class file. > > log4j.rootCategory=DEBUG, dest1 > log4j.appender.dest1=org.apache.log4j.FileAppender > #log4j.appender.dest1.layout=org.apache.log4j.PatternLayout > > # Appender dest1 writes to the file "test" in user's home. > log4j.appender.dest1.File=${CATALINA_HOME}/webapps/EP/WEB-INF/classes/app/log > > # Truncate 'test' if it aleady exists. > log4j.appender.dest1.Append=false > If you haven't already, you can find log4j documentation at http://logging.apache.org/log4j/docs/ As for the properties file, you don't often have to set them up, so it's hard to remember without looking it up. One thing I do notice is the first line should be "log4j.rootLogger=..." and not "rootCategory". Did someone do a global find and replace? Those are very dangerous. The ".File" tells it what file to write to, which should be in the specified directory within your Tomcat installation directory (assuming it is expanded properly; I don't think I've tried EL in here). Finally, I don't recognize that last line with the ".Append". ============================================================================== TOPIC: How to initialize a big (String-)Array fast? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/7a849e4e56de0eae ============================================================================== == 1 of 1 == Date: Mon, Dec 6 2004 5:46 pm From: "Tim" I was replying to Patrick's original post so maybe I should have bypassed Michael's response. Didn't yet see the "Threads" option in Googles' new beta DejaNews interface. Doesn't Java run on some 64-bit processors? I too was surprised 1.5 did not integrate 64-bit addressing. OS's incorporated this in the mid-90's so Java not having it is questionable. As always, when the processor cannot access available RAM then the "OS magic" for accessing secondary memory (disk, swap, pagefile) comes to bear. In this case, create a class that implements Collection but serves Strings. Back it with File or RandomAccessFile. You can even amortize the initialization by initializing on access and make it "faster" in total time used because you will not allocate Strings unless they are used. Of course, the simple fix is to allocate an array of array of Strings and make accessors. John, about 64MB memory-mapped blocks, I guess this is like on a 64MB RAM machines? For this RandomAccessFile, at least with 1.4.1_05, barfs if you try to access more than the given amount of RAM. TIJ refers to this limit correctly as length(). http://www.eastons.org/tij/TIJ314.htm#Index1408. This memory is not GC'ed either AFAICT! Anybody know if the filename given can be used by other code (non-Java) to access the same RAM? That's one thing cool I remember about Winders createFile. Happy coding, TimJowers ============================================================================== TOPIC: JOB: J2EE / J2ME platform development in LA http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2343840e9f8b5848 ============================================================================== == 1 of 1 == Date: Mon, Dec 6 2004 5:55 pm From: "Deb" Software house needs high-energy individuals to design, develop & deploy new BREW applications. Work is with a major player in the mobile industry who is providing applications, tools and infrastructure for carriers and content providers. You would be developing software which helps ringtones, screen images, picture messages, alert services, creative greetings and games get to wireless devices snappily throughout north America. REQUIREMENTS - 3+ years in software development - BS / CS (or related) - Proficiency in BREW, C++ & Java J2EE architecture (servlets, JSP) - Experience with: - XML, XSL & WebServices - SQL, JDBC & JDO - Client-side development - HTML, JavaScript, VBScript and J2ME - Linux - OOA / OOD - Ability to: - Create reusable components - Come up with realistic project estimates - Clearly document what you have done Experience with the following wireless technologies is a definite plus: - WAP, SMS and MMS Some training in BREW may actually be available for the right talent. BENEFITS - Medical, dental, vision and disability plans - 401(k) - Stock options & a stock purchase plan - Plenty of paid time off - And, even charitable contributions matching Your work will impact how well ringtones, screen images, voice mail, picture messages, alert services, creative greetings and games wind up on the public's mobile devices. TO APPLY E-mail up-to-date resume to: Deb Hester InfoSpace Recruiting Team (866) 324-0705 (toll free) [EMAIL PROTECTED] ============================================================================== 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
