FAQs - SAS and Web Server

  1. I created a test program using SnmpTarget. When I run it in Internet Explorer 4, I get the following message. com.ms.security.security.ExceptionEx [com/adventnet/snmp/snmp2/SnmpSession.op en}: cannot access 6001. What do I do?

  2. Does WebNMS's SAS work with Apache as the web server or does it run only with the WebNMS Web Server? Does the WebNMS Web Server run with Linux PC?

  3. I want to load applet that I created through the applet viewer. What should I do?

  4. I want to view the applet that I created in a web browser. What should I do?

  5. How do I make my applet connect to SAS when it is loaded through the web server?

  6. The SAS server runs in my web server host. Why does not my applet connect to SAS?

  7. Why do I get an Applet Security exception when I load a MIB file in the example applet that I developed?

  8. Why do I get a Security exception while locally loading a MIB file in the MibBrowser applet using Netscape?

  9. After starting the Web Server/SAS, if I try to connect through the browser by giving the URL http://localhost:8282, I get the "remote machine timed out" error. However, I can see the web server running at port 8282.

1. I created a test program using SnmpTarget. When I run it in Internet Explorer 4, I get the following message.com.ms.security.security.ExceptionEx[com/adventnet/snmp/snmp2/SnmpSession.open}: cannot access 6001. What do I do?

 

By default, IE4 does not allow Java applets to open sockets. You need to explicitly modify the browser settings or enable Java applets to use network ports.

 

SAS, provided with WebNMS SNMP, can be used to get rid of the security-related problems. The distribution includes an integrated web server and SAS, which is used to load the applet. This involves running the server, and loading the applet of the server. Refer the SAS documentation for details on running and using the SAS.

 

Questions

 

2. Does WebNMS's SAS work with Apache as the web server or does it run only with the WebNMS Web Server? Does the WebNMS Web Server run with Linux PC?

 

The WebNMS SAS server can run with any web server. The web server that is bundled along with the product is platform independent.

 

Questions

 

3. I want to load applet that I created through the applet viewer. What should I do?

 

The HTML file should contain the name of the applet's class file within the applet tags. You need to set CLASSPATH to the WebNMS classes and the necessary JDK classes, such as swingall.jar, and give one of the following commands.

 

appletviewer// will work for the JDK's between 1.1.6 and 1.2

appletviewer -J-Xbootclasspath:// For JDK 1.2

appletviewer http:// //will work in all JDK versions

 

 

Questions

 

4. I want to view the applet that I created in a web browser. What should I do?

 

You need to create a jar file that contains the example you have created and copy the jar file to the WebNMS classes directory. Ensure that the web server and the SAS is started and load the html file.

 

http://localhost:8282/

 

If the applets contain any JFC/Swing components, you need to include a few additional lines in the HTML file so that the web browsers invoke the proper plug-in. Then load the applet and check if it runs both in IE and Netscape. The complete HTML file to load an example applet is given in the following link.

This HTML file loads the applet by setting the code and codebase values. The following line needs to be included to load the applet by using the jar.

 

PARAM NAME = ARCHIVE VALUE = jar file name

 

Questions

 

5. How do I make my applet connect to SAS when it is loaded through the web server?

 

If you use low-level API, use the SnmpSession.open(api) instead of SnmpSession.open() when you open the Snmp Session in your applet. This automatically connects to SAS if it is alive. If you use Beans components, use the applet constructor instead of the default constructor.

Questions

 

6. The SAS server runs in my web server host. Why does not my applet connect to SAS?

 

SAS creates a file called SASPort.html when it is stared. The applet looks for that file to get the port number to connect to SAS. The file has to be created in the same directory in which your applet HTML file is present. Use the -d option to specify the directory for the SASPort file and make sure your applet HTML file is in this directory.

Questions

 

7. Why do I get an Applet Security exception when I load a MIB file in the example applet that I developed?

 

This is because your applet classes are not in the CLASSPATH. If your applet is loaded from code base, which is not in you CLASSPATH, in your HTML file, you can neither read/write files nor connect to any remote hosts.

Questions

 

8. Why do I get a Security exception while locally loading a MIB file in the MibBrowser applet using Netscape?

 

Netscape4.x does not allow classes loaded from the local system to access the disk unless they are signed. One option is to add the following line to prefs.js in Netscape users directory if you wish to use from local system.

 

user_pref(signed.applets.low_security_for_local_classes", true);

 

The other option is to put the classes in a jar file and sign them.

Questions

 

9. After starting the Web Server/SAS, if I try to connect through the browser by giving the URL http://localhost:8282, I get the "remote machine timed out" error. However, I can see the web server running at port 8282.

 

This error can occur if the web browser settings having the proxy connections enabled. This is because some proxy servers cannot resolve to the localhost. You can give the host name of the machine instead of localhost or you can disable the proxy settings in the browser.

Questions



Copyright © 2012, ZOHO Corp. All Rights Reserved.