3,892 Posted Topics
Re: > Usage: java FriendClient <host> <friend_port> This means that the program expects two command line parameters; the host name / address of the person you want to chat with along with the port to which chat application will listen to on his computer. Like it has been already mentioned rightly, … | |
Re: I got one when I joined Daniweb around 2 years back, though I must admit it was more along the lines of the moderator not knowing what an infraction was meant for considering the infraction feature was newly introduced. ;-) | |
Re: Maybe something like this: (untested) [code] <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv"Script-Content-Type" content="text/javascript"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta http-equiv="Expires" content="0"> <!-- disable caching --> <title>Example</title> <style type="text/css"> span { border: 1px solid black; background-color: #eeffee; cursor: hand; cursor: pointer; } </style> <script type="text/javascript"> // The … | |
Re: Considering that you are ready to learn, you need to look at some good tutorials posted at [URL="http://java.sun.com/javaee/reference/"]Suns' J2EE site[/URL] which has everything you need to know about JSP's and much more. They also have a sample application which will serve as a good reference. A good book like Head … | |
Re: Like it has been already mentioned, use JSP's only for presenting data and not running your database code or parsing a JSON string; use servlets instead. And as far as parsing JSON using Java is concerned, there are a lot of [URL="http://www.json.org/java/index.html"]JSON/Java bindings [/URL]out there. | |
Re: You can start off by reading about Hashes in general, moving on to reading the Java source for the implementation of HashMap / HashTable and finally attempting to write your own HashMap implementation. This [URL="http://bcs.wiley.com/he-bcs/Books?action=mininav&bcsId=3663&itemId=0470105550&assetId=110292&resourceId=10137&newwindow=true"]sample data structures in Java[/URL] chapter might help. | |
Re: Considering that you already have a webspace, it's kind of silly to not use a server side language which provides you with absolute control of what you do with the submitted data (process it, validate it, mail it to yourself etc.) Plus a Javascript solution would mandate that the user … | |
Re: There is no way you can access a Javascript variable set on a page on other pages. Just pass around the JSON object to the server and persist it in the client session if you need it across pages / requests. You can even process the JSON object at the … | |
Re: > This is a little function I wrote to verify form fields, all you need is an div with the id "error" to > take the output. A required addition to that script would be checking whether the element really exists and trimming the form values before comparing them with … | |
Re: AFAIK, client side, browser embedded Javascript can't connect to a database. Use a server side language like PHP, Perl etc. for this purpose. Assuming the VBScript here runs on the client machine, the above code will work only on a Windows box and that too when the file Config.udl is … | |
Re: Maybe the code before the edit and after the edit are no longer same? People tend to make such mistakes and in almost all cases, it turns out to be a silly one. Use the Error Console feature of Firefox to nail the problem. | |
Re: Don't write database connectivity code in a JSP; that's not what JSP's were meant for. Push all that database logic inside a servlet. Use JSP only as a presentation technology. And BTW, have you hosted your files on the Tomcat server? What is the URL you are using to access … | |
Re: Relying on Javascript to deliver the business functionality is dangerous to the business which you are trying to cater. If this is some school project, it doesn't matter anyways but if this is for real, you need to start rethinking your design and add a server side check for such … | |
Re: Don't use Scanner to process the input; just use it to read entire lines and process them in a separate function. That way, most of the program complexity would be abstracted in a separate function and if the delimiters or the parsing logic changes in future, all you would need … | |
Re: > What I would like to do next, is to take this modified information, > associate it with a new variable and send it to the database to > replace the old information - this is done after clicking a "save" button. > (Again done with AJAX). However I'm having … | |
Re: Looks a bit more sophisticated than the previous one and above all, it's usable, something which Dani was not planning to do at first. ;-) | |
Re: Since the specifications were not accurate, I made some assumptions when it came to exceptions. Being a Java programmer I couldn't resist this humble solution... [code=cplusplus] #include <iostream> #include <string> #include <sstream> #include <stdexcept> using namespace std; unsigned long extract_digits (unsigned long x, size_t n, size_t i) { stringstream ss; … | |
Re: You can pass variable number of arguments to your function and expect it to dynamically handle them in a variety of ways. One of them would be to use the arguments property of Javascript Function object to grab hold of what was passed to your function at run-time. [code] [...] … | |
Re: Yes, one such way would be to remove the same value from the second drop down so that the user never gets to select it. Another way would be to attach a 'onchange' listener to the second drop down which disallows the selection of a value present in the first … | |
Re: Yes I believe so...marking this as solved. | |
Re: Wait... do I see The Dude holding a knife in his hand, bloodshot eyes and "I am gonna kill Iamthwee" written all over his face :D | |
Re: [LIST] [*]Looking after my family [*]Anime [*]Sleeping [*]Staring at the sky/ceiling [*]Punching holes in happiness [/LIST] | |
Re: > FIRST : Can I call ID from the other files who contain J.S. code with ID ? As long as the page which includes the script has an element with the given ID and the function using that ID is called after the entire page has been loaded. > … | |
Re: Develop using Firefox. You can use a nifty feature of Firefox called the Error Console which shows you all the Javascript errors on your page (if you have any). | |
Re: This greed is what keeps most of the forums out there alive so cribbing is kind of pointless. This world works on a 'give and take' principle. | |
Re: This question would be more appropriate in the CSS/HTML forum. Moved. | |
Re: This question would be more appropriate in the CSS/HTML forum. Moved. | |
Re: Jonhlennon312, considering that this is an international forum reaching out to help one and all, we would really appreciate if you posted in English so that everyone can benefit from your post. | |
Re: > what require if someone want to be a team colleague, featured poster,moderator, etc ?? Don't think a lot about it. If you are good enough, these things will anyways come to you sooner or later. Just keep helping out people and above all, have fun. :-) | |
Re: > I think we need more focus on the content and less on silly rating and ranking systems for > the members who post it. Believe it or not, there are people out there who actually feel like helping others if they get something in return; and things like post … | |
Re: Plus consider using [URL="http://commons.apache.org/fileupload/"]Apache Commons File Upload[/URL] package rather than doing it yourself given the kind of nifty functionality it offers. | |
Re: > I want to use database MS-Access, how to connect the jsp to Ms-access, plse send code Asking for code without putting in any effort is against the forum rules. Plus avoid cross-posting. You already have got replies in you other thread. This thread is now closed. | |
Re: > another odd thing, is that I do not see the form in the source when viewed by the client > browser, is this just a fact of life for dhtml Yes, because it's the Javascript object XMLHttpRequest provided by the browser at work when fetching content using Ajax. AFAIK, … | |
| |
Re: Never used IE, always use FF. Personally what I feel is that IE sucks...(atleast IE6). Hell, even Avant Browser is better than IE. | |
Re: Yes, submit the form to a servlet, perform the processing and redirect to a page whose output you would like to have in responseText attribute of the XMLHttpRequest object. | |
Re: Something one can wear on his hand and use it to rip out someones' intestines. | |
| |
Re: Yes, start off with the excellent J2EE 1.5 tutorials available on java.sun.com which guides you through building a sample web application or get a good J2EE book and start reading. ![]() | |
Re: AFAIK, JFreechart can also be used to create dynamic on the fly charts. Read the documentation and the tutorials floating around the web and it shouldn't be that difficult. | |
Re: Please let us again not go path of discussing why and how ads are evil; this topic has been brought up and beaten to death time and time again. Maybe it's time to mark this thread as solved... | |
Re: There are different ways of persisting data across multiple requests; session object being one of them. You can save the create a bean class for all logically related data and store its instance in the HttpSession. Another way would be to use hidden form fields to pass values to and … | |
Re: Have you tried outputting the value in your servlet to see what it is receiving? Form values are submitted as they are; the job of encoding and decoding is automatically performed by your browser unless you are manually submitting the form using Javascript. Also AFAIK, no database performs automatic conversion … | |
Re: > Is it necessary to declare an inner class private? No. [URL="http://java.sun.com/docs/books/tutorial/java/javaOO/innerclasses.html"]Here[/URL] is some information which you would find useful when learning about Inner Classes. EDIT: Too slow. | |
Re: [QUOTE=scru;495582]Are you going to take Josh's place as grammar police? Fine. Just be aware that I don't like that dude, and will probably take it out on you.[/QUOTE] ...and you make sure you read the rules of this site before posting here. L33t speak along with threatening members with malicious … | |
Re: > I'm incredibly confused by what you just said but I'll take your word for it that if I read all of > these tutorials that, by the end, I'll have a much clearer understanding You shouldn't be; the basics as well the pretty advanced stuff remains more or less … | |
Re: Where have you declared 'slopetop', 'slopebottom' and 'slopefinal'? And document.write() is evaluated as the page is being rendered. Plus Javascript is a client side technology; as soon as a page is submitted, what you get is a new page and the state maintained in Javascript variables is reset. You need … | |
Re: The action attribute of your FORM tag should point to the servlet which would be doing all the processing. The servlet path can be obtained from the web.xml and is the same as the url-pattern for that servlet. In your case it should be [icode]<form action="results">[/icode]. | |
Re: There are no try...catch blocks around that switch statement of yours considering that any parseXXX method is very much capable of throwing a NumberFormatException. Plus writing parseInt(xxx) or parseDouble(xxx) in every switch case seems kind of redundant. Also a status code of '0' denotes success so your System.exit(0) should be … | |
Re: If you are talking about getting the values of a drop down list at the server side, it can be done by doing [icode]request.getParameter("nameOfSelectBox");[/icode] A better way of displaying the user list will be render it as table with the user id hyperlinked which would then take the user to … |
The End.