3,892 Posted Topics
Re: Since you are using a forward, there is no need to use session variables. The HttpServletRequest is preserved when forwarding. | |
Re: [code]> public Payroll(String Name, String Id) > public void setempId(String Id)[/code] Follow Java naming conventions; `Name' should have been `name'. `setempId' should be `setEmpId'. [code] > private double empPR; // holds the Employee Pay Rate > private double empHR; // holds the Employee Hours Worked > private double grossPay; // … | |
Re: But how is this related to Java? If you have a Java program which doesn't behave as expected for the above problem, post it, otherwise I would be moving this to the Computer Science sub-forum. | |
Re: Push the list into the session and access it in your JSP using [URL="http://www.ibm.com/developerworks/java/library/j-jstl0211.html"]JSTL[/URL]. Look into the c:forEach tag of JSTL. | |
Re: Use JSP's only for presenting data / view purposes only; use servlets for processing. Submit the above form to a servlet which would grab the mail related details, create a SMTPSender instance with the values obtained and do the required task. | |
Re: A lot of complicated terminology being thrown around here but a few points: > A static member of a class is a shared location in memory between objects of that class. Don't mix concepts and implementation details when explaining. From the JLS: [quote]If a field is declared static, there exists … | |
Re: > Am I Missing any thing here? Any suggestions are appreciated. The fix suggested by Masijade should work out for you; but just for the record, the way you are using SecurityManager in your code doesn't seem to be right. The security manager needs to be aware of the environment … | |
Re: [QUOTE=scru;717901]Add this to the page that URL1 points to: [code=javascript] window.location = url2; //the url you want to redirect to. [/code][/QUOTE] The `location' property of `window' object is itself an object but you are assigning a string to it. Though it *works*, it's incorrect. You need to set the href … | |
Re: You need to provide a default constructor for the `Circle' class. Also, since `main' method is `static', you can't access instance variables inside it. It wouldn't make sense to access something which pertains to the state of a `Circle' inside a method which can be invoked without a `Circle' instance. … | |
Re: > i heard some compilers like Eclipes Eclipes [sic] is not a compiler but an IDE. | |
Re: > Please suggest me a solution to solve this problem. A simple google search would have solved it for you; please consider searching the web/forum archives before posting a query. Anyways, read [URL="http://james.apache.org/server/FAQ.html"]this [/URL]and [URL="http://msdn.microsoft.com/en-us/data/cc325721.aspx#12"]this[/URL]. > If there is any other way to handle this scenario please suggest me the … | |
Re: > does the Servlet Container call the destroy() method of a servlet class even if we don't > define the destroy() method in Servlet? Yes, because it inherits one from GenericServlet. | |
Re: AFAIK, the implementation of [ICODE]hashCode()[/ICODE] and [ICODE]equals [/ICODE]method of [ICODE]File [/ICODE]class depends on the underlying file system. On Windows files systems, the [ICODE]hashCode()[/ICODE] method of the [ICODE]File [/ICODE]class is actually the hash code of the result of [ICODE]getPath()[/ICODE] after converting it to lowercase. The [ICODE]equals()[/ICODE] method compares the result of … | |
Re: > I've been able to find plenty of examples of Ajax being used to display data from XML on > a web page XML when served by the server when making asynchronous requests is purely for the sake of easy data manipulation given that a XML response can be easily … | |
Re: > They will only change it for you once, if you have a good reason and are nice to them. If you will notice, it is already done. | |
Re: > where must i put the throw Exception,if i haven't had the file saver.txt???? If you don't have ``saver.txt'', it will automatically be created given that sufficient privileges are available. | |
Re: [QUOTE=leo_zidane;715872]i am not asking for coding. I am just asking that whether my inorder traversal of the binary tree is right? The inorder traversal i have gotten is IBOMLQAFNSGZFHYXRKPWZVT Thanks[/QUOTE] That isn't a binary tree given that nodes B, F and H have more than two child nodes. If you … | |
Re: Is this even a Javascript question given that what you have posted seems like PHP? If you want to manipulate cookies using Javascript, read [URL="http://www.quirksmode.org/js/cookies.html"]this[/URL]. If this really is a PHP question, allow me to move it to the PHP forum. | |
Re: Make sure your SELECT elements have a name attribute which can be then used to retrieve the selected value using [ICODE]ServletRequest.getParameter[/ICODE] in case only single selection is allowed or [ICODE]ServletRequest.getParameterValues[/ICODE] in case multiple selections are allowed. Don't use JSP's for anything other than presenting the data; use servlets for handling … | |
Re: A useful reply can be provided only when we set a proper context here. Read the [URL="http://www.jibbering.com/faq/faq_notes/closures.html"]closure notes[/URL]. Now, what do you think those two do? What differences do you see in them? Do they end up solving the problem at hand? Hint: Both approaches don't do what they were … | |
Re: > Is there a better way? There are actually many more than three subclasses that need the > special handling, so that's a long if-else if-else statement. Just create an interface [ICODE]Collidable [/ICODE]which exposes a contract of the form [icode]Outcome collide(Collidable c)[/icode]. Make classes implement this interface and implement the … | |
Re: > Can it be something to do with the @ sign? Yes. Make sure you *always* encode user entered data; at least when making asynchronous calls using Ajax. Normal submits automatically encode the form data for you. Use [URL="http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Functions/encodeURIComponent"]encodeURIComponent[/URL]. | |
Re: > [snip] > How do I get it to only add on the next line? > [snip] > Or is there a simpler way? Thoroughly reading the [URL="http://java.sun.com/j2se/1.4.2/docs/api/java/io/FileWriter.html#FileWriter(java.io.File,%20boolean)"]documentation[/URL] would help you in the long run. :-) | |
Re: > ok so if i mark this as solved , will this be enough for you to stop? If you feel you have got your answer, please do so. One of the tricks I normally suggest to people looking for project ideas is to head over to some open source … | |
Re: It's not pretty clear what you mean by the `First Node' since there is nothing of that sort in your program. What are the specifications of the LinkedList you are trying to create here? Without having an inking of how things ought to be, helping you out would be difficult. … | |
Re: He just pointed out that you multi-posted, try not to get personal here. If the problem here is program logic, post in the Computer Science and Software design forum. If you feel like posting the same question in different language forums, at least post a link to your original thread … | |
Re: Your solution can be roughly broken into the following tasks: - Design a web page as per your requirement - Attach a listener to the key handler which monitors keystrokes pressed inside the search text box. - In that listener, create a XHR (XMLHttpRequest) object which asynchronously polls the server … | |
Re: I *love* IE for two reasons: • It brings out the real human within the developers. • It makes me realize life is not always a bed of roses. :-) | |
Re: [QUOTE=PRob99;708235]int x=10; int total=10; do { total += x++; }while(x<15); System.out.println(x); The output of this program will be 15. I don't understand why 15 is the answer. I'm not understanding the arithmetic here. Doesn't the "+=" mean total = total + x? And doesn't x++ mean that the next value … | |
Re: Congratulations on getting a yellow star! May you very soon achieve the same feat in the 'Solved threads' section. ;-) | |
I think it would be a handy feature to show the user the offending post he is about to report under the 'Report a bad post' text area. The purpose here would be to let the user know which post exactly he is trying to report [for posts close to … | |
Re: Are you sure you are saving the user preferences i.e. the position of the dragged images, the newly manipulated size etc.? Does this card making activity involve making multiple HTTP requests to the sever or is it a client side activity i.e. no page reloads? If yes, then you can … | |
Re: [QUOTE=Ancient Dragon;703797]DaniWeb newbes have asked me to do that lots of times, but I don't have a crystal ball nor is my eyesight good enough to see their monitors from where I am sitting.[/QUOTE] You don't need either of them; *ancient dragons* are considered to be choke full of ancient … | |
Re: IMO, the thread being on the first page has got nothing to do with its solved status; it depends on time the threads were `touched'. And BTW, the thread still isn't marked as solved by any moderator because there were no follow ups from the Original Poster[OP]. Members can contribute … | |
Re: [QUOTE=peter_budo;701237][I]I do not really understand why people do not use free available [URL="http://dev.mysql.com/downloads/"]MySQL[/URL] Community Server[/I][/QUOTE] [QUOTE=stephen84s;701464]By the way why are you using such an old version of the JDK ??? I can round up all the possible reasons from that in word "IGNORANCE".[/QUOTE] Software development is not all roses; there … | |
Re: If you just want to change the contents of the Text object or replace the given Text object with an entirely new one, the simplest possible way would be:[code] var e = document.getElementById("yourId"); if(e) e.innerHTML = "Hi! I am the new text";[/code] | |
Re: > What do you think the dark matter/dark energy is? Someone the pastor thought he would make up so he could prevent you people from sleeping? ;-) | |
Re: There are better ways of manipulating tables and table data. See the [URL="http://developer.mozilla.org/en/DOM/table"]HTMLTable [/URL]reference at MDC. | |
Re: Declare a variable 'test' outside the loop and inside the loop append the value of the selected option along with a '|' to `test'. Try it. Did you get the desired result? If no, then why? What seems to be missing here? What do you think needs to be done … | |
Re: > I would appreciate if someone can please help me eliminate the warnings and tell me where > I am going wrong. The solution here (nor the problem) lies with Javascript. You need to make suitable changes to your browser settings [firewall settings, anti-virus settings etc.] to make those pop … | |
Re: Reading the [URL="http://developer.mozilla.org/En/SpiderMonkey/JSAPI_User_Guide"]JSAPI user guide[/URL] and following up on the [URL="http://forums.mozillazine.org/"]Mozilla forums[/URL] might just solve your problem. | |
Re: Haven't you received enough replies [URL="http://groups.google.com/group/comp.lang.javascript/browse_thread/thread/3694a8394abe7aae"]here[/URL]? Please refrain from double posting or at least let us know you have posted somewhere else so that multiple people don't end up wasting their time for coming up with the solution of a same problem. | |
Re: Have you tried a standalone test case to make sure the problem is really with escape/unescape?[code=javascript] var escaped = escape("Advance to others"); var unescaped = unescape(escaped); window.alert("Escaped: " + escaped + "\nUnescaped: " + unescaped);[/code] Oh and BTW, use [ICODE]encodeURI[/ICODE]/[ICODE]encodeURIComponent[/ICODE] instead of [ICODE]escape [/ICODE]since [ICODE]escape [/ICODE]doesn't work well with non-ascii … | |
Re: [URL="http://simonwillison.net/2003/Aug/11/documentAll/"]Don't use document.all[/URL]. Also, the markup in the original post is thoroughly broken with the tag attribute values not quoted. Make sure you validate your markup using W3C validator to avoid browsers to correct your errors in their own way which may differ across browsers. | |
Re: > I am trying to have 2 columns in one form and third in the other form. Is it possible. Yes, very much possible. Make sure you have different request handlers defined for each form by using the 'action' attribute of form if you expect selective processing. But your requirement … | |
Re: The term 'best' would be relative in the context you mention. There is no single 'do-it-all' library out there. For e.g. Ogre is a pretty good game engine but the most complicated all of them out there. Irrlicht is pretty much easier to pick up but doesn't provide the fine … | |
Re: Why are you encoding textual data? Base64 is primarily meant to encode binary data. | |
Re: [URL="http://www.telegraph.co.uk/earth/main.jhtml?xml=/earth/2008/09/12/scicern212.xml"]One step closer to the edge![/URL] :-) | |
Re: This sure is a weird problem; without looking at the code, it would be kind of difficult to arrive at a solution. BTW, how are you attaching event listeners to your components? Are you using [ICODE]attachEvent [/ICODE]/ [ICODE]addEventListener [/ICODE]or the plain old way of attaching events? |
The End.