Paul Okeke

Ranch Hand
+ Follow
since May 16, 2009
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Paul Okeke

At the begging I thought it will return the loaded Date but I found that I was long. Thanks for your concern.
13 years ago
I reaaly want to the implication of calling static members of a class with an instance of such class. For example, Calendar now=Calendar.getInstance(); now.setTimeInMilis(someLongValue); now.MONTH; it gave some incorrect value but i want to know why?
13 years ago
Rob Prime, I don't know that it is an offense Posting what I felt will assist Matthew McHale if not solve his situation.
I felt we are all here to help each other, Matthew McHale has almost the same problem as I do.
In my case, I have already gotten some solutions which I felt will help Matthew McHale if not solving his own problem totally.

I post my Apologies.......................
13 years ago
I think I have a related problem but I was able to solve mine problem half way by eliminating the but still my sent Mail so not yet delivered to the desired destination.
How I solved it:

But my unfortunate thing is that my mail is not delivered after successful sending.
13 years ago
You may also Need a mail server like Apache James Mail Server if you don't have steady internet connect for your learning.
But JavaMail API and Java Activation Framework are inevitable.

Good Luck
13 years ago
Actually, I don,t mean configuring my GMail non Yahoo account.

This is my situation,

I have Apache James Mail Server installed on my Local Machine. I also have internet connection which I use to try my code for communication between my local mail server and remote servers like GMail and Yahoo.

So far, things works fine on my local server but I issues arises when I tried access to a remote server like GMail/Yahoo with the code in my previous post and got

Now, I observed that I don't need uncomment either lines 5 or 6 in order to send mail to remote server.
Sending mail with either line 13 or 14, the message sends successfully with out any error.
BUT, unfortunately the message never get delivered to the Yahoo/Gmail Account.

Please Your Help will be high apreciated. I have researched alot for a solution without success.
13 years ago

I use the code above to send mail with my local machine but the problem comes when I Uncomment path of the commented lines in other to send mail to the my yahoo and gmail account respectively:

My attempt to yahoo server gives:

javax.mail.MessagingException: Could not connect to SMTP host:, port:25, response: 421;

While my attempt to gmail server gives:

javax.mail.MessagingException: Could not connect to SMTP host:, port:25;

Please let somebody help me check if there is something that am not getting right?
I use Apache Jamas Mail Server,
Thank for your help
13 years ago
I am sure that the HttpServletRequest have some methods retrieve the URL and the URI from a particular request object.

But if you talk about the second servlet, then you MUST know the port where it was deployed.

DNS server could have being the solution, to resolve this inconsistency/change in the address (port no).

But since it seems there is no DNS server to resolve this, your have no alternative than to create a mechanism to conform that
the URI is valid before processing a request.

A change in this port no is as good as saying the was changed to
I dont see any alternative to this...

Will equally appreciate any other person will have a better idea
13 years ago
Depending on the need, I think it will be clever to have some hidden text field then make assign the Javascript variable as the value for your hidden field which could be assessed later by the JSP/Servlets.
13 years ago
Welcom to Java,
You have to define the port of your choice having in mind that;

Port numbers in TCP/IP systems are 16-bit numbers and the values range
from 0–65535.
In practice, port numbers below 1024 are reserved for
predefined services, and you should not use them unless communicating
with one of those services (such as telnet, Simple Mail Transport
Protocol [SMTP] mail, ftp, and so on).

Client port numbers are allocated
by the host OS to something not in use, while server port numbers are
specified by the programmer, and are used to identify a particular service.

Note that for you to establish a communication,
Both client and server must agree in advance on which port to use. If the
port numbers used by the two parts of the system do not agree,
communication does not occur.
13 years ago
It is not just like that, you will need to <c:if ... to test and control the condition you need.

Break out of, when your condition if meant.>
13 years ago
Also make sure that your have the right exception in your catch
13 years ago
Using relative is far easier,

If only you know you context root (mostly the URL that does not specify any particular page)
eg http://localhost:8080/yourApplication/. Here "yourApplication" is the context root.

All you need to do is reference all other pages assuming that the context root is your working directory.

eg if you want to reference http://localhost:8080/yourApplication/forms/registrationForm.jsp, you can do it this way
13 years ago