• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

save a Web page to an MHT file using jsp

 
santhoshkumar samala
Ranch Hand
Posts: 156
Eclipse IDE Hibernate Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
I have a requirement to save a Web page to an MHT file using jsp
I got it in asp but I dont know how to convert into jsp
this is some ASP code I have to convert this into jsp
------------------------ASP starts here-------------------------------------
<%@ Language=VBScript %>
<html>
<head>
</head>
<body>
<%
' *****************************************************
' ASP script to save a Web page to an MHT file.
' *****************************************************
set mht= Server.CreateObject("ChilkatMHT.ChilkatMHT")
mht.UnlockComponent "UnlockCode"

'***** Get the actual Web Page ******
'**http://www.codeproject.com is the web page to be converted****
'**codeproject.mht is the name of the converted mht file****
mht.GetAndSaveMHT "http://www.codeproject.com",Server.MapPath ("codeproject.mht")
response.write "Saved Codeproject! Home Page"
set mht = nothing
%>
</body>
</html>
-----------------ASP end---------------------------------------------------
here im using the product of chilkatmht if you know any other product please let me know.
(or)
If you have any other idea to convert a web page into mht using java please let me know
 
rajesh
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if you r creating these webpages from your server , then you can use some thing like a java mail api to create it as a multipart message ( mht- is that type ). and then save it as mht.
but if you are retriving it from some other server. then i am not sure http://www.ietf.org/rfc/rfc2557.txt :roll: , you have to retrive each of links in a page along with the page and then create the multipart-message , will be quite a lot of work..
this is the url for mutlipart-rfc..
 
santhoshkumar samala
Ranch Hand
Posts: 156
Eclipse IDE Hibernate Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you rajesh for reply
but I need to get the web page as image(gif/jpeg/..anything) by providing the url . this has to be done in java/jsp
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64721
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"rajesh",
We're really glad that you are here with us in the JSP forum, and there aren't many rules you'll have to worry about, but one is that proper names are required. Please take a look at the JavaRanch Naming Policy and change your display name to match it.
In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.
Thanks!
bear
JSP Forum Bartender
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic