35,617 Topics

Member Avatar for
Member Avatar for albertkao

My controller.java encounter an input string: "undefined". Please help. [CODE]public ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception { int rowsPerPage = 20; String rowsPerPageStr = request.getParameter("rowsPerPage"); logger.info("rowsPerPageStr " + rowsPerPageStr); if (rowsPerPageStr != null) { rowsPerPage = Integer.parseInt(rowsPerPageStr); }[/CODE] My jsp page use javascript as follows: [CODE]window.location = "hwdisplay?rowsPerPage=" + …

Member Avatar for javaAddict
0
424
Member Avatar for happyhound

Hello, I have been programming with the same JDK SE since last semester and now all of a sudden I am getting an exception in "main" with just a print statement. I uninstalled the old then reinstalled a newer version of the JDK SE from sun but I am still …

Member Avatar for peter_budo
0
134
Member Avatar for Nickair

Hi, I am currently learning the Java programming language and have downloaded the latest Eclipse Platform to program with and encountered an interesting error while trying to import a folder with some of my previous work. the importing client in eclipse encountered some error about a buffer overload which i …

0
88
Member Avatar for Addi15

Hey Guys I was wondering if anyone could help me. I have to put pictures such as JPEG's into a swing program as part of an assignment. I've looked in textbooks and online but anything I find doesn't work. Can this be done cause I'm completely lost with it? Please …

Member Avatar for Ezzaral
0
59
Member Avatar for Amurka

Annual Interest Rate [COLOR="Red"] Monthly Payment[/COLOR] 11.00 [COLOR="Red"]952.32[/COLOR] 11.25 [COLOR="Red"] 971.26[/COLOR] 11.50 [COLOR="Red"]990.29[/COLOR] 11.75 [COLOR="Red"]1009.41[/COLOR] 12.00 [COLOR="Red"]1028.61[/COLOR] I've done the hard part and completed the project, but I can't figure out how to get my program to output in two columns like above. Since this site doesn't take spacing, black …

Member Avatar for alisneaky
0
2K
Member Avatar for bletchley

Any good web resources out there for picking up C++ after already knowing Java? It's kind of a yawn to have to go back over concepts that are already familiar - functions, classes, polymorphism, recursion, etc. Really just looking for syntactic differences. Would be great to find some solid tutorials …

Member Avatar for Ancient Dragon
0
97
Member Avatar for gunjannigam

I want to Edit the Title of Save Dialog Box in JFileChooser from Save to Something Else. How is it possible?

Member Avatar for Freaky_Chris
0
82
Member Avatar for bletchley

I'm pretty proficient with Java but am not sure what's going on with pointers, classes, or imports/includes in C++. I originally had a size() function but I was getting error about it conflicting with my 'int size;' variable. Can functions not share the same name as variables? I renamed it …

Member Avatar for jonsca
0
122
Member Avatar for Illidanek

Something that i'll probly need to know in the future or even soon. What is the proper term of calling this | thing but blinking, when you type and it shows where you are typing. And is there any java API or any java commands linked to this? thx

Member Avatar for Illidanek
0
99
Member Avatar for drogba111

Hi there , basically i need to find connected components in graph using deep first search. i have already implemented the DFS method but unable to think how am i supposed to print out which is the connected components. is there any hint in implementing it using dfs?tips or pseudo …

0
38
Member Avatar for gokul

Hi, I am developing small chatting application... when i try to run the application, it throws the IO Exception while creating sockets.. How to resolve resolve the this one..? please help me.. i attached the code for your view...

Member Avatar for debjit.samsung
0
194
Member Avatar for john249D

I need to write an inheritance hierarchy for classes quadrilateral, trapezoid, parallelogram, rectangle and square. Quadrilateral bieng the superclass of the heirarchy. Make the hierarchy as deep as possible. Specify the instance variables and methods for each class. The private instance variable of Quadrilateral should be the x-y coordinate pairs …

Member Avatar for jwenting
-1
140
Member Avatar for KSUliz

[code=java] import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.text.*; import java.text.DecimalFormat; public class Grades extends JFrame { //construct components JLabel title = new JLabel("Grades"); JTextPane textPane = new JTextPane(); int numberOfGrades = 0; double total = 0; DecimalFormat twoDigits = new DecimalFormat ("##0.00"); //initialize data in arrays int[] grades = …

Member Avatar for moutanna
0
172
Member Avatar for lumbeelock

Can someone please HELP??? [CODE] public class Person { private String name; private String address; private String phoneNumber; private String email; public Person(){ } public Person(String name, String address, String phoneNumber,String email) { this.name =name; this.address=address; this.phoneNumber=phoneNumber; this.email=email; } public String toString() { return "Person "+ this.getName(); } public String …

Member Avatar for moutanna
0
282
Member Avatar for why1991

For my program I am working with simple graphics and need to display a straight row of squares from left to right decreasing in size. I also have to program this recursively so that it makes the squares following the first one by itself. My problem right now is that …

Member Avatar for darkagn
0
116
Member Avatar for ceyesuma

hello. I believe my InputStream is is null. Is there a way to get it to work? [code]InputStream is=pr.getClass().getResourceAsStream(path);[/code] [code] /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package schoolAppView.utils; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; /** …

Member Avatar for BestJewSinceJC
0
170
Member Avatar for ceyesuma

hello. Could someone tell me what I need to change to get the initial contcext for my JDesktopApp? [code] public JDBCSchoolofdbDAO() { try { Context initCtx = new InitialContext(); Context envCtx = (Context) initCtx.lookup( ModelUtils.getResource("JavaCompEnv")); dataSource = (DataSource) envCtx.lookup( ModelUtils.getResource("DataSource")); } catch (NamingException x) { ModelUtils.log(x); throw new InternalError(x.getMessage()); } …

Member Avatar for ceyesuma
0
199
Member Avatar for jnthn205

Can someone tell me how to print out each array and its value? we are given a random array of 1000 doubles. If a value in the array is above or below 90% the average, we are to print the "flagged" values. So far, I just have it printing one …

Member Avatar for jnthn205
0
250
Member Avatar for crackers8838

Hi, I was wondering is anyone could tell me how or give me pointers on how to convert the base of a number to another base. For example 2010 base 3 to base 4. I am stumped and I would appreciate any help I could get.

Member Avatar for javabru
0
89
Member Avatar for pradeepktg

Hi All, I have a database table "productdetails",where i have id,name,price,prodimage(blob) fields. Am displaying all the records using jsp inside a div with the help of while loop, am getting all the datas correctly except the image. Check below code and let me know how to display the image retrieved …

Member Avatar for peter_budo
0
72
Member Avatar for ardn0001

Hi, Im new in this forums looking for an answer for my problem, I find a similar post here so I decided to suscribe here because this website look very professional. I had the following code: [CODE=java]public class Gen { public static void main(String[] args){ args = new String[6]; args[0]="0101"; …

Member Avatar for ardn0001
0
186
Member Avatar for gajen007

I have confused to use Java Native Interface with dll file (by c++).. To get the squired value of a number which will be given by user... this is my class file...which also should be converted as header file for c++ file (dll file preparing...) import java.io.IOException; class First { …

Member Avatar for Freaky_Chris
0
148
Member Avatar for samrin

here is my code but i need to get output if my Sample input: 3 Sample output * *** ***** *** * will must look like this! now can anyone please help me with this .. [code=java]public class p2.java{ public static void main (String args[]){ int x; SimpleInput sInp = …

Member Avatar for javaAddict
0
168
Member Avatar for snowball14

Can anyone tell me what I am doing wrong? I can't get it to calculate the charges.

Member Avatar for stultuske
0
108
Member Avatar for java=hard

I have been scrounging about, trying to get to compile this properly, but I get a stupid error message at the end. I also do not know how to implement an accumulator into the methods, could someone at least teach me how to implement one? Into Main, or just a …

Member Avatar for stultuske
0
158
Member Avatar for knowledgelover

Hello there, we have a web application that must read a card which is plugged to the client, the reading of the card is done via a specific library, which is as a jar file, as have googled that situation , concluded that to achieve that we need to use …

0
71
Member Avatar for novellino

I am trying to make a form using html and JSP, get the data and save them in an XML file. I use also Tomcat 1.6 as server. For generating the XML I am using the XStream library. I have a Customer.java class with get and set methods for a …

Member Avatar for novellino
0
520
Member Avatar for Virux

Alright, been trying for at least an hour. I want to be able to add functions to a JPanel Example, JPanel a = new JPanel(); a.setTransparency(color, strength); or something like that. a.myFunction(parameters) Is this even possible? I am getting sick of overiding the paint method for every panel I create …

Member Avatar for Virux
0
90
Member Avatar for chern4ever

need help, this is my code! [CODE]import javax.swing.JOptionPane; public class Lab2_1 { public static void main(String[] args) { int value1=0 ,value2=0 ,operator=0; String temp4="1"; while(temp4 != "0" ){ String temp1 = JOptionPane.showInputDialog(null,"Please enter first value."); value1=Integer.parseInt(temp1); String temp2 = JOptionPane.showInputDialog(null,"Please enter operator.(+,-,*,/)"); String temp3 = JOptionPane.showInputDialog(null,"Please enter second value."); value2=Integer.parseInt(temp3); …

Member Avatar for javaAddict
0
108
Member Avatar for sawant_nitesh

content eg. 1. java.lang.String, 2. java.util.HashMap<Integer, Integer>, 3. java.util.ArrayList<Integer>, 4. java.util.HashMap<Integer, ArrayList<String>>, 5. java.util.HashMap<Integer, ArrayList<ArrayList<String>>>, I need a regex for matching method parameters in Java. I have tried with this one.. ([a-zA-Z\. ]+,)|([a-zA-Z\. ]+<[a-zA-Z\., ]+(<[a-zA-Z\., ]+>)*>[ ]*,) It is matching first 4 strings. But it is not matching 5th one, …

Member Avatar for Freaky_Chris
0
86

The End.