• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

save a Web page to an MHT file using jsp

 
Ranch Hand
Posts: 156
Hibernate Eclipse IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Hibernate Eclipse IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 67753
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
If you two don't stop this rough-housing somebody is going to end up crying. Sit down and read this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic