<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Java Applet from VMS Web Server in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/java-applet-from-vms-web-server/m-p/3886787#M35788</link>
    <description>Hi Bojan,&lt;BR /&gt;&lt;BR /&gt;Thanks for the reply.&lt;BR /&gt;&lt;BR /&gt;[I have just try to point the codebase to another server. This works. So the host from which the applet is downloaded can be a different host from which the html was downloaded.]&lt;BR /&gt;&lt;BR /&gt;Excellent! So if I understand you correctly, Any (socket) connect from the applet has to go to where the original html page was downloaded from *or* where the applet is downloaded from (if different).&lt;BR /&gt;&lt;BR /&gt;Is that correct?&lt;BR /&gt;&lt;BR /&gt;If so, what protocol, does the original html server use when accessing the codebase server to download the applet? More straight html on 8080? I'd just like to know what infrastructure is reqd on the "Applet Hosting or Codebase" server. &lt;BR /&gt;&lt;BR /&gt;(Or does the client Web Browser seek the applet from the codebase directly and not via the original html hosting server?)&lt;BR /&gt;&lt;BR /&gt;Not knowing what exactly the "codebase parameter" is I was rather hoping that I could have had a html server, html page, and Java applet on a UNIX server but be able to point the codebase to my VMS server for Socket connection rules. Can you please confirm that I have understood you correctly and that this is *not* possible?&lt;BR /&gt;&lt;BR /&gt;I do appreciate that you have given me alternatives such as Applet signing.&lt;BR /&gt;&lt;BR /&gt;But let me also check that this works: UNIX Server, hosting html Web-Page with codebase pointing to a VMS (presumably html Web?) server hosting the Applet which can subsequently socket connect back to the VMS server from the Applet running in the context of the clients browser?&lt;BR /&gt;&lt;BR /&gt;Thanks again!&lt;BR /&gt;&lt;BR /&gt;Cheers Richard Maher</description>
    <pubDate>Thu, 26 Oct 2006 18:01:27 GMT</pubDate>
    <dc:creator>Richard J Maher</dc:creator>
    <dc:date>2006-10-26T18:01:27Z</dc:date>
    <item>
      <title>Java Applet from VMS Web Server</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/java-applet-from-vms-web-server/m-p/3886778#M35779</link>
      <description>&lt;P&gt;Hi, &lt;BR /&gt;&lt;BR /&gt;Does anyone have an example of the commands involved in creating and storing a small Java Applet on a VMS system?&lt;BR /&gt;&lt;BR /&gt;I want to be able to activate the Applet from a page in a Web Broswer and link back to the same (or other) VMS server via a TCP/IP socket.&lt;BR /&gt;&lt;BR /&gt;Pointers to the "specific" documentation will also be very welcome.&lt;BR /&gt;&lt;BR /&gt;Below is a bit more detail copied from my post in comp.os.vms.&lt;BR /&gt;&lt;BR /&gt;Regards Richard Maher&lt;BR /&gt;&lt;BR /&gt;1) It looks like you have to create a Java Applet for the Socket stuff. This&lt;BR /&gt;seems secure and kosher and de rigueur for everyone outside of the VMS "chip&lt;BR /&gt;on each shoulder" brigade. See: -&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://java.sun.com/sfaq/#socket" target="_blank"&gt;http://java.sun.com/sfaq/#socket&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;2) This from some Java Socket discussion page on what the Applet(s) should&lt;BR /&gt;contain: -&lt;BR /&gt;&lt;BR /&gt;Creating a client&lt;BR /&gt;&lt;BR /&gt;To talk to a server, open a socket to the machine and port:&lt;BR /&gt;&lt;BR /&gt;Socket s = new Socket("mastercard.com", 303); // port 303&lt;BR /&gt;&lt;BR /&gt;When this returns, you can get input/output streams:&lt;BR /&gt;&lt;BR /&gt;OutputStream out = s.getOutputStream();&lt;BR /&gt;PrintStream pout = new PrintStream(out);&lt;BR /&gt;pout.println("hi from java client");&lt;BR /&gt;pout.close();&lt;BR /&gt;s.close();&lt;BR /&gt;&lt;BR /&gt;The client's input stream is pulling from the server's output stream and&lt;BR /&gt;vice versa.&lt;BR /&gt;&lt;BR /&gt;3) See the following link for a COBOL example of an INETd server listening&lt;BR /&gt;on port# 303. The truly amazing bit about this example is that it shows a&lt;BR /&gt;VMS server participating in a ACID proof 2PC with a transaction started on a&lt;BR /&gt;W2K server! But let's ignore that for the moment and concentrate on the&lt;BR /&gt;simple message passing mechanism. What could be easier than this: -&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://community.hpe.com/t5/General-Feedback-and-Suggestions/New-Forum-Locations-by-ITRC-Tree/td-p/4802433" target="_blank"&gt;https://community.hpe.com/t5/General-Feedback-and-Suggestions/New-Forum-Locations-by-ITRC-Tree/td-p/4802433&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Please look at my COBOL code in this thread as an example of how easy it&lt;BR /&gt;would be to fire-up your existing COBOL functionality from a Web client.&lt;BR /&gt;&lt;BR /&gt;I don't think I'm going out on a limb here to ask "What could be easier?".&lt;BR /&gt;Many people here are all pushing their own barrows with&lt;BR /&gt;Python/CGI/OSU/Apache but, if you find that (for whatever reason) you are&lt;BR /&gt;unable to locate the skill level in this, or any other forum, to show you&lt;BR /&gt;how to build a simple Java applet then I guess that you'll have to resort to&lt;BR /&gt;your clients support contract :-( I'm available for free to help you out&lt;BR /&gt;with any trouble on the VMS side&lt;/P&gt;</description>
      <pubDate>Tue, 11 Apr 2017 08:35:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/java-applet-from-vms-web-server/m-p/3886778#M35779</guid>
      <dc:creator>Richard J Maher</dc:creator>
      <dc:date>2017-04-11T08:35:18Z</dc:date>
    </item>
    <item>
      <title>Re: Java Applet from VMS Web Server</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/java-applet-from-vms-web-server/m-p/3886779#M35780</link>
      <description>Richard,&lt;BR /&gt;&lt;BR /&gt;How much detail do you want?&lt;BR /&gt;&lt;BR /&gt;From my experience you'll need to build the applet code and convert it into a java archive (.JAR) file. Under VMS this is a case of starting the Java environment and running the commands:&lt;BR /&gt;&lt;BR /&gt;javac class.java&lt;BR /&gt;jar cvf class.jar class.java&lt;BR /&gt;&lt;BR /&gt;Something like eclipse could be used on a PC as this provides far better debugging support for java.&lt;BR /&gt;&lt;BR /&gt;Once you have the applet it should be just a case of embedding it within the HTML page:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;  &lt;BR /&gt;      &lt;APPLET code="xxxx.class " archive="xxxx.jar" width="1024&amp;lt;BR"&gt; height=200&amp;gt;&lt;BR /&gt;        &lt;PARAM name="portnumber" value="20000" /&gt;&lt;BR /&gt;        alt="Your browser understands the &amp;lt;APPLET&amp;gt; tag but isn't running t&lt;BR /&gt;he applet, for some reason."&lt;BR /&gt;        Your browser is completely ignoring the &amp;lt;APPLET&amp;gt; tag!&lt;BR /&gt;      &lt;/APPLET&gt;&lt;BR /&gt;  &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;And making sure its in the location reference by the HTML.&lt;BR /&gt;&lt;BR /&gt;In our code we pass the port number to the applet so that it can talk back to the applications.&lt;BR /&gt;&lt;BR /&gt;According to the docs. the applet should only try to talk back to the host WebServer. &lt;BR /&gt;&lt;BR /&gt;cheers&lt;BR /&gt;&lt;BR /&gt;Brian&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 26 Oct 2006 02:20:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/java-applet-from-vms-web-server/m-p/3886779#M35780</guid>
      <dc:creator>Brian Reiter</dc:creator>
      <dc:date>2006-10-26T02:20:55Z</dc:date>
    </item>
    <item>
      <title>Re: Java Applet from VMS Web Server</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/java-applet-from-vms-web-server/m-p/3886780#M35781</link>
      <description>Richard&lt;BR /&gt;&lt;BR /&gt; Write your applet and copy the class files or a jar file containing all classes in a directory served by a Web server. Create a html file with an &lt;APPLET&gt; tag with the code attribute pointing to yours applet class the codebase attribute to the directory containing the classes or the jar file and if you have all packed in a jar file the archive attribute with the name of jar. Maybe an example (taken from the sun tutorial):&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;APPLET code="HelloWorld.class" codebase="https://community.hpe.com/examples/" archive="helloWorld.jar" width="150" height="30"&gt;&lt;/APPLET&gt;&lt;BR /&gt;&lt;BR /&gt;this means that the java class is HelloWorld which stays in a jar file named helloWorld.jar which is in the subdirectory (relative to the html source directory) called examples.&lt;BR /&gt;&lt;BR /&gt;Applets tutorial:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://java.sun.com/docs/books/tutorial/deployment/applet/index.html" target="_blank"&gt;http://java.sun.com/docs/books/tutorial/deployment/applet/index.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Now abbout the TCPIP socket. The Java Applet security forbids opening sockets to another server! So you can open a socket only to the server from which the applet was downloaded.&lt;BR /&gt;&lt;BR /&gt;Abbout "What could be easier?":&lt;BR /&gt;&lt;BR /&gt;Try this:&lt;BR /&gt;&lt;BR /&gt;COBOL (T.COB)&lt;BR /&gt;&lt;BR /&gt;identification division.&lt;BR /&gt;program-id. t.&lt;BR /&gt;procedure division.&lt;BR /&gt;aaa.&lt;BR /&gt;    display "Hello world"&lt;BR /&gt;    stop run.&lt;BR /&gt;&lt;BR /&gt;Command procedure for the TCPIP service (T.COM)&lt;BR /&gt;$ open/read/write net sys$net&lt;BR /&gt;$ define/user sys$input net&lt;BR /&gt;$ define/user sys$output net&lt;BR /&gt;$ run t&lt;BR /&gt;&lt;BR /&gt;And in TCPIP:&lt;BR /&gt;&lt;BR /&gt;TCPIP&amp;gt; SET SERVICE xxx /PORT=port -&lt;BR /&gt;    /FILE=dev:[dir]T.COM -&lt;BR /&gt;    /USER=username/PROCESS=processname&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Bojan&lt;/APPLET&gt;</description>
      <pubDate>Thu, 26 Oct 2006 02:34:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/java-applet-from-vms-web-server/m-p/3886780#M35781</guid>
      <dc:creator>Bojan Nemec</dc:creator>
      <dc:date>2006-10-26T02:34:17Z</dc:date>
    </item>
    <item>
      <title>Re: Java Applet from VMS Web Server</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/java-applet-from-vms-web-server/m-p/3886781#M35782</link>
      <description>Hi Brian, Bojan,&lt;BR /&gt;&lt;BR /&gt;Thanks for the replies!&lt;BR /&gt;&lt;BR /&gt;&amp;gt; How much detail do you want?&lt;BR /&gt;&lt;BR /&gt;Ideally Brian, I will give you the spec of a simple server that will take a Surname from a Web page via a TCP/IP socket and retrieve all Employees from the mf_personnel.employees table and Send them back on the very same socket to populate the web page with the list of matching employees.&lt;BR /&gt;&lt;BR /&gt;Would you be interested? Should I go ahead and code the VMS server side now? I'll give you numerous beers :-)&lt;BR /&gt;&lt;BR /&gt;&amp;gt; In our code we pass the port number &lt;BR /&gt;&amp;gt; to the applet so that it can talk back &lt;BR /&gt;&amp;gt; to the applications.&lt;BR /&gt;&lt;BR /&gt;So are you already doing this in production? Are the pages and applets publicly accessible? &lt;BR /&gt;&lt;BR /&gt;&amp;gt; According to the docs. the applet should&lt;BR /&gt;&amp;gt; only try to talk back to the host&lt;BR /&gt;&amp;gt; WebServer.&lt;BR /&gt;&lt;BR /&gt;Then Bojan said: -&lt;BR /&gt;&lt;BR /&gt;&amp;gt; The Java Applet security forbids opening&lt;BR /&gt;&amp;gt; sockets to another server! So you can &lt;BR /&gt;&amp;gt; open a socket only to the server from&lt;BR /&gt;&amp;gt; which the applet was downloaded.&lt;BR /&gt; &lt;BR /&gt;From the following at the Sun website that I referenced: -&lt;BR /&gt;&lt;BR /&gt;[How can an applet open a network connection to a computer on the internet? &lt;BR /&gt;&lt;BR /&gt;Applets are not allowed to open network connections to any computer, except for the host that provided the .class files. This is either the host where the html page came from, or the host specified in the codebase parameter in the applet tag, with codebase taking precendence.]&lt;BR /&gt;&lt;BR /&gt;Can the host "specified in the codebase parameter" not be different to the host from which the Applet was downloaded?  &lt;BR /&gt;&lt;BR /&gt;Thanks for the tutorial reference. I've got some reading to do.&lt;BR /&gt;&lt;BR /&gt;I especially liked the Initialize and Destroy methods!!! Absolutely designed for opening a socket and tearing it down!&lt;BR /&gt;&lt;BR /&gt;Why isn't everyone doing this? IPsec is around the corner but VPNs and intranets have been here for years.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; Abbout "What could be easier?"&lt;BR /&gt;&lt;BR /&gt;I concede fully that your example is easier. The contrast I was attempting to draw was with CGI scripting, Web Services etc etc. &lt;BR /&gt;&lt;BR /&gt;In my AUXS example I now have a working socket that can be PEEKed but yours is about as easy as you can get. &lt;BR /&gt;&lt;BR /&gt;In real life the server will be a AST multi-threaded Listener that will allocate work to a farm of Execution Server processes. Please see attached document for what we've been doing from PCs for years but would now like to do from a Web Browser.&lt;BR /&gt;&lt;BR /&gt;Thanks again!&lt;BR /&gt;&lt;BR /&gt;Cheers Richard Maher</description>
      <pubDate>Thu, 26 Oct 2006 07:24:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/java-applet-from-vms-web-server/m-p/3886781#M35782</guid>
      <dc:creator>Richard J Maher</dc:creator>
      <dc:date>2006-10-26T07:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: Java Applet from VMS Web Server</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/java-applet-from-vms-web-server/m-p/3886782#M35783</link>
      <description>&lt;P&gt;Do you want to stick to Java, or another way is possible ? &lt;BR /&gt;&lt;BR /&gt;Have you seen at &lt;A href="http://www.vmspython.org/doku.php" target="_blank"&gt;http://www.vmspython.org/doku.php&lt;/A&gt;&lt;BR /&gt;all the stuff about Webware for Python ?&lt;BR /&gt;&lt;BR /&gt;It may be compared to Ruby on Rails, using Python instead of Ruby, and lighter.&lt;BR /&gt;&lt;BR /&gt;Watch the video installation&lt;BR /&gt;&lt;A href="http://www.vmspython.org/doku.php" target="_blank"&gt;http://www.vmspython.org/doku.php&lt;/A&gt;&lt;BR /&gt;and see how easy it is to have some basic forms&lt;BR /&gt;&lt;BR /&gt;Have a look at Cheetah - The Python-Powered Template Engine &lt;BR /&gt;and the demonstrations&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Apr 2017 08:37:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/java-applet-from-vms-web-server/m-p/3886782#M35783</guid>
      <dc:creator>labadie_1</dc:creator>
      <dc:date>2017-04-11T08:37:16Z</dc:date>
    </item>
    <item>
      <title>Re: Java Applet from VMS Web Server</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/java-applet-from-vms-web-server/m-p/3886783#M35784</link>
      <description>Richard,&lt;BR /&gt;&lt;BR /&gt;If you goal is an AST-based server, there is likely no need to have separate worker processes to do the name lookups. For RMS, these can also be AST based.&lt;BR /&gt;&lt;BR /&gt;If you are using a database system that does not interact well with multiple AST threads, then a single worker thread for the database (which then hands things back to the AST based code) will likely do the trick.&lt;BR /&gt;&lt;BR /&gt;In short, before going to the effort of implementing worker processes, I would carefully check if they really help. In many cases, the transaction volume just does not justify the effort.&lt;BR /&gt;&lt;BR /&gt;- Bob Gezelter, &lt;A href="http://www.rlgsc.com" target="_blank"&gt;http://www.rlgsc.com&lt;/A&gt;</description>
      <pubDate>Thu, 26 Oct 2006 08:14:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/java-applet-from-vms-web-server/m-p/3886783#M35784</guid>
      <dc:creator>Robert Gezelter</dc:creator>
      <dc:date>2006-10-26T08:14:26Z</dc:date>
    </item>
    <item>
      <title>Re: Java Applet from VMS Web Server</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/java-applet-from-vms-web-server/m-p/3886784#M35785</link>
      <description>Hi Richard&lt;BR /&gt;&lt;BR /&gt;I wish it was publicly available, we've been trying to get our client(s) past the prototype phase (they're government based and as such have far too many commitees and consultants in the mix).&lt;BR /&gt;&lt;BR /&gt;Have you considered plain CGI scripting via a WebServer? We use WASD and a mix of DCL and VMS executables (Pascal based) to dip into the system and recover and format reports etc for our prototype system. &lt;BR /&gt;&lt;BR /&gt;In our case the Applet is used to display an overview of the system status, the sole purpose of which is to let remote engineers know at a glance of something external to the system is broken.&lt;BR /&gt;&lt;BR /&gt;FWIW I've attached a very much cut down and canabalised version of the applet. It creates a thread to look after reads on the socket. Its easy enough to do in Java (although editing and compiling java under VMS is a pain :) )&lt;BR /&gt;&lt;BR /&gt;cheers&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Brian</description>
      <pubDate>Thu, 26 Oct 2006 08:32:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/java-applet-from-vms-web-server/m-p/3886784#M35785</guid>
      <dc:creator>Brian Reiter</dc:creator>
      <dc:date>2006-10-26T08:32:41Z</dc:date>
    </item>
    <item>
      <title>Re: Java Applet from VMS Web Server</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/java-applet-from-vms-web-server/m-p/3886785#M35786</link>
      <description>Thanks Brian, I really appreciate your help!&lt;BR /&gt;&lt;BR /&gt;Hope it works out at your site.&lt;BR /&gt;&lt;BR /&gt;Cheers Richard Maher.&lt;BR /&gt;&lt;BR /&gt;PS. CGI is insulating tape and fencing-wire! It is to middleware what ODBC Store-Procedures were to Remote Procedure Calls. Still we're all doing Web-Services now anyway (not) catch-up :-)&lt;BR /&gt;&lt;BR /&gt;Good luck with those WS-AT transactions BTW.</description>
      <pubDate>Thu, 26 Oct 2006 08:52:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/java-applet-from-vms-web-server/m-p/3886785#M35786</guid>
      <dc:creator>Richard J Maher</dc:creator>
      <dc:date>2006-10-26T08:52:52Z</dc:date>
    </item>
    <item>
      <title>Re: Java Applet from VMS Web Server</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/java-applet-from-vms-web-server/m-p/3886786#M35787</link>
      <description>&lt;P&gt;Richard,&lt;BR /&gt;&lt;BR /&gt;[Can the host "specified in the codebase parameter" not be different to the host from which the Applet was downloaded?]&lt;BR /&gt;&lt;BR /&gt;No, the Applet is downloaded from the host specified in codebase.&lt;BR /&gt;&lt;BR /&gt;I have just try to point the codebase to another server. This works. So the host from which the applet is downloaded can be a different host from which the html was downloaded.&lt;BR /&gt;&lt;BR /&gt;You can owercome this problem with two solutions:&lt;BR /&gt;&lt;BR /&gt;1) Create an intermediate TCPIP service on the host which is serving the Applet. This service is then responsable to contact other servers and relay the data flow from the Applet to the server and vice versa.&lt;BR /&gt;&lt;BR /&gt;2) You can modify the Applet security or create a so called "signed Applet". See this nice (and short) tutorial:&lt;BR /&gt;&lt;BR /&gt;www-personal.umich.edu/~lsiden/tutorials/signed-applet/signed-applet.html&lt;BR /&gt;&lt;BR /&gt;Bojan&lt;/P&gt;</description>
      <pubDate>Tue, 11 Apr 2017 08:39:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/java-applet-from-vms-web-server/m-p/3886786#M35787</guid>
      <dc:creator>Bojan Nemec</dc:creator>
      <dc:date>2017-04-11T08:39:00Z</dc:date>
    </item>
    <item>
      <title>Re: Java Applet from VMS Web Server</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/java-applet-from-vms-web-server/m-p/3886787#M35788</link>
      <description>Hi Bojan,&lt;BR /&gt;&lt;BR /&gt;Thanks for the reply.&lt;BR /&gt;&lt;BR /&gt;[I have just try to point the codebase to another server. This works. So the host from which the applet is downloaded can be a different host from which the html was downloaded.]&lt;BR /&gt;&lt;BR /&gt;Excellent! So if I understand you correctly, Any (socket) connect from the applet has to go to where the original html page was downloaded from *or* where the applet is downloaded from (if different).&lt;BR /&gt;&lt;BR /&gt;Is that correct?&lt;BR /&gt;&lt;BR /&gt;If so, what protocol, does the original html server use when accessing the codebase server to download the applet? More straight html on 8080? I'd just like to know what infrastructure is reqd on the "Applet Hosting or Codebase" server. &lt;BR /&gt;&lt;BR /&gt;(Or does the client Web Browser seek the applet from the codebase directly and not via the original html hosting server?)&lt;BR /&gt;&lt;BR /&gt;Not knowing what exactly the "codebase parameter" is I was rather hoping that I could have had a html server, html page, and Java applet on a UNIX server but be able to point the codebase to my VMS server for Socket connection rules. Can you please confirm that I have understood you correctly and that this is *not* possible?&lt;BR /&gt;&lt;BR /&gt;I do appreciate that you have given me alternatives such as Applet signing.&lt;BR /&gt;&lt;BR /&gt;But let me also check that this works: UNIX Server, hosting html Web-Page with codebase pointing to a VMS (presumably html Web?) server hosting the Applet which can subsequently socket connect back to the VMS server from the Applet running in the context of the clients browser?&lt;BR /&gt;&lt;BR /&gt;Thanks again!&lt;BR /&gt;&lt;BR /&gt;Cheers Richard Maher</description>
      <pubDate>Thu, 26 Oct 2006 18:01:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/java-applet-from-vms-web-server/m-p/3886787#M35788</guid>
      <dc:creator>Richard J Maher</dc:creator>
      <dc:date>2006-10-26T18:01:27Z</dc:date>
    </item>
    <item>
      <title>Re: Java Applet from VMS Web Server</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/java-applet-from-vms-web-server/m-p/3886788#M35789</link>
      <description>Richard,&lt;BR /&gt;&lt;BR /&gt;[Excellent! So if I understand you correctly, Any (socket) connect from the applet has to go to where the original html page was downloaded from *or* where the applet is downloaded from (if different).]&lt;BR /&gt;&lt;BR /&gt;That is correct.&lt;BR /&gt;&lt;BR /&gt;The protocol is http so you need a http server on the VMS system. The codebase parameter is an URI which is the base path to the served directory where the classes or jar are located . The browser will download the classes to the local cache and run the applets.&lt;BR /&gt;&lt;BR /&gt;My test was done with the html page served by a Linux system and the Applet was served on a  7.3-2 VMS with SWS (Apache) server. The test was with a sample hello world applet which has not socket connect, but I think that this will run.&lt;BR /&gt;&lt;BR /&gt;Bojan&lt;BR /&gt;</description>
      <pubDate>Fri, 27 Oct 2006 01:48:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/java-applet-from-vms-web-server/m-p/3886788#M35789</guid>
      <dc:creator>Bojan Nemec</dc:creator>
      <dc:date>2006-10-27T01:48:18Z</dc:date>
    </item>
    <item>
      <title>Re: Java Applet from VMS Web Server</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/java-applet-from-vms-web-server/m-p/3886789#M35790</link>
      <description>Hi Bojan,&lt;BR /&gt;&lt;BR /&gt;Thanks for persisting with this! Please stay with me as a couple more questions and I think I'm done.&lt;BR /&gt;&lt;BR /&gt;[The protocol is http so you need a http server on the VMS system.]&lt;BR /&gt;&lt;BR /&gt;Please correct me if I'm wrong, but a quick flick thru the SUN website sugested that "a" protocol was http but another quite valid protocol was ftp. Would it be possible for you to try it out?&lt;BR /&gt;&lt;BR /&gt;And if you specified the applet url as something like "&lt;A href="ftp://1.2.3.4:303/blah" target="_blank"&gt;ftp://1.2.3.4:303/blah&lt;/A&gt;" then, conceivably, you could have a slimmed-down, lightweight, super-duper applet-downloader on port 303. That get's by talking only Restaurant-FTP.&lt;BR /&gt;&lt;BR /&gt;So, questions: -&lt;BR /&gt;&lt;BR /&gt;Q1: Can FTP be used as the protocol to download an applet from a server (in this instance) that is different to the original http server that delivered the driving web page? In which case, that second server has absolutely no *need* to be running a web server at all?&lt;BR /&gt;&lt;BR /&gt;Q2: Where does the "get applet file" (ftp or http) request come from? (a) The http server that hosted the original webpage? or (b) the clients web browser itself?&lt;BR /&gt;&lt;BR /&gt;I believe this to be quite important and can see a lot of security plusses in the answer being "a" but have a gut feeling it's going to be "b". Please advise.&lt;BR /&gt;&lt;BR /&gt;Q3: I know I've used up a bit of your time Bojan, but if you could go as far as testing the Socket and Connect methods it would absolutely make my day!!! I do pay beer as well as points :-)&lt;BR /&gt;&lt;BR /&gt;Q4: Given that an applet does *not* call out to any platform specific plug-ins, would it not be *possible* to develop your applets on any JDK environment/machine of your choice, archive them up into a .JAR file and finally, just copy them to the VMS server location that the Web clients will download them from. That is, such .JAR files are architecture neutral aren't they?  If you prefer the UNIX or Windows versions as your development environment then go crazy, and just deploy them to the VMS box when compiled/archived. No JDK required on VMS?&lt;BR /&gt;&lt;BR /&gt;Ok, those are the questions and I love Bojan's answers because he doesn't rabbit on about firewall considerations or how IPsec isn't here (*just*) yet, or the relative performance of each method/protocol. I know he's thinking about it and so am I, but he answers the question that I have asked. If there are others that would like to reply but can't restrain themselves to this philosophy then I am more than willing to listen to your pontificating *BUT ONLY AFTER* you have answered my questions.&lt;BR /&gt;&lt;BR /&gt;This thread is being viewed by, and is helping, a lot of people so please show it some respect.&lt;BR /&gt;&lt;BR /&gt;Cheers Richard Maher</description>
      <pubDate>Fri, 27 Oct 2006 20:19:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/java-applet-from-vms-web-server/m-p/3886789#M35790</guid>
      <dc:creator>Richard J Maher</dc:creator>
      <dc:date>2006-10-27T20:19:25Z</dc:date>
    </item>
    <item>
      <title>Re: Java Applet from VMS Web Server</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/java-applet-from-vms-web-server/m-p/3886790#M35791</link>
      <description>Richard,&lt;BR /&gt;&lt;BR /&gt;Sorry for a late ansawer but I was on short vacancies.&lt;BR /&gt;&lt;BR /&gt;Q1: Ok, ftp is also supported. I changed my previous test htmlcode to:&lt;BR /&gt;&lt;BR /&gt;codebase="ftp://bojan:PASSWORD@1.2.3.4"&lt;BR /&gt;&lt;BR /&gt;put the jar file in my sys$login directory, the html was served by a Linux machine and all works ok.&lt;BR /&gt;&lt;BR /&gt;Q2: shortly "b". The applet code is downloaded by the browser.&lt;BR /&gt;&lt;BR /&gt;Q3: I will try to find a hour or two to write a simple applet. But I thonk that willwork as is described.&lt;BR /&gt;&lt;BR /&gt;Q4: Absolutly right. My test was developed on a Linux desktop and only the jar was transfered to the VMS box. The beauty of JAVA code is that is platform independent.&lt;BR /&gt;&lt;BR /&gt;Just a word abbout using ftp or http. Ftp protocol is quite complicated so harder to implement. You can implement a very simple http server in some lines of code.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Bojan</description>
      <pubDate>Thu, 02 Nov 2006 03:41:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/java-applet-from-vms-web-server/m-p/3886790#M35791</guid>
      <dc:creator>Bojan Nemec</dc:creator>
      <dc:date>2006-11-02T03:41:19Z</dc:date>
    </item>
    <item>
      <title>Re: Java Applet from VMS Web Server</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/java-applet-from-vms-web-server/m-p/3886791#M35792</link>
      <description>Hi Bojan,&lt;BR /&gt;&lt;BR /&gt;&amp;gt; Sorry for a late ansawer but I was on&lt;BR /&gt;&amp;gt; short vacancies.&lt;BR /&gt;&lt;BR /&gt;No problem! I owe you several beers already and I wish I could post more points.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; Q1: Ok, ftp is also supported. &lt;BR /&gt;&lt;BR /&gt;This is great news for those you don't want or need a VMS web server and its baggage on their application server boxes. Just the applets!&lt;BR /&gt;&lt;BR /&gt;(Obviously, in the interim before my wonder "Applet Loader" arrives :-)&lt;BR /&gt;&lt;BR /&gt;&amp;gt; Q2: shortly "b".&lt;BR /&gt;&lt;BR /&gt;Oh well. Thought as much.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; Q3: I will try to find a hour or two to&lt;BR /&gt;&amp;gt; write a simple applet. But I thonk that&lt;BR /&gt;&amp;gt; willwork as is described.&lt;BR /&gt;&lt;BR /&gt;I would really appreciate it if you could, Bojan! It would mean a lot to me and I'm sure many others. I do have an "Ideal" (yet still small) example in mind, but anything at all will be welcomed with open arms!&lt;BR /&gt;&lt;BR /&gt;&amp;gt; Q4: Absolutly right. My test was developed&lt;BR /&gt;&amp;gt; on a Linux desktop and only the jar was&lt;BR /&gt;&amp;gt; transfered to the VMS box. The beauty of&lt;BR /&gt;&amp;gt; JAVA code is that is platform independent&lt;BR /&gt;&lt;BR /&gt;You gotta love that! &lt;BR /&gt;&lt;BR /&gt;&amp;gt; Just a word abbout using ftp or http. &lt;BR /&gt;&amp;gt; Ftp protocol is quite complicated so&lt;BR /&gt;&amp;gt; harder to implement. You can implement &lt;BR /&gt;&amp;gt; a very simple http server in some lines &lt;BR /&gt;&amp;gt; of code.&lt;BR /&gt;&lt;BR /&gt;Interesting (and timely!) advice. I would've thought that FTP would have been the far easier and function-poor/light-weight protocol. The "TIP://" protocol has to be about as clear and straight-forward as it gets, but I will focus on http next.  &lt;BR /&gt;&lt;BR /&gt;Thanks again.&lt;BR /&gt;&lt;BR /&gt;Cheers Richard Maher&lt;BR /&gt;&lt;BR /&gt;PS, For those following this there is also a prralel thread going on in comp.os.vms that you may be interested in. Over there Arne is helping me as much as Bojan is here. His latest reply is below: -&lt;BR /&gt;&lt;BR /&gt;"Arne VajhÃ¸j" &lt;ARNE&gt; wrote in message news:45496116$0$49196$14726298@news.sunsite.dk...&lt;BR /&gt;&lt;BR /&gt;Richard Maher wrote:&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt; But if you want the applet to do everything, then why uses HTML form&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt; fields at all and not just fields inside the Applet ?&lt;BR /&gt;&amp;gt;&amp;gt; :&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt; The easiest way to keep state would probably be to keep the same&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt; same web page and the same applet during the entire session.&lt;BR /&gt;&amp;gt;&amp;gt; :&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt; But the more you write the more I think you should use&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt; one big applet and only use the HTML for "application start".&lt;BR /&gt;&amp;gt;&amp;gt; :&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt; But if you don't want to submit the HTML form, then I think it&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt; is better to make the fields, buttons etc. in the applet.&lt;BR /&gt;&amp;gt;&amp;gt; :&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt; But you could do the same in pure Java applet.&lt;BR /&gt;&amp;gt;&amp;gt; Ok, ok, ok, okay. Has everyone got that?&lt;BR /&gt;&amp;gt;&amp;gt;&lt;BR /&gt;&amp;gt;&amp;gt; Option 1 (And I agree, the "preferred" option)&lt;BR /&gt;&amp;gt;&amp;gt; The Applet is the master of the universe!&lt;BR /&gt;&amp;gt;&amp;gt;&lt;BR /&gt;&amp;gt;&amp;gt; Use the WWW as not much more than an Application Port Mapper that uses your&lt;BR /&gt;&amp;gt;&amp;gt; company's Web Page to "pimp" the required application via a Java Applet. I&lt;BR /&gt;&amp;gt;&amp;gt; love it! I see this strategy as the future of Web interaction with VMS (if&lt;BR /&gt;&amp;gt;&amp;gt; not all platforms) and is a marvellous stepping stone if you later choose to&lt;BR /&gt;&amp;gt;&amp;gt; move to Java Web Start and full-blown applications, JVM downloads and so on.&lt;BR /&gt;&amp;gt;&amp;gt; Get your hands on a *good* Java coder(s) now 'cos this is what you'll be&lt;BR /&gt;&amp;gt;&amp;gt; doing in the next 6-12 months!&lt;BR /&gt;&lt;BR /&gt;It is certainly a valid approach.&lt;BR /&gt;&lt;BR /&gt;I belive that several chat programs has been implemented this way.&lt;BR /&gt;&lt;BR /&gt;I dont't think your app will be a chat, but a chat has the same&lt;BR /&gt;requirement to use sockets directly (so that the server can push&lt;BR /&gt;to the client instead of the the client polling via HTTP requests).&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt; JavaScript can call some Java code that uses them though&lt;BR /&gt;&amp;gt;&amp;gt; :&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt; JavaScript can call methods in the Java applet that can use&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt; the socket.&lt;BR /&gt;&amp;gt;&amp;gt; :&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt; JavaScript---(call)---Java applet---(socket)---server app&lt;BR /&gt;&amp;gt;&amp;gt; You bewdy!!!&lt;BR /&gt;&amp;gt;&amp;gt;&lt;BR /&gt;&amp;gt;&amp;gt; Option 2 (And possibly the softer less&lt;BR /&gt;&amp;gt;&amp;gt; challenging/distressingly-unfamiliar/safe option)&lt;BR /&gt;&amp;gt;&amp;gt; The Half-Way House&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; Can you please (pretty please!) show me an example of a Javascript calling a&lt;BR /&gt;&amp;gt;&amp;gt; method in a Java Applet? This is what I want to to in the short term.&lt;BR /&gt;&lt;BR /&gt;I have never used it myself.&lt;BR /&gt;&lt;BR /&gt;But here are some links:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.rgagnon.com/javadetails/java-0170.html" target="_blank"&gt;http://www.rgagnon.com/javadetails/java-0170.html&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://www.javaworld.com/javaworld/jw-06-2004/jw-0621-talk.html" target="_blank"&gt;http://www.javaworld.com/javaworld/jw-06-2004/jw-0621-talk.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; PS. Look, I tried hard but I have to mention AJAX again. It is the&lt;BR /&gt;&amp;gt;&amp;gt; asynchronous nature of watching a field being entered and sending the&lt;BR /&gt;&amp;gt;&amp;gt; interim results down the socket and displaying the results in a seperate&lt;BR /&gt;&amp;gt;&amp;gt; thread-like fashion that I'm led to believe is only doable (GIVEN OPTION 2's&lt;BR /&gt;&amp;gt;&amp;gt; CONSTRAINTS) by using AJAX. If you, in fact, don't need AJAX for this and&lt;BR /&gt;&amp;gt;&amp;gt; Arne is willing to take the time to show an example of pure&lt;BR /&gt;&amp;gt;&amp;gt; html-&amp;gt;javascript-&amp;gt;applet-method that can provide similar functionality then&lt;BR /&gt;&amp;gt;&amp;gt; please do.&lt;BR /&gt;&lt;BR /&gt;You only need the AJ part.&lt;BR /&gt;&lt;BR /&gt;You don't want the AX part.&lt;BR /&gt;&lt;BR /&gt;The AJ part is doing something via JavaScript client side when the user&lt;BR /&gt;does something.&lt;BR /&gt;&lt;BR /&gt;The AX part is about communicating with the server via HTTP and XML.&lt;BR /&gt;&lt;BR /&gt;Java applet and sockets replace the AX part.&lt;BR /&gt;&lt;BR /&gt;Arne&lt;/ARNE&gt;</description>
      <pubDate>Thu, 02 Nov 2006 05:55:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/java-applet-from-vms-web-server/m-p/3886791#M35792</guid>
      <dc:creator>Richard J Maher</dc:creator>
      <dc:date>2006-11-02T05:55:29Z</dc:date>
    </item>
    <item>
      <title>Re: Java Applet from VMS Web Server</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/java-applet-from-vms-web-server/m-p/3886792#M35793</link>
      <description>Richard,&lt;BR /&gt;&lt;BR /&gt;I found some time to write a very simple applet which gets some text from VMS service and display the text. It work as predicted.&lt;BR /&gt;&lt;BR /&gt;Once more the Linux system was the html server and VMS served the class and jar file.&lt;BR /&gt;&lt;BR /&gt;By the way, I see that the applet class must be in a separate file!&lt;BR /&gt;&lt;BR /&gt;The server on VMS was Apache.&lt;BR /&gt;&lt;BR /&gt;The next thing I have try is to work without Apache just to explain how simple is the http protocol.&lt;BR /&gt;For this I write a small dummy web server in a command procedure and set it as a tcpip service in VMS. The server is realy dummy and the files must be set as UDF to work properly but in a program it will not be dificult to read a file and send it as is.&lt;BR /&gt;&lt;BR /&gt;Here is the code.&lt;BR /&gt;First the applet:&lt;BR /&gt;import java.applet.Applet;&lt;BR /&gt;import java.awt.Graphics;&lt;BR /&gt;import java.io.BufferedReader;&lt;BR /&gt;import java.io.InputStreamReader;&lt;BR /&gt;import java.net.Socket;&lt;BR /&gt;&lt;BR /&gt;public class HelloWorld extends Applet {&lt;BR /&gt; String text = "No text";&lt;BR /&gt; public void init ()&lt;BR /&gt; {&lt;BR /&gt;  String addr = getParameter("ADDR");&lt;BR /&gt;  int port = Integer.parseInt(getParameter ("PORT"));&lt;BR /&gt;  &lt;BR /&gt;  try&lt;BR /&gt;  {&lt;BR /&gt;   Socket socket = new Socket (addr , port);&lt;BR /&gt;   &lt;BR /&gt;   BufferedReader in = new BufferedReader (new InputStreamReader (socket.getInputStream()));&lt;BR /&gt;   text = in.readLine();&lt;BR /&gt;   socket.close();&lt;BR /&gt;  } catch (Exception e)&lt;BR /&gt;  {&lt;BR /&gt;   e.printStackTrace();&lt;BR /&gt;  }&lt;BR /&gt;  &lt;BR /&gt; }&lt;BR /&gt; public String[][] getParameterInfo() {&lt;BR /&gt;     String[][] info = {&lt;BR /&gt;       // Parameter Name     Kind of Value   Description&lt;BR /&gt;         {"ADDR",            "String",          "address"},&lt;BR /&gt;         {"PORT",            "int",             "port"}&lt;BR /&gt;     };&lt;BR /&gt;     return info;&lt;BR /&gt; }    &lt;BR /&gt; &lt;BR /&gt;    public void paint(Graphics g) {&lt;BR /&gt;        g.drawRect(0, 0,&lt;BR /&gt;                   getSize().width - 1,&lt;BR /&gt;                   getSize().height - 1);&lt;BR /&gt;        g.drawString("Hello world! " + text, 5, 15);&lt;BR /&gt;    }&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;Now the html:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;APPLET&gt;  code="HelloWorld.class"&lt;BR /&gt;  codebase="&lt;A href="http://1.2.3.4:4444/" target="_blank"&gt;http://1.2.3.4:4444/&lt;/A&gt;"&lt;BR /&gt;  archive="HelloWorld.jar"&lt;BR /&gt;  width="800" height="600"&amp;gt;&lt;BR /&gt;&lt;PARAM name="ADDR" value="1.2.3.4" /&gt;&lt;BR /&gt;&lt;PARAM name="PORT" value="4445" /&gt;&lt;BR /&gt;&lt;/APPLET&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The service installed on port 4445:&lt;BR /&gt;&lt;BR /&gt;$ open/read/write net sys$net&lt;BR /&gt;$ write net "Hello from VMS!"&lt;BR /&gt;&lt;BR /&gt;And the web server installed on port 4444:&lt;BR /&gt;&lt;BR /&gt;$ open/read/write net sys$net&lt;BR /&gt;$ read net httpcmd /time=10/error=end&lt;BR /&gt;$ method = f$element (0 , " " , httpcmd)&lt;BR /&gt;$ path = f$element (1 , " " , httpcmd)&lt;BR /&gt;$ show sym/all&lt;BR /&gt;$ if "GET".eqs.method&lt;BR /&gt;$ then&lt;BR /&gt;$   filename = f$element (1 , "/" , path)&lt;BR /&gt;$   if f$search(filename).nes.""&lt;BR /&gt;$   then&lt;BR /&gt;$     type = "application/octet-stream"&lt;BR /&gt;$     if f$parse(filename,,,"TYPE").eqs.".HTML" then type="text/html"&lt;BR /&gt;$     write net f$fao("HTTP/1.0 200 OK!/")&lt;BR /&gt;$     write net f$fao("Content-Type: ''type'!/")&lt;BR /&gt;$     len = (f$file(filename , "EOF") - 1) * 512 + f$file(filename,"FFB")&lt;BR /&gt;$     write net f$fao("Content-Length: ''len'!/!/")&lt;BR /&gt;$     copy 'filename' net&lt;BR /&gt;$     exit&lt;BR /&gt;$   endif&lt;BR /&gt;$ endif&lt;BR /&gt;$ write net f$fao("HTTP/1.0 404 not found!/!/")&lt;BR /&gt;$ exit&lt;BR /&gt;&lt;BR /&gt;The web server must have limit more than 1 to work properly!(I spent a hour to find that this causes errors!).&lt;BR /&gt;&lt;BR /&gt;This is a very simple example but it works and explains how can be things made.&lt;BR /&gt;&lt;BR /&gt;Bojan</description>
      <pubDate>Thu, 02 Nov 2006 10:38:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/java-applet-from-vms-web-server/m-p/3886792#M35793</guid>
      <dc:creator>Bojan Nemec</dc:creator>
      <dc:date>2006-11-02T10:38:59Z</dc:date>
    </item>
    <item>
      <title>Re: Java Applet from VMS Web Server</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/java-applet-from-vms-web-server/m-p/3886793#M35794</link>
      <description>Sorry,&lt;BR /&gt;&lt;BR /&gt;Forgot to check the Retain format.&lt;BR /&gt;So I have put all the examples in a txt file.&lt;BR /&gt;&lt;BR /&gt;Bojan</description>
      <pubDate>Thu, 02 Nov 2006 10:59:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/java-applet-from-vms-web-server/m-p/3886793#M35794</guid>
      <dc:creator>Bojan Nemec</dc:creator>
      <dc:date>2006-11-02T10:59:50Z</dc:date>
    </item>
    <item>
      <title>Re: Java Applet from VMS Web Server</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/java-applet-from-vms-web-server/m-p/3886794#M35795</link>
      <description>Hi Bojan,&lt;BR /&gt;&lt;BR /&gt;&amp;gt; Forgot to check the Retain format.&lt;BR /&gt;&amp;gt; So I have put all the examples in a txt file.&lt;BR /&gt;&lt;BR /&gt;Let me tell you that your text file format is not great either :-)&lt;BR /&gt;&lt;BR /&gt;Any chance of another one with just ASCII?&lt;BR /&gt;&lt;BR /&gt;Cheers Richard</description>
      <pubDate>Thu, 02 Nov 2006 17:45:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/java-applet-from-vms-web-server/m-p/3886794#M35795</guid>
      <dc:creator>Richard J Maher</dc:creator>
      <dc:date>2006-11-02T17:45:03Z</dc:date>
    </item>
    <item>
      <title>Re: Java Applet from VMS Web Server</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/java-applet-from-vms-web-server/m-p/3886795#M35796</link>
      <description>&lt;!--!*#--&gt;Richard,&lt;BR /&gt;&lt;BR /&gt;The attached file is just an ASCII file. I try to post it with the retain format checked.&lt;BR /&gt;&lt;BR /&gt;Applet:&lt;BR /&gt;&lt;BR /&gt;import java.applet.Applet;&lt;BR /&gt;import java.awt.Graphics;&lt;BR /&gt;import java.io.BufferedReader;&lt;BR /&gt;import java.io.InputStreamReader;&lt;BR /&gt;import java.net.Socket;&lt;BR /&gt;&lt;BR /&gt;public class HelloWorld extends Applet {&lt;BR /&gt; String text = "No text";&lt;BR /&gt; public void init ()&lt;BR /&gt; {&lt;BR /&gt;  String addr = getParameter("ADDR");&lt;BR /&gt;  int port =Integer.parseInt(getParameter ("PORT"));&lt;BR /&gt;  &lt;BR /&gt;  try&lt;BR /&gt;  {&lt;BR /&gt;   Socket socket = new Socket (addr , port);&lt;BR /&gt;   &lt;BR /&gt;   BufferedReader in = new BufferedReader (new InputStreamReader (socket.getInputStream()));&lt;BR /&gt;   text = in.readLine();&lt;BR /&gt;   socket.close();&lt;BR /&gt;  } catch (Exception e)&lt;BR /&gt;  {&lt;BR /&gt;   e.printStackTrace();&lt;BR /&gt;  }&lt;BR /&gt;  &lt;BR /&gt; }&lt;BR /&gt; public String[][] getParameterInfo() {&lt;BR /&gt;     String[][] info = {&lt;BR /&gt;       // Parameter Name     Kind of Value   Description&lt;BR /&gt;         {"ADDR",            "String",          "address"},&lt;BR /&gt;         {"PORT",            "int",             "port"}&lt;BR /&gt;     };&lt;BR /&gt;     return info;&lt;BR /&gt; }    &lt;BR /&gt; &lt;BR /&gt;    public void paint(Graphics g) {&lt;BR /&gt;        g.drawRect(0, 0,&lt;BR /&gt;                   getSize().width - 1,&lt;BR /&gt;                   getSize().height - 1);&lt;BR /&gt;        g.drawString("Hello world! " + text, 5, 15);&lt;BR /&gt;    }&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;Html:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;  &lt;APPLET&gt;    code="HelloWorld.class"&lt;BR /&gt;    codebase="&lt;A href="http://1.2.3.4:4444/" target="_blank"&gt;http://1.2.3.4:4444/&lt;/A&gt;"&lt;BR /&gt;    archive="HelloWorld.jar"&lt;BR /&gt;    width="800" height="600"&amp;gt;&lt;BR /&gt;    &lt;PARAM name="ADDR" value="1.2.3.4" /&gt;&lt;BR /&gt;    &lt;PARAM name="PORT" value="4445" /&gt;&lt;BR /&gt;  &lt;/APPLET&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Service on port 4445:&lt;BR /&gt;&lt;BR /&gt;$ open/read/write net sys$net&lt;BR /&gt;$ write net "Hello from VMS!"&lt;BR /&gt;&lt;BR /&gt;Service on port 4444 acting as web server:&lt;BR /&gt;&lt;BR /&gt;$ open/read/write net sys$net&lt;BR /&gt;$ read net httpcmd /time=10/error=end&lt;BR /&gt;$ method = f$element (0 , " " , httpcmd)&lt;BR /&gt;$ path = f$element (1 , " " , httpcmd)&lt;BR /&gt;$ show sym/all&lt;BR /&gt;$ if "GET".eqs.method&lt;BR /&gt;$ then&lt;BR /&gt;$       filename = f$element (1 , "/" , path)&lt;BR /&gt;$       if f$search(filename).nes.""&lt;BR /&gt;$       then&lt;BR /&gt;$               type = "application/octet-stream"&lt;BR /&gt;$               if f$parse (filename,,,"TYPE").eqs.".HTML" then type="text/html"&lt;BR /&gt;$               write net f$fao("HTTP/1.0 200 OK!/")&lt;BR /&gt;$               write net f$fao("Content-Type: ''type'!/")&lt;BR /&gt;$               len = (f$file(filename , "EOF") - 1) * 512 + f$file(filename,"FFB")&lt;BR /&gt;$               write net f$fao("Content-Length: ''len'!/!/")&lt;BR /&gt;$               copy 'filename' net&lt;BR /&gt;$               exit&lt;BR /&gt;$       endif&lt;BR /&gt;$ endif&lt;BR /&gt;$ write net f$fao("HTTP/1.0 404 not found!/!/")&lt;BR /&gt;$ exit&lt;BR /&gt;&lt;BR /&gt;Bojan&lt;BR /&gt;</description>
      <pubDate>Fri, 03 Nov 2006 02:16:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/java-applet-from-vms-web-server/m-p/3886795#M35796</guid>
      <dc:creator>Bojan Nemec</dc:creator>
      <dc:date>2006-11-03T02:16:07Z</dc:date>
    </item>
    <item>
      <title>Re: Java Applet from VMS Web Server</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/java-applet-from-vms-web-server/m-p/3886796#M35797</link>
      <description>Hi Bojan,&lt;BR /&gt;&lt;BR /&gt;Thanks very much for the example. This is just too easy for words! &lt;BR /&gt;&lt;BR /&gt;Why do we still hear about rubbish CGI scripts and poorly performing servlets, when people like Bojan and Arne can show everyone how to effortlessly obtain full function, web-enabled user-interfaces to the reliability, performance, and functionality of their VMS servers?&lt;BR /&gt;&lt;BR /&gt;And now Multinet IPsec is here, you message exchange can be also be effortlessly locked-down in an Internet environment.&lt;BR /&gt;&lt;BR /&gt;It just doesn't get any better than this!&lt;BR /&gt;&lt;BR /&gt;Cheers Richard Maher&lt;BR /&gt;&lt;BR /&gt;PS. Very surprised how basic the http protocol is! Thanks for the eye-opener. Definitely worth bundling an Applet-Loader with Tier3.&lt;BR /&gt;&lt;BR /&gt;PPS. I'm off to read my Java Programming book 'cos there doesn't appear to many around that are doing this? How bizarre!&lt;BR /&gt;</description>
      <pubDate>Fri, 03 Nov 2006 19:47:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/java-applet-from-vms-web-server/m-p/3886796#M35797</guid>
      <dc:creator>Richard J Maher</dc:creator>
      <dc:date>2006-11-03T19:47:11Z</dc:date>
    </item>
    <item>
      <title>Re: Java Applet from VMS Web Server</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/java-applet-from-vms-web-server/m-p/3886797#M35798</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Very quick one; what is the delimiter for Java "stream" I/O? I thought it would've been a &lt;NULL&gt; byte but Bojan's example suggests a &lt;CR&gt;&lt;LF&gt; combo? Or is it just as many bytes readline wants?&lt;BR /&gt;&lt;BR /&gt;What do you send and what do yo expect to receive?&lt;BR /&gt;&lt;BR /&gt;Cheers Richard Maher&lt;/LF&gt;&lt;/CR&gt;&lt;/NULL&gt;</description>
      <pubDate>Sun, 05 Nov 2006 08:12:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/java-applet-from-vms-web-server/m-p/3886797#M35798</guid>
      <dc:creator>Richard J Maher</dc:creator>
      <dc:date>2006-11-05T08:12:15Z</dc:date>
    </item>
  </channel>
</rss>

