Send Host name by socket? in servlets

Hi !
how to send request with out Host Name, is it possible ?.
like : http:///servlet/Sample .
send Host Name by socket programming(may be in c or c++).
if yes,how to communicate with that socket.
Please Help me.
Thanks in advance,
vij.

Hi Nitin,
Following is the specification for getRemoteHost()
"Returns the fully qualified name of the client that sent the request, or the IP address of the client if the name cannot be determined. For HTTP servlets, same as the value of the CGI variable REMOTE_HOST." I think the same would be true for getHostName().....
So, this can be one possiblity why ur given IP.

Similar Messages

  • [SOLVED] NetworkManager dhclient send host-name

    I use network-manager-applet on xfce4 . dhclient does not send the host name to the server. I don't see any related option in the applet.
    dhclient is started without the "-H" option and the generated conf does not have a "send host-name" line.
    "dhcp-client-identifier" is something different.
    [il@vmarch ~]$ ps -Af | grep dhcp
    root 548 185 0 12:01 ? 00:00:00 /usr/bin/dhclient -d -q -sf /usr/lib/networkmanager/nm-dhcp-helper -pf /var/run/dhclient-enp0s3.pid -lf /var/lib/NetworkManager/dhclient-eae8589b-41a8-4e9a-9bf1-29c0a43dc88a-enp0s3.lease -cf /var/lib/NetworkManager/dhclient-enp0s3.conf enp0s3
    [il@vmarch ~]$ sudo cat /var/lib/NetworkManager/dhclient-enp0s3.conf
    # Created by NetworkManager
    option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;
    option ms-classless-static-routes code 249 = array of unsigned integer 8;
    option wpad code 252 = string;
    also request rfc3442-classless-static-routes;
    also request ms-classless-static-routes;
    also request static-routes;
    also request wpad;
    also request ntp-servers;
    Last edited by leniviy (2015-03-29 15:54:58)

    For some reason, NM does not use the host name obtained from OS.
    Workaround:
    [root@vmarch ~]# nmcli con show
    NAME UUID TYPE DEVICE
    enp0s3 84b17c75-9129-4944-849e-b82003511578 802-3-ethernet enp0s3
    [root@vmarch ~]# nmcli con show enp0s3 | grep ipv4.dhcp-hostname
    ipv4.dhcp-hostname: --
    [root@vmarch ~]# nmcli con modify enp0s3 ipv4.dhcp-hostname `hostname`
    Last edited by leniviy (2015-03-29 15:54:46)

  • DHCP Client does not send host name to DHCP Server

    Hello,
    I installed Solaris 10 on VirtualBox and I cannot ping/ssh/telnet the virtual machine by its host name (even from the host computer) but only by it's ip.
    I tried everything I could find on internet with no success (I don't want to add the hostname in every hosts file on every computer because it's not really professionnal)
    I followed what said here: http://docs.oracle.com/cd/E26505_01/html/E27061/eyhuv.html#scrolltoc
    Can someone has an idea of what I can do or why this does not work.
    I installed a virtual Windows7 and an Ubuntu, and it worked perfectly.
    Any help would be grantly appreciated.
    Thank you
    Here is my current configuration:
    Oracle VM VirtualBox 4.3.8 (I choose "Oracle 10 10/09 and later (64 bit))
    Oracle Solaris 10 1/13
    Network: bridge with RealTek interface
    NB: I don't have access to dhcp server on my netgear router (access is disabled by my ISP)
    Files in /etc:
    dhcp.e1000g0 (empty)
    nodename (contains "thorgal")
    nsswitch.conf has following lines:
    hosts: files dns # Added by DHCP
    ipnodes: files dns # Added by DHCP
    networks:   files
    protocols:  files
    rpc:        files
    ethers:     files
    netmasks:   files
    bootparams: files
    hostname.e1000g0 (contains "inet thorgal")
    /etc/inet/hosts:
    ::1             localhost
    127.0.0.1       localhost loghost
    192.168.0.17    thorgal # Added by DHCP
    /etc/default/dhcpagent:
    REQUEST_HOSTNAME=yes
    PARAM_REQUEST_LIST=1,3,6,12,15,28,43
    .v6.PARAM_REQUEST_LIST=7,12,23,24,27,29
    I also try "ifconfig e1000g0 dhcp release" with no success
    the debugging of dhcpagent:
    # pkill -x dhcpagent
    # /sbin/dhcpagent -d1 -f &
    1088
    # ifconfig e1000g0 dhcp start
    /sbin/dhcpagent: debug: insert_pif: e1000g0: sdumax 1500, hwtype 1, hwlen 6
    /sbin/dhcpagent: debug: set_packet_filter: set filter 805869f (DHCP filter)
    /sbin/dhcpagent: debug: get_smach_cid: getting default client-id property on e1000g0
    /sbin/dhcpagent: debug: in state INIT; allowing start command on e1000g0
    /sbin/dhcpagent: debug: ipc_action_start: started start (command 4) on e1000g0
    /sbin/dhcpagent: debug: set_smach_state: changing from INIT to INIT_REBOOT on e1000g0
    /sbin/dhcpagent: debug: dhcp_selecting: host thorgal
    /sbin/dhcpagent: info: configure_v4_lease: setting IP netmask to 255.255.255.0 on e1000g0
    /sbin/dhcpagent: info: configure_v4_lease: setting IP address to 192.168.0.17 on e1000g0
    /sbin/dhcpagent: warning: configure_v4_lease: no IP broadcast specified for e1000g0, making best guess
    /sbin/dhcpagent: info: configure_v4_lease: using broadcast address 192.168.0.255 on e1000g0
    /sbin/dhcpagent: info: configure_v4_timers: e1000g0 acquired lease, expires Fri Mar 21 21:33:05 2014
    /sbin/dhcpagent: info: configure_v4_timers: e1000g0 begins renewal at Fri Mar 21 09:33:05 2014
    /sbin/dhcpagent: info: configure_v4_timers: e1000g0 begins rebinding at Fri Mar 21 18:33:05 2014
    /sbin/dhcpagent: debug: set_smach_state: changing from INIT_REBOOT to PRE_BOUND on e1000g0
    /sbin/dhcpagent: info: added default router 192.168.0.1 on e1000g0
    /sbin/dhcpagent: debug: set_smach_state: changing from PRE_BOUND to BOUND on e1000g0
    /sbin/dhcpagent: debug: configure_bound: bound e1000g0
    /sbin/dhcpagent: debug: ipc_action_finish: finished start (command 4) on e1000g0: 0

    During the Solaris installation process, you told it what the hostname was going to be and that you wanted that environment to exist with a dynamic IP address instead of a specific address that you desired.
    When Solaris boots it broadcasts that hostname and waits for a DHCP server to be quasi-intelligent enough to award an IP address based upon a pre-configured list inside that DHCP server.   Hostname ABC would always get IP address 123 on subnet rst, hostname DEF would always get IP address 456 on subnet xyz, and so on and so on.
    That's the fundamental process for proper (and thus secure) DHCP.
    All your other environments (Windows, Debian, Ubuntu) are what might be thought of as "hacked for convenience" to get around that sort of network configuration.  They take the lazy way to exist.  That partial networking setup is good enough for a home network but would be miserably insecure in a corporate environment.  Those choices are operating environments that are nice for end-user desktops but aren't Enterprise Class.
    My suggestion?
    Review the IP address range in your Netgear router's setup.
    It is likely something like 192.169.0.1 through 192.168.0.50 and can be customized.
    You probably don't have 50 devices on your network and probably will never have 50 simultaneous devices on your network.
    ... just do a reconfigure reboot and set your Solaris to use a static IP of 192.068.0.45
    Then reboot and I predict your issue that prompted this forum thread will be gone.
    That's how I've done it at home for many years, even when installing Solaris to bare metal (no virtualization).

  • How to I send host-name to my router?

    When I log into my netgear router's webmin page, my Arch Linux connection is reported as "UNKOWN" even though /etc/rc.conf has
    HOSTNAME="thinkpad"
    eth0="dhcp"
    and /etc/conf.d/dhcpcd has
    DHCPCD_ARGS="-t 30 -h $HOSTNAME"
    Can someone please tell me why my hostname is not being sent to my router and what I need to do to get to be sent?

    Sjoden wrote:
    All the small office/home office routers I've used were unable to get the hostname from my linux boxes. Netgear, SMC, Actiontec... I don't think it is uncommon.
    Zack
    i have had this same experience.  the only boxes on my home network that ever show a hostname are either windows or my roommate's ubuntu.  possibly the use of dhclient vs dhcpcd, but i'm not entirely sure.

  • Host name not showing up under Active Clients

    When I go into my router and check active connections, I can see all host names like "Acer Laptop", "IPhone" etc..., IP and MAC address' that are connected to router. Today, when I was in there looking, I saw an asterisk where host name should be for the TouchPad. (it took me a while to figure out it was the TouchPad) Is there a reason why Host name would not show up?
    I have gone into "Device Settings" and set "Name" as "Chucks TouchPad". Is that the host name that should be showing on router?
    Thank You for any assistance.
    Post relates to: HP TouchPad (WiFi)

    Sure is, but it will involve some commandline work. First, you're going to need to install the SDK. You only need the Novacom part of the SDK, but AFAIK there's no seperate download for Windows... you have to get the whole thing. The SDK is available here: https://developer.palm.com/content/resources/devel​op/sdk_pdk_download.html
    Next, you're going to need to enable Developer mode on your TouchPad, here's how to do that:
    Start a Just Type search and enter webos20090606
    A Developer Mode icon will display, tap it
    Tap the toggle switch to turn it On
    Leave the password blank and tap Sumbit
    Close the Developer Mode app
    Now, connect your TouchPad to your computer. Next, you're going to find a file called Novaterm.bat. It's buried in the install directory of the SDK. I don't remember the exact path (I don't use Windows anymore) but it's something like C:\Program Files\Palm SDK\Current\bin (keep digging around for bin folders in the C:\Program Files\Palm SDK path and you'll find it eventually). Doubleclick that to start a nice little terminal app. Choose your TouchPad from the drop down list and click connect.
    Now, time for some command line stuff. Run the following commands in the terminal:
    mount -o remount,rw /
    cd /etc/dhcp
    vi dhclient.conf
    Press the I key on your keyboard to go into edit mode (this is a Vi specific thing)
    Remove the # at the beginning of line 14 and change the andare.fugue.com inside the quotes to whatever you want your TouchPad reporting as. For example: #send host-name "andare.fugue.com"; would become send host-name "RidiusTouchPad";
    To save your changes, hit the ESC key (to exit edit mode), then type :wq and hit enter. Note there is a colon in there. Again, this is Vi specific stuff.
    sync
    mount -o remount,ro /
    Once you've done this, disable and re-enable your Wi-Fi and your TouchPad should be reporting a hostname. Kind of a lot of work if you ask me (unless you already have the SDK installed).

  • VM Creation - host name not set

    Hi,
    I'm creating vm using createVmTemplate api where i assign the hostname in NICConfig
    But i see that the given hostname is not set in the vm.
    Default hosname - "localhost.localdomain" is seen in the vm.
    how to resolve this

    Sure is, but it will involve some commandline work. First, you're going to need to install the SDK. You only need the Novacom part of the SDK, but AFAIK there's no seperate download for Windows... you have to get the whole thing. The SDK is available here: https://developer.palm.com/content/resources/devel​op/sdk_pdk_download.html
    Next, you're going to need to enable Developer mode on your TouchPad, here's how to do that:
    Start a Just Type search and enter webos20090606
    A Developer Mode icon will display, tap it
    Tap the toggle switch to turn it On
    Leave the password blank and tap Sumbit
    Close the Developer Mode app
    Now, connect your TouchPad to your computer. Next, you're going to find a file called Novaterm.bat. It's buried in the install directory of the SDK. I don't remember the exact path (I don't use Windows anymore) but it's something like C:\Program Files\Palm SDK\Current\bin (keep digging around for bin folders in the C:\Program Files\Palm SDK path and you'll find it eventually). Doubleclick that to start a nice little terminal app. Choose your TouchPad from the drop down list and click connect.
    Now, time for some command line stuff. Run the following commands in the terminal:
    mount -o remount,rw /
    cd /etc/dhcp
    vi dhclient.conf
    Press the I key on your keyboard to go into edit mode (this is a Vi specific thing)
    Remove the # at the beginning of line 14 and change the andare.fugue.com inside the quotes to whatever you want your TouchPad reporting as. For example: #send host-name "andare.fugue.com"; would become send host-name "RidiusTouchPad";
    To save your changes, hit the ESC key (to exit edit mode), then type :wq and hit enter. Note there is a colon in there. Again, this is Vi specific stuff.
    sync
    mount -o remount,ro /
    Once you've done this, disable and re-enable your Wi-Fi and your TouchPad should be reporting a hostname. Kind of a lot of work if you ask me (unless you already have the SDK installed).

  • Can I send DHCP host name to my ISP from RV220W?

    My ISP waits a definite host name from me to return my white IP address via DHCP. Can I set this parameter in RV220W router? I don't find such parameter in IPv4 WAN configuration page.

    After firmware update to 1.0.3.5 I can set up router name but provider support answer that router doesn't send its name to provider during DHCP handshake. Is that right?

  • HT201320 I have an email account through yahoo. I am having trouble setting it upon my iPhone and can't receive or send emails!!!! I contacted Rogers and they said I need to find out the host name of the incoming server, in other words yahoos host name. H

    I have an email account through yahoo. I am having trouble setting it upon my iPhone and can't receive or send emails!!!! I contacted Rogers and they said I need to find out the host name of the incoming server, in other words yahoos host name. Help!!

    Yahoo's servers are notoriously unreliable. Use the "Yahoo" account type when setting it up. If it doesn't work, and you are positive the credentials are correct, wait a while and try again.
    While you're waiting, set up a free gmail or iCloud email account.

  • How can I get the host name from Email address?

    hi
    When I using socket to develope an email-sending servlet,I don't know how to get the host name from emial address.can you help me,thanks

    Stripping off the user name will give you the domain of from field in the message. This is not the same as the host. Take a look at:
    http://www.stopspam.org/email/headers/headers.html
    Theres a pretty good discussion about email headers and how to use the information. You probably want to check the information here against the RFC.
    Sean

  • Domain name/"primary DNS" name/mail host name/mail server name/mx name

    Hi,
    I have registered my domain name (N.com) with an external dns server and created an MX record (mail.N.com) for it as well. My server sits behind a router and internet traffic is port(80)-forwarded to my server's fixed internal ip address (I can access my webpages from the internet just fine). When I initially setup the server I was asked to give it a "primary DNS name." I naturally assumed that N.com was supposed to be entered here, but that just caused all kinds of problems (though I still do not understand why). So I reinstalled and currently have server.N.com as the primary DNS name of the server (although it shows up in Server Admin and Workgroup Manager as server.local--why is that?)
    I have had no luck getting any email from the internet with the default settings in mail services (domain name of N.com and host name of server.N.com). Having no luck with the defaults, I assumed that maybe I needed to change the host name to "mail.N.com" so that it matched the MX record. I also changed the user preferences in Workgroup Manager to receive mail from mail.N.com--but still no luck. Could someone tell me what I am doing wrong and how come none of the Mail Service literature mentions anything about what a mail "host name" is supposed to be? Is it supposed to be the same as the "Mail Server" name that Workgroup Manager asks each user for? and is it the same as the MX record name?
    I am just needing some help to connect all these variously named, but undefined, dots.
    Also, how come I can access webmail from the internet using www.N.com/webmail but can't do it from any computers within my physical network (I have to use IPaddress/webmail or server.local/webmail)?
    Also, should my user email addresses be [email protected] or [email protected] (which is the current default)?
    Thanks in advance and good luck!
    John

    I had been told by a friend that ... regular email coming in from the internet would go through port 80
    Unfortunately you were misinformed.
    My MX record needs the extra subname (such as "mail") in front of the domain name, right?
    Not at all. A MX record for 'N.com' is entirely valid (expected, in fact).
    An MX record tells remote mail servers where to send mail for any domain/subdomain. If you think about it, let's say you worked for Apple and you wanted people to be able to send email to [email protected], well then you need an MX record for 'apple.com'.
    You can see if you dig MX apple.com that they actually have 9 MX records, but the point still stands.
    Now, you might also have MX records for subdomains so that you can have [email protected], [email protected], [email protected], etc. Each of these subdomains would need a separate MX record.
    So, in general, for any set of email addresses @[anything.]domain.com you have a MX record telling remote mail servers where to send that mail.
    Of course the MX record name is mail.N.com, but I think you are implying that the in the Mail settings of Server Admin where it asks for domain name all I need to put there is the N.com, right?
    What I mean is that you need to set the domain name to whatever domain name you expect to receive mail at.
    If you want users to have email addresses in the form of [email protected], then you enter 'N.com'.
    If you want users to have email addresses in the form of [email protected] then you enter 'mail.N.com'.
    If you want both forms, enter one in the main domain and add the other(s) in the Advanced -> Hosting -> Local Host Aliases section.
    Is there anything in the Mail settings that needs to have the full MX record name (mail.N.com)?
    Yes. Either the 'domain name' or the 'Local Host Aliases' needs to contain the same thing as your MX record. That's because the MX record tells remote servers to send mail to this machine, but the machine won't accept the mail unless it is configured to do so.
    What is the "host name" supposed to be?
    This should be the name that remote servers see when this machine tries to send outgoing mail.
    Ideally this should match the reverse DNS of your IP address, that way when it connects to a remote server it says "Hi, I'm $hostname" and the remote server can lookup the machine's IP address and see the same result. This will reduce the problem of remote servers thinking you're sending them spam.
    If you only have a single IP address then this probably needs to be something like 'N.com'. If you don't have control over your reverse DNS then you're going to run into a problem.
    Also in the user accounts (in Workgroup Manager) what should the "mail server name" be? Is it the host name or the domain name?
    Off hand, I don't know.
    Also, why are all the default user email addresses [email protected] (the name I gave the server at setup)? Why doesn't the user accounts create [email protected] as the default address?
    Presumably because the mail server says it is 'server.N.com' and therefore any accounts on that machine would be [email protected]. Changing the domain name (as above) should fix that.

  • Full qualified host name not appearing in url within WSDL generated from PI

    Hi
       We are on PI711  ( AIX OS ) and are stuck with an issue of the fully qualifed hostname not appearing within WSDL file  generated in PI71 for a webservice it exposes using the Integration builder
    We changed the host name in exchange profile ( all locations ) from hostname to hostname.companyname.intra and also in the ABAP stack as recommended in all OSS notes.
    We use the Integration Directory --> Sender Agreement --> Display WSDL option to generate the WSDL.
    Its to be noted that all locations ( including url for WSDL ) have the fully qualified hostname except the url within the WSDL.
    Dioes anyone come across this issue/ know which parameters to be updated on the PI server to make the url within the WSDL for the PI webservice to have the fully qualified host name ?

    HI Karthik,
    As Mentioned by Baskar donu2019t use proposed URL .. while creating WSDL in Id.. but instead provide URL in following format and use it in that place and create WSDL.. details about URL format..
    the URL format is fix. and it is simple.
    http://host:HTTPPort/XISOAPAdapter/MessagingServlet?channel=party:sendersystem:CC_sender
    in above URL provide your sender service component name instead of sender system.
    and provide SOAP sender communication channel name in place of CC_sender
    provide your PI system host and http name in place of host and https and use this..
    for more details about URL..
    Propose URL when Configuring Sender SOAP Adpater
    soap url
    Thanks,
    Bhupesh

  • Question about Domain and Host name fields.

    Hello! Just a quick question, I currently have the Mail Server up and running although I'm a little unsure about what exactly needs to be entered into the users email application.
    I've tested POP and IMAP using the information that I entered into the "Domain Name" field, and into the "Host name" field, and everything worked great.
    Example:
    Incoming Mail Server: mail.example.com
    Outgoing Mail Server: smtp.example.com
    Although while setting up another site and including the normal mail setup via DNS I've also noticed that I can send and receive email by using other sites that belong to me, as long as they are pointing towards our server.
    Example:
    Incoming Mail Server: mail.mynewsite.com
    Outgoing Mail Server: smtp.mynewsite.com
    So, I guess my question is whether its bad to use other websites in the incoming and outgoing mail server fields, or should I stick to the incoming and outgoing sites that I have listed in the Mail Server's 'Domain Name' and 'Host Name' fields?
    I hope that made sense, thanks again for your help.
    Paul
    PowerMac G5, Xserve G5, and PowerBook G4 Mac OS X (10.4.8)

    Does it matter if our users type mail.example.com
    into the incoming mail server, or are they allowed to
    use their own domain name "mail.mydomain.com" as long
    as the DNS is setup correctly?
    There is no intrinsic 'meaning' to hostnames entered into the mail client. These are merely converted to IP addresses, using available dns, and then the mail client communicates with the IP address, using whatever port number is applicable for the service required (e.g., port 25 for smtp, port 110 for pop). So you could use the hostname woohooo.mydomain.com for the smtp or pop server, as long as it resolves to the correct IP.
    This enables laptop users to have the one smtp/pop hostname, with lan dns resolving it to the local private IP and ext dns resolving same hostname to wan IP.
    There is also no need to have two separate hostnames for pop and smtp. These are typically used by ISPs because they have separate servers doing each job - one doing pop, one doing smtp. If one server does both (and there is no likelihood of splitting the services later) then just the one hostname for pop and smtp is fine.
    -david

  • Email host name for mailbean

    Hi, I have a problem about finding my own email host name when I am trying to send an email within JSP. I have tried many names such as: "mail.gmail.com"," yahoo.com", and the one included in the code blow. I think I have a misunderstanding about this host name, could anyone explain for me please? Thanks a lot.
    Blow is my code
    * Mail.java
    * Created on 2006年8月14日, 下午2:59
    package myclass;
    import java.io.*;
    import java.util.*;
    import javax.mail.*;
    import javax.mail.event.*;
    import javax.mail.internet.*;
    * @author weiming514
    public final class MailBean extends Object implements Serializable{
    private String to = null;
    private String from = null;
    private String subject = null;
    private String message = null;
    public static Properties props = null;
    public static Session session = null;
    static{
    /** Setting Properties for STMP host **/
    props = System.getProperties();
    props.put("mail.smtp.host", "hostname");
    session = Session.getDefaultInstance(props, null);
         /* Setter Methods */
         public void setTo(String to) {
              this.to = to;
         public void setFrom(String from) {
              this.from = from;
         public void setSubject(String subject) {
              this.subject = subject;
         public void setMessage(String message) {
              this.message = message;
    /* Sends Email */
    public void sendMail() throws Exception{
    if(!this.everythingIsSet())
    throw new Exception("Could not send email.");
    try{
    MimeMessage message = new MimeMessage(session);
    message.setRecipient(Message.RecipientType.TO, new InternetAddress(this.to));
    message.setFrom(new InternetAddress(this.from));
    message.setSubject(this.subject);
    message.setText(this.message);
    Transport.send(message);
    catch(MessagingException e){
    throw new Exception(e.getMessage());
    /* Checks whether all propertises have been set or not */
         private boolean everythingIsSet() {
              if((this.to == null) || (this.from == null) ||
              (this.subject == null) || (this.message == null))
                   return false;
              if((this.to.indexOf("@") == -1) ||
                   (this.to.indexOf(".") == -1))
                   return false;
              if((this.from.indexOf("@") == -1) ||
                   (this.from.indexOf(".") == -1))
                   return false;
              return true;
    Error:
    unknown smtp host: hostname

    and the one included in the code blow.You have written "hostname" in the code below. Since "hostname" is certainly NOT a valid SMTP host name,
    that's why you get the error: unknown smtp host: hostname.
    What did you expect? You must provide a valid SMTP host name, NOT "hostname". You see the difference right?
    Try with your ISP (Internet Service Provider) SMTP host name.
    It should be something like: stmp.somename.com.
    That's the one you must set in your email client (Outlook, Thunderbird, Eudora, Lotus Notes, whatever) to send your emails.
    Next time please paste your code between [code] tags with the help of the code button just above the edit message area.
    Regards

  • Run Into Problem When Trying Not To Hard Code the Host Name

    My code (using the JavaMail API) works fine when the SMTP host name is hard coded in the program:
           props.put( "mail.smtp.host", "TheHostName" );Then, I tried to put the host name in a properties file (smtpServer.properties). The properties file is in the $TOMCATHOME\webapps\AppName\WEB-INF\classes\resources directory. And the properties file has this one single line:
    smtpServer = TheHostName     //Note: The host name has only alpha characters, dots, and dashesIn my program, I did:
       private final String PROPFILE = "resources/smtpServer.properties";
       private Properties oProp = null;
       public SendBatchMails()  // this is the constructor in my class
          try
             oProp = new Properties();
             oProp.load ( getClass().getClassLoader().getResourceAsStream( PROPFILE ) );
          catch( IOException oEx )
             System.out.println("Unable to load the Properties " + PROPFILE + oEx );
           String smtpServer = oProp.getProperty( "smtpServer" );
           Properties props = System.getProperties();
           props.put( "mail.smtp.host", smtpServer );And, I got this runtime error:
    java.lang.IllegalArgumentException: argument type mismatch
         sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         java.lang.reflect.Method.invoke(Method.java:324)
         org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(PropertyUtils.java:1789)
         org.apache.commons.beanutils.PropertyUtils.setNestedProperty(PropertyUtils.java:1684)
         org.apache.commons.beanutils.PropertyUtils.setProperty(PropertyUtils.java:1713)
         org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:1019)
         org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808)
         org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1252)
         org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:821)
         org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
         org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
         org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

    I would agree with Reply 1. From the stack trace it is apparent that it comes from Struts, where it is failing to set some kind of property in a bean. However the code that you posted doesn't seem to have anything to do with that. Check your Struts configuration.

  • Problem with getting a service ticket - ignoring host name?

    Hello,
    I've been struggling with this for several weeks on and off. The latest issue I have, is that when I try to obtain a service ticket it replaces the hostname I use with the ip address of the server. This then results in a 'Server not found in Kerberos database' exception.
        public static void main(String args[]) {
            try {
                org.ietf.jgss.Oid[] desiredMechs = new org.ietf.jgss.Oid[1];
                desiredMechs[0] = new org.ietf.jgss.Oid("1.2.840.113554.1.2.2");
                GSSManager manager = GSSManager.getInstance();
                GSSName clientName = manager.createName("[email protected]", GSSName.NT_USER_NAME);
                GSSCredential clientCreds = manager.createCredential( GSSCredential.INITIATE_ONLY);
                GSSCredential clientCred = manager.createCredential(clientName,
                8 * 3600, desiredMechs[0], GSSCredential.INITIATE_ONLY);
               GSSName serverName = manager.createName("*[email protected]*", GSSName.NT_HOSTBASED_SERVICE);
    Entered Krb5Context.initSecContext with state=STATE_NEW
    Service ticket not found in the subject
    Credentials acquireServiceCreds: same realmUsing builtin default etypes for default_tgs_enctypes
    default etypes for default_tgs_enctypes: 3 1 23 16 17.
    CksumType: sun.security.krb5.internal.crypto.RsaMd5CksumType
    EType: sun.security.krb5.internal.crypto.ArcFourHmacEType
    KrbKdcReq send: kdc=labad2.lab2k.net UDP:88, timeout=30000, number of retries =3, #bytes=1276
    KDCCommunication: kdc=labad2.lab2k.net UDP:88, timeout=30000,Attempt =1, #bytes=1276
    KrbKdcReq send: #bytes read=92
    KrbKdcReq send: #bytes read=92
    KDCRep: init() encoding tag is 126 req type is 13
    KRBError:         sTime is Mon Jul 26 12:07:34 EDT 2010 1280160454000
             suSec is 65057
             error code is 7
             error Message is Server not found in Kerberos database
             realm is LAB2K.NET
             sname is *HTTP/172.16.118.89*
             msgType is 30
    KrbException: Server not found in Kerberos database (7)Thanks - Bryan.

    Your DNS server should have an entry for this host name in its reverse lookup table.
    Regards- Abid

Maybe you are looking for

  • How to delete time machine backups from trash bin

    Hello, I've got a little issue with time machine and doing something stupid on my part. I have seen different posts on this question, but it appears that most people haven't found a working solution, so I want to see if anybody has more insight. A fe

  • I can't email my Pages documents anymore.

    I have shared my Pages documents in the past via email (either in Pages, Word or PDF) with no problem, but suddenly it's not working.  I did do a software update today... wondering if that could have somehow affected it?  I am 10.6.8, I know, it's ol

  • In mountain lion must you use the cloud?

    I am reading different things about mountian lion and the cloud. Do oyu have to use the cloud for things? Can you opt out of using the cloud?

  • Problems in using Tomcat 4.0 and javaBeans

    Help! I find that I can't import javaBeans in the normal way For example, the bean class file should be placed in the application's Web-inf\classes (however, when I have changed to use the Tomcat 4.0, I have to place them in the outermost classes dir

  • Disp+work.exe - Running but dialog queue statistics unavailable

    Hi, We have two diferent instances in the same machine. One on them have disp+work.exe in yellow and show message "Running but dialog queue statistics unabailable". This is right, the queue statistics have no item to show, but I can login perfectly i