Sending files without closing the socket output

3838 byte By bronze-starDukes at 2007-11-26 12:13:33
Hi all!I'm new to sockets, and I'm trying to get a file from a Server...the problem is that unless I close the socket output stream the Client will hang...Here is the code:Clientpublic class FileClient {public static void main(String[] args) {try {Socket socket = new ...

Sending files without closing the socket output

3838 byte By bronze-starDukes at 2007-11-26 12:13:34
Hi all!I'm new to sockets, and I'm trying to get a file from a Server...the problem is that unless I close the socket output stream the Client will hang...Here is the code:Clientpublic class FileClient {public static void main(String[] args) {try {Socket socket = new ...

JEditorPane setUI()

110 byte By bronze-starDukes at 2007-11-26 12:13:35
Hi, I'm pretty new to java programming and I would like to know how to use setUI() for my JEditorPane.

gathering the data

5242 byte By bronze-starDukes at 2007-11-26 12:13:37
how do i make it so that when the radio button is clicked, a string of text is displayed below it? everytime i make an action listener for one of the radio buttons, my application won't run import java.awt.*;import java.awt.event.*;import javax.swing.*;public class swingMakeup implements ...

Ensuring order of child properties with JPA/EJB3?

541 byte By bronze-starDukes at 2007-11-26 12:13:38
When I have a one to many relationship, a simple parent child relationship, I specify the relationship like this:@OneToMany(cascade = CascadeType.ALL, mappedBy = "reportType")private List<ReportTypeValue> values;But when the List is populated, the actual order of the elements is ...

Performance issue with JDBC Oracle BLOB insert !

1004 byte By bronze-starDukes at 2007-11-26 12:13:39
Hi All,I'm facing a peroformance issue in inserting BLOB data in Oracle db using standard jdbc. Here's a code snippet I'm using :File binaryFile = new File(fileName);InputStream is = new FileInputStream(fileName);insertSql = "INSERT INTO JMS_MESSAGE_TEST ( JMS_MESSAGE_KEY, JMS_MESSAGE_TEXT ...

security breach

259 byte By bronze-starDukes at 2007-11-26 12:13:40
Hi,Im running sjsas 8.1 and whenever I put an additional dot after the url, the jsp reveals the source codes. I tried this on version 9 and it still occurs.e.g hxxp://www.main.com/index.jsp.Is there a solution to this?Thanks

Sun ONE Web Server 6.1 and Beans

324 byte By bronze-starDukes at 2007-11-26 12:13:41
Hello,I am learning JSP and I have a new install of Sun ONE Web Server Enterprise Edition 6.1. I have a some java code (a class) I would like to use in my JSP page via <jsp:useBean...>.Where do I put my .java (or compiled .class) file?For example: ...

Windows Vista; Recording with java sound, help!

709 byte By bronze-starDukes at 2007-11-26 12:13:42
Hey guys, I have built single/multitrack recorder using the java sound API. It has came to my attention that the sound input does not work with vista. I don't have vista, but, when I had access to a vista box, it appears like the TargetDataLine available() method does not work properly in ...

Application installation method

290 byte By bronze-starDukes at 2007-11-26 12:13:44
Hi,Currently, my company install java application into the corporate server using the EAR (Enterprise Archive)file, as the application logic gets complicated, the EAR file grows. Is this an efficient method ? Any way to keep the EAR file small ?Thank you for your time.

Which is better ? Single EAR file or Multiple EAR files ?

605 byte By bronze-starDukes at 2007-11-26 12:13:45
For a single EAR file application, sometimes, only a small part of the application needs to be updated, then the whole application needs to be compiled and the whole EAR file needs to be installed.Heard that we can split one EAR file into different EAR files. Has anyone tried that before ? Care ...

Problem in huge result set

490 byte By bronze-starDukes at 2007-11-26 12:13:46
I have problem in using huge result set.I'm making report application which the output is Ms. Excel (using POI), and the report can consist thousands of rows and may columns. I have to fetch it, process it, and make a beautiful Ms. Excel report file.The problem is, when I fetch too many row ...

Cannot change transaction isolation level in the middle of a transaction

276 byte By bronze-starDukes at 2007-11-26 12:13:47
por favor pido ayuda a quien sepa de la solucion de este problema, es q estoy trabajando con postgre, e intento realizar actualizaciones a la base de datos y me sale este errorCannot change transaction isolation level in the middle of a transactiongracias

consecutive objects(please very fast)

455 byte By bronze-starDukes at 2007-11-26 12:13:48
I have a loop that must create objects and give it consecutive names like:Obj0, Obj1, Obj2, etc...I tried Object ("Obj" + i) = new Object();where i is the loop counter but it failed, I haven't got the least clue how to do it so please help me because I am on a very tight deadline schedule. Any ...

calendar help

285 byte By bronze-starDukes at 2007-11-26 12:13:51
hi, i have a database with start-date and end-date (12/6/2006 - 12/9/2006). is there a possible for the program to extract the date out from the database and throw into the calendar component? and is there a way to count the week within the start-date and end-date?thanks

J M S

148 byte By bronze-starDukes at 2007-11-26 12:13:52
I'm a newbie (not to Java) to JMS. What is JMS and normally when to use in a J2EE application? Please provide me a simple example with code.

Game

240 byte By bronze-starDukes at 2007-11-26 12:13:53
How many years of experience would it take to create a game such as RuneScape? Only it would be 2D Isometric graphics OR like RuneScape Classic (2D people, 3D terrain)?If you need any more information let me know.Robert

JSF problem

155 byte By bronze-starDukes at 2007-11-26 12:13:54
I want to know if there would be any problem if the JSF components are embedded inside a html div tag.Message was edited by: KiranSagi

Open SSO : Modified AMConfig couldn't be found after configuration

5970 byte By bronze-starDukes at 2007-11-26 12:13:55
Hi, I'm trying to deploy the opensso(opensso.war) in the jboss. I have got it running and can configure it well. The problem is when i restart my jboss, it shows the configurator.jsp instead of login page, as I'm not yet successful configuring open sso. I check in the AMLog and have an error ...

Unable to compile class for JSP

5453 byte By bronze-starDukes at 2007-11-26 12:13:56
Hi Tomcat 4.0 & jdk 1.4.1 using struts fame workthe application is running smoothly.But whenever i add a jfreechart JAR .the problem starts.Already running jsps will show the folowing error. jfree jar is included to generate pie charts.But as i remove the jar ,then it will be ok.please ...

A couple questions about applets and games

1003 byte By bronze-starDukes at 2007-11-26 12:13:57
I'm relatively new to Java and I'm working on making a standard, simple game. Now I've looked through the Java Applet tutorials and I can make basic Applets that show graphics and whatnot. But I am interested in making an executable version of this run by a Driver Class. I'm not able to ...

Flash archive from FTP server

1004 byte By bronze-starDukes at 2007-11-26 12:13:58
I created a flash archive for a Solaris 10 x86 server. I then moved the file to my Solars 9 x86 ftp server, and placed the file in several directories, tried each and keep getting the error:The following errors were detected in the archive(s) you selected:-unexpected error found with media or ...

Help Please.. Sorting an array with a class.

3365 byte By bronze-starDukes at 2007-11-26 12:13:59
HelloI'm having trouble sorting an array that uses a class. I have to sort it by GPA and I can't quite get it.Here's my code:package test2;import java.io.*;public Main() {}public static void main(String[] args) throws IOException{BufferedReader input = new BufferedReader (new ...

Help please

568 byte By bronze-starDukes at 2007-11-26 12:14:01
Does anyone happen to know the answer to this question?Assume that the program below is invoked with the following statement: java mystery 1 2 3 4 11 360 108public class mystery { public static void main(String args[]) {int x[] = new int[args.length - 3];int y[];int w = 1;y = x;y[y.length-1] = ...

RessourcesBundle localization loading in jsf page

1691 byte By bronze-starDukes at 2007-11-26 12:14:02
Hi there !Well, as the title says, I have a problem loading RessourcesBundle in my jsf page.Let's say that I don't change the locale, I just want my page to load the right ressource bundle according to the browser settings.So i put this code :<f:loadBundle ...

Is it a better choice to go with JAXB over sax and dom

392 byte By bronze-starDukes at 2007-11-26 12:14:03
Is JAXB really a better solution over sax and dom in the present project we are planning to go with JAXB rather than sax(our xml file is huge)after some initial study and working around it seems good but i would like to have your opinion on the topic I am sure there is lot of people out there ...

Final year project due - brain too frazzled to fix small problem

1060 byte By bronze-starDukes at 2007-11-26 12:14:06
Hello,I am in my game class, and have filled up various arraylists with values.ArrayLists A, B, C, D, Z, XHow can I make the following not give loads of errors like cannot find symbol symbol : variable player1location: class irsds3.Game3if( player1.checkForDominance()!=0 ) if ...

submit multiple forms

697 byte By bronze-starDukes at 2007-11-26 12:14:07
Hi all, I have been approached to help develop an application that will allow users to sign up for your service, (fill in forms, that will be stored in a DB, and with this information, we sign them up to the specific directories they have chosen to register with using the data they entered. I ...

Getting msn to work with Gaim

511 byte By bronze-starDukes at 2007-11-26 12:14:08
Hello all,I have been trying to get msn to work on gaim. Checked other posts, got info that gnutls is needed.gnutls depends on libgpgerror and libgcrypt. I installed all of them successfully after getting the packages for solaris 10 x86 from sunfreeware.com.however, I tried running gaim, but ...

jdk-1_5_0-doc.zip

166 byte By bronze-starDukes at 2007-11-26 12:14:09
I'm looking for the documentation file: jdk-1_5_0-doc.zip, so that I may download it. Seem to remember seeing it in the past , but can't seem to find it now.

Applet inherited methods are not accessible to javascript code

1565 byte By bronze-starDukes at 2007-11-26 12:14:10
Hi,I am running into a weird problem with a relativelly simple JApplet. I have couple of applets in one jar what I can in my html pages. I figured to use proper OOP and the common get/set properties methods are in a super class. This methods are then used by the javascript to pass/execute code ...

JRE 6 - install language?

4321 byte By bronze-starDukes at 2007-11-26 12:14:11
Windows XP-SP2; US-English version.I had JRE 6 beta installed, and everything was in Japanese.Now I uninstalled the beta and try to install the final version. The installation dialog is again in Japanese, and I fear the installed product will also be in Japanese.Question: how can I force the ...

java jar file

415 byte By bronze-starDukes at 2007-11-26 12:14:12
Hi all,I am developing web based application using apache as a webserver. I have one application which is located in the folder apache/webapps/foo/foo2/myapp.jar . This application must access the class which is located in the apache/webapps/foo/WEB-INF/classes. My question is what is the ...

reading from a file and inserting in to database

137 byte By bronze-starDukes at 2007-11-26 12:14:13
Please give me the code to read data from a text file which is separated by semi colon to the respective columns of a table

Number of Messages in a Queue

131 byte By bronze-starDukes at 2007-11-26 12:14:14
Hi,How do i get the number of messages in a queue.I'm using the Oracle 9iAs server.Regards,Pari

how to do finger print scanning using java

333 byte By bronze-starDukes at 2007-11-26 12:14:15
hi, this is ravi kiran.i have been working on a project which deals with scanning the finger print of a customer and storing the finger print template to the database.i have no idea how to do it in java.i am using a USB finger print scanner.can any one tell me how to do it in java.thanx in ...

BigInteger.probablePrime() doesn't output the correct bitlength?

2017 byte By bronze-starDukes at 2007-11-26 12:14:16
Hi,I was trying to implement an algorithm for generating primes, p, that give an easy factorization of p - 1. To do this I am using BigInteger.probablePrime(int bitLength, Random rnd). For some reason, though, it never seems to give me a prime that has the bitlength I specify. This is how I ...

How to replace string with image( Say Emoticons )?

289 byte By bronze-starDukes at 2007-11-26 12:14:17
Hello Friends !!I am working on chat messenger and want some help in "How to access Emoticons when somebody typed :), ;), :)) and many more strings.....?"Is there any sample code to do that job or any function to perform such task?Thanks in Advance....

A problem with AJAX.pls!

4482 byte By bronze-starDukes at 2007-11-26 12:14:18
I am learning Ajax,so I find an example from web,but I came around a problem ,and can't find the error where it is.I parse the source files here,please help me to check and point the error to me ,thanks.As follows:JSP(ajaxsel.jsp): <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 ...

hi problem while getting mail content

203 byte By bronze-starDukes at 2007-11-26 12:14:20
hi dude getting problem while retriving mail content from multipart/mixed mail the content is displaying like this javax.mail.internet.MimeMultipart@146218a please help me out

how to use java on websites (for applications)?

675 byte By silver-starDukes at 2007-11-26 12:14:21
i am 100% internet retarded so i could use some help.i want to get a cheap web hosting package to make a website for my java apps.on my computer i can write a program that binds to a portat my ip address and people can connect. can i do this with a web hosting package? how do i run the program? ...

Help writing and reading from server

1028 byte By bronze-starDukes at 2007-11-26 12:14:22
I have a signed applet that is trying to read and write a file to the server. I have a logfile stored on the server at www.learning-java.com/logs.logfile.txt.The program runs and doesn't error, it just doesn't write to the file.This is my code:URL url = new ...

ActionListener & KeyListener

5826 byte By bronze-starDukes at 2007-11-26 12:14:24
I am trying to use and action listener and a key listener in my GUI, but i get an error message saying that i cannot apply the Keylistener, can anyone help?import javax.swing.JFrame;import javax.swing.JPanel;import javax.swing.JTextField;import java.awt.BorderLayout;import ...

Working code of java application accepting cookies?

217 byte By bronze-starDukes at 2007-11-26 12:14:25
I read through the tutorials and I couldn't get the CookieHandler class to work how I intended it to. Can anyone show me some working code of a java application accepting cookies so that it can read a website?

JTable method calling issue

1614 byte By bronze-starDukes at 2007-11-26 12:14:26
I had an interesting observation with my JTable implmentation: The "getColumnCount" method was called many times (likely to be equal to the number of columns) when a JTable is rendered. Similarly, the "getRowCount" method was called many times as well. Interestingly, when I scroll the table, ...

IECanvas Vs. ExCanvas (JAVA Frame)

354 byte By bronze-starDukes at 2007-11-26 12:14:27
Hi All,Till IE 6 I used to render the IE in my JAVA frame through the technique IECanvas , but now IE 7 has hit the market and IECanvas is not able to render the IE in JAVA frame ...Could any one please suggest me some link, tutorial, etc on Excanvas .. form where i can get the necessary ...

How to check the object running in JVM without using Reflection paack and

197 byte By bronze-starDukes at 2007-11-26 12:14:29
Procedures on how to check if JVM (some application) IS RUNNING?Note :without using Reflection package?Without modifying the code? (because code is in production)

IECanvas Vs. ExCanvas (JAVA Frame)

354 byte By bronze-starDukes at 2007-11-26 12:14:30
Hi All,Till IE 6 I used to render the IE in my JAVA frame through the technique IECanvas , but now IE 7 has hit the market and IECanvas is not able to render the IE in JAVA frame ...Could any one please suggest me some link, tutorial, etc on Excanvas .. form where i can get the necessary ...

Adding custom headers to a HTTP Request

477 byte By bronze-starDukes at 2007-11-26 12:14:31
Folks,I'm wondering if it is possible to add custom headers to a HttpRquest. In other words is it possible add new headers to the HttpServletRequest. We have addHeader methods for Respones but not Requests. Servlet Filters dont seem to let u do it too.I saw that the deprecated ...

Date

526 byte By bronze-starDukes at 2007-11-26 12:14:34
Need to pick start date and end date of a month between the date's specified.For example start date is 12-01-2006 and end date is 18-06-2006.I want to know the start date and end date of january,then feb and up to june...i can't use the standard 01-01-06 as start date and 31-01-06 as end date ...