Java mail api error- Please Help

2593 byte By bronze-starDukes at 2007-11-26 12:15:34
Hi, i have set up an smtp server on my local machine. i have given the smtp host address as 127.0.0.1I am getting the following error though. please help me out with the problemC:\trainee>java Emailerjavax.mail.SendFailedException: Invalid Addresses; nested exception ...

Working code of a java application acceptin cookies?

217 byte By bronze-starDukes at 2007-11-26 12:15:35
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?

JSP page uploading an attachment and form data

391 byte By bronze-starDukes at 2007-11-26 12:15:37
Hi i am using a JSP page to upload a file..and submit some form data (including textboxes and checkboxes)..and directing the input to another JSP page which sends it to a JDBC bean..the problem is that i am not able to correctly do so...the request submits all the data at once which contains ...

Text over video

489 byte By bronze-starDukes at 2007-11-26 12:15:39
Hi!!!I'm coding a little program that loads a MPG movie and draws text over the movie. I have a problem in the next piece of code:DataSource ds = Manager.createDataSource(fileURL);ds.connect();cds = (PushBufferDataSource) ds;cds.getStreams()[0].setTransferHandler(this);ds.start();The problem ...

Centering horizontally a page consisting of several Page Fragments

322 byte By bronze-starDukes at 2007-11-26 12:15:40
While centering a simple page horizontally was greatly described in SJSCField Guide and working fine, the same technique didn't work for multifragmentjsf page.Have somebody implemented the centering such a page horizontally?Will appriciate for a working example.Thanks in ...

Application design question

399 byte By bronze-starDukes at 2007-11-26 12:15:41
hi all,i would like to have some pointers regarding this design question.I have a web application and in this web application i would have certain parts where insertion into database is needed.However prior to deployment of the web application, the user can simply turn on or off the insertion ...

Boot MS-DOS for Win Server 2003 on SunFirex4100

357 byte By bronze-starDukes at 2007-11-26 12:15:42
I have installed Win Server 2003 Std edition on SunFire X4100. I would like to boot to DOS using bootdisk. I have a USB floppy drive. But how can I boot to the bootdisk? Possible? As I bootup the machine, since the floppy drive is externally plug-in, I don't see any options to select the ...

Checking the Time format..

684 byte By bronze-starDukes at 2007-11-26 12:15:43
Hello Friends,I have a string s ="10:12 PM" (something like this). I want to check that this is the correct format of Time or not. For that I have used the Pattern class of Java and have a code like Pattern p = Pattern.compile("(\\d)(\\d)(:)(\\d)(\\d)(\\s)(A|P)(M)");Matcher m = p.matcher("10:20 ...

Javax.mail.SendException,,, Connection timed out

2109 byte By olspal at 2007-11-26 12:15:45
HiWas wondering if anyone could help me out to sort a problem I'm facing with a mail-application I'm configuring.I have a mailprogram that are gonna send all from 100 to a 1000 mail. This is business related, and not spam,,,so that is said.What happens is, that when sendinging mail, once in a ...

UnsatisfiedLinkError

539 byte By easygal at 2007-11-26 12:15:46
Hii Everybody,i have been trying to run my test application using CVM.i am using a native library libJNI.so and i have kept it in /usr/local/lib . I have provided a link to libJNI.so.1.0 from libJNI.so...now both are same.When i am trying to run my application it's failing with ...

Help with POI HSSF

3520 byte By sruthim at 2007-11-26 12:15:48
I am trying to read a excel file by using HSSF API. It is not reading file in correct order of cells ;Below is my code:class TestExcel{HSSFWorkbook wb;HSSFSheet sheet;HSSFRow row;HSSFCell cell;int k=0;java.util.Iterator iter,iter1;FileInputStream file;int ...

cups problem on solaris 10 part II

969 byte By hadi74 at 2007-11-26 12:15:49
Dear All , I just install cups from companion cd on solaris 10 06/06 , first time is problem conflic port 631 with ipp-print protocol ,After change port 632 on cups.conf , both cups agent and ipp-print work .The problem is when i test a print , the job status always cancel by the system , I ...

removing element from a list

467 byte By JusteUneQuestion at 2007-11-26 12:15:50
Hello i would like to know how to remove an element for exemple a personne from a list, if his name is on the list. The name of the person is furnish dynamically for exemple through a jsp page. I would like to know how to compare the name furnish with the list of person and if the name provided ...

Disabling Checkbox in EXPRESS

270 byte By rsdthfsth at 2007-11-26 12:15:51
Hi,I am trying to disable the checkbox depending on certain criteria, <Disable> will knock off the field all together which should not be the case, it should basically get unselectible.Would appreciate for any kind of help.Thanks

trouble with icons

231 byte By andreas2007 at 2007-11-26 12:15:54
hi,i want to store an icon in a mysql database.i get the icon with fileSystemView.getSystemIcon(file).but i found nothing how to get the icon in a mysql database.i hope you can help.Andreas

java persistence

337 byte By Anoop_KA at 2007-11-26 12:15:56
Hiii, In the java persistence api the EnityManager declares a function merge().when I read the api specification it given asmerge(T entity)- Merge the state of the given entity into the current persistence context.I did nt understand what is it actually.Can u tell me what is ...

Need Help on Sending Multiple Attachments

1906 byte By Christopher_Keith at 2007-11-26 12:15:57
[nobr]Hi to all,I hope some one will help me.. Im stuck with this one. I can only send one attachment.Is there someone who know how to send an mail with 2 or more attachments?My code is below, I followed this code from the toturial:Hope for a kind reply. :-)Thankz..MimeMessage myMessage = new ...

Generic warning .....

645 byte By p.v.k.k at 2007-11-26 12:15:58
Hi ,Here my code gives unchecked warning .Can any one solve this warning ?Please urgent !Here my code : import java.util.HashMap;public class DataMap<K, V> extends HashMap<K, V>{public V put(K key, V value){if(key == null || value == null) return null;if(key.getClass() == ...

Wake up on DataInputStream.readInt()?

747 byte By Maik at 2007-11-26 12:15:59
Hi all,I am developing an application for two mobiles that communicate using Bluetooth. Communication is handled by a method containing several DataInputStream.readInt()'s. I noticed data missing because it is overwritten by either the method containing those readInts or events fired of by the ...

Portal Server 7 Installation failed

2160 byte By amitkul511 at 2007-11-26 12:16:01
Hii am trying to install sun java system portal server 7 on linux.here are my system details:OS:Red Hat Linux AS 4Swap:6 GBMemory:2GBHard Disk: 80GBI am getting Output of Summary Report as:...Sun Java(TM) System Portal Server 7 2005Q4 : Installation Failed, Configuration Failed...The Log file ...

Problem in collections:

679 byte By Nistelrooy at 2007-11-26 12:16:02
I am having a a problem here:Map<Integer, String> map = new ArrayList<Integer, String>();Collection<Integer> keys = map.keySet();for(String id : categories) {if(Collections.binarySearch(keys, Integer.valueOf(id)) > 0) { some code...}}While compiling i am getting the ...

Need an example of how to use java.nio.channels.FileLock

132 byte By Puzz at 2007-11-26 12:16:03
Hi,I need to use the Filelock, but can磘 find any examples on how to implement it -is it still used in Java 5.0?

Wat is the work of this Class

95 byte By ttrr at 2007-11-26 12:16:05
DocumentBuiledrDocumentBuilderFactory...etc....can anyone explain me in detail...

Using threads in web services

343 byte By ryanmccollum at 2007-11-26 12:16:06
Is it possible to use threads in a web service? What I propose is a web service that provides a number of different operations just like a standard web service. However, a new thread would be started at the initialisation point of the web service. This thread would wake up every hour and carry ...

byte []

293 byte By Me_Titus at 2007-11-26 12:16:07
Hi you all,I know this questions might have been asked a couple of times here but I am not been able to find a way of doing it. How can a get a stream of bytes from an byte[] ?Unfortunnately my java.io skills aren't that great... Any help is welcome.MeTitus

Run exe in java

307 byte By eses at 2007-11-26 12:16:09
Hi,By using Runtime rt = Runtime.getRuntime();Process proc;proc = rt.exec("some exe");commands I run an application in the client.I want to run the application inside the java window (Frame or applet).Is there a way?I really need ...

Exception Details: java.lang.IllegalArgumentException table1.

317 byte By Srinivasan1983 at 2007-11-26 12:16:11
Hi when i try to add some of the data to the database from the jsp page it is showing like Unhandled Exception: Exception Details: java.lang.IllegalArgumentException srni.Table1.IDReally i am frustrated by doing this from past 2 months. Any help would be appreciated. Thank You in ...

need an example(java 1.5/1.6), how to access certificate from usb etoken

304 byte By ajkr at 2007-11-26 12:16:12
Hi friendsI am trying to access certificate from USB eToken from Aladdin using java 1.5/1.6. i am not able to do this. i need an example using 1.5/1.6 for reference. also suggest any documentation for this.thanks to all in advance.ajkrMessage was edited by: ...

can we cache the remote object?

130 byte By crr at 2007-11-26 12:16:13
hi,can we cache the remote object?is this right way of doing?please suggest meregardscrr

How to create/write project report for java source code editor?

350 byte By gaurav.padia at 2007-11-26 12:16:14
Hello everybody,I am studying in last semester of diploma computer science and engineering. I had created tiny java source code editor in last sem project and I have to write projecr report on that but I don't have any idea about writing project report so please give me guidance or anything ...

Problem with web.xml

1645 byte By Toto at 2007-11-26 12:16:15
hey guys,i'm using netbeans 5.5 to develop my first servlet application. i created my project and tried to configure the web.xml file. here is my xml file:<?xml version="1.0" encoding="UTF-8"?><web-app version="2.4" xmlns=" http://java.sun.com/xml/ns/j2ee" ...

Adding JSP files to the collection

398 byte By ptah101 at 2007-11-26 12:16:16
Hello,I just migrated to the sunone 6.1 webserver and its my first time working with the search engine. I have been able to add docs such as html, pdf, txt ...etc as shown below:*.(jsp|html|htm|pdf|doc|xls|ppt|txt)All these file type get added to the collection, except for the jsp pages. How ...

Making a game, timing problem

1321 byte By Sasa_Ivanovic at 2007-11-26 12:16:17
I'm about to make a game which uses swing. And when i do animation, on diffrent systems game executes at diffrent speeds. Here is how i solved it :// private membersprivate static int fps, frames, seconds;// constructorfps = 30; // assagning a default valueframes = 0;seconds = ...

Drawing filled polygons

298 byte By Elfblood at 2007-11-26 12:16:18
Hi, I need to draw color filled polygons in javame, but it seems, this isnt possible.I found only methods within the LowLevel API to draw triangles and rectangles filled.Have I to split my polygons to triangles to make them filled ?maybe someone can help me

RFT

80 byte By R.D at 2007-11-26 12:16:19
how to avoid ArrayIndexOutofBound exception in Rational Funational Tester

urgent help!!

652 byte By da_master_of_nuthin at 2007-11-26 12:16:20
hi i have this code:public static void readAccounts(String fileName){String[] lines = LineIO.readAllLines(fileName);for (String line : lines){String[] a = line.split("&");{ if(line.startsWith("P")){account.add(new PrepaidAccount(a[1], a[2], a[3], ...

drawing with double buffering to a JFrame

361 byte By Sasa_Ivanovic at 2007-11-26 12:16:21
I want to create a simple JFrame and draw stuff to it via Graphic object using double buffering.If I create a loop and draw constantly using JFrame.getGraphic().xxx, am i doingdouble buffering. ( 'cause i read somewhere that swing components automaticly use double buffering ). And is this the ...

calculating with float...

332 byte By Elfblood at 2007-11-26 12:16:23
Hi, how can I manage the following calculation, without external librarys.A = X / (Z / Y)A, X, Z, Y are all short, but the 2 results shouldn be rounded...is it possible in java me to calculate something like this ?...mhh...Im sorry for this newbish question, maybe its quite simple, but Im ...

EJB Query Language where condtion based on date

632 byte By anu@singapore at 2007-11-26 12:16:24
Hi,I am using EJB3 query language. In the table I have a column called requestdate which is in date time format. I have created an entity class.I need to select few records using query language(named queries) based on this requestdate matching to the current date. I want to compare only based ...

what is JSR

110 byte By nareshbonagiri at 2007-11-26 12:16:25
hi this is naresh,i need the exact thing about JSR plz send me the thing about it.thank u

double array

273 byte By johnjohn at 2007-11-26 12:16:26
hi, i have a 2d array int [] [] IDAndNumber as a parameter :public void updateDetails(int [] [] IDAndNumber){//code here}in the code above, i need to be able to get the persons ID from the array and their number, how can i do this?

"Weird" Problem (javaw crash)

3316 byte By davierik at 2007-11-26 12:16:28
I was playing around a bit with mtrace, trying to modify it to profile the new-keyword instead of the constructor of Object. This led me to make a number of changes to java_crw_demo. Without going into too much detail and taking up page after page with code, I'll mention the relevant parts ...

Convert Hashtable to Vector.

203 byte By EikHors at 2007-11-26 12:16:29
Is there an easy way to convert a Hashtable to a vector containing the keys from the Hashtable?I know I can run through my Hashtable and adding the keys to a manually created Vector, but...

Problem with org.apache.POI.HSSF API

476 byte By Raviji at 2007-11-26 12:16:30
Hi Friends,I'm Ravi working in Java and J2EE, I have a problem that I am not able to enter Excel sheet data into the Mysql Database. I am able to read data from the excel file but not able to insert into the database. I tried to do it through 'insert' command but it is inserting onvalue in ...

Reading a file

185 byte By hi_all at 2007-11-26 12:16:32
Hi,Can anyone tell me how to read a file line by line.I am confused between so many Readers and writers!!Please and urgent Thanks in advanceBye

Can 1 application deployed more than once on a server without any changes?

231 byte By Gyuszi_ at 2007-11-26 12:16:33
Hi all!My question is in the topic.Could anyone give me a short answer?Someone has sad that JNDI names of EJBs should be different per application.Is it true?Thanks in advance.Gyuszi

Distinguishing only the text contents of JEditorPane

423 byte By islandhope at 2007-11-26 12:16:34
I'm trying to send contents of JEditorpane to database that is saved as an HTML file. The html file contains references to images and I've been able to distinguish all images of the JEditorPane and send those to database. Now I need to send the text contens of JEditorPane to database. Problem ...

Executing a shell script from a java program

507 byte By tsnrscreen at 2007-11-26 12:16:35
Hi,I'm facing a problem while executing a shell script from a jsp page.I'm using exec() function.It's working fine for single statement scripts.But if the script consists of any database processing and some other processing statements,it's not returning the correct exit status of the ...

Distinguishing only the text contents of JEditorPane

530 byte By islandhope at 2007-11-26 12:16:36
I'm trying to send contents of JEditorpane to database that is saved as an HTML file. The html file contains references to images and I've been able to distinguish all images of the JEditorPane and send those to database. Now I need to send the text contens of JEditorPane to database. Problem ...

sample code for paging

182 byte By kingofpeace at 2007-11-26 12:16:37
have a peace day i have code for paging, its display 1,2,3,,4 etc but i need like that 1,2,3......... 7,8,9,10 like google,any body help me.thank u