Custom TrustManager example which asks user for trustability

Hi!
For I needed a trustmanager which shows an untrusted server certificate to the user and asks him if the certificate can be considered trustable I wrote an own trustmanager. As it took much time to find out how to do this here is my code to shorten your time if you need a similar functionality:
NOTE:
If a certificate is declared trustable by the user it is stored in a local keystore file. So if you use the code in an applet you need to sign it to get the appropriate permissions.
To use it you have to put the following code where you get your SSLSocketFactory:
try{
               SSLContext sslContext=SSLContext.getInstance("SSL","SunJSSE");
               TrustManager[] tm={new StoreCertTrustManager()};
               sslContext.init(null,tm,null);
               factory = ( SSLSocketFactory) sslContext.getSocketFactory();
}catch(Exception e) { ... }
Here is the implementation of the StoreCertTrustManager:
* This class implements a TrustManager for authenticating the servers certificate.
* It enhances the default behaviour.
class StoreCertTrustManager implements X509TrustManager {
     /** The trustmanager instance used to delegate to default behaviour.*/
     private TrustManager tm=null;
     /** Password for own keystore */
     private final char[] keyStorePassword=new String("changeit").toCharArray();
     /** Path to own keystore. Store it into the home directory to avoid permission problems.*/
     private final String keyStorePath=System.getProperty("user.home")+"/https-keystore";
     /** The stream for reading from the keystore. */
     FileInputStream keyStoreIStream=null;
     /** The instance of the keystore */
     private KeyStore keyStore=null;
     * Creates a TrustManager which first checks the default behaviour of the X509TrustManager.
     * If the default behaviour throws a CertificateException ask the user if the certificate
     * should be declared trustable.
     * @throws Exception: If SSL - initialization failed.
     StoreCertTrustManager() throws Exception {
          /* Try to set the truststore system property to our keystore
          * if we have the appropriate permissions.*/
          try{
               File httpsKeyStore=new File(keyStorePath);
               if(httpsKeyStore.exists()==true) {
                    System.setProperty("javax.net.ssl.trustStore",keyStorePath);
          }catch(SecurityException se) {}
          /* Create the TrustManagerFactory. We use the SunJSSE provider
          * for this purpose.*/
          TrustManagerFactory tmf=TrustManagerFactory.getInstance("SunX509", "SunJSSE");
          tmf.init((java.security.KeyStore)null);
          tm=tmf.getTrustManagers()[0];
          /* Something failed we could not get a TrustManager instance.*/
          if(tm == null) {
               throw new SSLException("Could not get default TrustManager instance.");
          /* Create the file input stream for the own keystore. */
          try{
               keyStoreIStream = new FileInputStream(keyStorePath);
          } catch( FileNotFoundException fne ) {
               // If the path does not exist then a null stream means
               // the keystore is initialized empty. If an untrusted
               // certificate chain is trusted by the user, then it will be
               // saved in the file pointed to by keyStorePath.
               keyStoreIStream = null;
          /* Now create the keystore. */
          try{
               keyStore=KeyStore.getInstance(KeyStore.getDefaultType());
               keyStore.load(keyStoreIStream,keyStorePassword);
          }catch(KeyStoreException ke) {
               System.out.println("Loading of https keystore from file <"+keyStorePath+"> failed. error message: "+ke.getMessage());
               keyStore=null;
     * Authenticates a client certificate. For we don't need that case only implement the
     * default behaviour.
     * @param chain In: The certificate chain to be authenticated.
     * @param authType In: The key exchange algorithm.
     public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException {
          ((X509TrustManager)tm).checkClientTrusted(chain,authType);
     * Authenticates a server certificate. If the given certificate is untrusted ask the
     * user whether to proceed or not.
     * @param chain In: The certificate chain to be authenticated.
     * @param authType In: The key exchange algorithm.
     public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException {
          /* Output the certifcate chain for debugging purposes */
          System.out.println("got X509 certificate from server:");
          for(int i=0; i<chain.length; i++) {
               System.out.println("chain["+i+"]: "+chain.getIssuerDN().getName());
          try{
               /* First try the default behaviour. */
               ((X509TrustManager)tm).checkServerTrusted(chain,authType);
          }catch(CertificateException ce) {
               System.out.println("in checkServerTrusted: authType: "+authType+", got certificate exception: "+ce.getMessage());
               /* If we got here the certificate is untrusted. */
               /* If we could not craete a keystore instance forward the certificate exception. So we have
               * at least the default behaviour. */
               if(keyStore==null || chain == null || chain.length==0) {
                    throw(ce);
               try{
                    /* If we could not find the certificate in the keystore
                    * ask the user if it should be treated trustable. */
                    AskForTrustability ask=new AskForTrustability (chain);
                    boolean trustCert=ask.showCertificateAndGetDecision();
                    if(trustCert==true) {
                         // Add Chain to the keyStore.
                         for (int i = 0; i < chain.length; i++)
                              keyStore.setCertificateEntry
                                   (chain[i].getIssuerDN().toString(), chain[i]);
                         // Save keystore to file.
                         FileOutputStream keyStoreOStream =
                              new FileOutputStream(keyStorePath);
                         keyStore.store(keyStoreOStream, keyStorePassword);
                         keyStoreOStream.close();
                         keyStoreOStream = null;
                         System.out.println("Keystore saved in " + keyStorePath);
                    } else {
                         throw(ce);
               }catch(Exception ge) {
                    /* Got an unexpected exception so throw the original exception. */
                    System.out.println("in checkServerTrusted: got exception type: "+ge.getClass()+" message: "+ge.getMessage());
                    throw ce;
     * Merges the system wide accepted issuers and the own ones and
     * returns them.
     * @return: Array of X509 certificates of the accepted issuers.
public X509Certificate[] getAcceptedIssuers() {
          X509Certificate[] cf=((X509TrustManager)tm).getAcceptedIssuers();
          X509Certificate[] allCfs=cf;
          if(keyStore != null) {
               try{
                    Enumeration ownCerts=keyStore.aliases();
                    Vector certsVect=new Vector();
                    while(ownCerts.hasMoreElements()) {
                         Object cert=ownCerts.nextElement();
                         certsVect.add(keyStore.getCertificate(cert.toString()));
                    int newLength=cf.length+certsVect.size();
                    allCfs=new X509Certificate[newLength];
                    Iterator it=certsVect.iterator();
                    for(int i=0; i<newLength ; i++) {
                         if(i<cf.length) {
                              allCfs[i]=cf[i];
                         } else {
                              allCfs[i]=(X509Certificate)it.next();
               }catch(KeyStoreException e) {}
          for(int i=0; i<allCfs.length;i++) {
               System.out.println("allCfs["+i+"]: "+allCfs[i].getIssuerDN());
          return allCfs;
     * This class implements an interactive dialog. It shows the contents of a
     * certificate and asks the user if it is trustable or not.
     class AskForTrustability implements ActionListener, ListSelectionListener {
          private JButton yes=new JButton("Yes"),no=new JButton("No");
          /** default to not trustable */
          private boolean isTrusted=false;
          private JDialog trust=null;
          private JList certItems=null;
          private JTextArea certValues=null;
          private JComboBox certChain=null;
          private final String certParms[]={"Version","Serial Number","Signature Algorithm", "Issuer", "Validity Period", "Subject", "Signature","Certificate Fingerprint"};
          private X509Certificate[] chain;
          private int chainIdx=0;
          * Creates an instance of the class and stores the certificate to show internally.
          * @param chain In: The certificate chain to show.
          AskForTrustability (X509Certificate[] chain) {
               this.chain=chain;
          * This method shows a dialog with all interesting information of the certificate and
          * asks the user if the certificate is trustable or not. This method block

Your code has some errors, I have correct it. Here is the new code:
StoreCertTrustManager.java
import java.io.*;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import java.security.*;
import java.security.cert.*;
import javax.swing.*;
import javax.swing.border.*;
import javax.swing.event.*;
import javax.net.ssl.*;
* This class implements a TrustManager for authenticating the servers certificate.
* It enhances the default behaviour.
class StoreCertTrustManager implements X509TrustManager {
     /** The trustmanager instance used to delegate to default behaviour.*/
     private TrustManager tm=null;
     /** Password for own keystore */
     private final char[] keyStorePassword=new String("changeit").toCharArray();
     /** Path to own keystore. Store it into the home directory to avoid permission problems.*/
     private final String keyStorePath=System.getProperty("user.home")+"/https-keystore";
     /** The stream for reading from the keystore. */
     FileInputStream keyStoreIStream=null;
     /** The instance of the keystore */
     private KeyStore keyStore=null;
      * Creates a TrustManager which first checks the default behaviour of the X509TrustManager.
      * If the default behaviour throws a CertificateException ask the user if the certificate
      * should be declared trustable.
      * @throws Exception: If SSL - initialization failed.
     StoreCertTrustManager() throws Exception {
          /* Try to set the truststore system property to our keystore
           * if we have the appropriate permissions.*/
          try{
               File httpsKeyStore=new File(keyStorePath);
               if(httpsKeyStore.exists()==true) {
                    System.setProperty("javax.net.ssl.trustStore",keyStorePath);
          }catch(SecurityException se) {}
          /* Create the TrustManagerFactory. We use the SunJSSE provider
           * for this purpose.*/
          TrustManagerFactory tmf=TrustManagerFactory.getInstance("SunX509", "SunJSSE");
          tmf.init((java.security.KeyStore)null);
          tm=tmf.getTrustManagers()[0];
          /* Something failed we could not get a TrustManager instance.*/
          if(tm == null) {
               throw new SSLException("Could not get default TrustManager instance.");
          /* Create the file input stream for the own keystore. */
          try{
               keyStoreIStream = new FileInputStream(keyStorePath);
          } catch( FileNotFoundException fne ) {
          // If the path does not exist then a null stream means
          // the keystore is initialized empty. If an untrusted
          // certificate chain is trusted by the user, then it will be
          // saved in the file pointed to by keyStorePath.
               keyStoreIStream = null;
          /* Now create the keystore. */
          try{
               keyStore=KeyStore.getInstance(KeyStore.getDefaultType());
               keyStore.load(keyStoreIStream,keyStorePassword);
          }catch(KeyStoreException ke) {
               System.out.println("Loading of https keystore from file <"+keyStorePath+"> failed. error message: "+ke.getMessage());
               keyStore=null;
      * Authenticates a client certificate. For we don't need that case only implement the
      * default behaviour.
      * @param chain In: The certificate chain to be authenticated.
      * @param authType In: The key exchange algorithm.
     public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException {
          ((X509TrustManager)tm).checkClientTrusted(chain,authType);
      * Authenticates a server certificate. If the given certificate is untrusted ask the
      * user whether to proceed or not.
      * @param chain In: The certificate chain to be authenticated.
      * @param authType In: The key exchange algorithm.
     public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException {
     /* Output the certifcate chain for debugging purposes */
          System.out.println("got X509 certificate from server:");
          for(int i=0; i<chain.length; i++) {
               System.out.println("chain["+i+"]: "+chain.getIssuerDN().getName());
          try{
          /* First try the default behaviour. */
               ((X509TrustManager)tm).checkServerTrusted(chain,authType);
          }catch(CertificateException ce) {
               System.out.println("in checkServerTrusted: authType: "+authType+", got certificate exception: "+ce.getMessage());
               /* If we got here the certificate is untrusted. */
               /* If we could not craete a keystore instance forward the certificate exception. So we have
               * at least the default behaviour. */
               if(keyStore==null || chain == null || chain.length==0) {
                    throw(ce);
               try{
               /* If we could not find the certificate in the keystore
               * ask the user if it should be treated trustable. */
                    AskForTrustability ask=new AskForTrustability (chain);
                    boolean trustCert=ask.showCertificateAndGetDecision();
                    if(trustCert==true) {
                         // Add Chain to the keyStore.
                         for (int i = 0; i < chain.length; i++){
                              keyStore.setCertificateEntry(chain[i].getIssuerDN().toString(), chain[i]);
                         // Save keystore to file.
                         FileOutputStream keyStoreOStream = new FileOutputStream(keyStorePath);
                         keyStore.store(keyStoreOStream, keyStorePassword);
                         keyStoreOStream.close();
                         keyStoreOStream = null;
                         System.out.println("Keystore saved in " + keyStorePath);
                    } else {
                         throw(ce);
               }catch(Exception ge) {
               /* Got an unexpected exception so throw the original exception. */
                    System.out.println("in checkServerTrusted: got exception type: "+ge.getClass()+" message: "+ge.getMessage());
                    throw ce;
     * Merges the system wide accepted issuers and the own ones and
     * returns them.
     * @return: Array of X509 certificates of the accepted issuers.
     public java.security.cert.X509Certificate[] getAcceptedIssuers() {
          X509Certificate[] cf=((X509TrustManager)tm).getAcceptedIssuers();
          X509Certificate[] allCfs=cf;
          if(keyStore != null) {
               try{
                    Enumeration ownCerts=keyStore.aliases();
                    Vector certsVect=new Vector();
                    while(ownCerts.hasMoreElements()) {
                         Object cert=ownCerts.nextElement();
                         certsVect.add(keyStore.getCertificate(cert.toString()));
                    int newLength=cf.length+certsVect.size();
                    allCfs=new X509Certificate[newLength];
                    Iterator it=certsVect.iterator();
                    for(int i=0; i<newLength ; i++) {
                         if(i<cf.length){
                              allCfs=cf;
                         else {
                              allCfs=(X509Certificate[])it.next();
               }catch(KeyStoreException e) {}
          for(int i=0; i<allCfs.length;i++) {
               System.out.println("allCfs["+i+"]: "+allCfs[i].getIssuerDN());
          return allCfs;
     * This class implements an interactive dialog. It shows the contents of a
     * certificate and asks the user if it is trustable or not.
     class AskForTrustability implements ActionListener, ListSelectionListener {
          private JButton yes=new JButton("Yes"),no=new JButton("No");
          /** default to not trustable */
          private boolean isTrusted=false;
          private JDialog trust=null;
          private JList certItems=null;
          private JTextArea certValues=null;
          private JComboBox certChain=null;
          private final String certParms[]={"Version","Serial Number","Signature Algorithm", "Issuer", "Validity Period", "Subject", "Signature","Certificate Fingerprint"};
          private X509Certificate[] chain;
          private int chainIdx=0;
     * Creates an instance of the class and stores the certificate to show internally.
     * @param chain In: The certificate chain to show.
          AskForTrustability (X509Certificate[] chain) {
               this.chain=chain;
     * This method shows a dialog with all interesting information of the certificate and
     * asks the user if the certificate is trustable or not. This method blocks until
     * the user presses the 'Yes' or 'No' button.
     * @return: true: The certificate chain is trustable
     * false: The certificate chain is not trustable
          public boolean showCertificateAndGetDecision() {
               if(chain == null || chain.length == 0) {
                    return false;
               trust=new JDialog((Frame)null,"Untrusted server certificate for SSL connection",true);
               Container cont=trust.getContentPane();
               GridBagLayout gl=new GridBagLayout();
               cont.setLayout(gl);
               JPanel pLabel=new JPanel(new BorderLayout());
               Icon icon = UIManager.getIcon("OptionPane.warningIcon");
               pLabel.add(new JLabel(icon),BorderLayout.WEST);
               JTextArea label=new JTextArea("The certificate sent by the server is unknown and not trustable!\n"+
               "Do you want to continue creating a SSL connection to that server ?\n\n"+
               "Note: If you answer 'Yes' the certificate will be stored in the file\n\n"+
               keyStorePath+"\n\n"+
               "and the next time treated trustable automatically. If you want to remove\n"+
               "the certificate delete the file or use keytool to remove certificates\n"+
               "selectively.");
               label.setEditable(false);
               label.setBackground(cont.getBackground());
               label.setFont(label.getFont().deriveFont(Font.BOLD));
               pLabel.add(label,BorderLayout.EAST);
               GridBagConstraints gc=new GridBagConstraints();
               gc.fill=GridBagConstraints.HORIZONTAL;
               gl.setConstraints(pLabel,gc);
               pLabel.setBorder(new EmptyBorder(4,4,4,4));
               cont.add(pLabel);
               Vector choices=new Vector();
               for(int i=0; i<chain.length ; i++) {
                    choices.add((i+1)+". certificate of chain");
               certChain = new JComboBox(choices);
               certChain.setBackground(cont.getBackground());
               certChain.setFont(label.getFont().deriveFont(Font.BOLD));
               certChain.addActionListener(this);
               JPanel pChoice=new JPanel(new BorderLayout());
               pChoice.add(certChain);
               gc=new GridBagConstraints();
               gc.fill=GridBagConstraints.HORIZONTAL;
               gc.insets=new Insets(4,4,4,4);
               gc.gridy=1;
               gl.setConstraints(pChoice,gc);
               pChoice.setBorder(new TitledBorder(new EmptyBorder(0,0,0,0), "Certificate chain"));
               cont.add(pChoice);
               certItems=new JList(certParms);
               certItems.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
               certItems.addListSelectionListener(this);
               JPanel pList=new JPanel(new BorderLayout());
               pList.add(certItems);
               pList.setBorder(new TitledBorder(new EtchedBorder(), "Certificate variables"));
               gc=new GridBagConstraints();
               gc.fill=GridBagConstraints.HORIZONTAL;
               gc.insets=new Insets(4,4,4,4);
               gc.gridy=2;
               gl.setConstraints(pList,gc);
               cont.add(pList);
               certValues=new JTextArea();
               certValues.setFont(label.getFont().deriveFont(Font.BOLD));
               certValues.setEditable(false);
               certValues.setBackground(cont.getBackground());
               certValues.setLineWrap(true);
               certValues.setWrapStyleWord(true);
               JPanel pVals=new JPanel(new BorderLayout());
               pVals.add(certValues);
               pVals.setBorder(new TitledBorder(new EtchedBorder(), "Variable value"));
               gc=new GridBagConstraints();
               gc.insets=new Insets(4,4,4,4);
               gc.weightx=1.0;
               gc.weighty=1.0;
               gc.fill=GridBagConstraints.BOTH;
               gc.gridy=3;
               gl.setConstraints(pVals,gc);
               cont.add(pVals);
               JPanel p=new JPanel();
               yes.addActionListener(this);
               no.addActionListener(this);
               p.add(yes);
               p.add(no);
               gc=new GridBagConstraints();
               gc.weightx=1.0;
               gc.fill=GridBagConstraints.HORIZONTAL;
               gc.gridy=4;
               gl.setConstraints(p,gc);
               cont.add(p);
               //This should be the subject item
               certItems.setSelectedIndex(5);
               certItems.requestFocus();
               trust.pack();
               trust.setSize(500,600);
               trust.setVisible(true);
               return isTrusted;
     * Listener method for changin the contents of the JTextArea according to the
     * selected list item.
          public void valueChanged(ListSelectionEvent e) {
               if (e.getValueIsAdjusting()){
                    return;
               JList theList = (JList)e.getSource();
               if (theList.isSelectionEmpty()) {
                    certValues.setText("");
               } else {
                    String selVal = theList.getSelectedValue().toString();
                    if(selVal.equals("Version")==true) {
                         certValues.setText(String.valueOf(chain[chainIdx].getVersion()));
                    } else if(selVal.equals("Serial Number")==true) {
                         certValues.setText(byteArrayToHex(chain[chainIdx].getSerialNumber().toByteArray()));
                    } else if(selVal.equals("Signature Algorithm")==true) {
                         certValues.setText(chain[chainIdx].getSigAlgName());
                    } else if(selVal.equals("Issuer")==true) {
                         certValues.setText(chain[chainIdx].getIssuerDN().getName());
                    } else if(selVal.equals("Validity Period")==true) {
                         certValues.setText(chain[chainIdx].getNotBefore().toString()+" - "+chain[chainIdx].getNotAfter().toString());
                    } else if(selVal.equals("Subject")==true) {
                         certValues.setText(chain[chainIdx].getSubjectDN().getName());
                    } else if(selVal.equals("Signature")==true) {
                         certValues.setText(byteArrayToHex(chain[chainIdx].getSignature()));
                    } else if(selVal.equals("Certificate Fingerprint")==true) {
                         try{
                              certValues.setText(getFingerprint(chain[chainIdx].getEncoded(),"MD5")+"\n"+
                              getFingerprint(chain[chainIdx].getEncoded(),"SHA1"));
                         }catch(Exception fingerE) {
                              certValues.setText("Couldn't calculate fingerprints of the certificate.\nReason: "+fingerE.getMessage());
     * This method calculates the fingerprint of the certificate. It takes the encoded form of
     * the certificate and calculates a hash value from it.
     * @param certificateBytes In: The byte array of the encoded data.
     * @param algorithm In: The algorithm to be used for calculating the hash value.
     * Two are possible: MD5 and SHA1
     * @return: Returns a hex formated string of the fingerprint.
          private String getFingerprint(byte[] certificateBytes, String algorithm) throws Exception {
               MessageDigest md = MessageDigest.getInstance(algorithm);
               md.update(certificateBytes);
               byte[] digest = md.digest();
               return new String(algorithm+": "+byteArrayToHex(digest));
     * This method converts a byte array to a hex formatted string.
     * @param byteData In: The data to be converted.
     * @return: The formatted string.
          private String byteArrayToHex(byte[] byteData) {
               StringBuffer sb=new StringBuffer();
               for (int i = 0; i < byteData.length; i++) {
                    if (i != 0) sb.append(":");
                    int b = byteData[i] & 0xff;
                    String hex = Integer.toHexString(b);
                    if (hex.length() == 1) sb.append("0");
                    sb.append(hex);
               return sb.toString();
     * The listener for the 'Yes', 'No' buttons.
          public void actionPerformed(ActionEvent e) {
               Object entry =e.getSource();
               if(entry.equals(yes)==true) {
                    isTrusted=true;
                    trust.dispose();
                    } else if(entry.equals(certChain)==true) {
                         int selIndex=certChain.getSelectedIndex();
                         if(selIndex >=0 && selIndex < chain.length) {
                              chainIdx=selIndex;
                              int oldSelIdx=certItems.getSelectedIndex();
                              certItems.clearSelection();
                              certItems.setSelectedIndex(oldSelIdx);
                    } else {
                         trust.dispose();
-----------------------------------------------end------------------------------------------------
We can use follow code in main class to complete SSL authorize:
         SSLSocketFactory factory = null;
          KeyManager[] km = null;
          TrustManager[] tm = {new StoreCertTrustManager()};
          SSLContext sslContext = SSLContext.getInstance("SSL","SunJSSE");
          sslContext.init(null, tm, new java.security.SecureRandom());
          factory = sslContext.getSocketFactory();
         SSLSocket socket =
          (SSLSocket)factory.createSocket("localhost", 7002);

Similar Messages

  • Please I'd be happy if we can claim where we are misleaded when buying the product : The retailer or seller should know what they are selling ... For example I asked earphone for my shuffle ipod 3rd generation showing it

    Follow-up: 203908177
    Dear sir/madam
    Please I'd be happy if we can claim where we are misleaded when buying the product : The retailer or seller should know what they are selling ... For example I asked earphone for my shuffle ipod 3rd generation showing it but the they gave me an ear phone which just was like an ordinary earphone where I can't low and high the volume nor I can select the playlist ... Please read below
    that I wrote to you in the email I've sent to you on last April as followed :-
    Dear madam/sir,
    It's me Santosh Lamichhane who just arrived to my place in Kathmandu, Nepal after a month visit in Bolivia and Argentina ...
    Dear madam/sir, I like to inform you that while my visit in Santa Cruz de La sierra in Bolivia I bought a new earphone for my ipod shuffle 3G due to the problem in my old earphone on the date as followed in the bill of as shown
    ALTEK
    PN 26986 VN 24186
    Vendedor:
    Federico
    Date 02/04/2012 time: 03:34:22 PM
    I did checked the earphone there same time and found that I can't lower or high the volume from that new purchased earphone and even asked why and one of your senior staff said it might be the problem of my ipod shuffle's setting, Since the beginning of the time of purchase till I came to Nepal 4 days ago I didn't use the ipod because I'm not able to increase the volume and I didn't took my laptop with me while my visit there ...
    But when I try to restore my shuffle here ; even that doesn't works ... Today and yesterday when I checked my friend's earphone of ipod - it was working on my shuffle and my earphone also working in his classic ...
    I want to kindly request you since I showed my shuffle at the time of buying earphone there in Altek, San Martin AV in SAnta Cruz de la Sierra in Bolivia and asked I need the earphone for my ipod shuffle 3G It's not my fault ... Could you please ask the agents of apple here in Kathmandu to replace it with the working the right compatible earphone for me ...
    Hope to hear from you very soon ...
    Thanking you
    From Santosh Lamichhane,
    Cell +977 9802033662, 9813716393,
    +977 (1) 5002018 Res ...
    1210 Tikhedewal 28, Lalitpur SMPC 14, Kathmandu, Nepal

    You will not get a reply from Apple in these forums. As stated in the information to which we all agreed when we signed up here, these forums are for user-to-user assistance, not for getting technical assistance from Apple. All you will get here is suggestions and commiseration from we your fellow users. If you want to express your displeasure directly to Apple, call the tech support line and ask to speak with Customer Relations and see if there's anything they can do for you. Please keep in mind that the CR rep will not have caused your problems, so keep your calm and be polite; they're just working stiffs too.
    Message was edited by: Dave Sawyer

  • When I try installing Firefox 6.0 from the binary file, a box with "Run As" in the type field appears, which asks me for user name and password. Please advise about the course of action that I should take.

    Trying to run it as the current user, or as one from a different account(administrator in this case) also doesn't work.

    I think the client is not able to do a HTTP POST
    to the WLS server but it can do a HTTP GET.
    I dont know why.
    http://manojc.com
    "Ganesh" <[email protected]> wrote in message
    news:3eba91bc$[email protected]..
    >
    Hi,
    I deployed a rpc web service using WLS 7.0 SP2 in HP-UX 11 environment.When I
    invoke the web service through my browser (IE 6.0) using the web servicesurl,
    it brings my service method correctly. From there, if I click the invokebutton
    it asks me for a network user name and password under "weblogic" realm???If I
    provide the admin user credentials (which I supplied while creating mydomain)
    it is not accepting that it keeps popping up this network user passwordwindow
    over and over. Not sure which username/password I have to provide here tosee
    the result of my service.
    If I try to invoke the web service through my client (static) I am gettinga connection
    refused exception. I guess either way, I am not able to access my webservice.
    In the attached file, I have cut and pasted the client stack trace as wellas
    the server log trace from weblogic.
    Any ideas would be highly appreciated.
    Thanks,
    Ganesh

  • Best way to ask user for duration ??

    I am wondering what the best way to set up a dialog to ask the user for a duration is ?
    I need to query the user for the following duration example 1 month 3 days 5 hours 15 mins
    I have tried messing around with JSpinners with date formats but they really only work with fixed calendar dates not calendar durations...
    Any ideas on a neat approach..
    Currently i have an individual number spinner for each of the items which looks ugly and is hard to manage as you have to take care of up to 23 hours but 24 is one day so one day etc etc..
    Thanks in advance
    -Alan

    You continue along the same lines; keep the DTO in the session as an attribute. When you display your JSP, read the appropriate values for choices from the DTO and set your checkboxes/ radio buttons to 'selected' if they should be.
    When the page is submitted, read the parameters from the form submit and update your session attribute ( DTO ) to reflect any changes the user might have made like selecting a new option or deselecting a previously selected one.
    People on the forum help others voluntarily, it's not their job.
    Help them help you.
    Learn how to ask questions first: http://faq.javaranch.com/java/HowToAskQuestionsOnJavaRanch
    (Yes I know it's on JavaRanch but I think it applies everywhere)
    ----------------------------------------------------------------

  • Upload file without asking user for the file

    Hi,
    I need to upload a file to server, but from my code, not using the file upload from page.
    I have created a xml file and I need to upload to server when user open a web browser (without asking user to select a file).
    How do I proceed??, or what kind of libraries do I must use?
    thanks

    davisote wrote:
    Hi,
    thanks for answer.
    Let me try to explain again (I think its very simple).Simple, yes. But not very thorough.
    I have developed a web application using JSF.So all the code is running on the server, right? There are no Applets, Applications or WebStart applications involved. Right?
    My application has a splash screen where I show data. I have developed a bean to connect to my database (sql server), extract this data and create an xml (using DOM) file like:
    <news>
    <simplenews id="1"> Value </simplenews>
    </news>And that bean runs ... where? Server again?
    (important step) Once I have created the xml file in my bean I want to upload to the server to a place like /WEB-INF/news.
    If the code is running on the server, then "uploading" is the wrong term, as there's nowhere to upload to, since you're already on the server.
    This may sound like nit-picking, but you're sending us on a wrong trail with this phrase.
    Once the file is on the server with another bean I read the xml fileWhy don't you simply store it in the application scope and let everyone access it from there? It doesn't sound as if the XML is huge.
    As you can see I haven't a web page where to show an upload file componetYou also don't want to "upload" anything from the client, from the sound of it.
    You simply want to transfer data between to server-side components, if I understood you correctly.

  • Asking user for value to resize?

    Hello guys. I want to make a quick script that will take the selected finder item, ask the user for a value to resize (In the form of a dialog box) and then using that percentage, execute the scale image function under preview. Does anyone know how I could do this? Thanks!

    Get Selected Finder Items
    Scale Image (Preview Library, check the "show when run" option)
    As written here, this works on the original. Put a Copy Finder items in Place of Get Selected Finder items if you want to work on a copy.
    Kevin

  • Cant get IMAQ write file 2 to ask user for the path.

    I am currently using an IMAQ write file 2 to create a .bmp image. I have the VI attached to a control path that allows the user to enter the path where they want to save the file. However I dont want the user to have to make sure they typed the path in before the IMAQ write file executes. I want the program to work so that when the IMAQ write file executes a window appears asking the user where they would like to save the file. If someone could help me out I would appreciate it thanks.
    Solved!
    Go to Solution.

    Use the File dialog VI under File I/O >> Advanced File Functions palette

  • Ask user for date

    Is there a standard dialog for this?
    I googled but the things I found was
    * JDatePicker (some sort of commercial product - ?)
    * JXDatePicker (belongs to org.jdesktop.swingx, a packet I cannot import)
    sure there must be a simpler way?

    of you can try to find out plenty od JDatePicker, JDate or JCalendar
    then google returns ...., check and compare its funcionalities with calendar by "toedter"
    on check posts on some forums (inc. this one), its can get you answer

  • Ask user for input after Workflow has already started?

    I am in the process of creating an "expense report" declarative workflow in Designer. I want to have it start automatically when a new document (here, an Excel file) is uploaded to the Library. I also want some user input (e.g. "Is this
    ER urgent?"). Is there a way to this without requiring the workflow to start manually?

    You can have required information as metadata on your library and user needs to fill those information. You read that information in your workflow.
    Amit

  • Itunes asking me pay again for a paid app which i paid for already!

    itunes login asking me pay again for a paid app which i paid for already and my bank acc is also showing the charge.
    It is not letting me update even free apps now.
    IT says:
    we are unable to authorise ur payment card for this purchase. Pls update ur billing info.
    It says i owe ₹55/-
    but as u can see below which is a screen shot of my banks window i have paid ₹60/-and it is already debited frm my acc to apple.
    Sl.No
    Date
    Description
    CR/DR
         Trxn. Amount
    1
    31/12/12
      MAST-POS/APPLE ITUNES STORE-INR ITUNES
    DR
              60.00
    Why am i being told to pay again???

    Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact

  • Please help me fix this problem it's driving me crazy. I have tried installing and reinstalling photoshop EXTENDED several time and each time i lunch it ask me for the serial number in which i entered it once entered nothing happens

    Please help me fix this problem it's driving me crazy. I have tried installing and reinstalling photoshop EXTENDED several time and each time i lunch it ask me for the serial number in which i entered it once entered nothing happens

    Hi Glenn,
    Kindly try out the steps mentioned in the link below and see if you are able to serialize your software.
    Sign in, activation, or connection errors | CS5.5 and later, Acrobat DC
    Try Solution 2: Clean up cached user login information.
    Please share the results after performing the steps.
    Thanks,
    Atul Saini

  • HT1212 I recently purchased an Iphone 5s and it is asking me for a security code w/my itune purchase info which I never needed w/my 3Gs Iphone ?

    Let me first say that I have No problem with accessing my iphone using my passcode!
    1. I am having a problem purchasing app's with my new iphone 5s. I recently upgraded from the 3Gs to th 5s and now along with asking me to give my user password, but then it is asking me to continue and then varify my pay account info with a security code which was not required on my last phone and have know idea how get one or reset the old one (which I never had)?
    2. My new iphone 5s is asking me for a voicemail passcode. I have not set up a voice mail and entered an initial ID, what should I do?

    2.  you can reset the passcode by contacting your phone carrier.  usually means you have a voicemail.

  • Itunes keeps asking me for a user name and password when I first open it.

    I do not allow apple to access my library or my hard drive because you guys are predators, and I have NO interest in using the app store.  I have disabled access to the store, so i do not know why it keeps asking me for a user name and password.  You have NO right to see the music THAT I PURCHASED a loooooooooong time ago.  It is my license. I should be able to play it whenever and wherever I like...and NO, I do not burn and copy my music.  I just want to play it on MY MACHINES. So, I do not need your useless snooping, which is probably the reason you want me to log in.  Who do you think you are? You didn't write the songs.  You just sell licenses. Period.  And I purchased mine, thank you.  I no longer use your store for these reasons.  I use Amazon.

    Not control-R. Command-R. Shut the computer down. Reboot it. Hold down cmd-R when you hear the chime. Keep it held down and you should see the Lion recovery partition.
    http://support.apple.com/kb/ht4718
    http://support.apple.com/kb/ts3273
    Matt

  • How can I keep the name of the user around for each JSP without asking user

    I have a number of JSP pages that I give the user access to once they login successfully. I want to be able to keep the name of the user present on every page without having to ask them for it each time.
    How can I do this? Currently I have a user object that is access through use of a request bean in my JSP's.
    Any suggestions???

    Thanks for the help. A few questions though...
    Can you just clarify how the 2 different SessionTest2.jsp's differ. I am right in thinking that the second one will instantiate a new bean object which if I do every time I go to the page, I will be getting the same name but in a different session each time. In the first SessionTest.jsp, I get the same name but from the same session object each time??
    Please clarify???
    SessionTest1.jsp
    <%@ page language="java" import="test.*" %>
    <jsp:useBean id="testBean" scope="session"
    class="test.TestBean" />
    <jsp:setProperty name="testBean" property="name"
    value="ZZZZZ" />
    <jsp:setProperty name="testBean" property="status"
    value="Married" />
    <%
         response.sendRedirect("SessionTest2.jsp");
         return;
    %>
    SessionTest2.jsp
    <%@ page import="test.*" %>
    <jsp:useBean id="testBean" scope="session"
    class="test.TestBean" />
    <%
    out.println("User Name is : "+testBean.getName());
    %>or SessionTest2.jsp
    <%@ page import="test.*" %>
    <jsp:useBean id="testBean" scope="session"
    class="test.TestBean" />
    <%
    TestBean testBean =
    (TestBean)session.getAttribute("testBean");
         out.println("Name is : "+testBean.getName());
    %>Hope this helps.
    Sudha

  • Social comment control in custom page layout stucks at "Working" for read access users

    Hi,
    I created a custom page layout which is attched to my custom content type.
    i have a custom field control which is derived from RichImageField.
    i have also added a social comment control to the page layout using
    <SharePointPortalControls:SocialCommentControl ID="SocialCommentControl1" runat="server"  />.
    Now the problem is, an user who have read access for a pages library should post comments. but its not working and when the user clicks post button it stucks at working. but when the user is given contribute access then it works and the comments are posted.
    And one more thing is if i remove my custom field control from the page layout, then user with read access can post the comment without any issues.
    i am sure the issue is caused by my custom field control but dont know how to solve it. i dont want to give contribute access to the users as they can edit the content of the page also. Any help would be appreciated.
    This is the custom field control code.
    public class mycompanyRichImageField : RichImageField
    public static string webimage = null;
    #region Private variables
    /// <summary>
    /// File upload control used to upload image.
    /// </summary>
    private FileUpload fileUpload;
    /// <summary>
    /// Upload button.
    /// </summary>
    private Button btnSave;
    /// <summary>
    /// Delete button.
    /// </summary>
    private Button btnClear;
    /// <summary>
    /// Article image.
    /// </summary>
    private Image imgPicture;
    /// <summary>
    /// Image width.
    /// </summary>
    private DropDownList ddlWidth;
    /// <summary>
    /// Temporary store image url.
    /// </summary>
    private Label lblFileName;
    /// <summary>
    /// Image text.
    /// </summary>
    private TextBox txtImage;
    /// <summary>
    /// Value of image field.
    /// </summary>
    private ImageFieldValue pageImage;
    /// <summary>
    /// List item - current article.
    /// </summary>
    private SPListItem ArticlePage = SPContext.Current.ListItem;
    /// <summary>
    /// The first image width dropdown list options, default value 240 px.
    /// </summary>
    // private int imageWidthWide = 400;
    //private int height = 225;
    /// <summary>
    /// The second image width dropdown list options, default value 120 px.
    /// </summary>
    private int imageWidthNarrow = 126;
    /// <summary>
    /// Picture library to store the image files.
    /// </summary>
    private string imageLibrary = "Images";
    /// <summary>
    /// List field to store Article image.
    /// </summary>
    private string imageField = "Page Image";
    /// <summary>
    /// List field to store image text.
    /// </summary>
    private string imageTextField = "Image Text";
    private string preview = "Preview";
    /// <summary>
    /// List field to store rollup image.
    /// </summary>
    private string rollupImageField = "Rollup Image";
    /// <summary>
    /// Whether to update the rollup image using the current image.
    /// </summary>
    private bool updateRollupImage = false;
    /// <summary>
    /// Whether to display image text.
    /// </summary>
    private bool enableImageText = true;
    #endregion
    #region Properties
    /// <summary>
    /// Gets or sets the first choice of image width.
    /// </summary>
    //public int ImageWidthWide
    // get
    // return this.imageWidthWide;
    // set
    // this.imageWidthWide = value;
    //public int ImageHeight
    // get
    // return this.height;
    // set
    // this.height = value;
    /// <summary>
    /// Gets or sets the second choice of image width.
    /// </summary>
    public int ImageWidthNarrow
    get
    return this.imageWidthNarrow;
    set
    this.imageWidthNarrow = value;
    /// <summary>
    /// Gets or sets the name of the picture library that is used to store image files.
    /// </summary>
    public string ImageLibrary
    get
    return this.imageLibrary;
    set
    this.imageLibrary = value;
    /// <summary>
    /// Gets or sets the field name of image.
    /// </summary>
    public string ImageField
    get
    return this.imageField;
    set
    this.imageField = value;
    /// <summary>
    /// Gets or sets the field name of image text.
    /// </summary>
    public string ImageTextField
    get
    return this.imageTextField;
    set
    this.imageTextField = value;
    /// <summary>
    /// Gets or sets the field name of rollup image.
    /// </summary>
    public string RollupImageField
    get
    return this.rollupImageField;
    set
    this.rollupImageField = value;
    public string Preview
    get
    return this.preview;
    set
    this.preview = value;
    /// <summary>
    /// Gets or sets a value indicating whether to update rollup image using current image.
    /// </summary>
    public bool UpdateRollupImage
    get
    return this.updateRollupImage;
    set
    this.updateRollupImage = value;
    /// <summary>
    /// Gets or sets a value indicating whether the image text should be displayed.
    /// </summary>
    public bool EnableImageText
    get
    return this.enableImageText;
    set
    this.enableImageText = value;
    #endregion
    #region Override methods
    /// <summary>
    /// Using get method instead of set method to set the value.
    /// set method cannot be used here.
    /// </summary>
    public override object Value
    get
    ImageFieldValue value = new ImageFieldValue();
    value.ImageUrl = string.IsNullOrEmpty(this.lblFileName.Text) ? this.imgPicture.ImageUrl : this.lblFileName.Text;
    // value.Width = string.IsNullOrEmpty(this.ddlWidth.Text) ? this.ImageWidthWide : Convert.ToInt32(this.ddlWidth.Text);
    // value.Height = this.ImageHeight;
    ////update the page rollup image.
    if (this.UpdateRollupImage)
    this.ArticlePage[this.RollupImageField] = value;
    if (this.EnableImageText)
    this.ArticlePage[this.ImageTextField] = this.txtImage.Text;
    this.ArticlePage.SystemUpdate(false);
    return value;
    set
    base.Value = value;
    /// <summary>
    /// Intialize all controls.
    /// </summary>
    protected override void CreateChildControls()
    this.pageImage = (ImageFieldValue)this.ArticlePage[this.imageField];
    this.ddlWidth = new DropDownList();
    this.ddlWidth.Width = 99;
    // this.ddlWidth.Items.Add(this.ImageWidthWide.ToString());
    this.ddlWidth.Items.Add(this.ImageWidthNarrow.ToString());
    if (this.pageImage != null && !string.IsNullOrEmpty(this.pageImage.ImageUrl))
    // if (this.pageImage.Width >= this.ImageWidthWide)
    // // this.ddlWidth.SelectedIndex = 0;
    //else
    // // this.ddlWidth.SelectedIndex = 1;
    // this.Controls.Add(this.ddlWidth);
    this.imgPicture = new Image();
    if (this.pageImage != null && !string.IsNullOrEmpty(this.pageImage.ImageUrl))
    this.imgPicture.ImageUrl = SPContext.Current.Site.Url + this.pageImage.ImageUrl;
    this.Controls.Add(this.imgPicture);
    this.fileUpload = new FileUpload();
    this.fileUpload.Width = 180;
    this.Controls.Add(this.fileUpload);
    this.btnSave = new Button();
    this.btnSave.Text = "Upload";
    this.btnSave.CausesValidation = false;
    this.btnSave.Visible = string.IsNullOrEmpty(this.imgPicture.ImageUrl) ? true : false;
    this.Controls.Add(this.btnSave);
    this.btnSave.Click += new EventHandler(this.BtnSave_Click);
    this.btnClear = new Button();
    this.btnClear.Text = "Delete";
    this.btnClear.CausesValidation = false;
    this.btnClear.Visible = !this.btnSave.Visible;
    this.Controls.Add(this.btnClear);
    this.btnClear.Click += new EventHandler(this.BtnClear_Click);
    this.lblFileName = new Label();
    this.Controls.Add(this.lblFileName);
    if (this.EnableImageText)
    this.txtImage = new TextBox();
    this.txtImage.TextMode = TextBoxMode.MultiLine;
    this.txtImage.Rows = 4;
    this.txtImage.Text = this.ArticlePage[this.ImageTextField] == null ? string.Empty : this.ArticlePage[this.ImageTextField].ToString();
    this.Controls.Add(this.txtImage);
    /// <summary>
    /// Render the field in page edit mode.
    /// </summary>
    /// <param name="output">Output stream.</param>
    protected override void RenderFieldForInput(System.Web.UI.HtmlTextWriter output)
    output.Write("<div style='padding-bottom:12px'>");
    if (!string.IsNullOrEmpty(this.imgPicture.ImageUrl))
    output.Write("<br />");
    // this.imgPicture.Width = ((ImageFieldValue)this.Value).Width;
    // this.imgPicture.Height = ((ImageFieldValue)this.Value).Height;
    this.imgPicture.RenderControl(output);
    if (this.EnableImageText)
    this.txtImage.Width = this.imgPicture.Width;
    if (this.EnableImageText)
    output.Write("<br />");
    this.txtImage.RenderControl(output);
    output.Write("<br /><br />");
    this.fileUpload.RenderControl(output);
    this.btnSave.RenderControl(output);
    this.btnClear.RenderControl(output);
    output.Write("<br /><br />");
    //output.Write("Width:");
    //this.ddlWidth.RenderControl(output);
    output.Write("</div>");
    /// <summary>
    /// Render the field in page display mode.
    /// </summary>
    /// <param name="output">Output stream.</param>
    protected override void RenderFieldForDisplay(System.Web.UI.HtmlTextWriter output)
    if (this.ListItemFieldValue != null)
    output.Write("<div style='padding-bottom:12px'>");
    base.RenderFieldForDisplay(output);
    if (this.EnableImageText && this.ArticlePage[this.ImageField] != null
    && this.ArticlePage[this.ImageTextField] != null)
    //string strImgWidth = string.IsNullOrEmpty(this.ddlWidth.Text) ? this.ImageWidthWide.ToString() : this.ddlWidth.Text;
    //string strImgHgt = this.ImageHeight.ToString();
    output.Write("<div style='width:");
    // output.Write(strImgWidth);
    // output.Write(this.imgPicture.ImageUrl);
    // output.Write("<div style='height:");
    // output.Write(strImgHgt);
    output.Write(";margin-right:4px;' align='left'>");
    output.Write(this.ArticlePage[this.ImageTextField].ToString());
    output.Write("</div>");
    output.Write("</div>");
    #endregion
    #region Button events
    /// <summary>
    /// Delete image file from the library and empty the image field.
    /// </summary>
    /// <param name="sender">Delete button.</param>
    /// <param name="e">No arguments.</param>
    protected void BtnClear_Click(object sender, EventArgs e)
    ////remove the image file from the Images library
    using (SPSite site = new SPSite(
    SPContext.Current.Web.Url,
    SpSecurityHelper.GetSystemToken(SPContext.Current.Site)))
    using (SPWeb currentWeb = site.OpenWeb())
    SPDocumentLibrary imageList = (SPDocumentLibrary)currentWeb.Lists[this.ImageLibrary];
    SPFolder rootFolder = imageList.RootFolder;
    try
    currentWeb.AllowUnsafeUpdates = true;
    rootFolder.Files.Delete(this.imgPicture.ImageUrl);
    rootFolder.Update();
    catch
    ////cannot delete specified file, this means file doesn't exist, the file must be deleted
    ////directly in the Images library by someone
    ////don't do anything here
    finally
    currentWeb.AllowUnsafeUpdates = false;
    if (this.pageImage != null)
    this.pageImage.ImageUrl = string.Empty;
    this.imgPicture.ImageUrl = string.Empty;
    this.lblFileName.Text = string.Empty;
    this.btnClear.Visible = false;
    this.btnSave.Visible = true;
    /// <summary>
    /// Upload image file to library and fullfilled the image field.
    /// </summary>
    /// <param name="sender">Upload button.</param>
    /// <param name="e">No argument.</param>
    protected void BtnSave_Click(object sender, EventArgs e)
    this.ArticlePage[this.ImageTextField] = this.txtImage.Text;
    this.ArticlePage.SystemUpdate(false);
    string fileName = this.fileUpload.FileName;
    ////validate file name
    if (fileName == string.Empty || !this.fileUpload.HasFile)
    this.lblFileName.Text = string.Empty;
    if (this.pageImage == null)
    this.Page.ClientScript.RegisterStartupScript(typeof(string), "NoImage", "<script>alert('No image found, please select an image.')</script>", false);
    else
    using (SPSite site = new SPSite(
    SPContext.Current.Web.Url,
    SpSecurityHelper.GetSystemToken(SPContext.Current.Site)))
    using (SPWeb currentWeb = site.OpenWeb())
    SPDocumentLibrary imageList = (SPDocumentLibrary)currentWeb.Lists[this.ImageLibrary]; ////Images
    SPFolder rootFolder = imageList.RootFolder;
    ////the image file name must be unique except for the file name extension
    string imageName = this.ArticlePage.UniqueId.ToString("N") + this.FieldName + Path.GetExtension(fileName);
    ////first delete the image file from the Images library.
    ////if a file with different file name extension is uploaded, the old file won't be overwritten,
    ////and will never be deleted from this page, so it must be deleted before adding a new one.
    if (this.pageImage != null && !string.IsNullOrEmpty(this.pageImage.ImageUrl))
    try
    currentWeb.AllowUnsafeUpdates = true;
    rootFolder.Files.Delete(this.pageImage.ImageUrl);
    rootFolder.Update();
    catch
    ////cannot delete specified file, this means file doesn't exist, the file must be deleted
    ////directly in the Images library by someone
    finally
    currentWeb.AllowUnsafeUpdates = false;
    try
    currentWeb.AllowUnsafeUpdates = true;
    SPFile imageFile = rootFolder.Files.Add(imageName, this.fileUpload.FileBytes, true);
    finally
    currentWeb.AllowUnsafeUpdates = false;
    // this.lblFileName.Text = currentWeb.Site.Url + imageList.RootFolder.ServerRelativeUrl + "/" + imageName;
    this.lblFileName.Text = currentWeb.Site.Url + imageList.RootFolder.ServerRelativeUrl + "/_w/" + imageName.Substring(0, imageName.LastIndexOf(".")) + "_" + imageName.Substring(imageName.IndexOf(".") + 1) + "." + imageName.Substring(imageName.IndexOf(".") + 1);
    // webimage = currentWeb.Site.Url + imageList.RootFolder.ServerRelativeUrl + "/_w/" + imageName.Substring(0,imageName.LastIndexOf("."))+"_"+imageName.Substring(imageName.IndexOf(".")+1) +"." + imageName.Substring(imageName.IndexOf(".")+1);
    this.imgPicture.ImageUrl = this.lblFileName.Text;
    this.btnClear.Visible = true;
    this.btnSave.Visible = false;
    #endregion
    This is how i used it in my page layout
     <Article:mycompnayRichImageField runat="server" ID="RichImageField1" InputFieldLabel="Keep image text short and precise" FieldName="PublishingPageImage" UpdateRollupImage="true"/>
    Aruna

    Hi,
    For this issue, I'm trying to involve someone familiar with this topic to further look at it.
    Thanks,
    Jason Guo
    TechNet Community Support

Maybe you are looking for

  • Merging files using BPM-Prod Issue - JDBC to File.

    Hi all, We had a scenario in which data is available in two database tables and that data needs to be merged and dropped in a File system. To meet this requirement we have developed a BPM with constant correlation and it was working fine. But some da

  • Fault handling - BPELFaultRecoveryContextImpl - how to get payload

    Hi, I have a custom java action for every fault in my composite. Once in the handler I need to access the payload, in case it's a mediator fault it's quite easy as MediatorRecoveryContext provides a public method to access its message. How can I do i

  • How to dump connection pooling stats?

    OK, since the forum search is not working, can someone post the link or code to dump the connection pooling stats? Thanks Sam

  • Waiting all threads in a fixed thread pool

    Hello, may I know how can I wait for all the threads in a fixed thread pool to be completed, without calling shutdownNow? Executor pool = Executors.newFixedThreadPool(nThreads); for(int i = 0; i < 10000;  i++)     pool.execute(new StockHistoryRunnabl

  • SelectOneChoice set default selected item

    Hi I have an edit form, that is loaded from a query. In this form there are some values that are setted using a selectOneChoice The thing is that i need to set the selectOneChoice initial selected item acording to the values of the entity retrieved b