- Upvotes Received
- 2
- Posts with Upvotes
- 2
- Upvoting Members
- 2
- Downvotes Received
- 4
- Posts with Downvotes
- 4
- Downvoting Members
- 3
63 Posted Topics
Re: What do you mean by step debugging? If you are referring to debug capabilities of eclipse where you can debug servlets during runtime, such runtime debugging is not available in eclipse for JSP. JSP debugging during runtime are available in "intellij idea" tool. | |
I am a regular user of Rapheal javascript library to generate charts on web pages. Now am forced to use Rapheal with eve and require javascript so that the generated chart can be modfied according to clink events on web page. Any idea to make Raphael work with require.js and … | |
Re: What is the error? Can you please tell us the error you are getting in jsp ? Did you verify the server logs? please give the server logs for the issue? It is a good practice to use some logging framework like log4j to log important events in the application. … | |
Re: Seems there is no issue with this code. Have you checked if cookies are not disabled in your browser? And how are you checking this cookie on your web page? can you put here that piece of code that shows how you are testing this cookie in the jsp? or … | |
Re: Why do you want to pass java script variable value to a scriptlet(java code)? The java code on a jsp will be running on server side . java script is running on client side. So if you want a value from java script to java scriptlet you can put the … | |
Re: @dharmil007 Google provides an App Engine(Application endgine) where you can deploy your web applications. But I am not sure if you can deploy EJBs there. Please check here on this link for more information. http://googcloudlabs.appspot.com/ | |
Re: @Neversleepin I saw the code in the link provided by you. I see that you created a custom logger of type "java.util.logging.Logger". While defing the logger you have not set the default logging level . Please set the default logging level in your code like this logger.setLevel(Level.ALL);// there are more … | |
Re: There is a MockFtpServer available and this works on your own computer. For more details , check this link http://mockftpserver.sourceforge.net/ You can get all the related artifacts using for this mock ftp server using this maven dipendancy . <dependency> <groupId>org.mockftpserver</groupId> <artifactId>MockFtpServer</artifactId> <version>2.4</version> <scope>test</scope> </dependency> More details are on this page … | |
Re: Hi, I hope you are creating a dynamic image using jfree chart and trying to display it on a jsp. For this to happen "is your jsp should be hosted on server like tomcat?" OR "Are you running your code on a server ?" If answer is no then you … | |
I need the algorithm not the code . I am on a project where I should not use any third party libraries other than java sdk. I am supposed to convert a text file to an xml file. I know that there are SAX parsers and DOM parsers available and … | |
Re: Method "cutCheck" is printing the values of instance variables. That's what is being displayed in the output when you run the code out.printf("Pay to the order of %s ", name); out.printf("(%s) ***$", jobTitle); out.printf("%,.2f\n", amountPaid); These variables "name, jobtitle, amountPaid" are all instance varaibles, so they can be direclty accessed … | |
I have this singleton class public final class MySingleton{ public static MySingleton singletonInstance; private MySingleton(){} static{ singletonInstance=new MySingleton(); } public static MySingleton getInstance(){ return singletonInstance; } } I wanted to know is there any other simpler and better way of creating a singleton instance? | |
Re: It is very simple. You can do it using javascript. You need to call a javascript function on the "onClick" event of the checkbox. Inside the called function just check if the checkbox is selected? If yes, then enable the textbox elements elements based upon the ids. like this document.getElementById("mytxt").disabled=false; … | |
I know that java.long.String is an immutable class. I need to know different ways on to how create an immutable class in java. What are the pros and cons of immutable class | |
Re: If you are writting servlet code and trying access any file/resource inside your web application then you you can use to types of paths. 1.RealPath 2.contextPath The details of which you can find from this link http://www.avajava.com/tutorials/lessons/how-do-i-get-the-location-of-my-web-application-context-in-the-file-system.html | |
Re: After changing the java code in .java file and compiling it , did you restart the server? Server restart is must if class files are modified. If only jsp files are changed server restart is not required. Please verify your server logs, if a restart has happened on server side? | |
Re: @hala.qaddoumi Have you tried something on your own? If yes pelase post the code and tell us the errors | |
Re: I think this is your algorithm. Assume you are tryning to convert Decimal 9 to binary value. We know that (9) in base 10 = 1001 in base 2( i.e in binary). So we use popular double dabble method for this conversion ( I also see this algorithm is used … | |
Re: At line 12 in class proj5 --> train.addCar(new Boxcar<Person>(), 2); //this is wrong Just look at the constructor of Boxcar. So modify the this line to train.addCar(new Boxcar(), 2);// this is code asper your constructor declarationin Boxcar Please make sure your Person class implements Comparable interface, if not this code … | |
Re: you have put double variable "numToAdd" inside the do-while loop and you are accessing it in while condition like this } while (sum += numToAdd;);// this will not compile This is incorrect , since variable "numToAdd" is not visible outside the flower brackets {} of do-while loop. Hence declare the … | |
Re: Servlet technology is based on request / response model. When user requests something to the server by sending an HTML request. In the current case user can place a "get" request for the HTML page and server sends the htmlpage which is displayed on the client's browser. So now after … | |
Re: I could see some compilation problems here at lines 12 and 20. There is also another missing piece: Sorting.insertionSort(StringList); Can you give the details of this class Sorting which is having the method insertionSort(String[] arrayOfStrs) Using this information we can find what sorting algorithm is there and fix the bugs … | |
Re: @java123456 I am unable to understand the game program. Hence Please provide the complete information (clearly and more elaborately if you feel so). Please dont give the information in pieces. Also dont wait until other forum members ask you the missing information in your problem. How is generation in your … | |
Re: @crackprac can you please post your code which is related to 1.the jsp where you are getting the session scoped variable and navigating to next jsp. 2. the second jsp where you are retrieving again the same session scoped variable. | |
Re: What you are trying to do is "socket programing" using java. There is a nice tutorial published by by ORACLE in the below link. It is very useful for beginners. It covers every thing right from the basics http://docs.oracle.com/javase/tutorial/networking/sockets/readingWriting.html Full Server and client code examples are given here http://docs.oracle.com/javase/tutorial/networking/sockets/clientServer.html | |
Re: I found the problem at line 169 in class ProgThree int animalID = 0, cageNumber = 0, animalTotal = 0, petTotal = 0, zooTotal = 0; you are trying to acess animalTotal, petTotal, zooTotal statically from class Animal in method createOutputFile() public String createOutputFile() { String count = ""; count … | |
I am new to sybase. I came to know that i can take contents of a sybase table into a text file using an option called BCP Can anybody here explain how to use BCP in sysbase | |
Re: Line1 says private ArrayList<Artikel> artikelen;// arraylist still not initialized. I find here that the arraylist is not yet initialized in the above code. Even in the method voegToe(Artikel artikel) arraylist is not initialized. public void voegToe(Artikel artikel) { artikelen.add(artikel); } Hence user is not able to see the added items … | |
Re: Though you cannot call the method directly from another class since it is not visible to other classes(because of private access modifier). So you can create another pubilc method that calls private method "gradeExam()" like below inside the class DriverExam. public void callGradeExam(){ gradeExam(); } Instead of making a call … | |
Re: I found these compilation problems line 16 -->int counter;// this should be int counter=0;// initialization required for local variable line 29 --> new Random().next(49);// this should be new Random().nextInt(49) line 42 --> if (counter == 6){ //remove the "openingflower bracket" -->if (counter == 6) line 48 -->} not required , … | |
Re: First thing i observe that you are iterating a collection(row) and getting value date from the collection. Hence there will not be just one "date", but there will be same nubmer "date" which is equal to the size of the collection "row". Hence the logic is not correct here, since … | |
Re: Can you please provide the "full path" of the src folder.I think src folder is not inside any server like TOMCAT , Hence you are getting this error. for example: d:\temp\src ( it may be like this and i am only guessing). Normally if your code is deployed on TOMCAT … | |
Re: its simple currently you are compiling this way javac <className.java> You can add the option "-Xlint:unchecked" during compilation like below javac -Xlint:unchecked <className.java> But it is not necessary. You can ignore the message straight away | |
Re: Your program shows at line 15--> Sorting.insertionSort(intList); Can you please provide the details of this method "insertionSort" of class Sorting. it is obvious from the error message that class "Sorting" is not there and hence current program could not be compiled. Please write the a class "Sorting" with a static … | |
Re: I found issue in generating StarNumber in the function findStarNumber. You just need to modify the code at line 14 14 for(int n=1; n>i; n++){ // ..should be .....> for(int n=-1; n<=i; n++){ When i ran the program for number range 1 to 100 there is only one instance where … | |
Re: Hi, The porblem is at line number 2 while initializing the array you must provide the array size. hence modify the line 2 as below int[] arry=new int[5]; //5 is the array size and it can be any number also at line 7 --> system.out.println(k); // k is not defined … | |
Re: The problem is in class "Wall" This class is having a member "Image image". The class "Image" does not implement "serializable" and hence you are getting this exception--> java.io.NotSerializableException: sun.awt.image.ToolkitImage Here is a link where you find a solution https://forums.oracle.com/forums/thread.jspa?threadID=1204190 | |
Re: @abevenkat First you need to declare content type as ""multipart/form-data" on your jsp. <form action="uploadResume" method="post" enctype="multipart/form-data"> then using simple html tag <input type="file"> you can provide provision for file upload on jsp. For validation you need to write java script code on the jsp. In servlet you need to … | |
Re: I feel it is a logical error . You are doing a redirect inside a while loop; I feel instead of this declare a boolean variable assign its value=true even before you iterate over the list. Then inside the if condition block (when the result of if condition is true) … | |
Re: I see from your code there is a form "frmAddPopUp". and values to various elements populated **request.getAttribute("attribute name")**. I think dont want to do this way instead you want to make a database call from jsp itself and propluate the values to various fields on jsp. If this is the … | |
Re: you said the the hyperlink is "test.jsp?id=1" and you are also telling that by clicking on this hyperlink to want to open "lorem1.jsp". Can you please tell me how can you open "lorem1.jsp " by clicking on hyperlink "test.jsp?id=1". So your requirement is not fully clear. Can you please show … | |
Re: I understand your requirement is --> " TinyMCE " is just collecting documents like a jpg /doc/txt .. etc from user and then putting it on to a network resource like a network disk drive. From this network drive other people like support can later retrive this information and provide … | |
Re: @sunnykeerthi request.getParameter("some_value") gets the value from "request parameter" and not "attribute". Request parameters are sent as query string in a URL. The code where data from database is populated ON first JSP is given below. <input type="text" name="Allocation" size="75" id="Allocation" value="<%=rs.getString("DBID")%>" readonly="readonly"> I observe that this textbox is having only … | |
Re: You also need to a login servlet filter to block any direct access of "user_home.jsp" . Since access to "user_home.jsp" is allowed only if user passes validation on login.jsp. | |
Re: If you are facing problems with handling "unsigned bytes" in your code. Then there is "ByteBuffer" class which is part of -->Java 2 Platform SE v1.4.2. This class provides very good api and it can solve all your problems take a look at the below links http://stackoverflow.com/questions/946593/convert-bytes-to-bits http://stackoverflow.com/questions/4841340/what-is-the-use-of-bytebuffer-in-java I had … | |
Re: Instead of assigning values like this <instance-name>.variable_name = appropriate_value. It is better to have a constructor and pass all the values to the constructor while you create the object. Otherwise create getter and setter methods for all the class veariables. Then call the setter methods to assign the value to … | |
Re: I obeserve that the code does not find the number under guess. if user is trying to use binary search for finding the number under guess then this is not the correct implementation of binary search. I dont even find even if recursion is being used here. In any case … | |
I have this static block of code which is following Singleton design pattern. class Employee{ private static Employee emp; static { if (emp==null){ emp=new Employee(); } } public static Employee getEmployee(){ return emp; } } My doubt is if this code can be accessed by Mutiple threads concurrently and break … |
The End.