Divyajot Ahluwalia

Ranch Hand
+ Follow
since Nov 03, 2000
Merit badge: grant badges
For More
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 Divyajot Ahluwalia

Does anyone know how to display a pdf file in an applet?
I have heard that the "com.pdfgo.pdf.jar " api bean does this.. Does anyoe have it or know where i can download it.
Thanks in advance
20 years ago
Hi everyone,
I have been trying to embed a flash .swf file in an email. I attach the file and call a referance of it in the message body. This works perfectly in Outlook express but does not work with Outlook 2000.
Additionally, the email send to hotmail and yahoo dont work out.
Please advice how this can be overcome.
Looking forward to your help
DA
21 years ago
Hi everyone,
I have been trying to embed a flash .swf file in an email. I attach the file and call a referance of it in the message body. This works perfectly in Outlook express but does not work with Outlook 2000.
Additionally, the email send to hotmail and yahoo dont work out.
Please advice how this can be overcome.
Looking forward to your help
DA
21 years ago
Dear Friends,
i have been trying to send emails with html content and images in such a manner that the images are attached and the images in the main email links to the attached image. i have tried the following code but i am unable to establish the link.
Please help
the code is:

this is from a jsp page im trying to use
the final email has the image attached but does not show it in the final email's html content.
Please help
DS

(edited by Cindy to format code and put spaces in html strings so that they will display)
[This message has been edited by Cindy Glass (edited December 12, 2001).]
22 years ago
Dear Friends,
i have been trying to send emails with html content and images in such a manner that the images are attached and the images in the main email links to the attached image. i have tried the following code but i am unable to establish the link.
Please help
the code is:

// basic message has been created
MimeMultipart multipart = new MimeMultipart("related");
BodyPart messageBodyPart = new MimeBodyPart();
messageBodyPart = new MimeBodyPart();
String htmlText = "<H1>Hello</H1>" +
"<img src=\"cid:memememe\">";
messageBodyPart.setContent(htmlText, "text/html");
multipart.addBodyPart(messageBodyPart);
messageBodyPart = new MimeBodyPart();
URL aurl=new URL("http://www.google.com/");
URL burl=new URL(aurl,"logo.gif");
DataSource fds = new URLDataSource(burl);
messageBodyPart.setDataHandler(new DataHandler(fds));
messageBodyPart.setHeader("Content-ID","memememe");
multipart.addBodyPart(messageBodyPart);
msg.setContent(multipart);
Transport.send(msg);
this is from a jsp page im trying to use
the final email has the image attached but does not show it in the final email's html content.
Please help
DS

22 years ago

Dear Friends,
i have been trying to send emails with html content and images in such a manner that the images are attached and the images in the main email link to the attached image. i have tried the following code but i am unable to establish the link.
Please help
the code is:

// basic message has been created
MimeMultipart multipart = new MimeMultipart("related");
BodyPart messageBodyPart = new MimeBodyPart();
messageBodyPart = new MimeBodyPart();
String htmlText = "<html><H1>Hello</H1>" +
" </html> ";
messageBodyPart.setContent(htmlText, "text/html");
multipart.addBodyPart(messageBodyPart);
messageBodyPart = new MimeBodyPart();
URL aurl=new URL("http://www.google.com/");
URL burl=new URL(aurl,"logo.gif");
DataSource fds = new URLDataSource(burl);
messageBodyPart.setDataHandler(new DataHandler(fds));
messageBodyPart.setHeader("Content-ID","memememe");
multipart.addBodyPart(messageBodyPart);
msg.setContent(multipart);
Transport.send(msg);
this is from a jsp page im trying to use
the final email has the image attached but does not show it in the final email's html content.
Please help
DS
22 years ago
thanks david
for your response.
I checked out the link and the code you had written. I however need a little more help from you in terms of some code which uses the javadns to send an email message.
I look forward to your help
regards,
DS
22 years ago
Hi everyone,
I have been using the JMail api for sometime and have found it to be extremely helpful for most of my emailing needs.
There is another way of sending emails ie by emulating a mail server thru the use of a DNS. Is there any API that can facilitate this?
I need this API so that the local SMTP server can be bypassed for greater control over message delivery.
I look forward to your help
Regards,
Ds
22 years ago
Hi,
does anyone know how to send an email from a java application using the DNS server technique and not SMTP?
Is there any java api which supports that?
Please help
DA
22 years ago
hi
thanks for your reply.
i am using 2-3 other servlets in the same context and they are working.
the method the error talks of is used to get the system date and store it in a certain format.
do you think that could be the problem.
thanks
da
22 years ago
hi im geting the following error from a servlet i had written
Error: 500
Location: /servlets/referthis.Visitor
Internal Servlet Error:
java.lang.VerifyError: (class: referthis/Visitor, method: makeDate signature: ()V) Expecting to find integer on stack
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Class.java:237)
at org.apache.tomcat.core.ServletWrapper.initServlet(ServletWrapper.java:298)
at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:445)
at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:597)
at org.apache.tomcat.servlets.InvokerServlet.service(InvokerServlet.java:257)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:156)
at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
at java.lang.Thread.run(Thread.java:484)

could you please tell me whats wrong??
rgds
da
22 years ago
hi,
what are the jdbc objects we must close after finishing a process?
db - mysql
web server - apache + tomcat
in a servlet i use a connection broker from javaexchange and in the service method get a connection and towards the end free the connection. I close the statement and the prepared statements. Should i also close the result set.
My application is repeatedly throwing a servlet exception and therefore stops.
Can u please help.
Regards,
dj

thanks bill,
In the case of a servlet, how do i catch a servlet exception?
What are the database objects that need to be closed. in my application i do the following
1) in the connection broker refresh the connections every minute
2) i close all statements and prepared statements
3) free connections from the connection broker object.
what else should i do? i do not close connection objects becoz that currupts the pool the pool of objects in the broker.
In the servlet i start another object which is a thread(runnable). the new thread executes all the database operations and finally closes the statements and frees the connection.
Id this a problem?
thanks
dj
22 years ago
hi,
im using tomcat on top of apache.
the server keeps on throwing a servlet exception every few hrs and all servlets and jsp files stop working...
I am using a mysql db with a connection broker from javasoft.
any suggestions what could be the problem
thanks,
dj
22 years ago
hi deepak,
i can suggest the following:
make a session object and store the existing page no ie 1,2,3,4
use this page number to query the database with limits clause
check the mysql documentation for details. u will get the page number from the session object. multiply the page number with 10 and add 1 so u get the start value. query the db with the start value and extract 10 records.
example of such a query is
SELECT * from tablename where 1 LIMIT 3, 10
here we are picking 10 records starting from the 3rd.
try it out and if any problem let me know
rgds
dj
22 years ago