Message from davout Most recent post: 6/4/2007 8 authors and 9 replies. I have a question about what the convention is for throwing exceptions on validating data passed to business tier objects. If I have a business tier service like where 'AccountManager', a business tier that maintains accounts... public class Account { ... private String fTitle; private String fAccountCode .... } public class AccountManager { ... public void addAccount(Account aNewAccount); ... } ... and any new account must have a non null title and a non-null account code. If the 'aNewAccount' parameter is passed with a null title field or a null account code field what type of exception should I throw? Should the business tier code be throwing an IllegalArgumentException? If so, how can my GUI tier determine what field failed the validation test? Or should I use a separate custom exceptions for each validation point? One custom exception for title, another for alias etc. read more about What exception to use with invalid data fields on object passed to business tier method?
Message from KevinRobinson Most recent post: 4/26/2007 2 authors and 2 replies. Hi, Can anyone help me with a problem please. I am using the <%@xxxxxxxxxxx include file="/include/amt_header.jsp" %> code to include a header into a JSP and it works fine if the file which uses the include statement is in the same folder that contains the include folder. The problem is when a file wishes to use the "/include/amt_header.jsp" file from a different folder. So for example if my main file is in a folder "cart" and I want to access the header file contained in the folder "include" then I can not. I have tried the following but it won't work <%@xxxxxxxxxxx include file="../include/amt_header.jsp" %>. I am sure there is a siimple solution to this problem but what. Thanks in Anticipation. Kevin read more about jsp include
Message from Godspeed Most recent post: 10/20/2006 7 authors and 13 replies. I've started writing a new collections library based on set theory as per Spivey's Z notation. I've put the library on SourceForge. It is currently in its infancy and it'll be expanded fairly rapidly. Let me know if you are interested in getting involved. To try it out go to: http://sourceforge.net/projects/zedlib ... or search for project "JAVAx.z" I've resisted calling it yacl, but maybe that is more appropriate! Brad. read more about JAVAx.z Yet Another Collections Library
Message from KenStahl Most recent post: 10/8/2006 2 authors and 6 replies. I've a JAVA application that reads a properties file. All is well until I include a property like: AppPath = C:\Program files\myprog\dat When I use getProperty() to read the property the \ characters are stripped out. How can I prevent this from happening to that the string reads in correctly?-- If you can not be the flame, do not be the moth. read more about JAVA property files
Message from None Most recent post: 6/16/2006 3 authors and 3 replies. Dynamic array creation Hi all... here's a good one for you... I've a situation where I've some bean, and I need to populate an array field in it... here's the problem... I don't know the element type of the array before runtime. Now, I have been planning on using Commons Beanutils, since the rest of this particular app does (it's doing a lot of introspection of the beans and such). So, here's the question... can anyone figure out a way to dynamically create an array at runtime? What I mean is, I want to do the followig: PropertyUtils.setProperty(obj, fieldName, ((List)fieldValues).toArray()); So, I want to set the field named by fieldName on the bean instance referenced by obj, and I want to do it by taking the fieldValues List and converting it to an array. Now, I can do: PropertyUtils.setProperty(obj, fieldName, ((List)fieldValues).toArray(new String[0])); ...and that's great, except that I do not know until runtime that the field of the bean is of type String, it could be anything else. So, how can I dynamically do the equivalent of the new String[0] is really the question? FYI, I do not really care if this is done with Beanutils, but I think that's probably the logical course of action. Any ideas? Thanks all! read more about Dynamic array creation
Message from Jamie Most recent post: 3/23/2006 2 authors and 2 replies. Hi All, I am just trying to find out how to use JAVA Help and have come across a problem at the first step. I've the line below which I thought should find the help set file. For some reason it always returns null. ClassLoader cl = getClass().getClassLoader(); hsURL=HelpSet.findHelpSet(cl, "Help/JAVAhelpexample.hs"); The Help folder is in my application directory so it should be able to find the file fine I thought. P.S. cl isn't null. Any suggestions? Regards Jamie read more about JAVA HelpSet
Message from Jamie Most recent post: 2/9/2006 3 authors and 4 replies. Hi there, I've used the JAVA logging class to log errors to an xml file, I'm just wondering if anyone knows of a simple program that will easily view this files and allow them to be filtered by log level? Regards Jamie read more about JAVA logging
Message from Charles Tryon Most recent post: 12/10/2005 3 authors and 5 replies. I have been hunting all over the place for this one and have come up empty... I've been using IntelliJ IDEA v4.x to build a BEA/Weblogic (v8.1) Web services application, and found that it works very well. I've a large ANT task (build.xml) which defines various build and deploy tasks. Some of the tasks use BEA specific extensions (taskdef tags) to build various components. The way I have found to get this to work is to include the weblogic and webservices JAR files in the "Additional Classes" tab on the build preferences. Life is wonderful. Life is grand. Then I upgrade to IntelliJ IDEA 5.0.3. *BOOM* Everything in IntelliJ works just fine, except that any and all ANT tasks immediately exit with a "success" status with no explaination as to what they may or may have done. No error logs or anything. I finally trace it back to the webservices.jar file which contains the required classes for the taskref definition. If I take this jar file out, it runs ANT, but fails with a "Class not found" error. If I put it back in, it just exits. Note that this isn't a problem in the older IntelliJ 4.x (or even in some of the EAP builds between 4 and 5). Any idea what might be going on, and how I might be able to get around this problem in IntelliJ? read more about Weblogic/IntelliJ/Ant conflict?
Message from davout Most recent post: 11/23/2005 3 authors and 4 replies. Does anybody know of any open source JAVA products that offer server driven automated telecom calling? Basically I'm looking for a telecom service product that can make telecom calls and relay a message to a human receipient who is then prompted for a response. read more about any open source JAVA products that handle automated telecom calling?!?
Message from news Most recent post: 9/6/2005 2 authors and 2 replies. If 'System' is a class, what exactly is 'System.out' ? And apparently 'println' is a public method of object 'System.out'. If 'System.out' is an instance [public object] of Class 'System', is it necessary the prepend the ClassID, because there are other 'out' objects which are public instances of other than 'System' Class ? Ie. to distinguish 'System.out' from 'otherClass.out' ? Thanks for any info. == Chris Glur. read more about 'type' of 'System.out.println'([code][/code])
Message from Reddy Tech Recruiting Most recent post: 9/1/2005 3 authors and 3 replies. Reddy Technical Services has a client with an opening for a web front-end developer. The person in this position will be responsible for the design and implementation of the User Interface for the client's main product line. This position will also control the design direction for the entire product suite and all future products. Candidate qualifications: - Solid JAVA/JSP development experience. - Solid web and graphics design experience (Photoshop, etc.) - An understanding of Struts and Model-View-Controller. - Good communication skills. - Be a team player. This is a fulltime permanent position with all the accompanying benefits, including 401k and profit sharing. Salary range is 70k - 80k. Location is in metro Atlanta's I-75/Wendy Hill area. If you or someone you know'd be interested in applying for this position, please forward a resume to resumes0817@xxxxxxxxxxx read more about JOB OPENING: JAVA Front-End Web Developer - Atlanta, GA
Message from Paul Most recent post: 8/31/2005 8 authors and 18 replies. HI! I get an error with this code. <SCRIPT language="JAVAScript"> If (ifp==""){ ifp="default.htm"} //--></SCRIPT> Basicly I want my iframe to have a default page if the user enters in directly. so I need a way doing this. so I check to see if the ifp value is null and if so then assign it a value. is this correct?Thanks in advance :) Paul read more about What am I doing wrong here. Simple statement. Novice Question.
Message from Geoff Cox Most recent post: 7/15/2005 3 authors and 5 replies. Hello, I am trying out some of the Sun JAVA sample code and starting to learn about swing gui etc. I've added the slider object and now the Hello World message no longewr appears. Why is this? Thanks Geoff import JAVAx.swing.*; public class HelloWorldSwing { /** * Create the GUI and show it. For thread safety, * this method should be invoked from the * event-dispatching thread. */ private static void createAndShowGUI() { //Make sure we've nice window decorations. JFrame.setDefaultLookAndFeelDecorated(true); //Create and set up the window. JFrame frame = new JFrame("HelloWorldSwing"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setSize(800, 600); //Add the ubiquitous "Hello World" label. JLabel label = new JLabel("Hello World"); frame.getContentPane().add(label); //Add slider JSlider slider = new JSlider(JSlider.HORIZONTAL, 0, 20, 1); frame.getContentPane().add(slider); //Display the window. // frame.pack(); frame.setVisible(true); } public static void main(String[] args) { //Schedule a job for the event-dispatching thread: //creating and showing this application's GUI. JAVAx.swing.SwingUtilities.invokeLater(new Runnable() { public void run() { createAndShowGUI(); } } read more about Hello World message disappeared?!
Message from Marc Lambrichs Most recent post: 3/11/2005 2 authors and 2 replies. We're having problems with our tomcat virtualhost setup. See the log below. We can not explain the "can not resolve localhost:8009" error. If you have a clue, please let us know. Cheers, Marc[Wed Mar 09 13:54:39 2005] [notice] Apache/2.0.52 (FreeBSD) mod_jk2/2.0.2 configured -- resuming normal operations [Wed Mar 09 13:54:39 2005] [info] Server built: Feb 8 2005 11:14:08 [Wed Mar 09 13:54:39 2005] [debug] prefork.c(955): AcceptMutex: flock (default: flock) [Wed Mar 09 13:54:39 2005] [notice] jk2_init() Found child 39367 in scoreboard slot 0 [Wed Mar 09 13:54:39 2005] [notice] jk2_init() Found child 39368 in scoreboard slot 6 [Wed Mar 09 13:54:39 2005] [notice] jk2_init() Found child 39369 in scoreboard slot 7 [Wed Mar 09 13:54:39 2005] [notice] jk2_init() Found child 39370 in scoreboard slot 8 [Wed Mar 09 13:54:39 2005] [notice] jk2_init() Found child 39371 in scoreboard slot 9 [Wed Mar 09 13:54:39 2005] [error] jk2_channel_socket_init: can not resolve localhost:8009 errno=22 [Wed Mar 09 13:54:39 2005] [error] workerEnv.initChannel() init failed for channel.socket:localhost:8009 [Wed Mar 09 13:54:39 2005] [error] ajp13.init(): No channel localhost:8009 [Wed Mar 09 13:54:39 2005] [error] workerEnv.initWorkers() init failed for ajp13:localhost:8009 [Wed Mar 09 13:54:39 2005] [debug] ../../common/jk_uriMap.c(377): uriMap.init() Fixing Host * [Wed Mar 09 13:54:39 2005] [debug] ../../common/jk_uriMap.c(464): uriMap: fix uri (null) cont read more about tomcat woes
Message from japcuh Most recent post: 3/2/2005 18 authors and 28 replies. How do you write self modifying code in JAVA? Japcuh (Just Another Perl C Unix Hacker) http://www.catb.org/~esr/faq/hacker-howto.htm#what_is .0. ..0 000 read more about Self Modifying Code
Message from Glenn McCall Most recent post: 2/19/2005 2 authors and 2 replies. Hi there I am using Netbeans 4.0 on windows XP. My problem is that the compiler does not seem to be receiving *some* of my options. Has anyone else come across this and how did you fix it? I am trying to compile so that the .class files will run in the 1.4 JVM. To achieve this I need to run the compiler with the switch "-source 1.4". But Netbeans does not appear to be passing this switch to JAVAc!?!?!?!? Details follow. If I compile from the command prompt (with the following), I can run it on the 1.4 JVM no problems. JAVAc -source 1.4 TestB.JAVA as a matter of interest if I omit the "-source 1.4" switch I get the following notes (i.e. the compiler is recognising the switch): Note: TestB.JAVA uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. If I compile in the IDE and do not specify any switches, I get the above 2 messages (notes). If I set the -Xlint:unchecked switch (right click "Source Packages" then select "Properties". Then select "Compiling Sources" in the dialog and enter the switch in "additional compiler options"). Then the I get the lint output as follows: TestB.JAVA:21: warning: [unchecked] unchecked call to add(E) as a member of the raw type JAVA.util.LinkedList This means that the -Xlint:unchecked is being passed to the compiler. So far so good. Now if I follow the logical sequence and enter -source 1.4 in the "additional compiler options" in Netbeans, I still get read more about Netbeans does not recognise compiler options ?
Message from Nebojsa Topolscak Most recent post: 1/14/2005 2 authors and 4 replies. Hello, wrote in message application which does not use graphic at all. One part of application needs Parser class from JAVAx.swing.text.html.HTMLEditorKit. The ridiculous fact is when I try to instantiate parser, jvm wants to connect to X11 server. That means that I need X-server for simple html text parsing. Is there any workaround for this issue ? Any help appreciated. best regards, Nebojsa read more about ridiculous - JAVAx.swing.text.html.HTMLEditorKit.Parser needs X11 server to work
Message from donalmurtagh Most recent post: 12/22/2004 2 authors and 4 replies. Hi, I'm looking for a command-like utility which can read a .class file and tell you whether it includes debug information, i.e. whether it was built with the -g option of JAVAc. Thanks in Advance, D=F3nal read more about .class file includes debug info??
Message from samagna Most recent post: 12/20/2004 6 authors and 6 replies. I need to call a function that is there in a C++ dll. The arguments to the function are STRUCT and string. The return type is void. Also I donot have any rights to change the dll and I've to use as it is.... So here goes my questions: 1. How to pass a struct variable from JAVA to a function in DLL. 2. The function returns void and the second argument is the output variable which I need to use. So is there anyway, that call by reference can be used from JAVA? 3. Where should I place my dll to compile it? Quick reply'd be appreicated. Thanks in advance. Samagna read more about Calling a C++ dll from JAVA
Message from chanchito_cojones Most recent post: 12/14/2004 2 authors and 5 replies. hi there, I am new to the whole world of JAVA and will be doing my best to learn, absorb, and understand all that it has to offer. The first question that I have is the following: The latest SDK is j2se5.0, if a JAVA program is compiled under this release will it work under an older JVM (ie. JAVA 1.3.0..04)? thanks in advance. read more about newbie question
Message from Dino Buljubasic Most recent post: 11/14/2004 4 authors and 5 replies. I heard that there is 5.0 version but I can not find it on Sun's wweb page. All I found is J2SE 5.0 RC Can somebody send me a link? read more about J2SE 5.0 SDK
Message from sap6210 Most recent post: 11/12/2004 2 authors and 3 replies. Okay, now I know this is a hugely retarded question, because I'm at the JAVA.sun site reading through the manuals, but maybe it's my state of mind or something (21st birthday was yesterday.. possibly a factor...). BUT! I've a few questions: 1)What is the difference between j2ee SDK, JDSE SDK, J2SE JRE? I'm a software developer, and I USED to program in JAVA, back in the day, but I can not remember for the life of me which to download. I thought it was just called the J2SDK, but I guess I'd want the j2ee SDK? Is this right? 2)The liscence agreement. I'm lost. I'm working for a company. I can program software using the downloadable JAVA software for use in the company, right? Where in the agreement does it say that, because I'm confused (I'm thinking I'm just not bright enough to handle it). Alright, sorry for the dumb questions. I have been looking through the newsgroup and their site, trying to find a definitive answer, to no avail. If someone has a link or an answer, I'd appreciate it immensely. read more about Hugely dumb questions...
Message from System User Most recent post: 11/7/2004 2 authors and 2 replies. Hello, I've searched to no avail on this question. Does anyone know how to view the grapical (menu) output of a JAVA class file? I am not interested in the code behind the scene, but rather the executed/parsed output. I've some JAVA class files that create various menus and I need to take screen captures of those menus. Please excuse any apparent ignorance with JAVA. Any assistance will be very much appreciated. Thanks, Jim read more about How to "VIEW" JAVA Class Files?
Message from mayayana Most recent post: 10/18/2004 5 authors and 6 replies. I'm just beginning to dabble in JAVA, coming from VB. I'm exploring learning JAVA for GUI application development. Probably no web apps or applets. So far I have got the JDK1.5 and NetBeans4.0B installed. I'm not sure how to start with NetBeans and wonder if it might be overkill. (It seems to be impossible to even do a "hello world" without first figuring out what an "Ant script" is.) Borland JBuilder and Code Warrior both only run on Win2000/XP (odd for a cross-platform language!) and I do not want to leave Win98 for this. Given all of that, I'd appreciate hearing opinions about whether a different IDE or editor'd be better, and how to go about jumping in. I'm imagining working in a drag-and-drop-type GUI environment like VB, but maybe JAVA does not work that way?? Thanks.-- -- read more about starting out - need advice
Message from Jussi Jumppanen Most recent post: 10/11/2004 4 authors and 4 replies. To all the JAVA guru's out there. I am quite new to JAVA, but I've come across something that I find very strange. Can anyone offer an explanation for the following: 1) I've a directory with nothing in it but two jar files: D:\test>dir *.jar 24/09/2002 10:39 AM 2,520 MyLayout.jar 09/10/2004 07:24 AM 21,215 Importer.jar 2 File(s) 23,735 bytes 2) I try to run the Import.jar as follows: d:\test>JAVA -classpath ".;MyLayout.jar;" -jar Importer.jar but this fails with this error message: JAVA.lang.NoClassDefFoundError: com/MyPackage/MyLayout at MainFrame.creatDialog(Importer.JAVA:452) at MainFrame.<init>(Importer.JAVA:285) at Importer.<init>(Importer.JAVA:560) at Importer.Show(Importer.JAVA:572) at Importer$1.run(Importer.JAVA:578) 3) I unpack the Importer.jar using: jar xf Importer.jar and run the program as such: JAVA -classpath ".;AbsoluteLayout.jar" Importer this works fine (so the jars look ok, me thinks). 4) So after five hours of pain trying to figure out why things not working I finally try this: d:\test>JAVA -classpath ".;MyLayout.jar;Importer.jar" Importer d:\test> and to my suprise it works? For completeness sake below is the mainfest for importer.jar file: Manifest-Version: 1.0 Main-Class: Importer Specification-Title: "Importer" Specification-Version: "1.00" read more about Weird JVM Behaviour?
Message from mayayana Most recent post: 10/7/2004 3 authors and 5 replies. After getting several recommendations of BlueJ as a basic JAVA editor, I installed the latest version. (I have not tried JGrasp yet.) But BlueJ seems to be very buggy. Maybe I'm missing something? The interface looks sensible and usable but there were 3 problems from the start, and I have not even used the program yet: 1) Every time I start it I get a blue screen error. (I did not think to check exactly what it was.) 2) It won't run at all unless allowed to open a port. I can not imagine why an editor needs Internet access. 3) Every time I start BlueJ.exe, it stays in memory as a service, ignoring quit messages. (I can not even seem to force-close it.) If I start it twice I end up with 2 running instances, despite having closed the program. read more about BlueJ for the birds?
Message from iyspost Most recent post: 9/16/2004 2 authors and 2 replies. I try to setup a socket connect to the port (for example) 1099 but I can not get any? Exception message is "connection refused" Help! If have a laptop with XP professional, SP1 and JVM 1.4.2_03. All the programs are running on the same machine (local). Thanx for all suggestions… read more about Connection Refused (XPprof,JMV 1.4.2_03)
Message from gunmuc Most recent post: 9/10/2004 2 authors and 2 replies. Hi, im using batik to draw several rectangles via graphics2D. now I would like to add a link to another html or svg document to the rectangle. if the user clicks on the rectangle, the other document should appear. how can this be done using batik? thanks! read more about [BATIK] Rectangle links to other SVG-Document/Webpage
Message from Dick Most recent post: 9/10/2004 5 authors and 5 replies. Is there a secure FTP class out there yet? Looking for an easy way out because I do not have time to write one! :-) A Google search turned up nothing. read more about Is there a Secure FTP (SFTP) class?
Message from LarsR Most recent post: 7/30/2004 2 authors and 2 replies. I am looking for at 100% free horizontal "news ticker" like the one at: http://www.appletcollection.com/JAVA-news-tickers.htmlI am able to find plenty of tickers on various applet-sites, but they alle have watermarks or statusbarmessages saying "unregistered version". Where do I find a copyright-free newsticker? Best regards LarsR read more about News ticker
Message from Alexander.Farber Most recent post: 7/30/2004 2 authors and 2 replies. Hi, I've an applet with a tiled background. On that background I draw two light spots, which take quite some time to render. So whenever the applet (actually a Frame in my applet) is resized I draw the tiles (this does not take long) and after that'd like to fire off a background thread which'd calculate the light spots: class RenderThread extends Thread { public volatile boolean running = false; public RenderThread() { setPriority(Thread.MIN_PRIORITY); } public void start() { running = true; super.start(); } public void run() { while (running) { // rendering code } } } And in my applet/frame code I call: void init() { thread = new RenderThread(); } public void resize(int w, int h) { if (thread.isAlive()) { thread.running = false; try { thread.join(); } catch (Exception ex) { ex.printStackTrace(); } } // draw the tiles here (that is quick) super.setSize(w, h); thread.start(); } Unfortunately this does not work as expected - the thread runs only once. I'm sorry that I do not have a handy test case to show, but could anyone please answer a general question for me: Can yo read more about Running a Thread multiple times
Message from javanewbie22 Most recent post: 7/24/2004 3 authors and 3 replies. I'm just starting to learn JAVA. Naturally, I am comparing it to languages that I am already familiar with. In Oracle, in Sqlplus, you can describe procedurenameThis will list procedure "headers". It'll show you all input and output parameters.If you: describe pacakgename Oracle will list all the internal procedures, and the parameters required for each of the procedures.Is there something similar in JAVA? Ie. I want to know all the built in functions, etc in: JAVA.io JAVA.langAnd, if I do know the particular function that I am interested in, how do I describe it, and find out: - the input parameters - any return values - any description/help Thanks a lot read more about How to find info on JAVA libraries, classes, etc.?
Message from grisha Most recent post: 7/23/2004 2 authors and 3 replies. Hi all, This isn't necessarily an Ant question, nor a standard sun JAVAc. I am using both, and all suggestions are welcome. I'd like to build as many classes as possible from a given "project". In an Ant script, I just supply all classes from a given "project" (or "module" -- the idea is that the code base is divided into modules), and even say failonerror="false". At which point the build script'd take files from source control and build them, in the order of specified dependencies. That is, if module X depends on module Y, I want to build module Y into a .jar, and then supply it to module X. Now, as much as I'd like people not to check in stuff that doesn't compile, sometimes it happens. Given that this isn't a big project (yet), I think it's worthwhile to allow people to make mistakes, but still to be able to build whatever is possible. But if I supply all the .JAVA files on the same command line to JAVAc, once one compile fails, the whole thing fails. I ended up writing my own CompilerAdapter for Ant to take care of that, but I wonder if there's a better way -- if something fails, let it fail, but compile whatever you can (and build a .jar). So, I guess, the question is clear. What do you suggest? (Technical solutions, only, please (as opposed to "policy" solutions). Thanks. read more about Ant/JAVAc: building as many files as possible?
Message from usenet Most recent post: 7/22/2004 3 authors and 3 replies. Most of the open source web-service products that I am reading about seem to require generation of client stub and server implementation ancestor classes from the WSDL file. The client application links in with the stubs. Like CORBA SII, the client operates on a proxy (albeit a "service proxy" and not an "object proxy") in its address space. This approach seems to limit the scope of web services. Is there an equivalent of CORBA DII for web services? I believe the UDDI standard allows clients to invoke services without having compile-time knowledge of the service description. Is this correct? Also, are there any open source web-service products that support this capability? Thanks in advance. Bhat read more about Dynamic invocation of web services?
Message from Serge Giguere Most recent post: 7/17/2004 2 authors and 2 replies. Hello, Can someone tell me if they're a way to program the IP options in JAVA? Thanks Serge read more about IP options
Message from grisha Most recent post: 7/14/2004 2 authors and 2 replies. Hi all, How'd one force a deep reserialization for a collection whose reference is already known to be serialized by ObjectOutputStream (without using custom mechanisms, of course; in that case there's no question, is there?). For example, I am trying to serialize a large number (hundreds of thousands) of rows of a database, that I store as a List. Now, if I do .clear() and try to serialize again, I'd get the same result back as the first thing I serialized. But if I create a "new" object every time, I run out of memory pretty fast. Is there a standard way, or should I roll my own solution? read more about Forcing different Serialization/Externalization for identical references
Message from Roy J Most recent post: 7/11/2004 2 authors and 2 replies. hello; does anyone know the function or method that'd take any integer and converted to any base (2---9)? roy read more about converting from decimal to any bae
Message from udupi_mail Most recent post: 7/8/2004 7 authors and 9 replies. I've been reading all I can about Sessions and Tracking but in vain. Herez the deal: I've been using cookies for session tracking. I had to resort to cookies because httpsessions aren't feasible since my env. is Websphere5 ND. There is no guarantee that the session is replicated across appliacation servers in a clustered env. The real issue here is that need to ENSURE that a user doesn't logon more than once ..In simple avoid multiple login. On a successful 2nd logon I'd like to terminateb I know this can be achieved by doing a DB read on every page forwards/action. I want to avoid DB dips since this will affect the performance of my appln. By the way, I am using struts framework for the web app. Is there any other way , In which the above can be achieved? TIA Guru. read more about Avoid multiple logon..
Message from grisha Most recent post: 7/2/2004 3 authors and 5 replies. Hi all, Can anyone suggest a (preferably open-source) library that'd allow for disk-based collections (kind of an application's own VM)? Thanks. read more about Disk-backed allocations or collections
Message from Geiger581 Most recent post: 6/25/2004 5 authors and 7 replies. Back when the new J2SE1.5 features were announced, there was a JAVALive community chat (http://JAVA.sun.com/developer/community/chat/JAVALive/2003/jl0729.html) in which Neal Gafter explains the Sun stance on lack of support for delegates: ... There are serious semantic problems with trying to add delegates to a language in a consistent way. The main problem is that once you call the delegate, the original class instance is no longer part of the call chain, so overriding in the original class no longer takes precedence over the delegate. ... Could someone please explain this to me a little more fully? It sounds like he's saying that delegates cannot follow a subclass call chain if they are created from an object stored in a superclass reference, but I can not tell if he means overriding delegates themselves. I'd like to know: 1) What exactly does he mean in less ambiguous terms? (Or maybe just simpler terms; it's been a while since my college programming languages course.) 2) What an example of delegates 'failing' like this'd look like. 3) What is so significant about this problem. I am already familiar with the 'Truth about Delegates' dialogue between Sun and Microsoft and the lack of true type safety of C# delegates, but not understanding this criticism bothers me. Any help'd be greatly appreciated. Thanks, Jeff read more about Clarification of JAVALive delegates criticism?
Message from Nicholas Pappas Most recent post: 6/17/2004 3 authors and 4 replies. Hello all. I'm having some trouble getting JDK 1.5 to work properly in JBuilder under Linux. After downloading and installing (in both the OS and JBuilder) I point my current project to the new JDK and try to run it. I get the follow error: "Application1.JAVA": cannot access JAVAx.swing.UIManager,bad class file: /opt/jdk1.5.0/jre/lib/rt.jar/JAVAx/swing/UIManager.class,class file has wrong version 49.0, should be 48.0,Please remove or make sure it appears in the correct subdirectory of the classpath. at line 3, column 20 The common thread is this "wrong version" funkiness. Depending on the application I am trying to compile a different class pops up, but it is always telling me the version is wrong. What am I missing something? Thanks! read more about JDK 1.5 + JBuilder + Linux
Message from jlwilson Most recent post: 6/15/2004 2 authors and 2 replies. To keep me away from the 'darker side' of computers I was advised by a computer expert to start learning computer languages. I currently no small amounts of c++ and html. I was advised that JAVA was a good starting point, does anyone disagree? What is the best medium for learning JAVA, book - online tutorial etc. Are there any peices of software required such as a compiler? Thanks for any info given SK read more about Begginner to JAVA
Message from aprz43 Most recent post: 6/15/2004 2 authors and 4 replies. Hi Guys, I am writing a JAVA application which needs to produce an RSA MD5 Mac code for a message, using Sun's JCE version 1.22. This Mac code then gets validated bt a 3rd party application written in C++, which is using Microsoft's CryptoAPI running on Windows 2000 Professional. The problem is that the Microsoft & JAVA functions seems to produce 2 different MAC values using the same key and the same input data. My code is as follows: This is the JAVA Code: public String test(String message, byte[] keyBytes) throws Exception { Provider sunJce = new com.sun.crypto.provider.SunJCE(); Security.insertProviderAt(sunJce,0); //create key object SecretKey key = new SecretKeySpec(keyBytes, "HmacMD5"); // Create a MAC object using HMAC-MD5 and initialize with key Mac mac = Mac.getInstance("HmacMD5"); mac.init(key); // Encode the string into bytes using utf-8 and digest it byte[] utf8 = message.getBytes(); byte[] digest = mac.doFinal(utf8); // If desired, convert the digest into a string String digestB64 = new sun.misc.BASE64Encoder().encode(digest); return digestB64; } ***************************************************************************** This is the C++ Code: HRESULT CSecureDataMgr::HashData(CByteBuffer& bufBytesData1,CByteBuffer& bufBytesData2,CByteBuffer& bufHashBuffer, CComBSTR& bstrErrMsg) { HRESULT hr = S_OK; BOOL bHashed = FALSE; CRYPT_HASH_MESSAGE_PARA stHashParms; read more about Sun's JCE 1.22 producing different MD5 MAC result to MS CryptoAPI
Message from Daniel Forster Most recent post: 6/12/2004 2 authors and 2 replies. I've the following problem that is still unsolved since one month: when in the content (StyledDocument) of a JTextPane two digits are following each other - what you can test very easy - they shouldn't be displayed as normal (from left to right), but from top to bottom. That means they should have the same x-coordinates, but different y-coordinates. How can I do this? I think I've to change the Viewfactory or the Editorkit... Please Help I need this to display fractions and vectors (math.). read more about Problem displaying Characters vertically in a JTextComponent
Message from pedro2ramos Most recent post: 6/11/2004 2 authors and 3 replies. Hi, I have got an applet (MyApplet) in a page and I am calling a method, from JAVAscript passing it all of my form elements in a String : for (var I = 0; I < myform.elements.length; i++) { concString = concString + " " + form.elements[i].name+"="+ form.elements[i].value; } top.topwork.document.MyApplet.MACData(concString)); The loop takes a bit of time in JAVAscript since I've about 300 fields. Is it possible to call the method with the form object, like top.topwork.document.EEximbilsApplet.MACData(myform)); What type of parameter should the method have and how can I inside the applet (JAVA) can I concatenate all of the elements in myform ?TIA Pedro read more about Pass form as a parameter to a method in an applet