36,051 Topics
![]() | |
In our code we have a table with check boxes in one column.How to retrieve selected rows values to the action class. | |
Hi all, I am trying to learn my Java, and I am using my terminal in my mac to run my Java code. It compiles but when I run it I get the following error message: [CODE]-bash-3.00$ java Bifurcationlo Exception in thread "main" java.awt.HeadlessException: No X11 DISPLAY variable was set, … | |
I have my brackets all messed up and was wondering if someone could help me fix them. I am sure there are other errors too, so any advice would be greatly appreciated! :) [code] import java.util.*; import java.awt.Container; import java.awt.TextArea; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.IOException; import java.text.DecimalFormat; import java.text.NumberFormat; … | |
I have a grid of links in ma jsp..in the href attribute, i ve specified the navigation to a servlet...... in the servlet, i want to read the value of the link that i clicked in the jsp..... for example, If my link appears to be <a href="ProductController" target="right">A</a> in … | |
When I compile the program below I get the message "variable x may not have been initialized" yet as far as I see I did. I am trying to have a program where a person selects a number from 1 to 10 and it then shows the corresponding string from … | |
hello!!!! i m a student of 3rd year.....and i want some mini projetcs in java..... so can u please help me........ from Radhika | |
can someone check my codes where my error was?! [code] import java.io.*; import java.util.Arrays; public class exer06_01{ public static void main(String [] argv)throws Exception{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String sh = " "; String str = new String(sh); System.out.print("Enter a string: "); str = br.readLine(); System.out.println("The reverse: "+ReverseString.reverseIt(str)); … | |
Hi there. I received an assignment to sort Strings alphabetically which a user inputs. So far I've been able to produce the first word that would be top in the sort, so if someones inputs ("All Big Cats"), the first would be All. Anyways that is where I am now … | |
What code to find Max value and min value in this Array... ? Help me Please..? import java.util.Scanner; import java.lang.Math; class Work4_1 { public static void main(String[] args) { Scanner input=new Scanner(System.in); int[] value=new int[10]; int max,min; for(int i=1;i<value.length;i++) { System.out.print("Enter Value : "); value[i]=input.nextInt(); } Math.max(value[i]); <<< It's True...? … | |
i have installed mysql , and JDK . I wrote the following code to test jdbc . But it didnt work [code] public class Test { public static void main(String[] args) { try { Class.forName("root.mysql.jdbc.Driver").newInstance(); System.out.println("Good to go"); } catch (Exception E) { System.out.println("JDBC Driver error"); } } } [/code] … | |
hi 'm aparna... Am developing a web application with j2ee and sql 2005 Express edition as the back end.. When i connect with the jdbc driver in system DSN and test the connection, the connection turns out to be successful, and when I run the application, the web page is … | |
I have a server which uses MySQL and supports many clients, and everything works perfectly fine when the MySQL database is on the same machine as the server. However, when it's on another machine, due to what I believe is the slow connection there are several requests from different clients … | |
[CODE] < form name=form1> <% int x = 0; while ( x < 10) { %> <label name="<%=x%>"> <input type=textbox name=inaki> <br> <% x = x + 1; } %> <input type=button value=go onclick="doit(this)"> </form> <script> function doit(sthg) { var x = 0; while( x < 100) { alert(document.form1.inaki[x].value); x … | |
I attended one interview today,Interviewer asked me one question regarding the creation of unique identifier. Question : Consider same webapplication is deployed in 3 webserver.if any user registered in any of my application,a unique identifer is given to the user.It cannot be stored in a database.3 webserver should not produce … | |
Hi all, I'm writing a program which will replace certain words in entered text and output the modified sentence. I've opted to use StringTokenizer to split the sentence, put the words into a string array, use a 'for' loop to replace the necessary words and then output the array once … | |
Hi.! uhm i just partially finished my card game project "Lucky Nine" in simple java application.. The results of the game are just printed in System.out.println, and i cant manage to turn it into just JOptionPane.. uhm, anyways, i need you guys to help me how to load images from … | |
Hi, I'm trying to understand how the Calendar, GregorianCalendar and Locale classes work. Say I instantiate two Locale objects and then two Calendar objects, each with their respective Locale. Then ask for the always troublesome DAY_OF_WEEK on every Calendar object as in the following code: [CODE=java] import java.util.Calendar; import java.util.Calendar.*; … | |
I've spent a few hours tonight reviewing basic java syntax, but did not learn how to create applets or windows. I was reading tutorials on java3D, but sadly they were all pretty bad.. They didn't explain what was going on, and were using classes extending Applet and other java libraries … | |
Hello everyone, So, far i have worked on employee management system(sap - abap), inventory payroll system (C lang), Reverse engineering(assembly),Quiz (VB). Now i want to work on java so that i connect my project with any server file like Sql connectivity,ms access, ms excel etc (i don't know how to … | |
I want to run multiple test cases, for a java program. How can i write script that causes the same program to run for different test cases. Test cases need to be included in same file or different files? how to write the script? | |
Can someone pls give me a fragment code on how to do a binary search using java.... I want to search it by name Say for instance, System.out.print("Enter name you wish to search:"); //My array of name is already sorted... My only concern is how to do a binary search... … | |
Hi all, i am new to javabeans and JSP, i have some problem to retrieve value from beans, any help will be appreciate. my index.jsp has a from [code] <form action="update.jsp" method="POST"> userName <input type="text" name="userName" /> <br> realName <input type="text" name="realName" /> <br> <input type="submit" value="Log In" /> </form> … | |
I'm making an app that, when executed will continue to do something in an infinite loop, forever (or until the process is manually stopped). My goal is to create a process with a unique name which will run this application (right now java uses javaw.exe as the same name for … | |
[code=JSP]<%@ taglib uri="/WEB-INF/lib/pagertaglib.tld" prefix="pg" %> <pg:pager export="currentPageNumber=pageNumber"> <pg:item> my search data.. </pg:item> <pg:index> <pg:pages><% if (pageNumber.intValue() < 10) { %> <% } if (pageNumber == currentPageNumber) { %><b><%= pageNumber %></b><% } else { %><a href="<%= pageUrl %>"><%= pageNumber %></a><% } %> </pg:pages> </pg:index> </pg:pager>[/code] This is the code i typed and … | |
i'm transfering simple(small) files (using jsp) from client to server. what is the difference when i do it using apache commons and without using commons(by using files)? i've done it with files.....should i shift to apache commons? thanks guess me! | |
I have a class which displays the pixel information of an image. Right now the class takes a buffered image in its constructor but I would like the class to allow an image to be passed from another class. How can I do this because right now if the class … | |
Hi how can i create the struts project in exadel studio 4.0 and eclipse 3.2. please and one send the full process of this. | |
I am having a problem getting my calculations to work here. I managed to get the objects in place. Any suggestions?? import java.applet.*; import java.awt.*; import java.awt.event.*; public class TravelCostEstimator Applet implements ActionListener { //This part defines how the program will look private Choice choice; Label companyLabel = new Label("Traveler's … | |
In servlet we can do this. [CODE]<servlet-mapping> <servlet-name>exampleServlet</servlet-name> <url-pattern>/example</url-pattern> </servlet-mapping>[/CODE] But how to do it for jsp file ? Thanks.. | |
I want to start graphics programming. I do SDL in C++, and took a look at OpenGL in C++, but it was like reading Greek! What functions handle graphics programming in Java? I am not very good at Java, and would like to bring it up to the level my … | |
Before i thought all i had to do was add graphics on the background of the panels. [url]http://blogfriendlyzone.webs.com/WheelOfFortune/WheelOfFortune.html[/url] But now when i look at, i think it would need more than graphic background to give it more of a professional look to it so that people would want to play … | |
(servlets, jsp)i'm to tranafer a file from client to server using files concept. i donno how to start. plz gimme a basic idea of implementation procedure and i'll try the rest. waiting 4 help, guess me! | |
(servlets, jsp)i'm to tranafer a file from client to server using files concept. i donno how to start. plz gimme a basic idea of implementation procedure and i'll try the rest. waiting 4 help, guess me! | |
Actually these is not just printing text. It somehow involves logic but I keep on thinking these for almost a week. First I printed a price list then I want also to print the receipt. What can I put to eliminate the price list and then print the receipt. But … | |
I have a live website that is experiencing periodic errors where data is not making it into the DB - yet certain functions are still progressing. In an attempt at tracking the jdbc connection errors, I've manually updated various fields with accurate data. When I go back to the webapp … | |
JAVA does NOT post any way to fix this error 1101 for VISTA on the JAVA website. When I try to install the Java 6.0 update 7 on my Hewlett Packard computer with Windows Vista Home Premium and I repeatedly get the same error 1101. Java only posts the fix … | |
Hi everybody, I'm having an issue with using SAX parser. Some of the values between elements are not reading properly ie. partially. eg: <userNumber>+10117388488</userNumber> value here will be read as 17388488. But this is not happen every element of the xml file and only happen in few cases. Anyone have … | |
When I am taking input from file using Ubuntu as OS, DataInputStream is giving different values from the number in file. What to do about it?? I dont know much about file int, I also tried out using BufferedStream, Still getting some strange values. Please reply soon. ![]() | |
I'm trying to make an app that will memorize 1 point on the screen and continuously click that point (running on a timer) until it is manually stopped. I've noticed that the mouse functions require you to be "inside" a component for it to recognize the mouse position or do … | |
This is a mini-paint program which uses class Point. It is very basic and allows a line to be drawn, then altered by its size and color. The issue that I am having is when I change color or size, all of the previous lines change with it? [CODE] import … | |
[code=html]<html><head> <script language="JavaScript"> function update() { confirm("Are you sure?(Yes/No)"); document.forms[0].submit(); } </script></head> <body> <form name="form1" method="post" action="controller/servlet"> <input type="submit" name="event" value="Add"> <input type="button" name="event" value="Update" onClick="update();"> </form> </body> </html>[/code] here, on the click of both buttons "Add" and "Update",the control should go to the servlet.While clicking Update, the script runs … | |
I am doing a Java project for cash registry. I cant italicize or bold a text. Can someone help me. | |
Hi All, i using Hibernate to develop a project for my company, i getting jvm out memory error often, every 5 refresh. please help me to find out what is causing this. Thanks | |
I need to access the information in an excel file, my only problem is, all the forums i read use the ODBC bridge via the data source tool buillt into windows. Since i am running windows 7, i can only assume, i get an error such as the setup routines … | |
Hello all, I've been working on a project where I wish to retrieve two sets of information from a MySQL database using two prepared statements. When I try to do this I get a blank screen, but the first query is successfull executed. Any suggestion would be greatly appreciated. Thanks. | |
hi all i am creating a webproxy in jdeveloper. i am getting all the codes written in core java ..... starts with public static void main()... i want to use with jsp . how can i do that? thanks n regards vij | |
(jsp) Is it possible with static hashmaps to store the logged in users (without using db) in a webapp and retrieve all users list later? plz give me an idea for implementation. or is there any other better way? thanks, guess me! | |
Hi, [B][I am experienced][/B] I would like to create a virtual 3D world. I am familiar with SDL and 2d graphics programming. I am experienced with C++ and I know a little Java (I have enough programming experience to learn a language quickly). I am familiar with the traditional game … | |
I need help to write this code of java for a lotto game . ANd I dunno how to do anything pls help. Its Due in 2 days. Can someone write this code for me . The pdf file is the instructions The lottoprogram file is wher i have to … | |
Hello, I'm trying to get my first RMI Program working, and I keep getting a Timed out exception. I believe that the error is occurring in the "bind" method... Does anyone know what the problem might be? Here's the code and the error: [code=Java] /** Server */ import java.rmi.registry.Registry; import … |
The End.