• Post Reply Bookmark Topic Watch Topic
  • New Topic

mime type problem

 
Sunil K Bansal
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I have tomcat installed on two computers.
I m using java mail in JSP and servlets.
on one computer it allowes me to send mail with mime type "text/html", but on other computer it allows me mail with "text/plain"
where is the problem
i hv set default setting in web.xml in conf folder of tomcat like this
<!-- Establish the default MIME type mappings -->
<mime-mapping>
<extension>txt</extension>
<mime-type>text/plain</mime-type>
</mime-mapping>
even then it is not allowing me to send text/html mails
kindly guide me
thanx and regards
Bansal
 
Rahul Mahindrakar
Ranch Hand
Posts: 1869
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Try and look at the
public void setContent(java.lang.Object o,
java.lang.String type)

method of the MimeMessage class of javax.mail.internet package.
Look at this link web page
Hope this will help.
 
Sunil K Bansal
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI
Thanx
I m using the same method with correct arguments(I suppose) .
I think this is the problem with Tomcat as same code is working fine on one computer but not working on another computer.
Bansal
 
Rahul Mahindrakar
Ranch Hand
Posts: 1869
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a bit strange. Just see if some configuration has changed.
 
Sunil K Bansal
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I made changes in web.xml file in conf folder as
<!-- Establish the default MIME type mappings -->
<mime-mapping>
<extension>txt</extension>
<mime-type>text/plain</mime-type>
</mime-mapping>
even then I m not able to send text/html mails
may be i m checking at wrong file.
can anybody tell me where I need to make changes
thanx
Bansal
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!