35,618 Topics

Member Avatar for
Member Avatar for peadro

Hello folk's I`m new to JSP and to this forum so apologies for any mistakes. I'm struggling with a drop down menu selection, I have a database with 6 locations and if I want to select any of them and I can (so far so good)but I can't get it …

0
53
Member Avatar for riahc3

Hey Im currently working on a application server written in Java but to use information from a C++ program. The company seems to agree that rewriting thousands of lines of code would be time consuming and simply making libraries of key functions of the C++ program and then passing them …

Member Avatar for riahc3
0
2K
Member Avatar for umair jameel

How to convert int value to another data type in java or from other data types to int.I just need syntax of it.

Member Avatar for JamesCherrill
0
76
Member Avatar for Labdabeta

I accidentally hit Source->Externalize Strings... on eclipse and now hundreds of string literals are stored in a properties file. I want them back scattered about my code. How can I do this without re-entering them?

Member Avatar for JamesCherrill
0
158
Member Avatar for poojavb

I need a help to understand what condition can be applied to the below requirement: If suppose we have 2 species name eg. dog and cat... and we have few breed name for the above mentioned species.... so what condition can be applied in such a way that the user …

Member Avatar for niranga
0
175
Member Avatar for asif49

I have to complete a project about employees and their jobs. Here are the requirements: 1 Must be able to add new employees 2 Must be able to add new jobs 3 Must be able to attach a registered employee to registered jobs (several jobs to the same employee) Since …

Member Avatar for stultuske
0
87
Member Avatar for Undermine

Hello guys, I am using Hibernate + Spring with netbeans to make a web application. I have it working correctly and displaying data from the DB. My problem is I only know how to do one hibernate query which is shown below. How can I do insert/delete queries. For instance …

Member Avatar for peter_budo
0
306
Member Avatar for Matth963
Member Avatar for Matth963

[CODE]int numdigits(int num){ int len = 0; while(num >= 10){ num = num/10; len++; } return len; } [/CODE] This algorithm is used to count the number of digits but I can't understand it. Someone explain it to me please :D Thanks

Member Avatar for hfx642
0
106
Member Avatar for jaxi

For a program I'm writing, I'm trying to get rid of doubles in my string (which is a concatenation of a keyword and the alphabet). My code was compiling fine until I added the code about concatenating the substrings before and after the character I'm trying to get rid of. …

Member Avatar for NormR1
0
203
Member Avatar for DaniwebOS

Can you guys run this program, I'm having issues running it. [ICODE]import java.io.*; import java.util.*; //class definition public class NumberAdder { //The main function public static void main(String args[]) { //This declares a file to open. File outFile = new File("numbers.dat"); int sumEven = 0; int sumOdd = 0; //File …

Member Avatar for NormR1
0
456
Member Avatar for Jade4127

I am confused about composition in java. I am able to write code using inheritance...but have no idea how to turn it into composition...from what my textbook said the two are quite similar has a is a relationship and all. I ultimately would like to write the cylinder code using …

Member Avatar for fausto1234
0
548
Member Avatar for begueradj

Hello people, I created an innter class like this [CODE] public class OuterClass{ int attribute=0; class InnerClass { public void method1(){ attribute++; } public void method2(){ System.out.println(attribute); } }[/CODE] My problem is when I call method2() in a correct way, it displays 0 and not 1 as I wanted. Can …

Member Avatar for JamesCherrill
0
215
Member Avatar for SeasideP

Hey i was wondering if someone could have a look at this and help me figure out why the output is repeating it's self and how I would fix it. I have spent several hours trying to fix this. Thanks in advance. [CODE]/* Author : * Date :02/10/10 * Title: …

Member Avatar for SeasideP
0
88
Member Avatar for Chaitanya Dhote

how to .class file from another package????? following is run time error when i execute like this.... [CODE] e:\java2>java employee1 Exception in thread "main" java.lang.NoClassDefFoundError: Employee1 (wrong name : com/project/employee/Employee1) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632) at java.lang.ClassLoader.defineClass(ClassLoader.java:616) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:14 1) at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) at java.net.URLClassLoader.access$000(URLClassLoader.java:58) at java.net.URLClassLoader$1.run(URLClassLoader.java:197) at java.security.AccessController.doPrivileged(Native Method) at …

Member Avatar for peter_budo
0
114
Member Avatar for taranpreet

i am making a chat server in jsp. i want to insert the message entered by a user in a table but i don't want to use any button to enter the message. can anyone suggest me a method to insert the message in the table when the user writes …

Member Avatar for peter_budo
0
46
Member Avatar for swink11123

[CODE] private int [] minValues; private int count = 0; String[] tempString ; tempString = line.split("-"); System.out.println(tempString[0]); [/CODE] but when i try to add the store into array's code, [CODE] private int [] minValues; String[] tempString ; tempString = line.split("-"); minValues[count] = tempString[0]; <-- it say incompatible types System.out.println(tempString[0]); count++; …

Member Avatar for JamesCherrill
0
105
Member Avatar for bombay1982

I would like to write a program which asks the user for a number and prints off the tree, For example 7. Program prints something like that then. If user put 3 tree will start from 3. I think you should get the idea. [CODE] "Enter a number: 7" 1 …

Member Avatar for NormR1
0
364
Member Avatar for hhheng

I'm working on a project and want to open the window to the position the same as last time the window was closed, and open the window the same size as last time was closed also. The rough script is as below: When user open the window and resize it, …

Member Avatar for harinath_2007
0
255
Member Avatar for DarkVision

Here my code [CODE] public static String modele; public static String supplier; public static int height = 180; public static final String[] COLORS = { "RED", "BLUE", "GOLD", "ORANGE", "PURPLE", "PINK", "NONE" }; public static String description; public static boolean withSnow = false; public static boolean sale = false; public …

Member Avatar for JamesCherrill
0
101
Member Avatar for gouki2005

I want to fill a Drop-downlist with a list look heres my list code [CODE] public List ListaEmpresas(){ SessionFactory factory = HibernateUtil.getSessionFactory(); Session session = factory.openSession(); Transaction transaction = null; transaction = session.beginTransaction(); Criteria crit = session.createCriteria(Empresas.class); List empresas = crit.list(); List list = new LinkedList(); // Doubly-linked list list …

Member Avatar for gouki2005
0
132
Member Avatar for bobytch

Hello everyone in this activity i should use if, else if, Boolean, for loop, do while loop ok here is the OUTPUT i must do: GRADING SYSTEM! 96-100 =1.00 94-95 =1.25 92-93 =1.50 90-91 =1.75 88-89 =2.00 86-87 =2.25 84-85 =2.50 82-83 =2.75 80-81 =3.00 78-79 =3.25 75-77 =3.50 74-below …

Member Avatar for CSloan7597
0
191
Member Avatar for Alviery

Can anybody help mi getting the area so that I display it on a message? Here is the driver: import javax.swing.JOptionPane; public class Driver { public static void main(String[] args) { Rectangle tennisCourt = new Rectangle(); { JOptionPane.showInputDialog(null," Enter Lenght: " + tennisCourt.setLength() ); JOptionPane.showInputDialog(null," Enter Lenght: " + tennisCourt.setWidth() …

Member Avatar for stultuske
0
122
Member Avatar for jeraldmuthu

[CODE] public List<SelectItem> getAnalysisList() throws ProjectContentServiceException { selectItems1.clear(); if (getTreeTable() != null && this.rootTreeNode != null) { this.rootTreeNode.accept(new TreeNodeVisitor() { public void visit(TreeTableNode node) { TreeTableUserObject obj = node.getUserObject(); if (obj.isLeaf()) { List<String> aa = new ArrayList<String>(); Map<String, Object> attributes = obj.getAttributes(); if (attributes.containsKey("selected") && ((Boolean)attributes.get("selected")) == Boolean.TRUE) { lis …

0
88
Member Avatar for pmehalik46

hi everyone. i am writing a small caeser cipher program in java for a lab is my cs class. I am sure that most of it is generally okay, but when i run the program it will not return the newly encrypted or decrypted code. Why??? is there something wong …

Member Avatar for JamesCherrill
0
733
Member Avatar for vvsjon

Google don't crawl my javascript link.. [CODE] <td><span>1</span></td><td><a href="javascript:__doPostBack('grdCompany','Page$2')">2</a> ........ [/CODE] How i crawl these link in Google??

Member Avatar for hericles
0
104
Member Avatar for tr4nquility

I would like to build a simple highlighter program. The idea is to set an image to change the cursor so that it will look like a highlighter. And then, when we move the cursor, it will trace a line along with our movement. The requirement here is to be …

Member Avatar for tr4nquility
0
905
Member Avatar for chiiqui

I have installed MySql here already, now i need to connec it because I am going to make a project which it needs a Database, but my problem is that I don't know how to set the connector/j/ I don't know how to install it/I don't know how to put …

Member Avatar for peter_budo
0
96
Member Avatar for Alviery

How do I set a new salary and a new department for the emp1 object class using a setPosition method. Everything works except that for some reason I just can't show the results on Message. Here is the Driver: import javax.swing.JOptionPane; public class Employee { public static void main(String[] args) …

Member Avatar for thines01
0
100
Member Avatar for poojavb

Hello All, I need to create a java code for auto numbering. A value will be mentioned in a table in database eg 10000. The java file has to retrive the database value and start the auto numbering from that particular number. It should increment by 1 for the next …

Member Avatar for poojavb
0
396

The End.