Dynamically output a  image via struts insted of servlet

Hello,
I want to know how to dynamically output a image via struts insted of servlet;
I can work it fine with the serverlet, this how i get it to work via serverlet:
java class:
public class ImageServlet extends HttpServlet {
public void doGet(HttpServletRequest request, HttpServletResponse response)
          throws ServletException, IOException {
in web.xml :
<servlet>
<servlet-name>ImageServlet</servlet-name>
<servlet-class>com.admin.transferform.ImageServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ImageServlet</servlet-name>
<url-pattern>/ImgServlet</url-pattern>
</servlet-mapping>
and access the pic in[b] jsp :
<img src="/ImgServlet"></img>
<br>
I just want to know, how do i access via struct?
i change the java class to :
public class ImageServlet extends Action {
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
and in struts-config.xml :
<action
path="/image"
type="com.admin.transferform.ImageServlet">
</action>
and i have tryed both these in jsp but none did work:
in JSP :
<img src="/image"></img>
or
<html:image src="/image" />
can some one tell me, where did i went wrong pleaseee :)

ImageServlet java :
package com.admin.transferform;
import java.io.*;
import java.net.URLConnection;
import javax.servlet.ServletException;
import javax.servlet.http.*;
import org.apache.log4j.Logger;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
public class ImageServlet extends Action {
     private static Logger logger = Logger.getLogger(ImageServlet.class);
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
          try {
               InputStream in = new BufferedInputStream(new FileInputStream("/export/projects/images/headernews.jpg"));
               logger.debug("dec : trying to output the image file");
               String s = URLConnection.guessContentTypeFromStream(in);
               response.setContentType( s );
               byte pic[]= new byte[in.available()];
               in.read( pic );
               OutputStream out = response.getOutputStream();
               out.write( pic );
          } catch (IOException e) {
               logger.error("Error opening file region", e);
          return null;
in struts-config :
<action-mappings>
<action
path="/image"
type="com.waterfind.admin.transferform.ImageServlet">
</action>
</action-mappings>
jsp :
<img src="<html:rewrite action="/image"/>">
or
<img src="/myContext/image.do"/>
none working still, any more help please :)

Similar Messages

  • Output byte[] (image) to JSP page from Servlet - not working - why??

    I'm testing some new code in my servlet. I'm changing the method I use for pulling an image from the db (which is stored in a Blob column) and then displaying it in a Jsp page via <img src="go.callServlet">
    The new way works up until the code that outputs the image (bytes).
    Here's a snippet of the code -
                   rs = stmt.executeQuery("Select image from images");
                   rs.next();
                   Blob blobimage = rs.getBlob(1);          
                   int index = 0;             
                in = blobimage.getBinaryStream();        
                BufferedImage orig = ImageIO.read(in);    
                //resize image
                GraphicsConfiguration gc = getDefaultConfiguration(); //calls method in servlet
                 BufferedImage image = toCompatibleImage(orig, gc); //calls method in servlet                   
                 final double SCALE = (double)max_Width_Large/(double)image.getWidth(null);
                 int w = (int) (SCALE * image.getWidth(null));
                 int h = (int) (SCALE * image.getHeight(null));
                 final BufferedImage resize = getScaledInstance(image, w, h, gc);
                   //convert bufferedimage to byte array
                   ByteArrayOutputStream bytestream = new ByteArrayOutputStream();                                        
                  // W R I T E                                        
                  ImageIO.write(resize,"jpeg",bytestream);                                                                      
                  byte[] bytearray = bytestream.toByteArray();
                  bytestream.flush();
                  res.reset();
                   res.setContentType("image/jpeg");                   
                   while((index=in.read(bytearray))!= -1 ) {                         
                             res.getOutputStream().write(bytearray,0,index);
                   res.flushBuffer();              
                   in.close();     
                   //....               I know for a fact that the process of getting the image as a blob, making a BufferedImage from it, having the BufferedImage resized, and then converted into a byte[] array, works! I tested by putting the result into a db table.
    I just don't understand why it is that as soon as it gets to the code where it should output the image, it doesn't work. Its frustrating:(
    Here's the code I use regularly to output the image to the jsp, works all the time. The reason I've changed the method, is because I wanted to resize the image before displaying it, and keep it to scale without losing too much quality.
    rs = stmt.executeQuery("Select image from testimages");
                   rs.next();
                   Blob blobimage = rs.getBlob(1);
                   int index = 0;             
                in = blobimage.getBinaryStream();
                  int blob_length = (int)blobimage.length();
                  byte[] bytearray = new byte[blob_length];
                  res.reset();
                  res.setContentType("image/jpeg");
                   while((index=in.read(bytearray))!= -1 ) {
                             res.getOutputStream().write(bytearray,0,index);
                   res.flushBuffer();
                   in.close();     
    //...Can someone shed some light on this trouble I'm having?
    Much appreciated.

    I hate to bother you again BalusC, but I have another question, and value your expertise.
    With regards to using the BufferedInput and Output Streams - I made the change to my code that is used for uploading an image to the db, and I hope I coded it right.
    Can you please take a look at the snippet below and see if I used the BufferedOutputStream efficiently?
    The changes I made are where I commented /*Line 55*/ and /*Line 58*/.
    Much appreciated.
         boolean isPart = ServletFileUpload.isMultipartContent(req);
             if(isPart) { //40
              // Create a factory for disk-based file items
              FileItemFactory factory = new DiskFileItemFactory();
              // Create a new file upload handler
              ServletFileUpload upload = new ServletFileUpload(factory);                    
              java.util.List items = upload.parseRequest(req); // Create a list of all uploaded files.
              Iterator it = items.iterator(); // Create an iterator to iterate through the list.                         
              int image_count = 1;
         while(it.hasNext()) {                                                       
              //reset preparedStatement object each iteration
              pstmt = null;
                 FileItem item = (FileItem)it.next();     
                 String fieldValue = item.getName();     
                 if(!item.isFormField()) {//30
              //when sent through form
              File f = new File(fieldValue); // Create a FileItem object to access the file.
              // Get content type by filename.
                 String contentType = getServletContext().getMimeType(f.getName());
                 out.print("contenttype is :"+contentType+"<br>");                    
                 if (contentType == null || !contentType.startsWith("image")) {                               
                     String message = "You must submit a file that is an Image.";
                     res.sendRedirect("testing_operations.jsp?message="+message);
                       return;
              }//if
              //#### Code Update 3/18/09 ####
    /*line 38*/     BufferedInputStream bis = new BufferedInputStream(new FileInputStream(f));
              BufferedImage bug_lrg_Img = ImageIO.read(bis);                                           
              //code to resize the image;
              BufferedImage dimg = new BufferedImage(scaledW,scaledH,BufferedImage.TYPE_INT_RGB);
              //more code for resizing
              //BufferedImage dimg now holding resized image                           
                  ByteArrayOutputStream bytestream = new ByteArrayOutputStream();
                // W R I T E
                /* Line 55 */     
                   /*  ??? - is a BufferedOutputStream more efficient to write the data */
                   BufferedOutputStream bos = new BufferedOutputStream(bytestream);
                   /*line 58 */     
                   //changed from  ImageIO.write(dimg,"jpg",bytestream);                                  
                   //to
                   ImageIO.write(dimg,"jpg",bos);
              // C L O S E
              bytestream.flush();
                   /* Line 63 */
                   byte[] newimage = bytestream.toByteArray();                    
              pstmt = conn.prepareStatement("insert into testimages values(?)");                              
              pstmt.setBytes(1,newimage);
              int a = pstmt.executeUpdate();     
                   bis.close();
                bytestream.close();
                   bos.close();
                  //...

  • Oddities when serving images via NES from a servlet that is part of a WAR

    Just wanted to confirm that the following behavior is normal:
              Environment:
              NT 4.0 SP5
              NES 3.6 SP3
              WLS 5.1 SP3
              jdk 1.2.2
              Goal: When constructing a page that has images embedded in it from my
              servlet, I would like NES to serve the images.
              I've found out that I've to refer to my images with an absolute URL that
              maps to the images directory under Netscape's document root. If I refer to
              my image with a relative URL (request.getContextPath() +
              "/images/cookie.jpg"), then WebLogic tries to retrieve the image from the
              WAR. What is interesting is if I use relative references to images within my
              servlet (minus the WAR, i.e. with the servlet registered in
              weblogic.properties), I see that the image is being served by Netscape.
              Why does the WAR require absolute references to images and the previous
              mechanism does not? Is this behavior consistent with the spec? How are you
              guys handling this (are you using absolute references to static content when
              using WAR?)?
              I'm really baffled by this and wanted to see how others view this. Any
              comments/feedback will be much appreciated.
              Thanks,
              Sanjiv
              

    Hi Cameron,
              You are right but see my "Goal" below. I want to serve my images from my web
              server and NOT by WebLogic. Anyway, I spent too much time on this and found
              out that I was getting inconsistent results during testing different
              approaches because I was not restarting my web server. Once I became
              consistent in restarting my web server and closing all browser windows
              before each test, I got consistent results. So, here's what works for me:
              If I want to have my JSPs/servlets running in WLS to serve images that are
              included in their output from my web server, then I've to use absolute URLs.
              An example would be:
              img src="/images/a.gif"
              On the other hand if I use relative paths like img src="images/a.gif", then
              the browser request for the image is sent to WebLogic, which then looks for
              the image in the WAR (as it should).
              All of this might be common knowledge to most folks but not me.
              Thanks,
              Sanjiv
              Cameron Purdy <[email protected]> wrote in message
              news:[email protected]...
              > The WAR does not require absolute paths. Your JSP must be served from a
              URL
              > that, when combined with a relative path, actually specifies an image in
              the
              > WAR.
              >
              > Cameron Purdy, LiveWater
              >
              > "Sanjiv Gulati" <[email protected]> wrote in message
              > news:[email protected]...
              > > Just wanted to confirm that the following behavior is normal:
              > >
              > > Environment:
              > > NT 4.0 SP5
              > > NES 3.6 SP3
              > > WLS 5.1 SP3
              > > jdk 1.2.2
              > >
              > > Goal: When constructing a page that has images embedded in it from my
              > > servlet, I would like NES to serve the images.
              > >
              > > I've found out that I've to refer to my images with an absolute URL that
              > > maps to the images directory under Netscape's document root. If I refer
              to
              > > my image with a relative URL (request.getContextPath() +
              > > "/images/cookie.jpg"), then WebLogic tries to retrieve the image from
              the
              > > WAR. What is interesting is if I use relative references to images
              within
              > my
              > > servlet (minus the WAR, i.e. with the servlet registered in
              > > weblogic.properties), I see that the image is being served by Netscape.
              > >
              > > Why does the WAR require absolute references to images and the previous
              > > mechanism does not? Is this behavior consistent with the spec? How are
              you
              > > guys handling this (are you using absolute references to static content
              > when
              > > using WAR?)?
              > >
              > > I'm really baffled by this and wanted to see how others view this. Any
              > > comments/feedback will be much appreciated.
              > >
              > > Thanks,
              > > Sanjiv
              > >
              > >
              >
              >
              

  • Dynamically output image in JSP?

    Hi,
    This is a fairly simple action in VBScript, but I can't get it working here in JSP.
    For a database db, i want to cycle through db rows and read the information, and depending on the information in db, different images are populated.
    so far i tried to just dynamically printing out images by wrap <jsp:scriptlet> or just <script> around the <ui:image> but it keeps on giving me errors.
    Could someone please point out the obvious thing that i am missing?
    And how would I iterate through the database rows in jsp?
    appreciate you help.

    I display images dynamically in my application based on Spring and using JSC. Take a look at this tutorial to see what I did: http://swforum.sun.com/jive/thread.jspa?threadID=52657&tstart=0
    In short, I use servlets to read the data, and then set that to the button's image properties. There is a trick to it mentioned in the tutorial I believe).

  • Problem using image via URL

    Hi everybody
    I have a problem with loading images via URL into my PDFs.
    I am using LCD ES2 Version 9.0.1....
    I want to create a PDF which loads images from the internet but it does not work.
    So far I have tried to add an image or image field to my PDF in the LCD and populate that image using the Object-->Field-->URL: palett. I put the URL in there like this http://www.adobe.com/imageshome/pdfgift_home.gif , tick the "embed image Data" checkbox (also tried with without that just to be sure) and save as Dynamic PDF (I also tried static) but when I open the PDF in adobe reader 9 or 10 or acrobat  9 there is no image showing. I also put the image in a subform and made that subform flowed, as well as the page itself and made the binding global.
    I have the form properties - default set to "Acrobat and Adobe Reader version 9.0 or higher", Default Language to JavaScript, PDF Render format to Dynamic PDF.
    I also tried using JavaScript events like "form:ready ImageField2.value.#image.href = "http://www.adobe.com/imageshome/pdfgift_home.gif" as discribed here http://partners.adobe.com/public/developer/en/tips/lc_dynamic_images.pdf but that also does not work.
    What am I missing?
    Any help would be great and greatly appreciated!!!
    Thanks and best regards
    Norbert

    As far as I can tell, this use case is not allowed because of cross site references related security concerns. The form can refer to the images stored on the same server from where the PDF is served, but the images cannot come from external servers.

  • How to open and validate the tif images via java?

    Is it possible to open and validating the photoshop images via java. Kindly advise me.
    Thanks for looking into this.
    Maria Prabudass

    I have recently looked at athe code for Image Processor.
    To avoid bailing on errors it uses two techniques.
    1) It turns off all PS error reporting in addition to just turning off dialogs with:     app.displayDialogs = DialogModes.NO;  (it restores the original settings when exiting)
    2) It uses the Javascript construct  Try.....Catch around the basic body of the code so "any" error will not abort the script but just jump to the "Catch" code.
    Hope that is useful

  • Display image in struts

    Hi
    i am new in struts and i have a image in my data base but i am unable to show that image in struts
    what i did tilll now is
    i get that images content as binary data and make the InputStream object
    but when i try to write that InputStreams data it will not work and didnt show any image
    i set the content type image/gif but still facing problem
    can any one tell me the solution
    thanks alot

    lQuery = "Select ItemName,CategoryId,Item_image,item_Desc2 from item_master where ItemId='00c63f38-95d9-1028-b9d1-cb9eb7b97c40' and CategoryId='1823bc79-726e-1028-b4b9-b993b5d1f868'";
         lStatement = lDAOFactory.getStatement(lConnection);
         lResultSet = (ResultSet) lDAOFactory.executeQuery(lQuery, null, null, DAOFactory.SQLTYPEQUERY,lConnection, lStatement);
         while(lResultSet.next())
         Blob blob = lResultSet.getBlob("item_image");
         InputStream istream = blob.getBinaryStream();
         result.setM_inStreamItem_Image(istream);
    this retrieve the image from the data base
    InputStream istream =l_CatalougeItem.getM_inStreamItem_Image();
    if(istream!=null)
    OutputStream out= response.getOutputStream();
    byte dataBytes[] = new byte[istream.available()];
         int byteRead = 0;
         int totalBytesRead = 0;
    while (totalBytesRead < istream.available())
    byteRead = istream.read(dataBytes, totalBytesRead, istream.available());
         totalBytesRead += byteRead;
    out.write( dataBytes );     
    it write the image in the socket

  • My phone no longer outputs any sound via it's speakers

    iPhone 4S, iOS 6.1.3
    My phone no longer outputs any sound via it's speakers. I can hear sound with headphones and also if it is connected by the dock connector it will output sound to whatever it is connected to.
    I have tried plugging and unplugging headphones several times thinking that it is stuck in headphone mode but that did not resolve the problem. I tried a factory reset in case it was software related but that didn't fix it either. The phone is  out of warranty.
    Thanks.

    Bring your phone to Apple for out of warranty replacement.  In the US this will cost $199.

  • Need to dynamically include an image file when calling a popup window

    I am working on a web dynpro Java app which uses a button to call a popup window/view. Within the popup, I want to dynamically choose an image to show (from mime types) based on a criteria...there will be multiple buttons on the initial view that all call the same popup, but the popup will have content specific to which button called it (specifically the image embedded in the view).
    My question is, what is the proper/best way to do this?
    Here are some possible ways I can think of...
    1. Pass a parameter from each button during the call of the event, but how does that get sent to the implementation of the second view for use in determining which image? And, how do I modify the source property of the image element based on that parameter?
    2. Create multiple pages and views for each button to call...but this seems decidedly un-DRY.
    3. Saw one posting on how to dynamically create a cached image...I could use different event handlers in the initial view, then load individual images from the mime library at that point...cache it into a hard-coded image name...then just call the identical view every time. Not sure this is even possible...input?
    I don't know specifically how to implement any of these options, or know if there are other/better ways. Any help would be appreciated.

    Just create a context attribute "imageFileName" in the component controller or a custom controller, map this attribute from both views (the one that contains the buttons and the one in the popup window that displays the image).
    Now you can have an separate action for each button or one common action. In the first case just set the "imageFileName" inside the action handler for the specific button. In the second case use an action parameter "buttonId" and a parameter mapping
    button.mappingOfOnAction().setParameter("buttonId", button.getId());
    to determine which button triggered the action. After having checked which button was pressed, set the "imageFileName" accordingly.
    Armin

  • Dynamically Calling Background Image instead of standard setting

    Hi all,
    There is a requirement that, based on some condition I have to display shaded background image, say 'zimage1' .so as a result it should print in all pages. If condition fails, we have to display other image, say 'zimage2' in background. If both fails, no need to display background image.
    If any body knew the solution please assist me in this regards.
    Thanks & Regards,
    Nagesh.

    Do any one knew how to set Dynamic Background (Watermark) Image instead of going for the standard setting in Page. (by selecting BACKGROUND PictureTab).
    I want to pass a variable kind of information to the following fields during runtime.
    ie.,
    Path: Page->Background Picture.
    Name: <Variable image name>
    Object: GRAPHICS
    ID: BMAP
    and other properties like Ouput Mode, Position..etc.
    That image should come at backgroudn for all the pages.
    Hope, you have understood the issue here.
    Please do update me with relevnat ideas, if any.
    Thanks & Regards,
    Nagesh.

  • Can't view shared images via browser

    I use an old version of Skype, and I do not want to update. Whenever somebody sends an image via Skype, I see this message:
      <user> sent a photo.
      This device doesn't support Skype's new photo sharing features yet, but you can still view it in your browser here:
      https://api.asm.skype.com/s/i?[...]
    When I go to the link, it asks me to log into Skype, when I login, I see a page saying "Sorry, we were unable to open this photo. Try signing into Skype again.". No matter how many times I log in again, it still shows this message.
    Please help.
    Thank you.

    Mateon1 wrote:
    ruwim wrote:
    Images sent from the latest Skype versions on Windows, Mac or smartphones, are transferred now using the new Cloud-based mode. This means that they are not send directly to the recipient, but saved on a Cloud server.
    If the recipient is also using one of the latest Skype versions (on Windows it must be 6.21 or later), a preview of this image will be displayed in the chat window.
    On older Skype versions, only a link (similar to the one as you are seeing) to this image saved on the Cloud server is displayed.
    Theoretically, clicking on this link and signing in with your Skype account should display this image in your browser.
    If this was not the case, then the image might have been corrupted or there is an issue with your browser. What browser have you used to open this link?
    I use Google Chrome, the latest beta version (40.0.2214.85 beta-m). I find this unlikely that this particular image is corrupted, because I can view it with Skype on my phone, and this issue happens with all images shared via Skype, as far as I can tell.
    I have not tried to open the image links in Chrome, but it works with both Firefox and Internet Explorer.
    Make sure that you have the latest IE version installed on your computer and try to open this link in IE.

  • How to load external png image via xml?

    Can anyone help me with adding a png image to a mc with an instance name.
    I only want to display a single image (no gallery)
    I would like to get the url for the image via an xml.
    Here is a copy of my current action script which has already pulled in the xml data which includes the node with the url for the photo.
    import flash.events.Event;
    import flash.events.MouseEvent;
    import flash.net.URLLoader;
    import flash.net.URLRequest;
    var myXML:XML;
    var myLoader:URLLoader = new URLLoader();
    myLoader.load(new URLRequest("links.xml"));
    myLoader.addEventListener(Event.COMPLETE, processXML);
    function processXML(e:Event):void
        myXML = new XML(e.target.data);
        trace(myXML);
        menumv.carbtn.addEventListener(MouseEvent.CLICK, openCURL);
        menumv.edubtn.addEventListener(MouseEvent.CLICK, openEURL);
        menumv.psybtn.addEventListener(MouseEvent.CLICK, openPURL);
        menumv.stubtn.addEventListener(MouseEvent.CLICK, openSTURL);
        menumv.busbtn.addEventListener(MouseEvent.CLICK, openBURL);
        menumv.shabtn.addEventListener(MouseEvent.CLICK, openSURL);
        studentmv.stuname.text = myXML.student.name;
    function openCURL(e:MouseEvent):void
            navigateToURL(new URLRequest(myXML.car.url));
    function openEURL(e:MouseEvent):void
            navigateToURL(new URLRequest(myXML.edu.url));
    function openPURL(e:MouseEvent):void
            navigateToURL(new URLRequest(myXML.psy.url));
    function openSTURL(e:MouseEvent):void
            navigateToURL(new URLRequest(myXML.stu.url));
    function openBURL(e:MouseEvent):void
            navigateToURL(new URLRequest(myXML.bus.url));
    function openSURL(e:MouseEvent):void
            navigateToURL(new URLRequest(myXML.sha.url));
    And here is a copy of the node containing the url
    <menu>
        <student>
        <name>testnamehere</name>
        <photo>http://10.0.0.2/test/photos/testnamephoto.jpg</photo>
        </student>
    </menu>
    I did see this tutorial but it was for a gallery and I couldnt seem to hack and slash it to do what I want.
    http://tuts.flashmint.com/creating-a-simple-xml-gallery-in-actionscript3/
    Thanks again in advance for all the help.

    I have added that code but I think i have buggered up something else in the process.
    I get the following error
    ReferenceError: Error #1069: Property data not found on flash.display.LoaderInfo and there is no default value.
        at sdp_fla::MainTimeline/load_complete()
    Current AS
    import flash.events.Event;
    import flash.events.MouseEvent;
    import flash.net.URLLoader;
    import flash.net.URLRequest;
    var myXML:XML;
    var myLoader:URLLoader = new URLLoader();
    myLoader.load(new URLRequest("links.xml"));
    myLoader.addEventListener(Event.COMPLETE, processXML);
    function processXML(e:Event):void
        myXML = new XML(e.target.data);
        trace(myXML);
        menumv.carbtn.addEventListener(MouseEvent.CLICK, openCURL);
        menumv.edubtn.addEventListener(MouseEvent.CLICK, openEURL);
        menumv.psybtn.addEventListener(MouseEvent.CLICK, openPURL);
        menumv.stubtn.addEventListener(MouseEvent.CLICK, openSTURL);
        menumv.busbtn.addEventListener(MouseEvent.CLICK, openBURL);
        menumv.shabtn.addEventListener(MouseEvent.CLICK, openSURL);
        studentmv.stuname.text = myXML.student.name;
    var _request:URLRequest = new URLRequest(myXML.student.photo);
    var _ldr = new Loader();
    studentmv.photo.addChild(_ldr);
    _ldr.load(_request);
    _ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, load_complete, false, 0, true);
    function openCURL(e:MouseEvent):void
            navigateToURL(new URLRequest(myXML.car.url));
    function openEURL(e:MouseEvent):void
            navigateToURL(new URLRequest(myXML.edu.url));
    function openPURL(e:MouseEvent):void
            navigateToURL(new URLRequest(myXML.psy.url));
    function openSTURL(e:MouseEvent):void
            navigateToURL(new URLRequest(myXML.stu.url));
    function openBURL(e:MouseEvent):void
            navigateToURL(new URLRequest(myXML.bus.url));
    function openSURL(e:MouseEvent):void
            navigateToURL(new URLRequest(myXML.sha.url));
    function load_complete(event):void
    var bitmap:Bitmap = Bitmap(event.currentTarget.data);
    bitmap.smoothing = true;
    bitmap.width = studentmv.photo.width
    bitmap.width = studentmv.photo.height
    studentmv.photo.addChild(bitmap)

  • I am trying to create an responsive HTML5 output, but images are not showing up.

    When I preview my output, the images are note showing up. It is simply the blank outline of the image with the little image icon in the top left corner.
    As it is compiling I see the message "Warning: Image maps are not converted to relative size". Is there something in the setting that I need to change, or is that even the problem?

    Can you check your output folder: are the images copied to your output? If they are missing, are the images listed in the Project Manager pod in RoboHelp?
    The warning is unrelated. Since image maps work with pixel coordinates, you can't simply make them responsive. You are probably using an image map in your project. This is causing the warning. It is not a problem since the image map will still work. But if the image map is very large, it may give a bad experience on smaller screens. You may have to decide whether to change or remove the image map if you want to support mobile.

  • Send spool id output (sap script) via email in PDF format

    Dear friends,
    Looking for sample program to send spool id output of sapscript via email in PDF format.
    Regards,
    Praveen Lobo

    Hi,
    Try this code..
    * Parameters.
    PARAMETERS: p_email(50) LOWER CASE.
    PARAMETERS: p_spool LIKE tsp01-rqident.
    * Data declarations.
    DATA: plist LIKE sopcklsti1 OCCURS 2 WITH HEADER LINE.
    DATA: document_data LIKE sodocchgi1.
    DATA: so_ali LIKE soli OCCURS 100 WITH HEADER LINE.
    DATA: real_type LIKE soodk-objtp.
    DATA: sp_lang LIKE tst01-dlang.
    DATA: line_size TYPE i VALUE 255.
    DATA: v_name LIKE soextreci1-receiver.
    DATA rec_tab LIKE somlreci1 OCCURS 1 WITH HEADER LINE.
    * Get the spool data.
    CALL FUNCTION 'RSPO_RETURN_SPOOLJOB'
    EXPORTING
    rqident = p_spool
    first_line = 1
    last_line = 0
    desired_type = ' '
    IMPORTING
    real_type = real_type
    sp_lang = sp_lang
    TABLES
    buffer = so_ali
    EXCEPTIONS
    no_such_job = 1
    job_contains_no_data = 2
    selection_empty = 3
    no_permission = 4
    can_not_access = 5
    read_error = 6
    type_no_match = 7
    OTHERS = 8.
    * Check the return code.
    IF sy-subrc <> 0.
    MESSAGE s208(00) WITH 'Error'.
    LEAVE LIST-PROCESSING.
    ENDIF.
    * Prepare the data.
    plist-transf_bin = 'X'.
    plist-head_start = 0.
    plist-head_num = 0.
    plist-body_start = 0.
    plist-body_num = 0.
    plist-doc_type = 'RAW'.
    plist-obj_descr = 'Spool data'.
    APPEND plist.
    plist-transf_bin = 'X'.
    plist-head_start = 0.
    plist-head_num = 0.
    plist-body_start = 1.
    DESCRIBE TABLE so_ali LINES plist-body_num.
    plist-doc_type = real_type.
    * Get the size.
    READ TABLE so_ali INDEX plist-body_num.
    plist-doc_size = ( plist-body_num - 1 ) * line_size
    + STRLEN( so_ali ).
    APPEND plist.
    * Move the receiver address.
    MOVE: p_email TO rec_tab-receiver,
    'U' TO rec_tab-rec_type.
    APPEND rec_tab.
    IF NOT sp_lang IS INITIAL.
    document_data-obj_langu = sp_lang.
    ELSE.
    document_data-obj_langu = sy-langu.
    ENDIF.
    v_name = sy-uname.
    * Subject.
    document_data-obj_descr = 'Spool attached'.
    * Send the email.
    CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
    EXPORTING
    document_data = document_data
    sender_address = v_name
    sender_address_type = 'B'
    TABLES
    packing_list = plist
    contents_bin = so_ali
    receivers = rec_tab
    EXCEPTIONS
    too_many_receivers = 1
    document_not_sent = 2
    document_type_not_exist = 3
    operation_no_authorization = 4
    parameter_error = 5
    x_error = 6
    enqueue_error = 7
    OTHERS = 8.
    IF sy-subrc <> 0.
    MESSAGE e208(00) WITH 'Error in sending email'.
    ENDIF.
    COMMIT WORK.
    * Send the email immediately.
    SUBMIT rsconn01
    WITH mode = 'INT'
    AND RETURN.
    * Success message.
    MESSAGE s208(00) WITH 'Email sent'.
    Thanks
    Naren

  • How to set the AppleTV to output PCM DIGITAL via toslink

    how do you set the AppleTV to output PCM DIGITAL via toslink - my amp can only recieve PCM audio via toslink cable

    I am having the same problem. I bought an optical-analog convertor from Amazon (SANOXY) and had Onkyo try to help me set it up. No luck. I am going to try a Monoprice version. I was able to output audio through my DirectTV box to the Zone 2 speakers, so that isn't the problem. I was able to hear the music from my iMac through the AppleTV/Onkyo receiver on the 5.1 side but was unable to output it through Zone 2 to the speakers.
    Very frustrating!!!!

Maybe you are looking for

  • Holding state in a jcd how to do it but not in a dirty way ...

    hi *, we do have the following setup (simplified): 3 appservers in 3 datacenters running all the same jcds. ICAN 505 setup (no eInsight) and or CAPS V6 till today we were in the lucky position that we did not need to hold any state in jcds and had no

  • How to add images/photos to multiple item entries quickly?

    We've got about 10,000 items in our database, and we've got pictures of all of them. We've got all of the items in the Business One database individually, with price and cost and barcode, etc. But we want to add the photo of each one to its respectiv

  • Check print report PaymentAmountText field gets spaces while using RPAD Fn

    Hi, In the check print report we are using the PaymentAmountText field to print the amount in text. After printing the remaining spaces should be filled with '*' I used the below command <?xdofx:rpad(PaymentAmountText,100,'*')?> But the output is as

  • Any standard function module to read data from a cube

    Hi, I want to read data from a cube say XYZ, into an internal table. Is there any standard function module to do this? If so can anyone plz tell me what change should i make in the function module for my requirement. Regards BW Fresher.

  • Flicker Filter Settings Lost when I re-open file

    I have created a sequence consisting of 2 video layers and about 30 cuts. Because it consists of Flash-generated 2D animation, it was necessary for me to apply the ANTI FLICKER FILTER to every single shot to reduce the flicker. For some reason, even