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

Tuhin Ghosh

Ranch Hand
+ Follow
since Oct 11, 2006
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 Tuhin Ghosh

Hello Sathish,

I working on a project to develop intra day flash based financial charts ! back end is JAVA,database is SQL server.
how does your book help me.

thanks in advance
tuhin ghosh
12 years ago
hi ,
I am developing financial charts using Jfree Charts,right now i am trying to display open high low chart with moving average (3 separates line graphs ) ,While my Chart is plotting correctly including tool tip for the open high low, the rest 3 line graphs without tool tip.

Can any one suggest any good tutorial (other than the Authors)

thanks
tuhin
Sorry for the conf.

Its like
ASP >> [Servlet >> JSP]

thanks
tuhin
13 years ago
JSP
Hi...
I am working on a project where I have to invoke a JSP page from a ASP page , Any suggesstion how to submit an ASP to a servlet

Thanks in advance
Tuhin
13 years ago
JSP
Suggest me some good tutorial on how to implement hybernate on an existing
j2ee project

thanks
tuhin
HI..,
Am using struts ... to build a content management system
I am Using <html:file></html:file> tag to get the file from the local system
Everything 's working fine in the Action
How ever on reload the page is displayed without any File name which was selected earlier....
On viewing soutce of the page
I found the "file name" in the <html:file value="c:/desktop/abc.xsl"></html:file>
My question is
1) If i am setting the value in the struts property file
Why its not displaying...?
2) In case there is any other way to resolve the issue...Explain


Thanks in advance

Tuhin

[ September 23, 2007: Message edited by: Tuhin Ghosh ]
[ September 23, 2007: Message edited by: Tuhin Ghosh ]
14 years ago
hello ranchers,
Recetly i got a task of creating Menu and sub menus.
I am using <Div></Div> to show and hide submenus on desired selection.
Now, Here is the issue....
The popup blocker of IE blocks my sub menu ...

any ideas how to solve it?
Links are welcome....
Should i use something other than <DIV>?

Thanks in advance

tuhin
Thanks Paul for the reply


I got the resultset in a xml format.

Is there anyway i can store this resultset into a xml File


Is there anyway (dom writer which takes parameter as resultset) so that i can parse w3.document object






regards
tuhin

[ January 17, 2007: Message edited by: Tuhin Ghosh ]
[ January 17, 2007: Message edited by: Tuhin Ghosh ]
hello ranchers,

i am very new to xml.

i got a task to fetch some values stored in the database (sql server) and display in jsp page using xml.


any ideas how to connect , fetch and store..


Links are welcome

thanks in advance

TUHIN
Hi,
k one more thing i successfully connected using Outlook. on port 25 with same SMTP name. Guide me !!!



Thanks

TUHIN
15 years ago
thanks Ulf and paul,

i did check the telnet smtp.ktk.airtelbroadband.in . Its aborting connection.
Is this an Issue? Coz am successfuly fetching the mail from the same server using POP.

so any other thing that i missed...? which is important.Please tell me.

Thanks
TUHIN
15 years ago
hello ranchers,

I am developing a client application which can send and recieve mails from ISP. The recieving part works fine .I m able to connect to the POP server and able to fetch the mail. But i could not able to send the mail. It gives teh forllowing exception:! Any thoughts about wat went wrong

Exception:---->>>>


<Oct 31, 2006 12:01:28 PM GMT+05:30> <Warning> <HTTP> <BEA-101248> <[null]: Depl
oyment descriptor "web.xml" is malformed. Check against the DTD: org.xml.sax.SAX
ParseException: cvc-elt.1: Cannot find the declaration of element 'web-app'. (line 2, column 10).>
DEBUG: not loading system providers in <java.home>/lib
DEBUG: not loading optional custom providers file: /META-INF/javamail.providers
DEBUG: successfully loaded default providers

DEBUG: Tables of loaded providers
DEBUG: Providers Listed By Class Name: {com.sun.mail.smtp.SMTPTransport=javax.ma
il.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc
], com.sun.mail.imap.IMAPStore=javax.mail.Provider[STORE,imap,com.sun.mail.imap.
IMAPStore,Sun Microsystems, Inc], com.sun.mail.pop3.POP3Store=javax.mail.Provide
r[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc]}
DEBUG: Providers Listed By Protocol: {imap=javax.mail.Provider[STORE,imap,com.su
n.mail.imap.IMAPStore,Sun Microsystems, Inc], pop3=javax.mail.Provider[STORE,pop
3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc], smtp=javax.mail.Provider[T
RANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]}
DEBUG: not loading optional address map file: /META-INF/javamail.address.map

DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.s
mtp.SMTPTransport,Sun Microsystems, Inc]
DEBUG SMTP: useEhlo true, useAuth true

DEBUG: SMTPTransport trying to connect to host "smtp.ktk.airtelbroadband.in", port 25

javax.mail.MessagingException: Could not connect to SMTP host: smtp.ktk.airtelbr
oadband.in, port: 25;
nested exception is:
java.net.SocketException: Software caused connection abort: connect
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:867)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:15
6)
at javax.mail.Service.connect(Service.java:234)
at javax.mail.Service.connect(Service.java:135)
at mail.sendMessage(mail.java:79)
at mail.doPost(mail.java:36)
at mail.doGet(mail.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
(ServletStubImpl.java:1053)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:387)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:305)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
n.run(WebAppServletContext.java:6310)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
dSubject.java:317)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
118)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
rvletContext.java:3622)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
pl.java:2569)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)



The Code as follows--------------->>>>>>

import javax.mail.*;
import javax.mail.internet.*;

import java.io.IOException;
import java.io.PrintWriter;
import java.util.Properties;

import javax.servlet.*;
import javax.servlet.http.*;

import javax.mail.Transport;

public class mail extends HttpServlet{


private final static String DEFAULT_SERVER="smtp.ktk.airtelbroadband.in";

public void doPost(HttpServletRequest request,HttpServletResponse response) throws ServletException,IOException
{

String smtpServ="smtp.ktk.airtelbroadband.in";
String from= "";
String to= "";
String subject="subject1";
String emailContent="This is a Test Email";




response.setContentType("multipart/alternative");
java.io.PrintWriter out = response.getWriter();

out.println("<html><head><title>Email MEssage sender</title></head></html>");

try{
sendMessage(smtpServ, to, from, subject, emailContent,out);}


catch(Exception e)
{
throw new ServletException(e.getMessage());
}
out.println("<h2>The Message was sent successfully</h2>");
out.println("</body></html>");
}

private void sendMessage(String smtpServ,String to,String from,String subject,String emailContent,PrintWriter out) throws Exception
{


try{
Properties properties=System.getProperties();

properties.put("mail.smtp.host",smtpServ);
properties.put("mail.smtp.auth", "true");
properties.put("mail.debug", "true");

Session session=Session.getDefaultInstance(properties);

Message mailMsg=new MimeMessage(session);

Multipart mp = new MimeMultipart();

BodyPart b1 = new MimeBodyPart();
b1.setContent("hi","text/plain");

mp.addBodyPart(b1);

mailMsg.setContent(mp);

mailMsg.saveChanges();

Transport bus = session.getTransport("smtp");
bus.connect("smtp.ktk.airtelbroadband.in","yyyy","zzz");
out.println("connected");
bus.send(mailMsg);
out.println("Message sent");
}
catch(MessagingException ex)
{
ex.printStackTrace();

}
}

public void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException,IOException
{

doPost(request,response);
}
}


Thanks...

TUHIN
15 years ago
thanks paul ,

can you tell me how to configure it, so that i can get the SMTP name .


thanks
TUHIN
hello people,

i am working on JMS task.where users can send mail to other user.i like to know what is the difference between SMTP and other protocol and which one is best for simple tasks only for sending and recieving mails (no attachments)...

Furthur i lie to know if i go for any specific protocol. how do i proceed. Should i download the sun suit from there site or any third party suit will be best.




tx
tuhin