How to get default SMTP server name

Hi,
I want to know the name default SMTP server configured in machine. How i can get this through my java code.
Help me on this

You can find STMP server configured in hostname, in ask to dns of domain who is mailserver, you need to find MX records :
- look a DNS config : NS (name server) , CNAME (Alias) , MX (mailexchange) etc...
import java.util.ArrayList;
import java.util.Hashtable;
import javax.naming.*;
import javax.naming.directory.*;
public class MXLookup
     public static void main(String args[]) throws NamingException
          System.out.println(getMX("altern.org") + " mail servers");
     private static ArrayList getMX(String hostName) throws NamingException
          // Perform a DNS lookup for MX records in the domain
          Hashtable env = new Hashtable();
          env.put("java.naming.factory.initial", "com.sun.jndi.dns.DnsContextFactory");
          DirContext ictx = new InitialDirContext(env);
          Attributes attrs = ictx.getAttributes(hostName, new String[] { "MX" });
          Attribute attr = attrs.get("MX");
          // if we don't have an MX record, try the machine itself
          if ((attr == null) || (attr.size() == 0))
               attrs = ictx.getAttributes(hostName, new String[] { "A" });
               attr = attrs.get("A");
               if (attr == null) throw new NamingException("No match for name '" + hostName + "'");
          ArrayList res = new ArrayList();
          NamingEnumeration en = attr.getAll();
          while (en.hasMore())
               String x = (String) en.next();
               String f[] = x.split(" ");
               if (f[1].endsWith(".")) f[1] = f[1].substring(0, (f[1].length() - 1));
               res.add(f[1]);
          return res;
}

Similar Messages

  • How to get the report server name in Forms 10g.

    How to get the report server name in Forms 10g.
    I'm using the Application Server 10g 10.1.2.

    Hello,
    I do not think that you can get this value from anywhere. A solution is to put the Reports server name in an environment variable stored in the /forms/server/default.env file, then to query it at Forms runtime with the TOOL_ENV.Getvar() built-in.
    Francois

  • How to get orchestration instance server name

    I have two server where orchestration can run...I need to know the server name where my orchestration instance has run.
    How to get this information...

    When you have more than one BizTalk-processing server and if your orchestration is bound to host instance which exist in more than one server (generally for better resilience, the best practice
    is to have multiple instances of host in different servers), the idea of get the server name where Orchestration instance has run is INVALID.
    With the BizTalk features like scalability, resilience and persistence points an Orchestration instance could run in more than one server.
    For example due to persistence points, if that BizTalk server were to suffer a power outage, another BizTalk server could continue the orchestration from the checkpoint rather than having
    to start the orchestration from the beginning. Or during or during long-running process while waiting for a response, then message being consumed by an orchestration instance would be persisting the in-memory representation of an orchestration (to its last
    good state) and any associated messages in BizTalk MessageBox. So when the response comes back the rest of the part of orchestration could execute from other server instance. So an orchestration would not always run from one server.
    But if you have specific “Expression shape” which you may have been using for logging/tracing then you can get the server name which executed that particular “Expression shape” from an Orchestration
    instance (not the whole Orchestration instance). This is done using the standard .NET code to get the server name -
    System.Environment.MachineName
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • How to find SMTP server name on AIX 5.3 ?

    Hi All/Guru
    how can i find SMTP Server name on my aix server which i need to configure E-mail notification for database alerts.
    Thanks in advance.
    Tina

    Check in the file /etc/sendmail.cf

  • About smtp server name

    Hi i had developed one application using java mail.
    when i run that it shows the could not connect . sendFailedException
    why it is?
    and how to know thw smtp server name in my machine?

    Read the JavaMail FAQ.

  • How do I changing the default WIKI Server name on OS x Lion Server?

    How do I changing the default WIKI Server name on OS x Lion Server? Enterprise solutions suggested I post this question here to get a direct answer. I have searched everywhere... This would be the META TAG On the top of browsers...

    I went looking for this answer, to no avail.
    Solution I used:
    step 1 - Navigate to the folder /usr/share/collabd/coreclient/locales/en.lproj/ and open the only file there called default.strings.
    step 2 - somewhere around lines 74 & 164 you will see the default title "OS X Lion Server". I'm sure only one of the is required to be changed to adjust the title on the window, but I changed both to my desired title. Save and close. If asked for authentication, enter you administrator details.
    step 3 - restart the server (or wiki service may work too)
    step 4 - done and your Wiki welcome page should show the new title
    Finally I have a bookmark that means something by default.
    Hope this helps

  • How Can i specify multiple server names in rwservlet.properties  file?

    How Can i specify multiple server names in rwservlet.properties file without clustering?
    I am using oracle 10g Application server. we have 3 servers Repsvr1, RepSvr2 and RepSvr3. Now i need to configure rwservlet.properties file to point to these servers based on any running report. i got 3 keymap files with reports info.
    Sample entry in the key map file is:
    key1: server=Repsvr1 userid=xxx/yyy@dbname report=D:\Web\path1\path2\reports\Report1.rdf destype=cache desformat=PDF %*
    key2: server=Repsvr2 userid=xxx/yyy@dbname report=D:\Web\path1\path3\reports\Report2.rdf destype=cache desformat=PDF %*
    rwservlet.properties file letting me to enter only one servername. Even though i merged all 3 keymap files into 1, still i have the server name issue. If i leave the server to the default name still i am getting the below error.
    REP-51002: Bind to Reports Server Repsvr1 failed. However, i know the default rep_<servername> would be used incase we dont have SERVER=<value> parameter in the rwservlet.properties file.
    If i specify the servername in the rwservlet.properties file then only Repsvr1 reports are working fine and other 2 server reports are giving the same error like
    REP-51002: Bind to Reports Server <<Server Name>> failed.
    how can i configure the info which will work all 3 reports. 2 Port servers are invoking using oracle forms and report server is invoking using ASP pages.
    If i specify Server name & Key map file in rwservlet.properties one at a time, all the reports are working without any error, whenever i am trying to integrate all 3 to workable i am getting binding error. if i exclude the server from rwservlet.properties still i am getting the same error.

    My RELOAD_KEYMAP setting is YES only.As i said If i specify Server name & Key map file in rwservlet.properties one at a time, all the reports are working without any error.
    keymap file entries
    key1: server=Repsvr1 userid=xxx/yyy@dbname report=D:\Web\path1\path2\reports\Report1.rdf destype=cache desformat=PDF %*
    key2: server=Repsvr2 userid=xxx/yyy@dbname report=D:\Web\path1\path3\reports\Report2.rdf destype=cache desformat=PDF %*
    If i use http://server.domain:port/reports/rwservlet? cmdkey = key1 should bring the report from Repsvr1 and http://server.domain:port/reports/rwservlet? cmdkey = key2 should bring the report from Repsvr2, but i am getting an error from Repsvr2 saying that REP-51002: Bind to Reports Server repsvr2 failed.
    Only Servername Repsvr1 is in rwservlet.properties file. Now what is the best option to by pass the server from rwservlet.properties file and should be from keymap file. if i comment server name in rwservlet.properties file still i am getting REP-51002: Bind to Reports Server <<Server Name>> failed error for both keys.

  • How to configure the smtp server..

    i had an error when running the java mail program..
    this is my program
    import javax.mail.*;
    import javax.mail.internet.*;
    import javax.activation.*;
    import java.io.*;
    import java.util.Properties;
    public class MailClient
    public void sendMail(String mailServer, String from, String to,
    String subject, String messageBody,
    String[] attachments) throws
    MessagingException, AddressException
    // Setup mail server
    Properties props = System.getProperties();
    props.put("mail.smtp.host", mailServer);
    // Get a mail session
    Session session = Session.getDefaultInstance(props, null);
    // Define a new mail message
    Message message = new MimeMessage(session);
    message.setFrom(new InternetAddress(from));
    message.addRecipient(Message.RecipientType.TO, new InternetAddress(to));
    message.setSubject(subject);
    // Create a message part to represent the body text
    BodyPart messageBodyPart = new MimeBodyPart();
    messageBodyPart.setText(messageBody);
    //use a MimeMultipart as we need to handle the file attachments
    Multipart multipart = new MimeMultipart();
    //add the message body to the mime message
    multipart.addBodyPart(messageBodyPart);
    // add any file attachments to the message
    // addAtachments(attachments, multipart);
    // Put all message parts in the message
    message.setContent(multipart);
    // Send the message
    Transport.send(message);
    protected void addAtachments(String[] attachments, Multipart multipart)
    throws MessagingException, AddressException
    for(int i = 0; i<= attachments.length -1; i++)
    String filename = attachments;
    MimeBodyPart attachmentBodyPart = new MimeBodyPart();
    //use a JAF FileDataSource as it does MIME type detection
    DataSource source = new FileDataSource(filename);
    attachmentBodyPart.setDataHandler(new DataHandler(source));
    //assume that the filename you want to send is the same as the
    //actual file name - could alter this to remove the file path
    attachmentBodyPart.setFileName(filename);
    //add the attachment
    multipart.addBodyPart(attachmentBodyPart);
    public static void main(String[] args)
    try
    MailClient client = new MailClient();
    String server="smtp.canvasindia.com";
    String from="[email protected]";
    String to = "[email protected]";
    String subject="Test";
    String message="Testing";
    String[] filenames ={"c:/A.java"};
    client.sendMail(server,from,to,subject,message,filenames);
    catch(Exception e)
    e.printStackTrace(System.out);
    the error is .................
    javax.mail.SendFailedException: Invalid Addresses;
    nested exception is:
    com.sun.mail.smtp.SMTPAddressFailedException: 553 Attack detected from p
    ool 59.144.8.116. <http://unblock.secureserver.net/?ip=59.144.8.*>
    at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1196)
    at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:584)
    at javax.mail.Transport.send0(Transport.java:169)
    at javax.mail.Transport.send(Transport.java:98)
    at MailClient.sendMail(MailClient.java:47)
    at MailClient.main(MailClient.java:84)
    Caused by: com.sun.mail.smtp.SMTPAddressFailedException: 553 Attack detected fro
    m pool 59.144.8.116. <http://unblock.secureserver.net/?ip=59.144.8.*>
    at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1047)
    ... 5 more
    how to configure the smtp server in my machine..
    please guide me...

    This uses gmail account, and gmail smtp
    * MailSender.java
    * Created on 14 November 2006, 17:07
    * This class is used to send mails to other users
    package jmailer;
    * @author Abubakar Gurnah
    import javax.mail.*;
    import javax.mail.internet.*;
    import java.util.*;
    public class MailSender{
        private String d_email,d_password;
         * This example is for gmail, you can use any smtp server
         * @param d_email --> your gmail account e.g. [email protected]
         * @param d_password  --> your gmail password
         * @param d_host --> smtp.gmail.com
         * @param d_port --> 465
         * @param m_to --> [email protected]
         * @param m_subject --> Subject of the message
         * @param m_text --> The main message body
        public String send(String d_email,String d_password,String d_host,String d_port,
                String m_from,String m_to,String m_subject,String m_text ) {
            this.d_email=d_email;
            this.d_password=d_password;
            Properties props = new Properties();
            props.put("mail.smtp.user", d_email);
            props.put("mail.smtp.host", d_host);
            props.put("mail.smtp.port", d_port);
            props.put("mail.smtp.starttls.enable","true");
            props.put("mail.smtp.auth", "true");
            //props.put("mail.smtp.debug", "true");
            props.put("mail.smtp.socketFactory.port", d_port);
            props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
            props.put("mail.smtp.socketFactory.fallback", "false");
            SecurityManager security = System.getSecurityManager();
            try {
                Authenticator auth = new SMTPAuthenticator();
                Session session = Session.getInstance(props, auth);
                //session.setDebug(true);
                MimeMessage msg = new MimeMessage(session);
                msg.setText(m_text);
                msg.setSubject(m_subject);
                msg.setFrom(new InternetAddress(m_from));
                msg.addRecipient(Message.RecipientType.TO, new InternetAddress(m_to));
                Transport.send(msg);
                return "Successful";
            } catch (Exception mex) {
                mex.printStackTrace();
            return "Fail";
        //public static void main(String[] args) {
        //    MailSender blah = new MailSender();
        private class SMTPAuthenticator extends javax.mail.Authenticator {
            public PasswordAuthentication getPasswordAuthentication() {
                return new PasswordAuthentication(d_email, d_password);
    }

  • Java mail(fetch default SMTP server address)

    I am writting a code to send an email using Java Mail API.
    I have manged what I wanted(send a mail with an attachment)
    But in my code I have hard coded the SMTP server address,that is what I dont want to do .Is there anything in java which can fetch the default SMTP server address ?

    Let me send the code itself to make it clear
    Here the host is hard coded to10.1.1.5
    I dont want that ,rather I would like my code itself to fetch the host
    package javamail;
    import java.util.*;
    import java.io.*;
    import javax.mail.*;
    import javax.mail.internet.*;
    import javax.activation.*;
    public class SendMailUsage {
    public static void main(String[] args) {
    // SUBSTITUTE YOUR EMAIL ADDRESSES HERE!!!
    String to = "[email protected]";
    String from = "[email protected]";
    // SUBSTITUTE YOUR ISP'S MAIL SERVER HERE!!!
    String host = "10.1.1.5";
    // Create properties for the Session
    Properties props = new Properties();
    // If using static Transport.send(),
    // need to specify the mail server here
    props.put("mail.smtp.host", host);
    // To see what is going on behind the scene
    props.put("mail.debug", "true");
    // Get a session
    Session session = Session.getInstance(props);
    try {
    // Get a Transport object to send e-mail
    Transport bus = session.getTransport("smtp");
    // Connect only once here
    // Transport.send() disconnects after each send
    // Usually, no username and password is required for SMTP
    bus.connect();
    //bus.connect("smtpserver.yourisp.net", "username", "password");
    // Instantiate a message
    Message msg = new MimeMessage(session);
    // Set message attributes
    msg.setFrom(new InternetAddress(from));
    InternetAddress[] address = {new InternetAddress(to)};
    msg.setRecipients(Message.RecipientType.TO, address);
    // Parse a comma-separated list of email addresses. Be strict.
    msg.setRecipients(Message.RecipientType.CC,
    InternetAddress.parse(to, true));
    // Parse comma/space-separated list. Cut some slack.
    msg.setRecipients(Message.RecipientType.BCC,
    InternetAddress.parse(to, false));
    msg.setSubject("Test E-Mail through Java");
    msg.setSentDate(new Date());
    // Set message content and send
    setTextContent(msg);
    msg.saveChanges();
    bus.sendMessage(msg, address);
    setMultipartContent(msg);
    msg.saveChanges();
    bus.sendMessage(msg, address);
    setFileAsAttachment(msg, "D:/ketan.txt");
    msg.saveChanges();
    bus.sendMessage(msg, address);
    setHTMLContent(msg);
    msg.saveChanges();
    bus.sendMessage(msg, address);
    bus.close();
    catch (MessagingException mex) {
    // Prints all nested (chained) exceptions as well
    mex.printStackTrace();
    // How to access nested exceptions
    while (mex.getNextException() != null) {
    // Get next exception in chain
    Exception ex = mex.getNextException();
    ex.printStackTrace();
    if (!(ex instanceof MessagingException)) break;
    else mex = (MessagingException)ex;
    // A simple, single-part text/plain e-mail.
    public static void setTextContent(Message msg) throws MessagingException {
    // Set message content
    String mytxt = "This is a test of sending a " +
    "plain text e-mail through Java.\n" +
    "Here is line 2.";
    msg.setText(mytxt);
    // Alternate form
    msg.setContent(mytxt, "text/plain");
    // A simple multipart/mixed e-mail. Both body parts are text/plain.
    public static void setMultipartContent(Message msg) throws MessagingException {
    // Create and fill first part
    MimeBodyPart p1 = new MimeBodyPart();
    p1.setText("This is part one of a test multipart e-mail.");
    // Create and fill second part
    MimeBodyPart p2 = new MimeBodyPart();
    // Here is how to set a charset on textual content
    p2.setText("This is the second part", "us-ascii");
    // Create the Multipart. Add BodyParts to it.
    Multipart mp = new MimeMultipart();
    mp.addBodyPart(p1);
    mp.addBodyPart(p2);
    // Set Multipart as the message's content
    msg.setContent(mp);
    // Set a file as an attachment. Uses JAF FileDataSource.
    public static void setFileAsAttachment(Message msg, String filename)
    throws MessagingException {
    // Create and fill first part
    MimeBodyPart p1 = new MimeBodyPart();
    p1.setText("This is part one of a test multipart e-mail." +
    "The second part is file as an attachment");
    // Create second part
    MimeBodyPart p2 = new MimeBodyPart();
    // Put a file in the second part
    FileDataSource fds = new FileDataSource(filename);
    p2.setDataHandler(new DataHandler(fds));
    p2.setFileName(fds.getName());
    // Create the Multipart. Add BodyParts to it.
    Multipart mp = new MimeMultipart();
    mp.addBodyPart(p1);
    mp.addBodyPart(p2);
    // Set Multipart as the message's content
    msg.setContent(mp);
    // Set a single part html content.
    // Sending data of any type is similar.
    public static void setHTMLContent(Message msg) throws MessagingException {
    String html = "<html><head><title>" +
    msg.getSubject() +
    "</title></head><body><h1>" +
    msg.getSubject() +
    "</h1><p>This is a test of sending an HTML e-mail" +
    " through Java.</body></html>";
    // HTMLDataSource is an inner class
    msg.setDataHandler(new DataHandler(new HTMLDataSource(html)));
    * Inner class to act as a JAF datasource to send HTML e-mail content
    static class HTMLDataSource implements DataSource {
    private String html;
    public HTMLDataSource(String htmlString) {
    html = htmlString;
    // Return html string in an InputStream.
    // A new stream must be returned each time.
    public InputStream getInputStream() throws IOException {
    if (html == null) throw new IOException("Null HTML");
    return new ByteArrayInputStream(html.getBytes());
    public OutputStream getOutputStream() throws IOException {
    throw new IOException("This DataHandler cannot write HTML");
    public String getContentType() {
    return "text/html";
    public String getName() {
    return "JAF text/html dataSource to send e-mail only";
    } //End of class

  • How to get file from server while click on link

    Hi,
    i created on link and i gave one server path to select file from server but while clickinng on link it no displaying any thing.
    following is the Destination url that i gave for the item.
    /u08/app/appvis/xxex/inst/xxex_apps/xxrbe/logs/appl/conc/log/
    please tell me how to get file from server while click on link.

    Ok I got your requirement now.
    If you are getting file names from view attribute then you should not be adding destination URI property for the link.
    Instead you can use OADataBoundValueViewObject API.
    Try below code in your controller processRequest method:
    I am assuming that you are using classic table.
    Also in below example it considers OAMessageStyleText and you can replace it with link item if you want.
    OATableBean tableBean =
    (OATableBean)webBean.findChildRecursive("<table item id>");
    OAMessageStyledTextBean m= (OAMessageStyledTextBean)tableBean.findChildRecursive("<message styled text in table item id>");
    OADataBoundValueViewObject tip1 = new OADataBoundValueViewObject(m, "/u08/app/appvis/xxex/inst/xxex_apps/xxrbe/logs/appl/conc/log/"+"<vo attr name which stores file name for each row>");
    m.setAttributeValue(oracle.cabo.ui.UIConstants.DESTINATION_ATTR, tip1);
    Regards,
    Sandeep M.

  • How to get the current schema name

    Hi,
    Can anybody please tell me how to get the current schema name, there is some inbuilt function for this,but i am not getting that. Please help me.
    Thanks
    Jogesh

    ok folks, I found the answer at Tom's as usual.
    http://asktom.oracle.com/tkyte/who_called_me/index.html
    I rewrote it into a function for kicks. just pass the results of DBMS_UTILITY.FORMAT_CALL_STACK to this function and you will get back the owner of the code making the call as well some extra goodies like the name of the code and the type of code depending on the parameter. This ignores the AUTHID CURRENT_USER issues which muddles the schemaid. Quick question, does the average user always have access to DBMS_UTILITY.FORMAT_CALL_STACK or does this get locked down on some systems?
    cheers,
    paul
    create or replace
    FUNCTION SELF_EXAM (
       p_call_stack VARCHAR2,
       p_type VARCHAR2 DEFAULT 'SCHEMA'
    ) RETURN VARCHAR2
    AS
       str_stack   VARCHAR2(4000);
       int_n       PLS_INTEGER;
       str_line    VARCHAR2(255);
       found_stack BOOLEAN DEFAULT FALSE;
       int_cnt     PLS_INTEGER := 0;
       str_caller  VARCHAR2(30);
       str_name    VARCHAR2(30);
       str_owner   VARCHAR2(30);
       str_type    VARCHAR2(30);
    BEGIN
       str_stack := p_call_stack;
       -- Loop through each line of the call stack
       LOOP
         int_n := INSTR( str_stack, chr(10) );
         EXIT WHEN int_cnt = 3 OR int_n IS NULL OR int_n = 0;
         -- get the line
         str_line := SUBSTR( str_stack, 1, int_n - 1 );
         -- remove the line from the stack str
         str_stack := substr( str_stack, int_n + 1 );
         IF NOT found_stack
         THEN
            IF str_line like '%handle%number%name%'
            THEN
               found_stack := TRUE;
            END IF;
         ELSE
            int_cnt := int_cnt + 1;
             -- cnt = 1 is ME
             -- cnt = 2 is MY Caller
             -- cnt = 3 is Their Caller
             IF int_cnt = 1
             THEN
                str_line := SUBSTR( str_line, 22 );
                dbms_output.put_line('->' || str_line);
                IF str_line LIKE 'pr%'
                THEN
                   int_n := LENGTH('procedure ');
                ELSIF str_line LIKE 'fun%'
                THEN
                   int_n := LENGTH('function ');
                ELSIF str_line LIKE 'package body%'
                THEN
                   int_n := LENGTH('package body ');
                ELSIF str_line LIKE 'pack%'
                THEN
                   int_n := LENGTH('package ');
                ELSIF str_line LIKE 'anonymous%'
                THEN
                   int_n := LENGTH('anonymous block ');
                ELSE
                   int_n := null;
                END IF;
                IF int_n IS NOT NULL
                THEN
                   str_type := LTRIM(RTRIM(UPPER(SUBSTR( str_line, 1, int_n - 1 ))));
                 ELSE
                   str_type := 'TRIGGER';
                 END IF;
                 str_line  := SUBSTR( str_line, NVL(int_n,1) );
                 int_n     := INSTR( str_line, '.' );
                 str_owner := LTRIM(RTRIM(SUBSTR( str_line, 1, int_n - 1 )));
                 str_name  := LTRIM(RTRIM(SUBSTR( str_line, int_n + 1 )));
              END IF;
           END IF;
       END LOOP;
       IF UPPER(p_type) = 'NAME'
       THEN
          RETURN str_name;
       ELSIF UPPER(p_type) = 'SCHEMA.NAME'
       OR    UPPER(p_type) = 'OWNER.NAME'
       THEN
          RETURN str_owner || '.' || str_name;
       ELSIF UPPER(p_type) = 'TYPE'
       THEN
          RETURN str_type;
       ELSE
          RETURN str_owner;
       END IF;
    END SELF_EXAM;

  • Where do you put the  SMTP Server Name  ?

    I am trying to set up the email address of the SNMP.
    i can set up the Server SNMP Agents and the trap destinations, but can't find where to specifiy the SMTP Server Name i.e our company email address name [email protected]
    I looked in security realms can't find it.
    Any ideas

    Hi,
    Here is sample setup for AIX machine.
    SETUP:
    GC agent installed in AGENT_ORACLE_HOME
    RDBMS installed in RDBMS_ORACLE_HOME
    Database and listener up and running, monitored by Grid Control,
    this implies that the AGENT_ORACLE_HOME/sysman/emd/targets.xml contains the correct credentials for the database.
    The listener name given ion RDBMS_ORACLE_HOME/network/admin/listener.ora is identical to the name of that listener target in Grid Control.
    AGENT_ORACLE_HOME/network/admin/sqlnet.ora must exist.
    SETUP steps needed for operating system AIX:
    A. AIX is using its native snmp deamon pointing to the snmpdv3 deamon (this is the default on AIX5L):
    [hostname]/root> ls -l /usr/sbin/snmpd
    lrwxrwxrwx 1 root system 9 Jul 24 2009 /usr/sbin/snmpd@ -> snmpdv3ne*
    B. The script AGENT_ORACLE_HOME/network/snmp/peer/start_peer has needs to be corrected on AIX :
    1. the locations of "whoami" needs to be corrected from "/usr/ucb/whoami" to "/bin/whoami"
    2. the command starting the os snmp deamon must be changed to
    $SNMPD $SNMPD_OPTIONS -p $NEW_SNMPD_PORT >snmpd.out 2>&1 &
    Alternatively add two blocks for operating system AIX:
    elif [ "$uname" = "AIX" ] ; then
    USERID=`/bin/whoami`
    SNMPD=/usr/sbin/snmpd
    SNMPD_CONFIG=/etc/snmpdv3.conf
    SNMPD_OPTIONS=""
    BP="AIX"
    TRPCMD="exit 1"
    ENCAP_OPT="-s 1160"
    elif [ "$uname" = "AIX" ]
    then
    echo "Starting $SNMPD ..."
    echo "$SNMPD $SNMPD_OPTIONS -p $NEW_SNMPD_PORT >snmpd.out 2>&1 &"
    $SNMPD $SNMPD_OPTIONS -p $NEW_SNMPD_PORT >snmpd.out 2>&1 &
    Starting up emsubagent
    None of the following processes must be upp and running: snmpd, emsubagent, master_peer, encaps_peer
    The following ports must not be allocated: snmp, smux, 161, 1161, 199
    run as root:
    ORACLE_HOME= <full path to the AGENT_ORACLE_HOME>
    export ORACLE_HOME
    $ORACLE_HOME/network/snmp/peer/start_peer -a
    This must start the following processes as root: master_peer, encaps_peer, snmpd
    As agent ORACLE_HOME owner run
    AGENT_ORACLE_HOME/bin/emctl start subagent
    The snmp_*.ora files needs to be copied from AGENT_ORACLE_HOME/network/admin to RDBMS_ORACLE_HOME/network/admin
    Restart the listener, query the listener status
    "RDBMS_ORACLE_HOME/bin/lsnrctl status <listener_name>" must show: SNMP ON
    Regards,
    Kal

  • How to get the Portal Page name from PLSQL?

    Can anyone tell me how to get the portal page name from my dynamic page using plsql?
    Apparently you can get the page id and work it out from there, but my calls to get the page id are not returning any values anyway.
    My code for attempting to get the page id is below.
    <oracle>
    declare
    v_pageid varchar2(30);
    begin
    v_pageid := wwpro_api_parameters.get_value('_pageid', '/pls/portal30');
    htp.print('Page is '|| v_pageid);
    end;
    </oracle>
    Ideally I'd actually just like to get the page name. Is there a straightforward way to do this?
    Thanks in advance!
    Sarah

    Few clarifications -
    1. wwpro_api_parameters cannot be used to get default portal
    page parameters such as '_pageid', '_dad', '_schema' etc.,
    2. Page information can be obtained through any components which
    are available in that particular page. For example, in case of
    dynamic page, we need to publish it as a portlet and add it to the
    page. This process creates necessary packages in the DB, but we
    will not have access to the portlet methods.
    So, I would prefer creating a simple DB provider & portlet and access
    page title from its show method as follows -
    //Declare local variable l_page_id, l_page_title as varchar2
    select page_id into l_page_id from wwpob_portlet_instance$ where
    portlet_id = p_portlet_record.portlet_id and
    provider_id = p_portlet_record.provider_id;
    select name into l_page_title from wwpob_page$ where id=l_page_id;
    More information on DB provider can be found at
    http://portalstudio.oracle.com/pls/ops/docs/FOLDER/COMMUNITY/PDK/articles/understanding.database.providers.html
    Secondly, usage of wwpro_api_parameters.get_value method is
    incorrect. This method expects two arguments -
    <ul>
    <li><b>p_name : </b> The name of the parameter to be returned.</li>
    <li><b>p_reference_path : </b> An unique identifier for a portlet instance on the current page.</li>
    </ul>
    p_reference_path would be something like 99_SNOOP_PORTLET_76535103 and not some type of path as its name suggests.
    The following code fragment fetches all parameters available
    for a portlet.
    Note : Copy this code into 'show' method of your portlet.
    //Declare l_names, l_values as owa.vc_arr
    * Retreive all of the names of parameters for this portlet
    l_names := wwpro_api_parameters.get_names(
    p_reference_path=>p_portlet_record.reference_path);
    * Retreive all of the values of parameters for this portlet
    l_values := wwpro_api_parameters.get_values(p_names=>l_names,
    p_reference_path=>p_portlet_record.reference_path);
    //Loop through these arrays to get parameter information
    htp.p('<center><table BORDER COLS=2 WIDTH="90%" >');
    htp.p('<tr ALIGN=LEFT VALIGN=TOP>');
    htp.tableData(wwui_api_portlet.portlet_heading('Name',1));
    htp.tableData(wwui_api_portlet.portlet_heading('Value',1));
    htp.tableRowClose;
    if l_names.count = 0 then
    htp.p('<tr ALIGN=LEFT VALIGN=TOP>');
    htp.p('<td COLSPAN="2">'
    ||wwui_api_portlet.portlet_text(
    'No portlet parameters were passed on the URL.',1)
    ||'</td>');
    htp.tableRowClose;
    else
    for i in 1..l_names.count loop
    htp.p('<tr ALIGN=LEFT VALIGN=TOP>');
    htp.tableData(l_names(i));
    htp.tableData(l_values(i));
    htp.tableRowClose;
    end loop;
    end if;
    htp.p('</table></center>');
    Hope it helps...
    -aMJAD.

  • How to get a parameter without name in JSP?

    hi everyone, My question is how to get a parameter without name in JSP? I have two pages, 1.html and 2.jsp.
    in 1.html, I embeds some Javascript codes in HTML contents like below ( changed < to ( , > to )):
    function toSubWin( obj )
    window.open('test.jsp?'+obj.firstChild.toString(),'sw');
    (a onClick='toSubWin(this)'style="background:green")focus(/a)
    How can I get the parameter in 2.jsp?
    THANK YOU IN ADVANCE!!

    Does obj.firstChild.toString() evaluate to a "name=value" type of String ?
    Or better what does obj.firstChild.toString(),'sw' evaluate to ? It has to end up in a name=value format, else its just gibberish appended to the url.
    In the jsp, you have to obviously know the name to get the parameter. There's a getParameterNames() method which returns you a Collection of parameter names as Strings, you could probably use that to retrieve the param values.
    Then there's a getParameterMap() method which returns an immutable Map containing parameter names as keys and parameter values as map values. The keys in the parameter map are of type String. The values in the parameter map are of type String array.
    However to what ends you employ them in a program which doesnt know its inputs is a different story.
    cheers,
    ram.

  • In ME2N  report for PO- How to get or add Vendor name in ALV grid output

    Hl Everyone
    How to get  or add Vendor Name and payment terms in the ALV grid output for the follwing reports like ME2N and ME2V.
    cuurently i am in 4.7 E version.
    Kindly suggest..........
    thanks in advance
    Regards
    Prashanth

    Hi Pankaj
    I knew that vendor name field is avaiable in ECC versions, but how to get the same field(vendor name) in 4.7 E vesion.
    Kindly suggest
    Regards
    Prashanth

Maybe you are looking for

  • How use a proxy consumer web service in ABAP Program with local interface

    I generate a proxy class based on a WSDL file. I want to use this class in an abap programm without a connection but using XML files in local. I see with the class CL_PROXY_LOCAL_ADAPTER that it is possible to execute without connection but for use t

  • DirectX 9.0c installed, now no sou

    I don't know what information you guys need to help me with this. I think it may be a Directx 9.0c driver issue, but thought I'd try you out first before losing my mind. I'm a World of Warcraft addict and had great sound with it. The new patch was in

  • Need to move documents from Record center to file share

    I am trying to figure out how can I manage moving the documents from record center to file share. I want to move the older documents that are taking lot of space from record center in to some kind of file share. There are thousands of old documents t

  • Since update 36 firefox is very slow to start (over 1 min)

    ever since update to v36 firfox start up time is well over 1 min i have tried clean install/refresh/checked norton firewall setting and adjusted same reboots restarts etc etc nothing is working my end i have never had a prob with FF before (i have IE

  • Has anyone NOT gotten their iPhone?

    UPS just dropped mine off. I wanted to know if anyone who pre-ordered through AT&T or apple and went to their store and was unable to get one? Or it didn't get delievered today? The day isn't over yet but just wanted to know how smoothly the ordering