Win a copy of Terraform in Action this week in the Cloud forum!

nilesh beit

Greenhorn
+ Follow
since Feb 04, 2009
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by nilesh beit

Hi
I did what you said ,but still same error. It is not working until added to jre.
I tried adding to src , bin folders and set classpath still same error.
Respected members
I am developing a javamail application.
When i add mail api jars to applications directory and include them in class path then program gives runtime error

Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/mail/util/LineInputStream
at javax.mail.Session.loadProvidersFromStream(Session.java:940)
at javax.mail.Session.access$000(Session.java:187)
at javax.mail.Session$1.load(Session.java:882)
at javax.mail.Session.loadAllResources(Session.java:1141)
at javax.mail.Session.loadProviders(Session.java:898)
at javax.mail.Session.<init>(Session.java:220)
at javax.mail.Session.getDefaultInstance(Session.java:309)
at SendMailUsingAuthentication.postMail(SendMailUsingAuthentication.java:46)
at SendMailUsingAuthentication.main(SendMailUsingAuthentication.java:25)



Though the class is present in that package.

But when i include mail api jars through Window->Prefereneses->Java->installed jre->edit ->external jar
the program works fine

Any solution to this strange problem

Thanks
Nilesh

Hello
Thats not a zonealarm problem.
Assuming you are directly connecting to internet through broadband\modem and not a firewalled router which is blocking smtp and pop ports.

Add some properties shown below
12 years ago

SMTPAuthenticator auth = new SMTPAuthenticator();
Session session = Session.getDefaultInstance(props, auth);


This might be causing problem
You said you have created new class SMTPAuthenticator , but have you extended it from javax.mail.Authenticator . That is required.
This line should be

The class Authenticator represents an object that knows how to obtain authentication for a network connection.
Applications use this class by creating a subclass, and registering an instance of that subclass with the session when it is created.
When authentication is required, the system will invoke a method on the subclass (like getPasswordAuthentication)
12 years ago
Hey

I found two links which indicate that it may not possible with smtp.hotmail.com

1. Search term hotmail in http://java.sun.com/products/javamail/FAQ.html

2. http://www.emailaddressmanager.com/tips/mail-settings.html
this link says "Hotmail is using the HTTP protocol for connecting you to your mailbox."

Try sending with gmail first just to check whether setup is rigtht. Check you have setup everything as Ulf suggested. And then find ways for hotmail

Regards
12 years ago
Hey
try this code
Its working correctly

12 years ago
Respected members
Is it possible to increase servlet response timeout period? If yes How?

Thanks
12 years ago
Respected members

When i deploy application to tomcat for first time from eclipse, then it creates application directory hierarchy correctly. But when i overwrite the .war file from eclipse ide while tomcat is running then tomcat creates only some of files in WEB-INF/lib and nothing else in applications directory. All the other files and folder are gone.
Please suggest me solution.

Thanks
12 years ago

Solved it

Damn it was Eclipse bug . It typed .value as .Value in document.getElementById("name").value
The V instead of v which made all mess.
Thanks for the responses.
Hello
This is code similar to what m trying to do
The problem is readContents shows 'undefined'
Respected members
I have a Div tag named 'composeplan' which on clicking on a button displays a few textboxes. i used innerHTML to replace contents in div tag with html text for creating Textboxes using <input type="text" > etc to display those textboxes
Now when i try to read value in textbox using its id like document.getElementById("flight_no") i get 'undefined' as value
I tried document.getElementById("flight_no").value still output 'undefined'
document.getElementById("flight_no").id returns 'flight_no' i.e id of text box

Can please suggest some solution to read value from textbox.

Thanks
Dear ArAsh Dex
Thank you very very much for your code. I'll study and try to implement that code for responsXML.

Dear Bear Bibeault
Thanks a lot for showing another way that didn't strike my mind.

Respected members
I'm trying to do like this
1. I have a div msgDiv tag in which i have a table msgTab, that should display list of messages..currently table is empty
2. When i'll get a responseXML ,then the data in that response should be displayed in the table as links, which ,on onclick method should display method in textarea msgText.Something similar to outlook or latest yahoo mail.

so my problem is how to create table of links inside div tag at runtime when xml response is received. The data in <td> needs to be filled with values in xml response for n no. of lines

<div id="msgDiv" style="overflow:auto; width:1202px; height: 160px;" align="left">
<table id="msgTab" width="1202" border="1">
<tr>
<th width="40" height="30" bgcolor="#003399" class="style1 style3" scope="col">No.</th>
<th width="130" height="30" bgcolor="#003399" class="style1 style3" scope="col">Message type</th>
<th width="169" bgcolor="#003399" class="style1 style3" scope="col">Date and Time</th>
<th width="200" bgcolor="#003399" class="style1 style3" scope="col">From</th>
<th width="506" bgcolor="#003399" class="style1 style3" scope="col">Subject</th>
</tr>
<tr>
<td> </td>
<td> </td>
<th> </th>
<td> </td>
<td> </td>
</tr>
</table>
</div>



Thanks
nilesh