35,618 Topics
![]() | |
Hi friends, I am using struts framework. I problem is I have fetched the data from from the databse in arraylist and want to display in the drop down here is the code i have written <html:select property="productCategory"> <html:options collection="array" /> </html:select> But I am getting following exception: javax.servlet.ServletException: javax.servlet.jsp.JspException: … | |
here is the code.. but it is not working.. why? [code=java] import java.sql.*; public class Connect{ public static void main (String[] args){ Connection conn = null; try{ String userName ="testuser"; String password ="testpass"; String url = "jdbc:mysql:/localhost:3306/test"; Class.forName("com.mysql.jdbc.Driver").newInstance(); conn = DriverManager.getConnection (url,userName,password); System.out.println ("Database connection established"); } catch(Exception e){ System.err.println("Cannot … | |
I've always wondered how GObjects had such significantly improved pixel-rendering over objects sketched out by the Graphics object in paint and paintComponent methods. What approach should I take to receive the same effect for big images that are say 1024x960, when using simple Graphics? Is there some way to traverse … | |
Hey all..am quite new to Java and I have encoutered a problem with my program. I am getting the error message "cannot find symbol constructor". I have tried to figure it out but I have failed. I have read around that adding an empty constructor would help but this is … | |
Hi. Me again. I was wondering how could i code my jsp page when i want the following page. I have the main contract page where you can see the certain property that is in that contract. Contract and Property are connected by contractproperty which contains both contractID and propertyID. … | |
Hello everyone. I was having a bit of a problem with printing out a text file using Formatter. Whenever my program writes to a file it prints everything on one line and when I type \n it prints out a square instead of a new line to separate my information. … | |
![]() | Hi! I need some help. It's probably really simple but im stuck and need some guidance. I want a simple loginpage where the user logs on and matches the username and pw in the database. Then i want to redirect him to another site. this new site should check that … |
hey i am beginner in java. i am not able to resolve differences in interface and with abstract class. do abstract class have methods defined??does those methods have body?? if so for abstract classes do not create objects, how they r invoked?? | |
I know it is a rookie question but how do I get the system to print what is in personList? [code] private void buildPersonOptions() { List<Person> personList = null; try { Session session = HibernateUtil.getSessionFactory().getCurrentSession(); Transaction tx = session.beginTransaction(); Query q = session.createQuery("from Person"); personList = (List<Person>) q.list(); } catch … | |
Hi there. i am trying to create an java class dealing with arrays though i am only new to programming. i have created a class with a char array field though i am not sure how to initialise it in the constructor. i am also trying to implement a few … | |
hello, I just noticed a problem in my code. hope you'll would help me. normally we have a login page where the userid and password is validated from database .now the problem what i am facing is [code]while(rs.next()) { if((rs.getString("m_emp_no").equals(user)) && (rs.getString("m_password").equals(pwd)) ) { " " direct to some page … | |
Hi. Does anyone know why i cannot write an object in a socket (any object) but i can write a primitive type such as an int. | |
i want a tool to convert the python files to java.Since i am completely unknown to python and want some python files converted to java...Can anyone please help me ??????U can reply to me directly on [email]tejas.dunk@gmail.com[/email] | |
Hello. I am presently tearing a HibernateTravelApp tutorial ([url]http://www.netbeans.org/kb/61/web/hibernate-vwp.html[/url]) apart to see how it works and I was looking at the traveldb that ships with netbeans and I am having trouble understanding how the tables interact because the name table only has one row with names and I don't see … | |
I want to draw some text on a JFrame (later it'll change to a JPanel), but not have the text necessarily be horizontal. I've found some decent examples online that have worked well, but they've all been 500+ lines long. I'm hoping it can be done in a way that's … | |
Hi all I have made this small text editor and it works fine. I would just like you too look over it and give me any tips and things, that would make the code better (more acceptable to you). [code=java] import javax.swing.*; import java.io.*; import java.awt.*; import java.awt.event.*; public class … | |
Hi Folks, I'm a Java newbie so please forgive me if you've heard this one before... Got a question for ya about an small app I am working on. I have a banking app that creates accounts, then makes deposits and withdrawls to/from these accounts. Its very simple. I have … | |
[code=java] public class book { private double basePrice = 0; private double vat = 0; private double discount = 0; private double sellPrice; public book() { setBasePrice(0); setVat(0); setDiscount(0); } public book(double basePrice, double discount, double vat) { setBasePrice(basePrice); setVat(discount); setDiscount(vat); } public double getBasePrice() { return basePrice; } public … | |
Hi, I have a MySQL database I want to access with the Java Persistence API. The database I use consists of two tables (supplier and product) and is created with a SQL-script I made. Furthermore I generated the database classes (Suppliers and Product) with Netbeans using the "Entity Classes from … | |
Hi :) Could you tell me if there is any possible way to start IE or Mozilla in Java using Swing/AWT components? I don't want just to load html in jeditorpane, i want to really start ie or mozilla. Thanks. | |
Hi. Does anyone know why i get a classnotfoundexception when i try to read an object that implements the interface serializable from a socket. | |
hiya - i'm making a new game and want to know how to make a simple rounded race track. i've done everything else but want to know what to use. I've tried g.fillRoundRect(left.x,left.y,left.width,left.height,left.arcWidth,left.arcHeight); but an error pops up can anyone help - i want to make a simple race track … | |
Can a html that contains JavaScript be loaded in Swing ? | |
I have developed a java web application which runs in tomcat. the application is served by a another EJB application running in a different jboss server. all is done but i cant get a hosting service to host it. I tried nameonthe.net. but after one week they have refunded my … | |
[B]Hi Guys, I was thinking of creating this software with Java language but am still sceptical about it because the java runtime makes java applications slow. I came arouund the JNI and i thought i could implement java with it since i also know C and C++. The only problem … | |
hey, I'm having a problem in getting this programm right.. this is what it does...in every 1000ms it paint an image.. I'm using a new thread to paint the image....the thread taking care of the paining then creats a new thread to play the sound..But what i want is to … | |
Sir, is there any method which return the Local on giving a date as argument. publlic Locale getLocale(Date d){ // return locale } help me to get the locale. Please help me to get the locale on giving the date.Ie when i give us date,i need to get US. Please … | |
In: multiplication = var1 * var2 Division = var1 / var2 addition = var1 + var2 Subtraction = var1 - var2 exponentiation = ??? One more thing, how to read this one, isDigit? Thanks in advance | |
Hi, How to find out the repeating substrings in a string which is having maximum characters. eg : abc abcd a abc abcd Answer : abcd |
The End.