How to insert new image in ITS  HTML template Urgent

Hi all,
get point full point.
i created new service and thats working fime but when i inserted image in this template , the image is not displaying in Browser.
can any body tell me what is the default path of of the image.
please help me out..
Regards
Rashmi

Hi,
  You have to import your image to new service(Zservice) like below..
Step: ZSERVICE>Topic99>Create>MIME>import from your desktop or any location, then give a path in your template source code below,
Example. < img name="phone`i`" border=0 src="`mimeURL(~language="", ~name="image/phone.gif")`" alt="`#PhoneMe`" border=0 > (Ref: PZ01 Service)
And to do the Save/Publish.
Thnx
Suriya

Similar Messages

  • How to insert a image file into oracle database

    hi all
    can anyone guide me how to insert a image file into oracle database now
    i have created table using
    create table imagestore(image blob);
    but when inserting i totally lost don't know what to do how to write query to insert image file

    Hi I don't have time to explain really, I did have to do this a while ago though so I will post a code snippet. This is using the commons file upload framework.
    Firstly you need a multi part form data (if you are using a web page). If you are not using a web page ignore this bit.
    out.println("<form name=\"imgFrm\" method=\"post\" enctype=\"multipart/form-data\" action=\"FileUploadServlet?thisPageAction=reloaded\" onSubmit=\"return submitForm();\"><input type=\"FILE\" name=\"imgSource\" size='60' class='smalltext' onKeyPress='return stopUserInput();' onKeyUp='stopUserInput();' onKeyDown='stopUserInput();' onMouseDown='noMouseDown(event);'>");
    out.println("   <input type='submit' name='submit' value='Submit' class='smalltext'>");
    out.println("</form>"); Import this once you have the jar file:
    import org.apache.commons.fileupload.*;Now a method I wrote to upload the file. I am not saying that this is correct, or its the best way to do this. I am just saying it works for me.
    private boolean uploadFile(HttpServletRequest request, HttpSession session) throws Exception {
            boolean result = true;
            String fileName = null;
            byte fileData[] = null;
            String fileUploadError = null;
            String imageType = "";
            String error = "";
            DiskFileUpload fb = new DiskFileUpload();
            List fileItems = fb.parseRequest(request);
            Iterator it = fileItems.iterator();
            while(it.hasNext()){
                FileItem fileItem = (FileItem)it.next();
                if (!fileItem.isFormField()) {
                    fileName = fileItem.getName();
                    fileData = fileItem.get();
                    // Get the imageType from the filename extension
                    if (fileName != null) {
                        int dotPos = fileName.indexOf('.');
                        if (dotPos >= 0 && dotPos != fileName.length()-1) {
                            imageType = fileName.substring(dotPos+1).toLowerCase();
                            if (imageType.equals("jpg")) {
                                imageType = "jpeg";
            String filePath = request.getParameter("FILE_PATH");
            session.setAttribute("filePath", filePath);
            session.setAttribute("fileData", fileData);
            session.setAttribute("fileName", fileName);
            session.setAttribute("imageType", imageType);
            return result;  
         } And now finally the method to actually write the file to the database:
    private int writeImageFile(byte[] fileData, String fileName, String imageType, String mode, Integer signatureIDIn, HttpServletRequest request) throws Exception {
            //If the previous code found a file that can be uploaded then
            //save it into the database via a pstmt
            String sql = "";
            UtilDBquery udbq = getUser(request).connectToDatabase();
            Connection con = null;
            int signatureID = 0;
            PreparedStatement pstmt = null;
            try {
                udbq.setUsePreparedStatements(true);
                con = udbq.getPooledConnection();
                con.setAutoCommit(false);
                if((!mode.equals("U")) || (mode.equals("U") && signatureIDIn == 0)) {
                    sql = "SELECT SEQ_SIGNATURE_ID.nextval FROM DUAL";
                    pstmt = con.prepareStatement(sql);
                    ResultSet rs = pstmt.executeQuery();
                    while(rs.next()) {
                       signatureID = rs.getInt(1);
                    if (fileName != null && imageType != null) {
                        sql = "INSERT INTO T_SIGNATURE (SIGNATURE_ID, SIGNATURE) values (?,?)";
                        InputStream is2 = new ByteArrayInputStream(fileData);
                        pstmt = con.prepareStatement(sql);
                        pstmt.setInt(1, signatureID);
                        pstmt.setBinaryStream(2, is2, (int)(fileData.length));
                        pstmt.executeUpdate();
                        pstmt.close();
                        con.commit();
                        con = null;
                if(mode.equals("U") && signatureIDIn != 0) {
                    signatureID = signatureIDIn.intValue();
                    if (fileName != null && imageType != null) {
                        sql = "UPDATE T_SIGNATURE SET SIGNATURE = ? WHERE SIGNATURE_ID = ?";
                        InputStream is2 = new ByteArrayInputStream(fileData);
                        pstmt = con.prepareStatement(sql);
                        pstmt.setBinaryStream(1, is2, (int)(fileData.length));
                        pstmt.setInt(2, signatureID);
                        pstmt.executeUpdate();
                        pstmt.close();
                        con.commit();
                        con = null;
            } catch (Exception e) {
                con = null;
                throw new Exception(e.toString());
            return signatureID;
       }

  • How to insert an image and an icon in a JFrame !

    i am seeking for th efollowing :
    1/- how to insert an image in a Jframe ? i triied to use a label and set labelk icon with the specefic path but i can not see it neither in the jbuilder6 brower nor in the execution of the application ! how to deal with that please!
    2/- how to insert an icon to my window sothat it does not display the jbuilder 6's default icon
    ant help wil be really apreciated! thanks

    In JBuilder, create a new file called Frame1 then copy this code into it. It should give you a frame which will have a different icon in the frame title and an image in its pane.
    Change the name of the icon it uses to any gif file that you have on your pc.
    // START OF FILE
    import java.awt.*;
    import javax.swing.*;
    public class Frame1 extends JFrame {
         JLabel jLabel1 = new JLabel();
         public Frame1() {
              try {
                   jbInit();
              catch(Exception e) {
                   e.printStackTrace();
         public static void main(String[] args) {
              Frame1 frame1 = new Frame1();
              frame1.pack();
              frame1.show();
         private void jbInit() throws Exception {
              ImageIcon myImage = new ImageIcon("c:/data.gif");
              this.setIconImage(myImage.getImage());
              jLabel1.setText("jLabel1");
              jLabel1.setIcon(myImage);
              this.getContentPane().add(jLabel1, BorderLayout.CENTER);
    //END OF FILE

  • How to insert new line character?

    Hi all,
    I have two lines to print.
    out.println("Available number of columns="+cols);
    out.println("Number of columns must be present=10");My problem is:
    i want both the lines to be printed one below the other. But, it is displayed in one single line.....
    Can anyone please tell me how to insert new line character?
    I tried with \n, '\n' and \r\n but, in vain......
    Thanks for your time.
    Regards,
    Ashvini

    You should never use "\n" directly.
    The line separator character is different on different operating systems.
    And putting quotes around it in your string will make absolutely no difference in the JSP.
    To find out what the line separator is you should use System.getProperty("line.separator");
    The JSPWriter and PrintWriter classes will automatically use this property with a println statement, so a println will always finish with a line separator.
    The issue here was that HTML by default ignores all whitespace.
    The solutions provided
    - use a <br> tag instead of a carriage return
    - use <pre> tags, which tells the browser not to ignore whitespace. That can be troublesome in JSP which generates a lot of extraneous carriage returns into the code.
    Cheers,
    evnafets

  • How to insert an image between two pages?

    How to insert an image between two pages? and how do remove the line of separation between two pages?.
    Attached image shows, there is a photo of two pages and no line of separation in the pages!

    Michi Thanks, but that option is only available on one page (2 columns), not to put two pages! see new image

  • How to insert new line in the copied schema with transaction code PE01?

    Dear Experts,
             I have copied HKT0 to ZKT0 , i want to insert new line between  line 150 and line 160 in ZKT0, I don't know how to insert new line 160, who can tell me ?
             Looking forward to your reply.
    Best Regards,
    Merry

    Hi,
    1. Open your schema,
    2. In first colume "Line" select line where you want to add new line,
    3. Replace first value in the column field (that indicates number of line) with character I (means insert),
    4. Press enter
    The line will be added. The same way you can add lines to PCR.
    To delete use character D.
    Cheers

  • How to insert the image or logo into the table as a field in webdynpro abap

    Hi Friends,
    Please tell me how to insert the image or logo into the table as a field in webdynpro abap.........

    Hi Alagappan ,
          In your view layout you take table UI element and then you bind it with some context nodes.
    The attributes of your nodes comes as a field.
    Now in these fields you can set various properties and image is one of them.
    Go to ->
    1. View Layout -> Right Click on ROOTUIELEMENTCONTAINER -> INSERT ELEMENT -> TABLE
    2. Right click on table -> Create Binding.
       Here you have to bind it with the appropriate context node.
    You will get two properties here
    a- Standard Cell Editor :- ( make it image )
    b- Standard properties :- ( If required set image properties ).
    3. If you want put image from out side then import it as a mime object and set the source of your table field ( used as a image )
    also have a look :-
    [Image Properties|http://help.sap.com/saphelp_nw04/helpdata/en/f3/1a61a9dc7f2e4199458e964e76b4ba/content.htm]
    Hope this will solve your problem.
    Reply if any case of any issue.
    Thanks & Regards,
    Monishankar C

  • How to insert an image file in Oracle database

    hi
    can you please tell me how to insert an image file into oracle database????
    suppose there is one image file in c:\pictures\rose.jpg. how to insert that file into database? theoretically i know that will be BFILE type but i dont know how to insert that.
    will be waiting for your reply........
    thanks & regards,
    Priyatosh

    Hello,
    The easiest way to load a blob is to use SQL loader.
    This example comes from the utilities guide:
    LOAD DATA
    INFILE 'sample.dat'
    INTO TABLE person_table
    FIELDS TERMINATED BY ','
    (name CHAR(20),
    1 ext_fname FILLER CHAR(40),
    2 "RESUME" LOBFILE(ext_fname) TERMINATED BY EOF)
    Datafile (sample.dat)
    Johny Quest,jqresume.txt,
    Speed Racer,'/private/sracer/srresume.txt',
    Secondary Datafile (jqresume.txt)
    Johny Quest
    500 Oracle Parkway
    Secondary Datafile (srresume.txt)
    Loading LOBs
    10-18 Oracle Database Utilities
    Speed Racer
    400 Oracle Parkway
    regards,
    Ivo

  • How to insert new line break in XSLT mapping

    Hi experts,
    I am doing file to mail scenario, i am sending the text file as an attachment using reciever mail adapter.
    I did everything, i can able to send the mail with text file attachment, but with in the file i got multiple rows, i need to put line break in XSLT mapping.
    I did use following statement but it is inserting small rectangle between the records, the records are not separating with new lines, all are in one line.
    <xsl:text>*#xA;</xsl:text>   
    note: in real coding replace * with &
    Can anyone suggest me how to insert new line in XSLT mapping.
    My XSLT mapping as look like:
    <?xml version='1.0'?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:ns0="http://www.Coj.co.za/SapIsuToABSA/DirectDebitFile">
    <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
    <xsl:variable name="break">&lt;br/&gt;</xsl:variable>
    <xsl:variable name="space"> </xsl:variable>
    <xsl:variable name="newline"><xsl:text></xsl:text></xsl:variable>
    <xsl:template match="/">
    <ns1:Mail xmlns:ns1="http://sap.com/xi/XI/Mail/30">
    <Subject>Please Check Attached Direct Debit File</Subject>
    <From>S@za</From>
    <To>P@za</To>
    <Content_Type>text/plain</Content_Type>
    <Content>
    <xsl:for-each select="MT_SapIsuToABSA_DirectDebitFile/DirectDebitRec/Body">
    <xsl:value-of select="Space1"/>
    <xsl:value-of select="Cust_AccNo"/>
    <xsl:value-of select="Reserve_1"/>
    <xsl:value-of select="Cust_Name"/>
    <xsl:value-of select="Cust_Name1"/>
    <xsl:value-of select="Cust_Bank_AccNo"/>
    <xsl:value-of select="Space2"/>
    <xsl:value-of select="Cust_Bank_BranchNo"/>
    <xsl:value-of select="Reserve_2"/>
    <xsl:value-of select="Space3"/>
    <xsl:value-of select="Cust_AccNo_1"/>
    <xsl:value-of select="Space4"/>
    <xsl:value-of select="Reserve_3"/>
    <xsl:value-of select="Deduction_Amnt"/>
    <xsl:value-of select="Space5"/>
    <xsl:value-of select="Reserve_4"/>
    <xsl:value-of select="Space6"/>
    <xsl:value-of select="Action_Date"/>
    <xsl:value-of select="Space7"/>
    <xsl:value-of select="Reserve_5"/>
    <xsl:text>*#xA;</xsl:text>   
    note: in real coding replace * with &
    </xsl:for-each>
    </Content>
      </ns1:Mail>
      </xsl:template>
      </xsl:stylesheet>
    Kind regards,
    Praveen

    Hi,
    I think <xsl:text>#xa;</xsl:text> should do the trick, but depending on which OS (ux or win), the "new line" chars sequence is different (win would require a CRLF like <xsl:text>#xd;*#xa;</xsl:text>)
    Chris
    -> &
    Edited by: Christophe PFERTZEL on Apr 14, 2010 2:16 PM

  • How to insert new Item in JCombox through setEditable?

    Hey guys,
    Is there somebody who can help me on how to insert new Item in the JComboBox through setEditable?
    JComboBox box  = new JComboBox();
    box.addItem("");box.addItem("a");
    box.addItem("b");
    box.setEditable(true);
    When I run it and selected the index 0 which the one which color red, I want to edit it and when I press enter key it will add a new item, but preserving this " box.addItem(""); , what I want is to add like this one, box.addItem("The new text entered"); "
    Can you help me with this one... Thanks

    hello,
    the following demo may help,
    import java.awt.BorderLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.DefaultComboBoxModel;
    import javax.swing.JButton;
    import javax.swing.JComboBox;
    import javax.swing.JFrame;
    * comobo.java
    * Version 1.0
    * Date Jan 3, 2006
    * Copyright spatika
    public class comobo extends JFrame implements ActionListener{
         JComboBox jc = new JComboBox();
         DefaultComboBoxModel lm = new DefaultComboBoxModel();
         JButton jb = new JButton("add");
         public comobo(){
              lm.addElement("");
              lm.addElement("1");
              lm.addElement("2");
              lm.addElement("3");
              jc.setModel(lm);
              jc.setEditable(true);
              jb.addActionListener(this);
              getContentPane().add(jb,BorderLayout.NORTH);
              getContentPane().add(jc,BorderLayout.SOUTH);
              pack();
              setVisible(true);
              setDefaultCloseOperation(EXIT_ON_CLOSE);
         public void actionPerformed(ActionEvent i){
              Object text = jc.getSelectedItem();
              jc.setSelectedItem(null);
              lm.addElement(text);
         public static void main(String artgs[]){
              new comobo();
    }thanks
    daya

  • How to insert multiple images

    How to insert multiple images in SQL/MySQL using servelet

    donsankar wrote:
    How to insert multiple images in SQL/MySQL using serveletuse a BLOB
    are you sure you need to store images in the database?
    why not store the image on the file system and store a link to the image file in the database
    you really don't gain much putting images in the database

  • Transform implementation goes wrong when I try transforming a image through script and save the new image using a HTML to canvas plugin.

    Transform implementation goes wrong when I try transforming a image through script and save the new image using a HTML to canvas plugin. The rotation comes up fine, but the origin of the transformation is faulty (compared to other browsers like Chrome & IE)

    A good place to ask advice about web development is at the mozillaZine "Web Development/Standards Evangelism" forum.
    *http://forums.mozillazine.org/viewforum.php?f=25
    The helpers at that forum are more knowledgeable about web development issues.
    You need to register at the mozillaZine forum site in order to post at that forum.

  • How to insert an image into mysql

    welcome to all,
    can any one tell how to insert an image into mysql database(BLOB). it is urgent.
    regards

    welcome to all,
    can any one tell how to insert an image into mysql database(BLOB). it is urgent.
    regards

  • Adding new text in SHC HTML template with different colour

    Hi Gurus,
    We are using SRM5.0 Server 550 and SP14 and classic scenario.
    Is it possible to change the colour of a newly added text in Shopping cart HTML template?
    I mean we have a requirement to add a new text in HTML template of shopping cart and with a different colour so that it woulod be highlighted whenever users try to shop something.
    Can anyone let me know the pros and cons of such a thing, if later on they upgrade to SRM7.0 and its feasibility?
    Regards,
    Teja

    Hi,
    You can enhance/modify the HTML template.
    SRM 7.0 does not use ITS HTML template. So SRM 5.0 is the last version using ITS HTML template and no impact for upgrading to SRM 7.0.
    Regards,
    Masa

  • How to insert an image file as blob using JDBC Statement

    Hi,
    I'm new on java.
    I want the code to insert an image file in Oracle database whose data type is blob.
    i want to use JDBC statement not the prepared statement.
    Please help me out.

    user8739226 wrote:
    thanks for the solution.
    I want to ask one thing
    let say i've created a method in a bean in which i'm passing three parameters.
    One is tablename as String, Second is Name of tablefields as Object, Third is Values as Object
    Like:
    public synchronized int insert(String table,Object[] fields, Object[] values)Ah now we're getting somewhere. I was trying to come up with a situation where using a regular Statement over PreparedStatement would be viable and came up with practically nothing.
    In the method body i'm accessing the table fields and values and combining them into the insert sql query.
    how can i do this using preparedstatment.
    how do i come to know here in this bean that this value is int or string or date at runtime to use setInt, setString, setdate or setBlob respectively.That's your problem. Bad design. You want to make some sort of universal insert method that can insert anything anywhere. But it doesn't really make sense, because whenever you're trying to insert something, you know exactly what you want to insert and where. You could use a PreparedStatement at that point (although encapsulate it in its own method). Now you're trying to create your own poorly designed framework over JDBC that doesn't solve problems, only increases them.
    Above was the only reason i saw, i was using statement instead of preparedstatment as statement was looking easy in this situation.
    please, give me the solution of above using preparedstatment.No, rather you should reconsider your design. What advantage does your insert() method give you over, let's say using a regular PreparedStatement. Granted, you can put your connection opening and other boilerplate code in the method. But if that's your only problem, then your insert method isn't gonna be much use. You could always switch to JPA for example and work with that.

Maybe you are looking for

  • How can i get a list of the user created on a database?

    dear all i need to issue a query that return a list for all users that are created on the database please help

  • Help with replicating/updating vendor master data

    Hi, Currently, we run the bbp_vendor_sync program to do the replication. It does the job of both bbpgetvd (new vendor creation) and bbpupdvd (update existing vendor). But the problem is, we have two number ranges for vendors. One is Numeric and other

  • F110-idoc-not-generated-rffoedi1

    hi expert, I am running a payment program F110 and the IDOC is not getting genrated for the payment program. In the payment log i see the infomation IDOcs were generated for the following entries.... but when i chekc the idoc by we05 i can't find any

  • Flashing unmounted partitions on Time Machine drive

    Using Lion 10.7.2 and an external 1TB WD My Book (firewire port). This drive has 5 partitions, 4 of them Super Duper BUs which are not mounted, and the rest of the drive is for Time Machine (500GB) and it is mounted. When TM is doing its backup I som

  • Change field labels for Absence Notification

    Hi Folks, I wonder how can I change a standard label for fields in absence notification window of ESS. For instance, the standard spanish translation for "Absence Type" is "Clase de Vacaciones" and the client want it to be "Tipo de Ausencia". How can