Bind WebServer to Specific IP

Hello,
We have netscape IPlanet WebServer 4.1 SP 9 running on Sun Solaris 2.8. We already have one instance running on port 443. I want to create another WebServer instance running also on port 443. For that the systems admins have created a virtual interface or Multihomes interface, where one LAN card has two ips.
But how can me force Netscape to bind to a particular interface?
Is there a way that i can specify netscape to bind on port 443 on a particular ip?

Hi,
You can "Bind To Address" to Specific IP by below steps.
1. Go to Admin Server GUI.
2. Select the Webserver instance(which one you to map to particular IP).
3. Click on Manage.
4. In Preference ----> Network Settings .
5. Bind To Address : a.b.c.d, Type the IP address, which you need to map to this instance.. and Restart the webserver.
6.Now the server will listen in new ipaddress (a.b.c.d:443).
Hope this helps you.
Regards,
Dakshin.

Similar Messages

  • [solved] Proxy which allows binding to a specific interface only?

    I have a server which has five IP addresses.  The main interface is on eth0 and then there are other external interfaces which each correspond to a separate distinct IP address on eth0:0, eth0:0, eth0:1, eth0:2, and eth0:3 respectively.
    What I want to do is make it so that I can have two different proxies which appear to be from separate IP addresses as opposed to being from the same (main) IP. I can already set a proxy such as polipo to listen on a specific IP address and port but unfortunately that's not enough.  I need the external requests to be routed through a different external interface such as eth0:1 (thus having a different IP address), not just eth0 (the server's main IP).
    Any suggestions?
    Last edited by davidm (2010-03-11 15:59:47)

    wonder wrote:tinyproxy can be configured to bind only on which interface you want
    From reading the documentation on the config file (specifically the BIND keyword) :
    https://www.banu.com/docs/tinyproxy/1.8 … .conf.html
    In fact BINDSAME looks as if it might even save me from having to run multiple instances of the proxy.
    It appears that this will be perfect.  Thank you very much.
    Last edited by davidm (2010-03-11 16:18:16)

  • Bind Socket to specific ip adress

    I'm trying to bind a Socket to a specific interface (IP-Adress) but with a port number
    chosen by the underlying operating system... Unfortunately, the Socket constructor
    only accepts a local ip address in combination with a specific port...
    Chosing a random port does not help since the port might already be in use by another program.
    Using the same port over and over again also does not work, since my program runs only a short time and then closes the socket and exits. If I restart my program, I get the Exception "Cannot assign requested address for fd: n" and the port may not be used for about half a minute.
    Is there a way to construct a socket bound to a specific ip address but letting the OS select
    a port number????

    Do you use java.net.Socket?
    Yes, I do...
    The point is that I want to connect to a system that only accepts connections
    from a specific IP address , therefore I have to bind to this address.
    Let's assume that my client machine has two IP-adresses (192.168.0.1,192.168.0.2)
    and the server has the address 192.168.0.3. The server only accepts connections
    from 192.168.0.2. This means, that the client Socket must be bound to 192.168.0.2,
    otherwise the server doesn't accept the connection.

  • How to make af:inputText bind  to a specific format?

    Hi,
    I want to make af:inputText as format specific i.e., Where I can specify such that it will accept only numeric/alphanumeric/alphabetic value?
    Regards,
    Lokesh.

    Put a validator (based on a regular expression) on your input text. this will not prevent the user to enter the wrong type of character, but give you an error message when you leave the field.
    To prevent the input of characters in a field expecting numbers only you can use a javascript function and an event handler.
    Timo

  • AFP bind to a specific interface

    I have 2 interfaces on my server. (wifi and eth)
    How to bind the AFP service to just one ? (no wifi)
    Thanks
    Cesare

    If I understand you, the two Macs are connected to the router (and thus to the internet) via Wifi, but for this copying you want to connect them directly using an ethernet cable. (I assume his Macs are reasonably recent and so don't require a crossover cable.)
    In System Preferences>Network you will see a list of possible connections; where there is more than one the Mac concerned will choose the top one unless it isn't available, in which case it will drop to the next one.
    You probably have wifi as the top one: if ethernet isn't there you need to add it and then drag it to the top of the list (on both Macs), then when you plug the lead in the Macs should be able to see each other using the normal File Sharing method and connect that way.
    An alternative would be to create a new location, so that you have two locations, one wifi only and one ethernet only: then you could switch to the cable (turning the connection to the router off altogether). Again you would do this on both Macs.
    This page has more details and may help:
    http://www.applelinks.com/index.php/more/handson_mac_connecting_two_macs_via_a_simple_ethernetnetwork/

  • How to send request from webserver to application server

    Hi All,
    I have below setup :-
    A)) Apache http server running over 192.168.206.128:8080
    B)) Weblogic application server admin server running on 192.168.206.128:7001
    -->i have a cluster with 2 managed servers
    -->cluster address us 192.168.206.128:7003,192.168.206.128:7004
    --> Also i have a Proxy Server running at 7011 port and have in memory sesion replication active through this.
    C)) I have application MyWebApp deployed over the cluster and ProxyApp deployed over Proxy Server. Now i want to use webserver to request for those applications. Can somebody please help me the way to do that.
    Regards
    Sharad Jain

    Hey Ravi,
    After some reasearch and going through your posts, i am now able to atleast go to the first jsp page of the application.like thorugh the below link
    http://192.168.206.128:8080/MyWebApp/First.jsp
    But after reaching this page when i start navigating to get through a servlet then it says page is on available on this server. please help me what i need now..
    i am also copying the httpd.conf file below:-
    # This is the main Apache HTTP server configuration file. It contains the
    # configuration directives that give the server its instructions.
    # See <URL:http://httpd.apache.org/docs/2.2> for detailed information.
    # In particular, see
    # <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>
    # for a discussion of each configuration directive.
    # Do NOT simply read the instructions in here without understanding
    # what they do. They're here only as hints or reminders. If you are unsure
    # consult the online docs. You have been warned.
    # Configuration and logfile names: If the filenames you specify for many
    # of the server's control files begin with "/" (or "drive:/" for Win32), the
    # server will use that explicit path. If the filenames do not begin
    # with "/", the value of ServerRoot is prepended -- so "logs/foo_log"
    # with ServerRoot set to "/usr/local/apache2" will be interpreted by the
    # server as "/usr/local/apache2/logs/foo_log".
    # ServerRoot: The top of the directory tree under which the server's
    # configuration, error, and log files are kept.
    # Do not add a slash at the end of the directory path. If you point
    # ServerRoot at a non-local disk, be sure to point the LockFile directive
    # at a local disk. If you wish to share the same ServerRoot for multiple
    # httpd daemons, you will need to change at least LockFile and PidFile.
    ServerRoot "/usr/local/apache2"
    # Listen: Allows you to bind Apache to specific IP addresses and/or
    # ports, instead of the default. See also the <VirtualHost>
    # directive.
    # Change this to Listen on specific IP addresses as shown below to
    # prevent Apache from glomming onto all bound IP addresses.
    Listen 192.168.206.128:8080
    Listen 8080
    # Dynamic Shared Object (DSO) Support
    # To be able to use the functionality of a module which was built as a DSO you
    # have to place corresponding `LoadModule' lines at this location so the
    # directives contained in it are actually available before they are used.
    # Statically compiled modules (those listed by `httpd -l') do not need
    # to be loaded here.
    # Example:
    # LoadModule foo_module modules/mod_foo.so
    <IfModule !mpm_netware_module>
    <IfModule !mpm_winnt_module>
    # If you wish httpd to run as a different user or group, you must run
    # httpd as root initially and it will switch.
    # User/Group: The name (or #number) of the user/group to run httpd as.
    # It is usually good practice to create a dedicated user and group for
    # running httpd, as with most system services.
    User daemon
    Group daemon
    </IfModule>
    </IfModule>
    # 'Main' server configuration
    # The directives in this section set up the values used by the 'main'
    # server, which responds to any requests that aren't handled by a
    # <VirtualHost> definition. These values also provide defaults for
    # any <VirtualHost> containers you may define later in the file.
    # All of these directives may appear inside <VirtualHost> containers,
    # in which case these default settings will be overridden for the
    # virtual host being defined.
    # ServerAdmin: Your address, where problems with the server should be
    # e-mailed. This address appears on some server-generated pages, such
    # as error documents. e.g. [email protected]
    ServerAdmin [email protected]
    # ServerName gives the name and port that the server uses to identify itself.
    # This can often be determined automatically, but we recommend you specify
    # it explicitly to prevent problems during startup.
    # If your host doesn't have a registered DNS name, enter its IP address here.
    #ServerName www.example.com:80
    # DocumentRoot: The directory out of which you will serve your
    # documents. By default, all requests are taken from this directory, but
    # symbolic links and aliases may be used to point to other locations.
    DocumentRoot "/usr/local/apache2/htdocs"
    # Each directory to which Apache has access can be configured with respect
    # to which services and features are allowed and/or disabled in that
    # directory (and its subdirectories).
    # First, we configure the "default" to be a very restrictive set of
    # features.
    <Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    </Directory>
    # Note that from this point forward you must specifically allow
    # particular features to be enabled - so if something's not working as
    # you might expect, make sure that you have specifically enabled it
    # below.
    # This should be changed to whatever you set DocumentRoot to.
    <Directory "/usr/local/apache2/htdocs">
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    # Note that "MultiViews" must be named explicitly --- "Options All"
    # doesn't give it to you.
    # The Options directive is both complicated and important. Please see
    # http://httpd.apache.org/docs/2.2/mod/core.html#options
    # for more information.
    Options Indexes FollowSymLinks
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    # Options FileInfo AuthConfig Limit
    AllowOverride None
    # Controls who can get stuff from this server.
    Order allow,deny
    Allow from all
    </Directory>
    # DirectoryIndex: sets the file that Apache will serve if a directory
    # is requested.
    <IfModule dir_module>
    DirectoryIndex index.html
    </IfModule>
    # The following lines prevent .htaccess and .htpasswd files from being
    # viewed by Web clients.
    <FilesMatch "^\.ht">
    Order allow,deny
    Deny from all
    Satisfy All
    </FilesMatch>
    # ErrorLog: The location of the error log file.
    # If you do not specify an ErrorLog directive within a <VirtualHost>
    # container, error messages relating to that virtual host will be
    # logged here. If you do define an error logfile for a <VirtualHost>
    # container, that host's errors will be logged there and not here.
    ErrorLog "logs/error_log"
    # LogLevel: Control the number of messages logged to the error_log.
    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn
    <IfModule log_config_module>
    # The following directives define some format nicknames for use with
    # a CustomLog directive (see below).
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %>s %b" common
    <IfModule logio_module>
    # You need to enable mod_logio.c to use %I and %O
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
    </IfModule>
    # The location and format of the access logfile (Common Logfile Format).
    # If you do not define any access logfiles within a <VirtualHost>
    # container, they will be logged here. Contrariwise, if you do
    # define per-<VirtualHost> access logfiles, transactions will be
    # logged therein and not in this file.
    CustomLog "logs/access_log" common
    # If you prefer a logfile with access, agent, and referer information
    # (Combined Logfile Format) you can use the following directive.
    #CustomLog "logs/access_log" combined
    </IfModule>
    <IfModule alias_module>
    # Redirect: Allows you to tell clients about documents that used to
    # exist in your server's namespace, but do not anymore. The client
    # will make a new request for the document at its new location.
    # Example:
    # Redirect permanent /foo http://www.example.com/bar
    # Alias: Maps web paths into filesystem paths and is used to
    # access content that does not live under the DocumentRoot.
    # Example:
    # Alias /webpath /full/filesystem/path
    # If you include a trailing / on /webpath then the server will
    # require it to be present in the URL. You will also likely
    # need to provide a <Directory> section to allow access to
    # the filesystem path.
    # ScriptAlias: This controls which directories contain server scripts.
    # ScriptAliases are essentially the same as Aliases, except that
    # documents in the target directory are treated as applications and
    # run by the server when requested rather than as documents sent to the
    # client. The same rules about trailing "/" apply to ScriptAlias
    # directives as to Alias.
    ScriptAlias /cgi-bin/ "/usr/local/apache2/cgi-bin/"
    </IfModule>
    <IfModule cgid_module>
    # ScriptSock: On threaded servers, designate the path to the UNIX
    # socket used to communicate with the CGI daemon of mod_cgid.
    #Scriptsock logs/cgisock
    </IfModule>
    # "/usr/local/apache2/cgi-bin" should be changed to whatever your ScriptAliased
    # CGI directory exists, if you have that configured.
    <Directory "/usr/local/apache2/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
    </Directory>
    # DefaultType: the default MIME type the server will use for a document
    # if it cannot otherwise determine one, such as from filename extensions.
    # If your server contains mostly text or HTML documents, "text/plain" is
    # a good value. If most of your content is binary, such as applications
    # or images, you may want to use "application/octet-stream" instead to
    # keep browsers from trying to display binary files as though they are
    # text.
    DefaultType text/plain
    <IfModule mime_module>
    # TypesConfig points to the file containing the list of mappings from
    # filename extension to MIME-type.
    TypesConfig conf/mime.types
    # AddType allows you to add to or override the MIME configuration
    # file specified in TypesConfig for specific file types.
    #AddType application/x-gzip .tgz
    # AddEncoding allows you to have certain browsers uncompress
    # information on the fly. Note: Not all browsers support this.
    #AddEncoding x-compress .Z
    #AddEncoding x-gzip .gz .tgz
    # If the AddEncoding directives above are commented-out, then you
    # probably should define those extensions to indicate media types:
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz
    # AddHandler allows you to map certain file extensions to "handlers":
    # actions unrelated to filetype. These can be either built into the server
    # or added with the Action directive (see below)
    # To use CGI scripts outside of ScriptAliased directories:
    # (You will also need to add "ExecCGI" to the "Options" directive.)
    #AddHandler cgi-script .cgi
    # For type maps (negotiated resources):
    #AddHandler type-map var
    # Filters allow you to process content before it is sent to the client.
    # To parse .shtml files for server-side includes (SSI):
    # (You will also need to add "Includes" to the "Options" directive.)
    #AddType text/html .shtml
    #AddOutputFilter INCLUDES .shtml
    </IfModule>
    # The mod_mime_magic module allows the server to use various hints from the
    # contents of the file itself to determine its type. The MIMEMagicFile
    # directive tells the module where the hint definitions are located.
    #MIMEMagicFile conf/magic
    # Customizable error responses come in three flavors:
    # 1) plain text 2) local redirects 3) external redirects
    # Some examples:
    #ErrorDocument 500 "The server made a boo boo."
    #ErrorDocument 404 /missing.html
    #ErrorDocument 404 "/cgi-bin/missing_handler.pl"
    #ErrorDocument 402 http://www.example.com/subscription_info.html
    # MaxRanges: Maximum number of Ranges in a request before
    # returning the entire resource, or one of the special
    # values 'default', 'none' or 'unlimited'.
    # Default setting is to accept 200 Ranges.
    #MaxRanges unlimited
    # EnableMMAP and EnableSendfile: On systems that support it,
    # memory-mapping or the sendfile syscall is used to deliver
    # files. This usually improves server performance, but must
    # be turned off when serving from networked-mounted
    # filesystems or if support for these functions is otherwise
    # broken on your system.
    #EnableMMAP off
    #EnableSendfile off
    # Supplemental configuration
    # The configuration files in the conf/extra/ directory can be
    # included to add extra features or to modify the default configuration of
    # the server, or you may simply copy their contents here and change as
    # necessary.
    # Server-pool management (MPM specific)
    #Include conf/extra/httpd-mpm.conf
    # Multi-language error messages
    #Include conf/extra/httpd-multilang-errordoc.conf
    # Fancy directory listings
    #Include conf/extra/httpd-autoindex.conf
    # Language settings
    #Include conf/extra/httpd-languages.conf
    # User home directories
    #Include conf/extra/httpd-userdir.conf
    # Real-time info on requests and configuration
    #Include conf/extra/httpd-info.conf
    # Virtual hosts
    #Include conf/extra/httpd-vhosts.conf
    # Local access to the Apache HTTP Server Manual
    #Include conf/extra/httpd-manual.conf
    # Distributed authoring and versioning (WebDAV)
    #Include conf/extra/httpd-dav.conf
    # Various default settings
    #Include conf/extra/httpd-default.conf
    # Secure (SSL/TLS) connections
    #Include conf/extra/httpd-ssl.conf
    # Note: The following must must be present to support
    # starting without SSL on platforms with no /dev/random equivalent
    # but a statically compiled-in mod_ssl.
    LoadModule weblogic_module modules/mod_wl_22.so
    <IfModule mod_weblogic.c>
    WebLogicCluster 192.168.206.128:7003,192.168.206.128:7004
    MatchExpression *.jsp
    MatchExpression *.xyz
    </IfModule>
    <IfModule ssl_module>
    SSLRandomSeed startup builtin
    SSLRandomSeed connect builtin
    </IfModule>
    =====
    waiting for the reply :-
    Regards
    Shartad Jain

  • How to get the selected item of a ListBox if it's contents are binded data? (Please read)

    So, I am making an application in which binds data from a WebClient to a ListBox. Thus, it is needed to understand that I did not create this data, it is from a Web API. So my goal is to be able to click on any of the items in the list box(which are binded
    from a web API) and open a pop-up to display more data binded from that specific area.
    Example:
    The data has been loaded and I click on the 2nd item, well this item is a Metallica concert located in Russia blah blah.. ok, so I press it, it opens a pop up with more info like the date, location, etc...
    Info:
    I am binding the things in the lost box from and "events" statement, and I want the data in the list box in the pop up to display the selected child item, "event".
    Zack Bowling

    So are you storing that 'more info data' along with main data(i.e. that metallica concert etc.) somewhere in a List/observableCollection/database etc, if yes then probably it can be fetched directly from that collection. 
    e.g.
    private void listBox_Tap(object sender, System.Windows.Input.GestureEventArgs e)
    var Itemobj = (listboxname.SelectedItem) as ObjectClassname; string datevalue = Itemobj.date; string location = Itemobj.location;
    //so using Itemobj you can fetch the properties you want as stored in ObjectClassname.
    // Here ObjectClassname is the name of class storing the properties(setter-getter) for the parsed data.
    http://developer.nokia.com/community/wiki/Using_Crypto%2B%2B_library_with_Windows_Phone_8

  • How to bind the value of slider from C# code in windows phone 8.1..?

    Hi, I want to bind a custom seek bar to the position of media element.
    I think from XAML we can achieve it by 
         Value="{Binding ElementName=mediaElement, Path=Position, Mode=TwoWay, Converter={StaticResource FormatConverter}}"
    where FormatConverter is a converter class written to convert mediaElement object to slider value during binding.
    But I am creating the media element from code, so I want to write C# code to achieve the above. How to do it..?

    You can create the same binding in C# by instantiating a
    Binding class and setting its Path, Source, etc. properties. See the remarks in the Binding class docs and
    Creating bindings in code in the
    Data binding with XAML docs.
    That said, the Position updates significantly more frequently than you want to update the seek bar, so you may want to use polling rather than binding for this specific use (especially since you're already in the code behind rather than in the Xaml).

  • Binding shared variable in executable across network

    I can't seem to get a shared variable to bind from an executable on another computer back to a source variable on the main machine.
    I can get the remote variable to change with programmatic access.  Is it possible to have shared variables in an executable bind to a PSP URL on another computer?  This is labview 2011.
    I can see everything with NI Distributed System Manager, and the programmatic access changes the remote variable, so it's not a network issue.
    Thanks for any insights.  This just doesn't seem to work the way NI's online white papers say it shoud.

    What I don't understand is why after binding to a specific URL, the "Shared Variable Deployment" screen of the application builder makes the target "my computer". 
    I probably could get this to work if I changed the network address of "my computer" in the ini file created in Application Builder?
    This seem a strange way for this binding process to work.  If the absolute target (for shared variable bound to another variable and referencing "absolute") was retained when the VI goes through the application builder, it would make for sense.
    I can't get this to work any way with using bound variables.  The only way this works is using programmatic access to shared variables in the built app, and I don't consider this the same thing.
    My conclusion is that shared variable binding and appropriate absolute references to deployed variable libraries do not survive passing through the application builder with their absolute references intact.

  • Sdo_geometry bind variables in trace file

    If I run trace on oracle spatial queries, how can I get the detailed information of the sdo_geometry objects (the content of the sdo_geometry objects, e.g. coordinates... ) in the queries?
    Thanks!

    Hi Rob
    Haven't checked the bind variable issue specifically here, but just a by-pass-reflex-of-fixed-implementations, have you tried passing the geometry as WKT?
    Obviously, this can also have some constraints on the varchar2 length etc, but depending on the type of geometries (and consequent length of the WKT) it might help you working around it.
    Check this section for the appropriate sdo_geometry constructor based on a WKT input.
    http://docs.oracle.com/cd/B19306_01/appdev.102/b14255/sdo_objrelschema.htm#CBBFGHAE
    Just a thought
    Luc

  • Compass Server, Robots, Binding to IP address

    Hello,
    We're running iPlanet Compass server on top of iPlanet web server. We have been using the product for years now (back when it was called Catalog server). Anyway, we would really like the robot to bind to a specific IP address and use it when doing crawling.
    For example, our machine may have a primary IP address of 1.2.3.4. However, using IP aliasing, we may also have an IP address of 1.2.3.5 on it (same subnet). We would like to have the robot use the IP alias address instead of the primary address when doing crawling.
    Many servers allow for this ability (BIND and Postfix come to mind). This allows us to separate the 'service' from the server providing the service. If we need to move the service on to a different server, we simply migrate the IP address over to it the new server. The old server keeps its original IP address because it never had any connection to the service.
    Does this capability exist for the robots? Please note that I am NOT referring to the web server portion; I understand that the web servers can be configured to bind to a specific IP address, and we do that with great success. However, the crawlers (robots) all seem to want to use the primary address of the machine.
    I'm hoping there might be a setting in process.conf that we could add to enable this functionality.
    Thanks for any pointers,
    --Dave
    Argonne National Laboratory

    On other server (not problematic one) try;
    netstat -ano
    verify in the list if the ports 137, 138 and 139 are listed and listening or at least have
    *.* in foreign column. If not make sure File and Printer Sharing
    is bound to the connection.
    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]
    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

  • Session Binding Question

    Hello All,
    I might be missing something, but I am trying to bind a session when a user logs
    in and out of my web application in order to be able to actively track online usage,
    however I can't seem to get it to work.
    I would appreciate any help that may shed some light on the problem.
    I invoke the bind listener in a servlet thus:
    session.setAttribute("listener", listener);
    I have a simple BindListener Class:
    import javax.servlet.http.*;
    public class BindListener implements HttpSessionBindingListener
    public int numSessions = 0;
    public BindListener()
    public synchronized void valueBound(HttpSessionBindingEvent event)
    numSessions++;
    public synchronized void valueUnbound(HttpSessionBindingEvent event)
    numSessions--;
    public int getNumSessions()
    return numSessions;
    However when I call a jsp page to monitor the online connections with the command
    BindListener listener = new BindListener();
    listener.getNumSessions()
    It always reports a 0 value even though I have serveral sessions running.
    Can anyone help explain why the counter is not working?
    I would extremely grateful of any assistance on this issue.
    Thanks in advance.
    Regards
    Les,

    Greetings,
    I would appreciate any help that may shed some light
    on the problem.First, it's important to understand a couple things about binding listeners:
    1. A session binding listener is an object that listens for its own binding; IOW, it receives notifications when it specifically is bound to or unbound from the session; and
    2. A session binding listener is specific to the session to which it is bound.
    I invoke the bind listener in a servlet thus:
    session.setAttribute("listener", listener);After the container binds the specified listener instance to this particular session, it calls the object's valueBound method...
    Conversely, when (after) the object is removed from the session by calling
        session.removeAttribute( "listener" );or
        session.invalidate();  // Which implicitly calls the above ;)then it's valueUnbound method is called.
    I have a simple BindListener Class:
    import javax.servlet.http.*;
    public class BindListener implements
    HttpSessionBindingListener
    public int numSessions = 0;
    public BindListener()
    public synchronized void
    valueBound(HttpSessionBindingEvent event)Synchronizing this method only keeps multiple threads from concurrently calling it on this instance... Since it's the current container instance that calls these (container callback) methods, there will (should) be only one thread calling it...
    numSessions++;
    }numSessions will only ever be 1 (at most), since this method only gets called when the instance is bound to the session - which is only when your user logs in. Again, session objects ('listener' or otherwise), unless persisted, exist only for the life of the current session...
    public synchronized void
    valueUnbound(HttpSessionBindingEvent event)
    numSessions--;
    }Refer again to the above. Incidentally, what are you trying to achieve with this?
    public int getNumSessions()
    return numSessions;
    }Refer again to the above. :)
    However when I call a jsp page to monitor the online
    connections with the command
    BindListener listener = new BindListener();This simply invokes the class' constructor and - most importantly in this case ;) - creates a new instance of the class, and...
    listener.getNumSessions();
    It always reports a 0 value even though I haveSince this is a new instance whose 'numSessions' member is initialized to '0', the accessor is reporting correctly.
    To get an existing listener object for the current session use:
    <jsp:useBean id="listener" scope="session" class="BindListener"/>...then one of:
    <jsp:getProperty name="listener" property="numSessions"/>
    <%-- or --%>
    <%= listener.getNumSessions() %>Keep in mind, however, that the above only retrieves the listener object for, again, the current session and whose 'numSessions' will still only be '1' (as currently implemented ;).
    serveral sessions running.A session is a reference to a client's life in the application (refer to thread http://forum.java.sun.com/thread.jsp?forum=13&thread=249978 for further discussion on "session life"); one session cannot access the (in memory ;) information of other sessions...
    Can anyone help explain why the counter is not
    working?Refer again to all the above. :)
    I would extremely grateful of any assistance on this
    issue.If your goal is to track "online usage" then you're on the right track. However, as explained, the current implementation will only count the current session. To keep track of all sessions for a user your bean needs to persist and re-load the current count statistics for the user. The following illustrates:
    import java.io.*;
    import java.util.*;
    import javax.servlet.http.*;
    * <p>Tracks user login counts.  A count of user's accesses is stored
    * in a file within the webapp space.</p>
    * <p>NOTE: This class is intended only to illustrate a method for
    * managing persistent session tracking.</p>
    * @author     Tony "Vee Schade" Cook, [email protected]
    public class SessionTracker implements HttpSessionBindingListener
         * <p>Creates a new session tracking instance.
         * @param  sessionFile     the user specific session file.
        public SessionTracker( File sessionFile )
            this.sessionFile = sessionFile;
         * <p>Loads current session count.
        public void valueBound( HttpSessionBindingEvent event )
            Properties data = new Properties();
            try {
                data.load( new FileInputStream( sessionFile ) );
                numSessions = Integer.parseInt( data.getProperty( "count" ) );
            catch( Exception ex ) {
                /* Assume no persistent data, or corrupt/invalid...
                 * either way, accept default numSessions = 0
            /* Remember this session too! ;)
            numSessions++;
         * <p>Stores current session count for later retrieval.
        public void valueUnbound( HttpSessionBindingEvent event )
            Properties data = new Properties();
            data.setProperty( "count", Integer.toString( numSessions ) );
            try {
                data.store( new FileOutputStream( sessionFile ), sessionFile.toString() );
            catch( Exception ex ) {
                /* Sorry, Charley - "log" the error for the administrator.
                ex.printStackTrace();
         * <p>Returns current session count for this user.
        public int getNumSessions()
            return numSessions;
        private File sessionFile;
        private int numSessions;
    }The above should actually be using a database for the persistence if you also want to be able to efficiently access the count statistics from a separate session. Yet, the above illustrates what is needed (session persistence) and should get you started in the right direction. :)
    I hope this helps.
    Thanks in advance.
    Regards
    Les,Regards,
    Tony "Vee Schade" Cook

  • WebServer on sbRIO

    Hey Guys,
    I am trying to make a webserver application on an NI 9636 sbRIO. I think I have all the necessary software installed on the target.
    I have built the webserver Build Specification and I can see the deployed webserver under the "Deployed Web Services" option of the NI Web based Configuration & Monitoring tool (screenshot attached).
    I attached a demo project, which has the sbRIO target with a "static" folder (this includes index.html), and the webserver Build Specification. The deployed webserver is shown in the attached screenshot. When I try to open 192.168.1.180/RIO_WebService/static/index.html, I get error 404.
    Do you have any suggestions why I cannot open the index.html page?
    I almost forgot: With the exact same configuration steps, I can deploy and reach the webserver on a desktop pc without any problems.
    I hope I made it clear what the problem is. I you need any further information, please ask!
    Thanks in advance,
    Norbert
    Solved!
    Go to Solution.
    Attachments:
    _RIO_WebServer.zip ‏9 KB
    Web Based Config and Monitor Screenshot.png ‏67 KB

    Hi Norbert and welcome to NI Forums!
    Did you try to access it using the port configued in the Web Application Server? So in your case, 192.168.1.180:8080/RIO_WebService/static/index.html or something similar.
    The web service setup looks good to me.
    Kind regards:
    Andrew Valko
    NI Hungary
    Andrew Valko
    National Instruments Hungary

  • Binding more than one IP address to a server instance

    I know that it is possible to bind multiple IP addresses to multiple server
              instances. But is it possible to bind more than one IP address to just one
              server instance? If so, how can it be done?
              Thanks in advance,
              David Chen
              

    No...it won't work, I misunderstood your post. There is no way you can tell
              a WL instance to bind to multiple IPs...Sorry about that.
              .raja
              "Mike Reiche" <[email protected]> wrote in message
              news:[email protected]...
              >
              > no... I don't think it (not specifying a bindAddr to have WL bind on all
              NICs)
              > will work. You will have two WL instances trying to bind to the same
              IP/Port -
              > which is not allowed.
              >
              > Or did you mean something else.
              >
              > There is no way/syntax to ask WL to bind to two specific IP addresses.
              >
              > Mike
              >
              > "Raja Mukherjee" <[email protected]> wrote:
              > >Mike,
              > >
              > >It will work if both NIC1 and NIC2 are on the same nework. In David's
              > >case,
              > >the NICs are part of different subnet. WLS cluster is only supported
              > >on the
              > >same network.
              > >
              > >..raja
              > >
              > >"Mike Reiche" <[email protected]> wrote in message
              > >news:[email protected]...
              > >>
              > >> Are you running two instances on the same machine in the same cluster
              > >and
              > >you want
              > >> them all to listen on both NICs? That is the only thing I don't know
              > >how
              > >to do.
              > >>
              > >> You would need to four IP addresses -
              > >>
              > >> nic1 / instance1 - 208.8.7.1
              > >> nic2 / instance1 - 208.8.7.2
              > >>
              > >> nic1 / instance2 - 208.8.7.3
              > >> nic2 / instance2 - 208.8.7.4
              > >>
              > >> then somehow you would need to specify the following - HOWEVER, THERE
              > >IS
              > >NO DOCUMENTED
              > >> WAY TO DO THIS. Open a case with BEA support.
              > >>
              > >> on instance 1
              > >>
              > >> bindAddr=208.8.7.1,208.8.7.2 # don't know what the syntax is
              > >>
              > >> and on instance 2
              > >>
              > >> bindAddr=208.8.7.3,208.8.7.4 # don't know what the syntax is
              > >>
              > >> MIke
              > >>
              > >> "Raja Mukherjee" <[email protected]> wrote:
              > >> >David,
              > >> >
              > >> >From what I understood from your email, if you want to add additional
              > >> >instance for "internal" network and that solves your problem, you
              > >don't
              > >> >need
              > >> >additional licenses. Again, I am not an expert on licensing , last
              > >I
              > >> >knew,
              > >> >the WL licenses are not charged by instances but by CPUs. As long
              > >as
              > >> >you not
              > >> >adding more CPU you don't need additional license for WL. Please check
              > >> >with
              > >> >your account rep to verify that.
              > >> >
              > >> >Are we talking about a requirement where the "same" application to
              > >be
              > >> >accessed by both "internal" as well as the "external" clients? If
              > >so,
              > >> >a
              > >> >simple firewall configuration of allowing traffic from "internal"
              > >network
              > >> >to
              > >> >the "external" network only to WLS port would do the trick. Also make
              > >> >sure
              > >> >that the firewall only allows incoming traffic for the ones originated
              > >> >from
              > >> >"internal" network. There are other possible options, but I need to
              > >know
              > >> >more about your configuration.
              > >> >
              > >> >Last but not the least, if you had given the information to the group
              > >> >instead of sending personal email, you would have probably gotten
              > >faster
              > >> >response. There are a lot of good and experienced folks in this
              > >newsgroup.
              > >> >
              > >> >I don't mind being your friend at all, couple of Bud light would be
              > >a
              > >> >good
              > >> >start :)
              > >> >
              > >> >..raja
              > >> >
              > >> >"David Chen" <[email protected]> wrote in message
              > >> >news:[email protected]...
              > >> >> Good guess, Raja. We do have two NICs and two separate networks.
              > >I
              > >> >think
              > >> >> Mike's answer is correct according the documentation. However, in
              > >our
              > >> >case,
              > >> >> since we are using cluster, we have to specify "bindAddr" (is that
              > >> >right?).
              > >> >>
              > >> >> Unfortunately, I am not the David Chen from Dallas. But I would
              > >not
              > >> >mind
              > >> >to
              > >> >> be a friend of yours, Raja :)
              > >> >>
              > >> >> Thanks,
              > >> >>
              > >> >> David Chen
              > >> >>
              > >> >>
              > >> >>
              > >> >> "Raja Mukherjee" <[email protected]> wrote in message
              > >> >> news:[email protected]...
              > >> >> > If my guess is correct, they have two NICs and two separate
              > >> >> networks...let's
              > >> >> > see what are they really trying to achieve. I may have emails
              > >on
              > >> >my
              > >> >> mailbox
              > >> >> > (I know a David Chen from Dallas, is that you David??) which I
              > >can
              > >> >not
              > >> >> check
              > >> >> > right now...
              > >> >> >
              > >> >> > .raja
              > >> >> >
              > >> >> > "Mike Reiche" <[email protected]> wrote in message
              > >> >> > news:[email protected]...
              > >> >> > >
              > >> >> > > If you do not specify a bindAddr, it automatically binds to
              > >all
              > >> >IP
              > >> >> > addresses on
              > >> >> > > that machine.
              > >> >> > >
              > >> >> > > Mike
              > >> >> > >
              > >> >> > > "David Chen" <[email protected]> wrote:
              > >> >> > > >I know that it is possible to bind multiple IP addresses to
              > >multiple
              > >> >> > > >server
              > >> >> > > >instances. But is it possible to bind more than one IP address
              > >> >to
              > >> >just
              > >> >> > > >one
              > >> >> > > >server instance? If so, how can it be done?
              > >> >> > > >
              > >> >> > > >Thanks in advance,
              > >> >> > > >
              > >> >> > > >David Chen
              > >> >> > > >
              > >> >> > > >
              > >> >> > >
              > >> >> >
              > >> >> >
              > >> >>
              > >> >>
              > >> >
              > >> >
              > >>
              > >
              > >
              >
              

  • Binding static port for rpc service

    I want to start a RPC server in a specific TCP port.
    The default behaviour is that the server chooses some arbitrary port and registers itself with the port-mapper (rpcbind). This is not good for me as I need to work throught a firewall. The first access to the port mapper (port 111) is fine. I don't need to make the client go directly to the my server.
    But how to start the server in a specific port?
    I read in some news group about openning the socket myself, and then using svctvp_create + svc_reg or the same with TLI, but till now I was not able to put this to work.
    Any help will be appreciated.
    Regards,
    Oren.

    Do a man on bind(). This API allows you to bind to a specific port.

Maybe you are looking for