Hoe do I convert a jsp to an image file?

Can anybody help me out?

Never mind you have another post on the same topic
Edited by: TexMark on Jul 23, 2008 2:07 PM

Similar Messages

  • Convert ing JSP page to PowerPoint  file

    How can I convert my JSP output to PPT file .The stuff that I would like to convert could be either text or simetimes images also.

    You won't find any answers to that question. I would stand on the other side of the client's screen and ask it from that point of view: where can you get something to convert a set of HTML files into a Powerpoint presentation? That, of course, has nothing to do with Java programming, but I suspect it has an answer if you search the right part of the web.

  • Looking for a Java program which converts a Webpage (HTML) to Image file

    Dear Experts,
    I would like to convert a given URL (www.yahoo.com) to a yahoo.jpg image file.I
    have searched a lot about that but could not get any idea.Does anyone can help me in this regard.
    Tahnking you

    Try this pdf render: https://pdf-renderer.dev.java.net/

  • Is there any way to convert the ImportObject into an image file ?

    I have converted a FM document into MIF file format. FM has a grapic imported by copying into the document. In the MIF file I can see the image like the following,
    <ImportObject
      <Unique 1001019>
      <Pen 15>
      <Fill 7>
      <PenWidth  1.0 pt>
    =TIFF
    &%v
    &II*\x00080000001000FE000400010000000000000000010300010000006009000001010300010000…..
    Is there any way to convert the ImportObject inside the mif file into an image file ?

    Error 7103,
    Regarding Note A and Note B... The Downsample dropdowns list three variations of Downsampling TO, each corresponding to a different downsampling method. When you select one of the Downsampling TO options, then the pixels per inch box allow you to specify the dpi of the downsampled image, the one after the downsampling.
    When you select Off, which means do NOT downsample, then the pixels per inch box is meaningless. Maybe it would be a nice interface feature to disable it, but that is another issue. In any event, OFF ignores any value in pixels per inch.
    Whenever you import an image into your publishing program (FrameMaker, InDesign, or whatever) and scale it, one can think of the scaled image as having a physical dpi, the number of pixels per physical inch on the "paper." When you specify downsampling in Distiller, the number you specify is most likely less than the physical dpi of the image in the document. It is probably meaningless to specify a number that is larger. I am guessing (and this is a guess) that Distiller does not UPsample images. I have never tested it.
    I use 1200 for image recovery.
    I assume you are talking about recoverying an image embedded in (copied into) the publishing document. I believe it is sufficient simply to turn downsampling off to create a PDF with the image at the resolution as embedded in the document.
    No, one of the settings is to Determine Automatically, which uses the resolution of the image IN the PDF.
    Where is that found?
    It is NOT in Distiller. It is in Acrobat Professional. (It may or may not be in Acrobat Standard or Acrobat Reader; I do not have them, so do not know.)
    The original poster wanted to recover an image copied into a Frame document file. My method is to create a PDF using a Distiller joboption with ALL downsampling and ALL compression OFF. Presumably the image is put into the PDF with all the pixels it has in the Frame file.
    THEN in Acrobat PROFESSIONAL, export the image with the setting Determine Automatically. I am presuming (never tested it) this exports ALL the pixels that the image has in the PDF file.
    Van

  • How to convert a jsp into a pdf file

    Hi,
    I am working on a struts based project . In this project i have a jsp which displays table in a nested format , but i have to provide the user a button say
    "GET PDF" on click of which that entire jsp should get exported as a .pdf file as it is .
    1] I cant use display tag because export functionality is not provided for nested table.
    2] I cant figure out how to put an entire jsp as an input stream if i was to use itext (that is if its possible ).
    What are my other options ? Bottom line, what i need is to "make a .pdf file of a .jsp displayed, on a click of a button ".
    Thanks in advance,
    Anjali.

    Anjali_Pal wrote:
    Hi,
    I am working on a struts based project . In this project i have a jsp which displays table in a nested format , but i have to provide the user a button say
    "GET PDF" on click of which that entire jsp should get exported as a .pdf file as it is .
    1] I cant use display tag because export functionality is not provided for nested table.
    2] I cant figure out how to put an entire jsp as an input stream if i was to use itext (that is if its possible ).
    To start with it isn't the jsp but rather the output of the JSP that you want in a pdf. The solution to that is that you must provide a method that puts the output into a pdf. Normal solutions for that first start by finding an appropriate pdf library of which there are more than one.
    What are my other options ? Bottom line, what i need is to "make a .pdf file of a .jsp displayed, on a click of a button ". Besides finding an existing library you could write your own.

  • How to convert a .jsp to a .java/.class file for use in peoplesoft

    Hi java/jsp experts,
    I want to convert a .jsp to a .java/.class file. is there a tool available, please let me know if you have any pointers....
    or can i do it manually:
    these are a few lines that the .jsp contains, and i would like to translate this to be in .java/.class format:
    <%@ page import="sun.misc.BASE64Encoder, javax.crypto., javax.crypto.spec."%>
    <%@ page import="java.util.StringTokenizer" %>
    <%@ page import="java.util.Map" %>
    <%!
    sb.append("<input type=\"hidden\" name=\"orderPage_serialNumber\" value=\"");
    sb.append(serialNumber);
    sb.append("\">\n");
    return sb.toString();
    %>
    how can i translate the above import statements and html elements from jsp to java, please let me know.
    Once i have the .java file created from the .jsp, I will compile .java to create the .class file and invoke the .class in peoplecode by using java apis available in peopletools.
    Thanks in advance.

    Is there a way convert a binary .exe file( compiled by
    another compiler) into Java .class/.jar file ? Anyone
    know of a free program that can do this?It's not possible. There are many decompilers and disassemblers for Java but nothing will take you from ANY binary to Java source. It would be the end of computing as we know it and the beginning of a new era -:)

  • How to convert a .jsp page in to the .txt page with a click of the button

    Hi Sir,
    Here the main thing is that in order to print a web page(.jsp page) in dotmatrix printer i need to first convert that webpage (.jsp page) in to .txt page.But my doubt is that can you convert a .jsp page in to .txt page with a click of a button so that whatever there in .jsp page has to be completely transferred in to .txt page if so then in that .txt page i need a button when i click it the page need to be send to the printer without using the file menu print option.First i need to know whether it is possible in java?If so please do help me by providing the exact code.If it is not possible in java pls.do provide other option.It is very urgent.Thank U.
    Regards,
    m.ananthu

    We can convert a .JSP page content into a .txt file by using MIME type conversion. In this scenario we cannot provide a button, because its an .txt file (not .JSP).
    If you want to print JSP content into a .txt content along with a button to print that page can also be done.
    -Chandra

  • Moving Scriptlet Code to backing bean when converting from JSP - Facelets

    Hello!
    We are converting our application from jsf1.2 to 2.0 and all jsps are being converted to XHTML. Some are trivial while others had very complex scriptlets.
    I would like to know what are some of the recommended ways of moving Scriptlet Code to backing bean when converting from JSP -> Facelets.
    I have thought about listeners, actionListeners, putting code getXXXX() of the backing bean and then calling #{bean.XXXX} but not sure whats the best way.
    I do appreciate the response!
    Eg of a jsp page:
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <%@ taglib uri="/WEB-INF/xxx-jsf.tld" prefix="l" %>
    <%@ taglib uri="/WEB-INF/yyy-pp.tld" prefix="p" %>
    <%@ page import="com.ttyy.search.beans.jsf.AdvancedSearchFormManagedBean" %>
    <%@ page import="com.kkee.util.*"%>
    <%
        AdvancedSearchFormManagedBean advancedSearchFormManagedBean = (AdvancedSearchFormManagedBean) request.getSession().getAttribute("AdvancedSearchFormManagedBean");
        if (advancedSearchFormManagedBean == null) {
           advancedSearchFormManagedBean = new AdvancedSearchFormManagedBean();
           request.getSession().setAttribute("AdvancedSearchFormManagedBean", advancedSearchFormManagedBean);
        advancedSearchFormManagedBean.initializeForAdvancedSearchOptions();
        advancedSearchFormManagedBean.setQuickSearch();
         request.setAttribute("portletHeader", "Hello " + advancedSearchFormManagedBean.getPerson().getFirstname() + ", check out the latest programs in your practice areas and jurisdictions");
    %>
    <h:form id="MYCenterForm">
         <p:portletRenderer portletSetName="test of portlet"
              portletContainer="#{PortletContainerManagedBean}"
              id="MYCenter"
              portletScope = "TEST_SCOPE"
              suppressIfNoData="true"
              portletSkinName="SOME_SKIN">
              <f:facet name="persistenceToolkit">
                   <h:commandLink id="persistenceToolkitLink"
                        actionListener="#{PortletContainerManagedBean.persistPortletSetStateListener}">
                        <h:outputText value="Save State Of Portlet Set" id="persistenceToolkitLinkText"/>
                   </h:commandLink>
              </f:facet>
         </p:pagePortletSetRenderer>
    </h:form>
    <%
         String flag = PropertyItems.getInstance().getPropertyItem("response.time.flag");
         if("1".equals(flag)){
              ResponseTime rt = (ResponseTime) session.getAttribute("responseTime");
            if(rt!=null){
                rt.setDesc("my cle loaded");
                long now = System.currentTimeMillis();
                long start = rt.getStart() + rt.getTotal();
                rt.setInterval(now-start);
                rt.setTotal(rt.getTotal()+rt.getInterval());
                LogUtil.log(rt.toString(), LogUtil.DEBUG_LEVEL);
                session.setAttribute("responseTime", rt);
    %>

    That helps.
    This could be another topic question but itst kind of related to what i am doing right now. while converting JSP to facelet (in jsf2) I came across another issue.
    <h:commandLink id="Save" rendered="#{RegistrationBean.isNOTInOrigionalRegistrationMode}" action="#{RegistrationBean.updateProfile2Submit}" styleClass="#{portalSkinManagedBean.contentPortletSkin.strongTextStyle}">
              <l:htmlSkinnedImage id="SaveImage" style="border:0;" url="save.gif" alt="Save Information"/>
    </h:commandLink>When I click on the generated link, I get this. And this is happening for all the h:commandLink in the application.
    http://localhost:9080/registration/updateProfile2.jsf[request.getQueryString()=null][request.getRequestedSessionId()=F1CCE237DD81D301F1C4DBA6910FFD8A][request.isRequestedSessionIdFromCookie()=true][request.isRequestedSessionIdFromURL()=false][request.isRequestedSessionIdValid()=true]Parameters:[rolePracticeAreasForm:title=rolePracticeAreasForm:primaryPracticeArea=10002javax.faces.ViewState=-2943345291093118815:-4400303399130292206rolePracticeAreasForm:practiceAreasMod2=10148.1rolePracticeAreasForm:practiceAreasMod1=10002.1rolePracticeAreasForm:Save=rolePracticeAreasForm:SaverolePracticeAreasForm=rolePracticeAreasFormrolePracticeAreasForm:otherField=rolePracticeAreasForm:fromMyAccount=1]||
    javax.servlet.ServletException: Index: 0, Size: 0
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:325)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at com.legaledcenter.util.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:250)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
         at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at com.jscape.framework.galileo.support.upload.UploadFilter.doFilter(UploadFilter.java:71)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
         at java.lang.Thread.run(Thread.java:619)
    Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
         at java.util.ArrayList.RangeCheck(ArrayList.java:547)
         at java.util.ArrayList.get(ArrayList.java:322)
         at javax.faces.component.AttachedObjectListHolder.restoreState(AttachedObjectListHolder.java:161)
         at javax.faces.component.UIComponentBase.restoreState(UIComponentBase.java:1427)
         at com.sun.faces.application.view.StateHolderSaver.restore(StateHolderSaver.java:121)
         at com.sun.faces.application.view.StateManagementStrategyImpl$4.invokeContextCallback(StateManagementStrategyImpl.java:289)
         at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:1253)
         at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:672)
         at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:1262)
         at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:672)
         at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:1262)
         at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:672)
         at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:1262)
         at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:672)
         at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:1262)
         at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:672)
         at com.sun.faces.application.view.StateManagementStrategyImpl.restoreView(StateManagementStrategyImpl.java:284)
         at com.sun.faces.application.StateManagerImpl.restoreView(StateManagerImpl.java:177)
         at com.sun.faces.application.view.ViewHandlingStrategy.restoreView(ViewHandlingStrategy.java:119)
         at com.sun.faces.application.view.FaceletViewHandlingStrategy.restoreView(FaceletViewHandlingStrategy.java:434)
         at com.sun.faces.application.view.MultiViewHandler.restoreView(MultiViewHandler.java:143)
         at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:199)
         at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
         at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:110)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)
         ... 22 more
    ********** Message End *************Thanks

  • How to convert EPS(image file) file in to other image format e.g NIGMAS

    Hi friends,
    I want to make a tool which will help to convert the EPS image file into other image format BY USING JAVA TECHNOLOGY. I havent done this type of file conversion before, so any body please explain it to me from the basic how can i go for it, what r the require things, where should i get the help of it, which java API should i use etc. i ll be vry thankful.
    My actual requirement is i want to convert the EPS file into the NIGMAS(Nihon computer graphic mapping System) file format.
    Thank you in anticiption.

    The easiest, but not necesarily the best, way is to use ImageMagick's convert utility. From Java you can use Runtime.exec to invoke convert.exe ... ImageMagick is opensource and supports many different formats ( www.ImageMagick.com )
         * Converts an eps file to a graphic that is suitable for the web.
         * We use ImageMagick's 'convert' utility to convert .eps files into either gif or png format.
         * The output format is determine by the extension that you set for the output file.
         * Sample command:
         * convert -density 208x208 /export/home/kpmg/tomcattest/jsp/1.eps
         *                                    /export/home/kpmg/tomcattest/jsp/1.png
         * Although convert supports about 100 different parameters, we are only using 1:
         * -density     (sets the vertical and horizontal resolution in pixels of the image)
         * Density sets the vertical and horizontal resolution in pixels of the image.
         * It should be changed based on the resolution of the user's monitor
         * (e.g. if hi-res display settings, then density will need to be greater
         * than if running on a low-res display, which would make the same image look really big )
         * You may want to use other convert parameters, such as -sharpen
         * to make the image look better, or -compress and
         * -quality to change the kb size of the image.
         * For the full list of parameters see:     
         *      http://www.imagemagick.org/www/convert.html
         * @param inFile The absolute path to the eps file to be converted
         * @param outFile The absolute path to the desired output graphic file.
         *                         NOTE: the format of the output file is determined by the
         *                         extension that you give for this parameter (e.g. file.png will
         *                          be written as a png file )
    public void eps2www(String inFile, String outFile, String density) throws Exception
              // use ImageMagick's convert program to make the www version ( png or gif, etc)
              String call = convert +
                        " -density " + density +
                                  " " + inFile +
                                  " " + outFile;
              try
                   Process child = rt.exec( call );
                   child.waitFor();
                   log.debug("Convert process exit code is: " + child.exitValue() );
              catch (Exception e)
                   // TO DO: this could probably be more explicit
                   throw new Exception(e);     
              // log the command strings for debuggin purposes.
              log.debug( "Convert Successful: call = " + call);
         }

  • How can I convert a string into an image

    I want to convert a string into an image.
    I want to know required steps for that.

    look at http://forum.java.sun.com/thread.jsp?forum=31&thread=194763
    drawString looks as something you might need

  • Can we control if text in a page is converted, or not, to an image?

    Hello!
    My experience tells me that if I use iWeb 1.0.1 and I put the text color with 80% opacity, for example, all text will be converted to an image. Most of the times I like this behavior, because the result is the same on every computer or browser.
    But after I update for iWeb 1.1.1 all text appears as text and no longer as images. Now, when I want some sites with the text converted to images I still use the older version (1.0.1).
    My question is: Can we control if text is converted, or not, to an image? Can we force a particular text box to be converted to an image, after 1.0.1?
    I search the iWeb forum and I have not find any answer for this particular question.
    Sorry for my english...
    Thanks!
    Power Mac G4 - 867MHz   Mac OS X (10.3.9)  

    Now answering newmacguru...
    1. Why I want text to appear as an image?
    Sometimes the graphical result is important. Most of the times, if you use a white or bright page background, what you see in iWeb is almost the same you see when browsing the page. No problem! But if the page background is black or dark, what you see when browsing the page can be different from what you see when developing the page with iWeb. And these differences can be important... Now if you tell iWeb to convert text to images, the result will be exactly the same you see in iWeb (the result you want).
    Let me show you an example. This page was published with iWeb 1.0.1. In this case all text boxes were converted to images and the result you see is exactly what I want. Normally I choose opacity of 80% in the text color to reduce the contrast between text and background (this is the graphical result I most like):
    http://clientes.netvisao.pt/3ebt2006/iweb/TesteTexto101/
    Now if you publish the page with iWeb 1.1.1/1.1.2 the result is the same for both, but different from the pages obtained with iWeb 1.0.1. I only get the result I want if the text is converted to an image (using shadow). You can also see that with a white background you get good results even if the text remains text:
    http://clientes.netvisao.pt/3ebt2006/iweb/TesteTexto111/
    http://clientes.netvisao.pt/3ebt2006/iweb/TesteTexto112/
    Thanks for the suggestion of the shadow. Sometimes using a non web safe font is not a solution, remember I want “that” graphical result...
    2. Now, considering the search engines, I think I read in this forum that the search engines can do is work, even if text is converted to images, because the text still remains in the page (sorry I don’t remember where).
    Sorry for my english...
    Power Mac G4 - 867MHz   Mac OS X (10.3.9)  

  • I need to convert a PDF to a jpeg file.

    I am using Photoshop Elements 7.  I have a "picture" in PDF form but I need it to be in jpeg.  Can snyone help me do this? I called customer service and they said it was possible using Photoshoop Elements 7 and that this forum would be the best source for getting help.
    Thanks,
    Jan

    Just use File>Open in the editor, which will bring up the import PDF window, where you can choose to open the whole thing or just images from your pdf, then save as a jpg. However, this may not  produce a top quality file. A PDF is different from a regular image file and it doesn't always convert at top quality.

  • How to convert dll to a java class file?

    Hi folks:
    I have some DLLs in VB and C++ and I wanna to convert them to a java class file. Does anybody know if exist a sw or easy way to do it?
    thanks
    Autair

    Well, I believe you could write JNI to call the functions in the DLLs, although I wouldn't recommend it. (You'd have a non-portable, fragile result.)

  • Have Windows XP and Adobe 9 Reader and need to send a series of large documents to clients as a matter of urgency     When I convert 10 pages a MS-Word file to Pdf this results in file of 6.7 MB which can't be emailed.     Do I combine them and then copy

    I have Windows XP and Adobe 9 Reader and need to send a series of large documents to clients as a matter of urgency When I convert 10 pages a MS-Word file to Pdf this results in file of 6.7 MB which can't be emailed.  Do I combine them and then copy to JPEG 2000 or do I have to save each page separately which is very time consuming Please advise me how to reduce the size and send 10 pages plus quickly by Adobe without the huge hassles I am enduring

    What kind of software do you use for the conversion to pdf? Adobe Reader can't create pdf files.

  • Can Adobe Distiller be used for converting all pro/e (3D -2D)  files to pdf format?

    Can Adobe Distiller be used for converting all pro/e (3D -2D)  files to pdf format?

    Acrobat Distiller Server converts Postscript to PDF.

Maybe you are looking for