Problem converting a JSP to html file

Hi,
I want to save my jsp page as a html file so that I can later send it as email body. This jsp page is a dynamic page.
I am giving a few code lines below that i'm using.
url = new URL("http://localhost:9080/ndw/jobsum/execdisplay.do?id=" bean.getId().toString()";jsessionid=" +id );
in = new BufferedInputStream( url.openStream() );
try {
file = new File("C:/myfile.html");
out = new BufferedOutputStream ( new FileOutputStream ( file ));
} catch ( FileNotFoundException e ) {
System.out.println( "Invalid save file requested: " +
e.getMessage() );
try {
bytesRead = in.read( bytes, 0,
bytes.length );
while ( bytesRead != -1 ){
out.write( bytes, 0, bytesRead );
bytesRead = in.read( bytes, 0,
bytes.length );
in.close();
out.close();
} catch ( IOException e ){
System.out.println( "Error saving to "
+"file: " + e.getMessage() );
This should save the JSP given by URL as html file.
A html file by name "myfile.html" is indeed being created in C drive but the html is of loginpage of my application and not the html file of the JSP required.
I guess this is happening because server is not convinced that i hv logged in before accessing tht JSP. Is there any servlet API which would bypass the access control mechanisms.
Folks, please help me in this.Its quite urgent.
Thanks in advance

This has nothing to do with JavaMail. You'll probably get a better
answer from the JSP support forum.
You might have to convince the server that you've logged in before
you can access the JSP page. That could be fairly complicated.
Alternatively, you might be able to access the page using one of
the servlet APIs, which would bypass the access control mechanisms.

Similar Messages

  • Having problems: can't open an html file with textedit to change code

    Hi. I have been trying to open up both my index.html and my Welcome.html files with textedit in order to change the HTML codes for them - but it doesn't seem to work. When I open them using text edit I still get a discomboblutaed form of the web page and no html codes. HOWEVER when I open them with Word I can get at the HTML code. Will changing the code in Word work or must I use textedit to do it? ULtimately does anyone know how to fix the fact that your web URL always gets redirected to the home page because of the index file. For Instance, my web site is www.zanzibarhotelbeach.com but when you type that in it redirects to the opening page www.zanzibarhotelbeach.com/Home.html which is a problem for when you want to submit your web site to be found on the net. Any help would be MUCH appreciated! Cheers!

    Give TextWrangler a try. It's a free editor by the makers of BBEdit and is very well suited for editing HTML.
    But as far as your URL in the window, unless you have URL forwarding with masking you will always get the page name at the end of the URL in the browser's window. That's just how it works. With masking you will only get www.zanzibarhotelbeach.com in every window of the site. BUT visitors will only be able to bookmark the first page of your site. My tutorial site, http://toadstutorials.info/ is set up that way.
    This thread discusses how the different domain name forwarding works:
    http://discussions.apple.com/thread.jspa?threadID=1164519&tstart=0
    OT

  • Lost Tomcat, its database and all JSP and HTML files

    I have mistakably uninstalled Tomcat from my machine, it removed the data I stored in the root including HTML and JSP files, I am using windows XP, Is there any way I can recover htem back, atlest the database and the JSP files? please Help

    Also a good example of why you should develop apps in a separate directory structure and then deploy the WAR file to Tomcat.
    You didn't have all your source code under Tomcat, did you?
    You weren't using a source control system like CVS?
    Oh, my. ;)
    You will from now on, I'll bet.
    %

  • Problem in converting word to html- file get error msg 'This command is not available because no document is open'

    Hi,
    I write the some asp code to save the word file from client machine to server machine , and convert it into the html file.
    it working fine when i debug the code into the visual studio but when i deploy code on iis it give me a error 'This command is not available because no document is open' , while i try to save file into html format.
    lot of time i try this give all the security full access to iis user and other things .
    can any one help me. i fully frustrated from this problem. 
    my need only upload the word document from client to server machine and convert it into the word document. 
    only IIS give me the problem, suggest me what setting i need to do in iis 
    please help me humble request 

    Hi,
    In this forum we mainly discuss questions about Office client questions and feedbacks, issues related to coding are not supported here.
    Based on the description, although the question is about converting Word documents, it's more likely to be a permission issue, the question is better to be posted in the IIS.NET forum:
    http://forums.iis.net/
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
    Regards,
    Melon Chen
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs. Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • 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.

  • Convert .psd file to a .html file

    hey fireworks gurus I have a photoshop layered file that I
    want to quickly convert this to a .html file through fireworks so
    that you can view in any browser....can anyone please help?...

    Quickly? Depends on your skill level....
    Taking a Fireworks comp to a CSS-based layout in Dreamweaver
    http://www.adobe.com/devnet/fireworks/articles/web_standards_layouts_pt1.html
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "sjpman" <[email protected]> wrote in
    message
    news:g02uqa$gts$[email protected]..
    > hey fireworks gurus I have a photoshop layered file that
    I want to quickly
    > convert this to a .html file through fireworks so that
    you can view in any
    > browser....can anyone please help?...
    >

  • Help needed:Printing HTML file using javax.print

    Hi
    I am using the following code which i got form the forum for rpinting an HTML file.
    The folllowing code is working fine, but the problem is the content of HTML file is not getting printed. I am geeting a blank page with no content. What is the change that is required in the code? ALso is there any simpler way to implement this. Help needed ASAP.
    public boolean printHTMLFile(String filename) {
              try {
                   JEditorPane editorPane = new JEditorPane();
                   editorPane.setEditorKit(new HTMLEditorKit());
                   //editorPane.setContentType("text/html");
                   editorPane.setSize(500,500);
                   String text = getFileContents(filename);
                   if (text != null) {
                        editorPane.setText(text);                    
                   } else {
                        return false;
                   printEditorPane(editorPane);
                   return true;
              } catch (Exception tce) {
                   tce.printStackTrace();
              return false;
         public String getFileContents(String filename) {
              try {
                   File file = new File(filename);
                   BufferedReader br = new BufferedReader(new FileReader(file));
                   String line;
                   StringBuffer sb = new StringBuffer();
                   while ((line = br.readLine()) != null) {
                        sb.append(line);
                   br.close();
                   return sb.toString();
              } catch (Exception tce) {
                   tce.printStackTrace();
              return null;
         public void printEditorPane(JEditorPane editorPane) {
                   try {
                        HTMLPrinter htmlPrinter = new HTMLPrinter();
                        htmlPrinter.printJEditorPane(editorPane, htmlPrinter.showPrintDialog());
                   } catch (Exception tce) {
                        tce.printStackTrace();
         * Sets up to easily print HTML documents. It is not necessary to call any of the setter
         * methods as they all have default values, they are provided should you wish to change
         * any of the default values.
         public class HTMLPrinter {
         public int DEFAULT_DPI = 72;
         public float DEFAULT_PAGE_WIDTH_INCH = 8.5f;
         public float DEFAULT_PAGE_HEIGHT_INCH = 11f;
         int x = 100;
         int y = 80;
         GraphicsConfiguration gc;
         PrintService[] services;
         PrintService defaultService;
         DocFlavor flavor;
         PrintRequestAttributeSet attributes;
         Vector pjlListeners = new Vector();
         Vector pjalListeners = new Vector();
         Vector psalListeners = new Vector();
         public HTMLPrinter() {
              gc = null;
              attributes = new HashPrintRequestAttributeSet();
              flavor = null;
              defaultService = PrintServiceLookup.lookupDefaultPrintService();
              services = PrintServiceLookup.lookupPrintServices(flavor, attributes);
              // do something with the supported docflavors
              DocFlavor[] df = defaultService.getSupportedDocFlavors();
              for (int i = 0; i < df.length; i++)
              System.out.println(df.getMimeType() + " " + df[i].getRepresentationClassName());
              // if there is a default service, but no other services
              if (defaultService != null && (services == null || services.length == 0)) {
              services = new PrintService[1];
              services[0] = defaultService;
         * Set the GraphicsConfiguration to display the print dialog on.
         * @param gc a GraphicsConfiguration object
         public void setGraphicsConfiguration(GraphicsConfiguration gc) {
              this.gc = gc;
         public void setServices(PrintService[] services) {
              this.services = services;
         public void setDefaultService(PrintService service) {
              this.defaultService = service;
         public void setDocFlavor(DocFlavor flavor) {
              this.flavor = flavor;
         public void setPrintRequestAttributes(PrintRequestAttributeSet attributes) {
              this.attributes = attributes;
         public void setPrintDialogLocation(int x, int y) {
              this.x = x;
              this.y = y;
         public void addPrintJobListener(PrintJobListener pjl) {
              pjlListeners.addElement(pjl);
         public void removePrintJobListener(PrintJobListener pjl) {
              pjlListeners.removeElement(pjl);
         public void addPrintServiceAttributeListener(PrintServiceAttributeListener psal) {
              psalListeners.addElement(psal);
         public void removePrintServiceAttributeListener(PrintServiceAttributeListener psal) {
              psalListeners.removeElement(psal);
         public boolean printJEditorPane(JEditorPane jep, PrintService ps) {
                   if (ps == null || jep == null) {
                        System.out.println("printJEditorPane: jep or ps is NULL, aborting...");
                        return false;
                   // get the root view of the preview pane
                   View rv = jep.getUI().getRootView(jep);
                   // get the size of the view (hopefully the total size of the page to be printed
                   int x = (int) rv.getPreferredSpan(View.X_AXIS);
                   int y = (int) rv.getPreferredSpan(View.Y_AXIS);
                   // find out if the print has been set to colour mode
                   DocPrintJob dpj = ps.createPrintJob();
                   PrintJobAttributeSet pjas = dpj.getAttributes();
                   // get the DPI and printable area of the page. use default values if not available
                   // use this to get the maximum number of pixels on the vertical axis
                   PrinterResolution pr = (PrinterResolution) pjas.get(PrinterResolution.class);
                   int dpi;
                   float pageX, pageY;
                   if (pr != null)
                        dpi = pr.getFeedResolution(PrinterResolution.DPI);
                   else
                        dpi = DEFAULT_DPI;
                   MediaPrintableArea mpa = (MediaPrintableArea) pjas.get(MediaPrintableArea.class);
                   if (mpa != null) {
                        pageX = mpa.getX(MediaPrintableArea.INCH);
                        pageY = mpa.getX(MediaPrintableArea.INCH);
                   } else {
                        pageX = DEFAULT_PAGE_WIDTH_INCH;
                        pageY = DEFAULT_PAGE_HEIGHT_INCH;
                   int pixelsPerPageY = (int) (dpi * pageY);
                   int pixelsPerPageX = (int) (dpi * pageX);
                   int minY = Math.max(pixelsPerPageY, y);
                   // make colour true if the user has selected colour, and the PrintService can support colour
                   boolean colour = pjas.containsValue(Chromaticity.COLOR);
                   colour = colour & (ps.getAttribute(ColorSupported.class) == ColorSupported.SUPPORTED);
                   // create a BufferedImage to draw on
                   int imgMode;
                   if (colour)
                        imgMode = BufferedImage.TYPE_3BYTE_BGR;
                   else
                        imgMode = BufferedImage.TYPE_BYTE_GRAY;
                   BufferedImage img = new BufferedImage(pixelsPerPageX, minY, imgMode);
                   Graphics myGraphics = img.getGraphics();
                   myGraphics.setClip(0, 0, pixelsPerPageX, minY);
                   myGraphics.setColor(Color.WHITE);
                   myGraphics.fillRect(0, 0, pixelsPerPageX, minY);
                        java.awt.Rectangle rectangle=new java.awt.Rectangle(0,0,pixelsPerPageX, minY);
                   // call rootView.paint( myGraphics, rect ) to paint the whole image on myGraphics
                   rv.paint(myGraphics, rectangle);
                   try {
                        // write the image as a JPEG to the ByteArray so it can be printed
                        Iterator writers = ImageIO.getImageWritersByFormatName("jpeg");
                        ImageWriter writer = (ImageWriter) writers.next();
                                       // mod: Added the iwparam to create the highest quality image possible
                        ImageWriteParam iwparam = writer.getDefaultWriteParam();
                        iwparam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT) ;
                        iwparam.setCompressionQuality(1.0f); // highest quality
                        ByteArrayOutputStream out = new ByteArrayOutputStream();
                        ImageOutputStream ios = ImageIO.createImageOutputStream(out);
                        writer.setOutput(ios);
                        // get the number of pages we need to print this image
                        int imageHeight = img.getHeight();
                        int numberOfPages = (int) Math.ceil(minY / (double) pixelsPerPageY);
                        // print each page
                        for (int i = 0; i < numberOfPages; i++) {
                             int startY = i * pixelsPerPageY;
                             // get a subimage which is exactly the size of one page
                             BufferedImage subImg = img.getSubimage(0, startY, pixelsPerPageX, Math.min(y - startY, pixelsPerPageY));
                                                 // mod: different .write() method to use the iwparam parameter with highest quality compression
                             writer.write(null, new IIOImage(subImg, null, null), iwparam);
                             SimpleDoc sd = new SimpleDoc(out.toByteArray(), DocFlavor.BYTE_ARRAY.JPEG, null);
                             printDocument(sd, ps);
                             // reset the ByteArray so we can start the next page
                             out.reset();
                   } catch (PrintException e) {
                        System.out.println("Error printing document.");
                        e.printStackTrace();
                        return false;
                   } catch (IOException e) {
                        System.out.println("Error creating ImageOutputStream or writing to it.");
                        e.printStackTrace();
                        return false;
                   // uncomment this code and comment out the 'try-catch' block above
                   // to print to a JFrame instead of to the printer
                   /*          JFrame jf = new JFrame();
                             PaintableJPanel jp = new PaintableJPanel();
                             jp.setImage( img );
                             JScrollPane jsp = new JScrollPane( jp );
                             jf.getContentPane().add( jsp );
                             Insets i = jf.getInsets();
                             jf.setBounds( 0, 0, newX, y );
                             jf.setDefaultCloseOperation( JFrame.DISPOSE_ON_CLOSE );
                             jf.setVisible( true );*/
                   return true;
              * Print the document to the specified PrintService.
              * This method cannot tell if the printing was successful. You must register
              * a PrintJobListener
              * @return false if no PrintService is selected in the dialog, true otherwise
              public boolean printDocument(Doc doc, PrintService ps) throws PrintException {
                   if (ps == null)
                   return false;
                   addAllPrintServiceAttributeListeners(ps);
                   DocPrintJob dpj = ps.createPrintJob();
                   addAllPrintJobListeners(dpj);
                   dpj.print(doc, attributes);
                   return true;
              public PrintService showPrintDialog() {
                   return ServiceUI.printDialog(gc, x, y, services, defaultService, flavor, attributes);
              private void addAllPrintServiceAttributeListeners(PrintService ps) {
                   // add all listeners that are currently added to this object
                   for (int i = 0; i < psalListeners.size(); i++) {
                   PrintServiceAttributeListener p = (PrintServiceAttributeListener) psalListeners.get(i);
                   ps.addPrintServiceAttributeListener(p);
              private void addAllPrintJobListeners(DocPrintJob dpj) {
                   // add all listeners that are currently added to this object
                   for (int i = 0; i < pjlListeners.size(); i++) {
                   PrintJobListener p = (PrintJobListener) pjlListeners.get(i);
                   dpj.addPrintJobListener(p);
              // uncomment this also to print to a JFrame instead of a printer
              /* protected class PaintableJPanel extends JPanel {
                   Image img;
                   protected PaintableJPanel() {
                        super();
                   public void setImage( Image i ) {
                        img = i;
                   public void paint( Graphics g ) {
                        g.drawImage( img, 0, 0, this );
    Thanks
    Ram

    Ram,
    I have had printing problems too a year and a half ago. I used all printing apis of java and I still find that it is something java lacks. Now basically you can try autosense. To check whether your printer is capable of printing the docflavor use this PrintServiceLookup.lookupPrintServices(flavor, aset); . If it lists the printer then he can print the document otherwise he can't. I guess that is why you get the error.
    Regards,
    Kevin

  • Deploying html files.

              Hello,
              I have a war file which has jsp and servlets . When I deploy this war file on
              the server I can reference the jsp and servlets without any problem thru the url
              mapping i configured in web.xml, but i am not able to access nay of the html or
              other stic files in the directory(rott or relative). anyone know what the problem
              is?
              Thanks,
              

              Do I have to specify seperate URI's for html files? Weblogic document says that
              all the HTML/static files under the root directory and sub dir can be accessed.
              I tried to install teh cokkier (war) example weblogic says that there are no components
              found in the application
              Thanks,
              "Chuck Nelson" <[email protected]> wrote:
              >
              >Arun,
              >
              >This should work - - I'm wondering if you are specifying the
              >URI correctly for the HTML files and/or static files.
              >Why don't you deploy the <beahome>/samples/examples/webapp/cookie
              >example which includes both JSP and HTML files and see if that works.
              > If so,
              >examine the 'deltas' between this working configuration and your custom
              >configuration
              >
              >Chuck Nelson
              >Developer Relations Engineer
              >BEA Technical Support
              

  • Problem while compiling JSP in FORTE

    Hello Friends,
    I am using Fore for Java 4 Community Edition, I have created a web module. I am using internal tomcat 4.0 server. When I request for a JSP which has a bean or a class file stored in the WEB-INF\classes folder either using useBean tag or if try to create an object of that class, I get compilation error as forte is not including those classes in its classpath. But when I deploy the same application on external tomcat, it works fine. Even after I mount the classes folder in the project, it doesn't solve the purpose. Please help me to get rid of this problem. My directory structure is as follows.
    root - jsp and html files
    root\WEB-INF\web.xml
    root\WEB-INF\classes - all class files
    root\WEB-INF\lib - lib jars

    I am also working on Forte. Forte has an inbuilt Tomcat. You dont need to copy any files to any where in the file mount system. You need to specify the External / Internal Browser settings, So that when you try to execute it, the .jsp file can be displayed in the browser. I havent faced any problem as you said.
    Uma
    http://www.javagalaxy.com

  • Safari 5.0.6 plug-in html file corrupted (now Safari doesn't run)

    Not sure how well I can explain this, as I'm definitely a novice!  Basically, Safari won't run or access certain websites b/c I'm guessing the html file for installed plug-ins is corrupt (Safari won't open the file file:///Applications/Safari.app/Contents/Resources/English.lproj/Plug-ins.html. While trying to open this file, I continuously see the spinning "wheel").  Also, interestingly, I can't open the website listing Safari's extensions gallery for the security options.  Safari will, however, let me access other sites (e.g., Apple Support).
    This all started to happen the DAY after the following:  In the interest of better securing my machine and/or having Safari run less slowly, I'd installed and enabled several RECOMMENDED Safari extensions (e.g., Web of Trust, Dr. WebLink Checker, and Ad Blocker).  I'd also enabled ClicktoFlash and changed several preferences (to accept cookies only from sites I visit; unclicking "Enable Java"). Everything was working BEAUTIFULLY (must faster and, when visiting a site containing videos or banners, I could click FLASH to run Flash for videos/banners requiring it).  Then, just this a.m., I first discovered I couldn't SEE ClicktoFlash and then discovered I couldn't open the plug-ins html file. I couldn't get into Canvas (a learning delivery system) that I desperately need.  I've tried uninstalling the new Safari security extensions mentioned above, clearing Safari's cache and its history, restarting my machine, restarting Safari, and even resetting Safari.  I've also repaired my disc permissions and restarted the machine, restarting Safari, etc. Nothing works to restore the plug-ins html file.
    My husband -- who is very proficient with MACs --  can't figure this out.  He did just install HIS version of Safari (same one for same OS) on my machine and disabled MY version of Safari.  Still having the exact same problem re the plug-ins html file.
    HUGE SIGH and thanks tremendously for recommending a fix!! I'd really rather use Safari than other browsers.
    Tamarajf

    Andy:  BTW, do you have any ideas about WHY the plug-in html file will no longer load in Safari?  As noted in my original query, this is what I'd done about one day before the plug-in file wouldn't load:  " I'd installed and enabled several RECOMMENDED Safari extensions (e.g., Web of Trust, Dr. WebLink Checker, and Ad Blocker).  I'd also enabled ClicktoFlash and changed several preferences (to accept cookies only from sites I visit; unclicking "Enable Java")."  Thanks for any hints you can share! Tamara

  • How to send an abap report to an HTML file?

    hello this a two part question and This is the first question and I will post the next question after I am done with this.
    So here goes.
    My question is how do I send/download an abap report and convert it to an HTML file?
    Thanks guys take care!

    Hi Chand,
    This code will help.
    Generate an HTML file from a Report in ABAP  
    data: begin of itab occurs 0,
          matnr type mara-matnr,
          mtart type mara-mtart,
          matkl type mara-matkl,
          groes type mara-groes,
          end of itab.
    data: ifields type table of w3fields with header line.
    data: ihtml   type table of w3html   with header line.
    select * into corresponding fields of table itab
              from mara up to 100 rows.
    call function 'WWW_ITAB_TO_HTML'
    EXPORTING
    *   TABLE_ATTRIBUTES       = 'BORDER=1'
    *   TABLE_HEADER           =
        ALL_FIELDS             = 'X'
      tables
        html                   = ihtml
        fields                 = ifields
    *   ROW_HEADER             =
        itable                 = itab
    check sy-subrc = 0.
    call function 'GUI_DOWNLOAD'
         exporting          filename = 'c:test.html'
         tables          data_tab = ihtml

  • Dynamic html file generation problem

    I have a HTML file(abc.html) which is used when user clicks on a particular link in my web application. Web application has been developed in java. Now due to certain law changes , user wants to add some notices to existing HTML file(abc.html). So when he clicks on the old link, he gets abc.html with those notices appended to it. All the notices are different HTML files.
    So it looks like simple file append problem. But if it will modify my original file permanently, then it is not helping my purpose.
    So my doubt is , how I can append different notices html files to abc.html file and still keep my abc.html file as it is because the changes are based on user conditions. So if X is affected with new laws, he will see abc.html along with notices , if Y is not affected, then he will see abc.html only.

    The best solution would depend on the implementation details of your current web app, but, likely, the easiest way is to convert your html files to jsps. The jsp can then conditionally include relevant disclaimer fragments.

  • How to convert a JSP page into a PDF file?

    I am calculating and generating a bill in JSP?
    I want the output JSP page from the server to get converted to a PDF file.
    How to do this?
    Please help me doing this!

    Hai CeciNEstPasUnProgrammeur
    Actually I didnt mean what you are asking?
    I will put it in this way,
    I am having a JSP output.
    If I save that page in the browser it should get
    saved as a PDF File,
    This is my problem,As far as I can see, you have two options:
    1) Ensure you have some kind of rendering tool installed on the server, render your JSP to that engine, capture the output as an image and transform the image to a PDF. Or a variation on that server-side theme.
    2) Take the data you would be/are pushing into a JSP, offer a "download" facility that just takes that data and wraps it into a PDF. Your server then serves out that PDF file.
    To save the browser view (your JSP) as a PDF each client machine would need to be set up with some mechanism to capture and save as PDF. You can't control that.
    I've had to do something similar in the past. In that case though we had a simplar task of just generating a stored HTML file that we could store in the DB and lock down. Our approach was to use XSLT over the generated XML data structure.
    I'd advise you doing the same and generating an XML file and then running an XSLT/FO process over it to generate your PDF file. Don't try to do all the fancy stuff on the client environment, that's an environment you usually have very little control over.

  • 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 -:)

  • Bitmap image won't show after converting HTML file to pdf

    I have a program which saves a technical report as a HTML file. I don't  have another choice as to file type to save as. This program has a  template which generates the report....and there are fields which are  filled in...some text fields, and one is a company logo. Just to be  clear the logo itself is not in the template, a holding place is there  which points to the location of the logo on my drive. This is all set up  by the program and can't be altered.
    If I save the logo as a jpg, png or tiff file, the logo shows up in the  final HTML report and if I use Adobe Professional (version 7.0 on Win XP)  to create a pdf the  image also shows up - a perfect replica of the report is created in pdf,  making it convenient for printing and email.
    If I save the logo as a bitmap file (which creates a higher resolution  and sharper looking logo) the logo shows up in the initial HTML  technical report, but when I convert this to pdf the file is not found,  instead it shows as a small square red box with the error "Bad file  image" or "unable to download image".
    I can't understand why this would be the case as the logo is saved in  the same location whether it is jpg, png, tiff or bmp. It just seems  that the Adobe Pro doesn't know how to "find" the bitmap logo from the  HTML template. 
    I did try converting the HTML document to Word but it threw the  formatting out and when it was converted to pdf it cropped the page  & I wasn't able to resolve this...maybe it can be done but it is a  long way around in any case, particularly if steps then need to be taken  to correct the formatting.
    At the moment the document can be printed with success from the original  format - then it's a matter of scanning the printed document in order  to email. It can't be emailed directly because of the embedded  information which is lost if then sent to the recipient's computer.  However it would be nice if the doc could be converted to pdf which  would then make it easier to transfer the file to a backup drive or for  email.  Any ideas? Thanks

    Thanks for your response. Yes I did mean .bmp files.
    The problem is not getting it to show in HTML - but Adobe then picking it up from there. I guess though if it is not a standard format for HTML then maybe Adobe has trouble recognising it if it is there. Also, it is possible for Adobe to convert .bmp files if they are inserted in the HTML file, but I have instead a template with the code for the location of the file rather than the graphic itself.  I don't have this problem using the other file formats and getting them into pdf...it's just that the images aren't as sharp as the bmp. I have tried various formats and resolutions so if there isn't a way I can get the bmp from the HTML file into pdf I might just have to live with printing and scanning from the original. Thanks for your input, it confirms what I was thinking. I'll leave this unanswered for now in case someone else has further information.

Maybe you are looking for

  • Question about drawLIne(x1,y1,x2,y2) and repaint()

    i am doing this project, which i suppose to use drawLine and repaint() to generate graphs. my problem is, every time i hit a new button it will call the repaint() then my old graph is gone, only the new graph is left. for example i have 4 buttons. mo

  • Export or Rename PDFs with title based on content

    I haven't done any scripting in Indesign before but it was suggested I pose this question to the scripting forum. I created a template document using the Data Merge feature of Indesign. I used the template and Data Merge to create a file that has 700

  • PL/SQL Introspection - USER_IDENTIFIERS in Oracle 10g

    USER_IDENTIFIERS is a new view as of 11g that will show profile info about stored PL/SQL. For more info, see Tom Kyte's article here: http://www.oracle.com/technology/oramag/oracle/07-nov/o67asktom.html I need to replicate part of that functionality

  • CRM 2007 New Service Ticket Transaction not visible in WEB UI

    Hi Gurus I don't understand why this is so difficult. To me I have done everything correctly. I have a Service Ticket Transaction visible in the WEB IC. I now want to make it visible for use in the WEB UI, I have set the channel to WEB UI. Yet when I

  • Form Builder Failed to Initilaize

    im running EBS12 smoothly. when i try to use form builder in the same machine it gives message "FRM-18122 failed to initialize", while running "startinst.bat" from \10.1.2\j2ee\DevSuite it runs the command and stop (hang out) at "Initialize" statemen