Asp-applet communication(URGENT!!)

hi,
i am facing a problem on asp-applet communication. i would like to ask how to pass applet parameters to asp page?my code below doesnt seem to work..
smsClient.java
public class smsClient {
private JOptionPane jOptionPanel = new JOptionPane();
private dialog dd;
String str;
public void executeSend(String smsno, String smsMessage,String user_id){
String qrysmsno=smsno;
String qrysmsMessage=smsMessage;
String qryUserId=user_id;
try{
String qry=URLEncoder.encode("smsno")+ "=" + URLEncoder.encode(qrysmsno) + "&";
qry= qry + URLEncoder.encode("smsMessage")+ "=" + URLEncoder.encode(qrysmsMessage);
//qry= qry + URLEncoder.encode("user_id")+ "=" + URLEncoder.encode(qryUserId);
URL url=new URL("http://172.20.34.116:8081/3dcommunity/sendsms.asp?"+qry);
dialog dd=new dialog();
//dd.showDialog(qry, "Alert!", JOptionPane.WARNING_MESSAGE);
          URLConnection uc = url.openConnection();
          uc.setDoOutput(true);
          uc.setRequestProperty("Content-Type","application/x-www-form-urlencoded");
          PrintWriter pw = new PrintWriter(uc.getOutputStream());
          pw.println(str);
          pw.close();
          BufferedReader in = new BufferedReader(new InputStreamReader(uc.getInputStream()));
          String res = in.readLine();
          dd.showDialog(res, "Alert!", JOptionPane.WARNING_MESSAGE);
          in.close();
/*HttpURLConnection http = (HttpURLConnection)url.openConnection();
     http.setRequestMethod("GET");
     InputStream iStrm = null;
     if (http.getResponseCode() == HttpURLConnection.HTTP_OK) {
     iStrm = http.getInputStream();
     int length = (int) http.getContentLength();
     if (length > 0) {
     byte servletData[] = new byte[length];
     iStrm.read(servletData);
     String resultString = new String(servletData);
dd.showDialog(res, "Alert!", JOptionPane.WARNING_MESSAGE);
     iStrm.close();*/
     catch(MalformedURLException e){
     System.err.println(e);
dd.showDialog("MalformedURLException", "Alert!", JOptionPane.ERROR_MESSAGE);
     catch(IOException e){
     System.err.println(e);
dd.showDialog("IOException", "Alert!", JOptionPane.ERROR_MESSAGE);
sendsms.asp
<%
     set mySMS = Server.CreateObject("SCSMS.SMS")
     mySMS.Port = "COM3"
%>
<%
          mfg = mySMS.Manufacturer
          mdl = mySMS.Model
          if mySMS.Error then
               response.write mySMS.ErrorMsg
          else
               response.write "Manufacturer : " & mfg & "<br>"
               response.write "Model : " & mdl & "<br><br>"
          end if
          smsno=request.queryString("smsno")
          smsMessage=request.queryString("smsMessage")
     mySMS.sendsms smsno, smsMessage
     if mySMS.Error <> 0 then
          'response.write "Failed" & mySMS.ErrorMsg
     else
          response.write "Success"
     end if
%>

use the following class for applet to any web site connection (it can be asp, jsp, cgi etc)
package com.oreilly.servlet;
import java.io.*;
import java.net.*;
import java.util.*;
* A class to simplify HTTP applet-server communication. It abstracts
* the communication into messages, which can be either GET or POST.
* <p>
* It can be used like this:
* <blockquote><pre>
* URL url = new URL(getCodeBase(), "/servlet/ServletName");
* HttpMessage msg = new HttpMessage(url);
* // Parameters may optionally be set using java.util.Properties
* Properties props = new Properties();
* props.put("name", "value");
* // Headers, cookies, and authorization may be set as well
* msg.setHeader("Accept", "image/png"); // optional
* msg.setCookie("JSESSIONID", "9585155923883872"); // optional
* msg.setAuthorization("guest", "try2gueSS"); // optional
* InputStream in = msg.sendGetMessage(props);
* </pre></blockquote>
* <p>
* This class is loosely modeled after the ServletMessage class written
* by Rod McChesney of JavaSoft.
* @author <b>Jason Hunter</b>, Copyright &#169; 1998
* @version 1.3, 2000/10/24, fixed headers NPE bug
* @version 1.2, 2000/10/15, changed uploaded object MIME type to
* application/x-java-serialized-object
* @version 1.1, 2000/06/11, added ability to set headers, cookies,
and authorization
* @version 1.0, 1998/09/18
public class HttpMessage {
URL servlet = null;
Hashtable headers = null;
* Constructs a new HttpMessage that can be used to communicate with the
* servlet at the specified URL.
* @param servlet the server resource (typically a servlet) with which
* to communicate
public HttpMessage(URL servlet) {
this.servlet = servlet;
* Performs a GET request to the servlet, with no query string.
* @return an InputStream to read the response
* @exception IOException if an I/O error occurs
public InputStream sendGetMessage() throws IOException {
return sendGetMessage(null);
* Performs a GET request to the servlet, building
* a query string from the supplied properties list.
* @param args the properties list from which to build a query string
* @return an InputStream to read the response
* @exception IOException if an I/O error occurs
public InputStream sendGetMessage(Properties args) throws IOException {
String argString = ""; // default
if (args != null) {
argString = "?" + toEncodedString(args);
URL url = new URL(servlet.toExternalForm() + argString);
// Turn off caching
URLConnection con = url.openConnection();
con.setUseCaches(false);
// Send headers
sendHeaders(con);
return con.getInputStream();
* Performs a POST request to the servlet, with no query string.
* @return an InputStream to read the response
* @exception IOException if an I/O error occurs
public InputStream sendPostMessage() throws IOException {
return sendPostMessage(null);
* Performs a POST request to the servlet, building
* post data from the supplied properties list.
* @param args the properties list from which to build the post data
* @return an InputStream to read the response
* @exception IOException if an I/O error occurs
public InputStream sendPostMessage(Properties args) throws IOException {
String argString = ""; // default
if (args != null) {
argString = toEncodedString(args); // notice no "?"
URLConnection con = servlet.openConnection();
// Prepare for both input and output
con.setDoInput(true);
con.setDoOutput(true);
// Turn off caching
con.setUseCaches(false);
// Work around a Netscape bug
con.setRequestProperty("Content-Type",
"application/x-www-form-urlencoded");
// Send headers
sendHeaders(con);
// Write the arguments as post data
DataOutputStream out = new DataOutputStream(con.getOutputStream());
out.writeBytes(argString);
out.flush();
out.close();
return con.getInputStream();
* Performs a POST request to the servlet, uploading a serialized object.
* <p>
* The servlet can receive the object in its <tt>doPost()</tt> method
* like this:
* <pre>
* ObjectInputStream objin =
* new ObjectInputStream(req.getInputStream());
* Object obj = objin.readObject();
* </pre>
* The type of the uploaded object can be determined through introspection.
* @param obj the serializable object to upload
* @return an InputStream to read the response
* @exception IOException if an I/O error occurs
public InputStream sendPostMessage(Serializable obj) throws IOException {
URLConnection con = servlet.openConnection();
// Prepare for both input and output
con.setDoInput(true);
con.setDoOutput(true);
// Turn off caching
con.setUseCaches(false);
// Set the content type to be application/x-java-serialized-object
con.setRequestProperty("Content-Type",
"application/x-java-serialized-object");
// Send headers
sendHeaders(con);
// Write the serialized object as post data
ObjectOutputStream out = new ObjectOutputStream(con.getOutputStream());
out.writeObject(obj);
out.flush();
out.close();
return con.getInputStream();
* Sets a request header with the given name and value. The header
* persists across multiple requests. The caller is responsible for
* ensuring there are no illegal characters in the name and value.
* @param name the header name
* @param value the header value
public void setHeader(String name, String value) {
if (headers == null) {
headers = new Hashtable();
headers.put(name, value);
// Send the contents of the headers hashtable to the server
private void sendHeaders(URLConnection con) {
if (headers != null) {
Enumeration enum = headers.keys();
while (enum.hasMoreElements()) {
String name = (String) enum.nextElement();
String value = (String) headers.get(name);
con.setRequestProperty(name, value);
* Sets a request cookie with the given name and value. The cookie
* persists across multiple requests. The caller is responsible for
* ensuring there are no illegal characters in the name and value.
* @param name the header name
* @param value the header value
public void setCookie(String name, String value) {
if (headers == null) {
headers = new Hashtable();
String existingCookies = (String) headers.get("Cookie");
if (existingCookies == null) {
setHeader("Cookie", name + "=" + value);
else {
setHeader("Cookie", existingCookies + "; " + name + "=" + value);
* Sets the authorization information for the request (using BASIC
* authentication via the HTTP Authorization header). The authorization
* persists across multiple requests.
* @param name the user name
* @param name the user password
public void setAuthorization(String name, String password) {
String authorization = Base64Encoder.encode(name + ":" + password);
setHeader("Authorization", "Basic " + authorization);
* Converts a properties list to a URL-encoded query string
private String toEncodedString(Properties args) {
StringBuffer buf = new StringBuffer();
Enumeration names = args.propertyNames();
while (names.hasMoreElements()) {
String name = (String) names.nextElement();
String value = args.getProperty(name);
buf.append(URLEncoder.encode(name) + "=" + URLEncoder.encode(value));
if (names.hasMoreElements()) buf.append("&");
return buf.toString();
}

Similar Messages

  • Signed applet communication on Mac

    In Denmark homebanking is goin on the net with NetBank. My bank postulates that Mac users cannot participate, as signed applet communication is not supported on Macs.
    I find it hard to believe an suspect that ActiveX components are the crook here.
    Can anybody confirm my suspicion. Or clear my Bank :-)
    I am Macin' 9.0.4ie - MRJ 2.2.5 . Explorer 5.0 or Netscape 6.0

    The bank probably says that because it doesn't have any Macs to test it on. Signed applets do work on Macs. However, not all of JRE 1.1 may be implemented in NS 4 or IE 5.0.
    I think providing applet only access to Netbanking is a really dumb idea. Fortunately, my bank has not gone the applet route and I can use netbanking services just fine on my Mac with 128 bit encryption.
    If I were you, I would just switch to a bank that is more Mac friendly...

  • Servlet/Applet communication, data limit?

    I have an applet that uses a servlet as a proxy to load/retrieve images from an Oracle database. I have a problem when trying to retrieve images larger than 9-10kb from the database. When using JDBC from a Java Application I don't have any probelms but through the Applet-Servlet configuration I do.
    I use the following code in the Applet:
    URL url =new URL("http","myserver",myport,"/servlet/MyServlet");
    HttpURLConnection imageServletConn = (HttpURLConnection)url.openConnection();
    imageServletConn.setDoInput(true);
              imageServletConn.setDoOutput(true);
              imageServletConn.setUseCaches(false);
    imageServletConn.setDefaultUseCaches (false);
    imageServletConn.setRequestMethod("GET");
    byte buf[] = new byte[imageServletConn.getContentLength()];
    BufferedInputStream instr = new BufferedInputStream(imageServletConn.getInputStream());
    instr.read(buf);
    Image image = Toolkit.getDefaultToolkit().createImage(buf);
    // then code to display the image
    And the following for the Servlet:
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    response.setContentType("image/gif");
    byte[] buff = loadImage(); // this method returns a byte array representing the image.
    response.setContentLength(contentLength);//contentLength is the size of the image
    OutputStream os = response.getOutputStream();
    os.write(buff);
    os.close();
    thanks in advance!

    thanks for your replay,
    I tried your suggestion but whatever I do it seems that tha applet only brings the first 5-10k of the image from the servlet. This is the value I get from instr.read() or any other type of read method. The value of bytes is not always the same.
    Now I also have something new. For images greater than 100k or so I get this error:
    java.io.IOException: Broken pipe
         at java.net.SocketOutputStream.socketWrite(Native Method)
         at java.net.SocketOutputStream.socketWrite(Compiled Code)
         at java.net.SocketOutputStream.write(Compiled Code)
         at java.io.BufferedOutputStream.write(Compiled Code)
         at org.apache.jserv.JServConnection$JServOutputStream.write(Compiled Code)
         at java.io.BufferedOutputStream.write(Compiled Code)
         at java.io.FilterOutputStream.write(Compiled Code)
         at interorient.DBProxyServlet.doGet(Compiled Code)
         at javax.servlet.http.HttpServlet.service(Compiled Code)
         at javax.servlet.http.HttpServlet.service(Compiled Code)
         at org.apache.jserv.JServConnection.processRequest(Compiled Code)
         at org.apache.jserv.JServConnection.run(Compiled Code)
         at java.lang.Thread.run(Compiled Code)
    I am using the Oracle Internet application server (ias 9i) which actualy uses the apache web listener.
    It seems that this servlet-applet communication is really unstable. If you have anything that may help me it will be greatly appriciated. You can even e-mail me at [email protected]
    thanks!

  • Inter Applet Communication across frames - Help Needed

    I am trying inter applet communication across frames. For this to happen I am using an intermidiate
    class which registers two applets and whenever any applet needs reference of other applet it gets it
    through this class.
    The page is an important part of a navigation link. So it is loaded many times while traversing through
    the site.
    Every time I load this page the applet does not paint itself (shows grey or background) and the browser
    stops responding. The machine needs to be restarted. This also happens when we keep that page idle for
    a long time (say 2 hours - session does not time out but applet hangs). I have used another thread object
    which is for utility and accesses the applet in the other frame every 10 seconds or so.
    When the applet hangs it does ot throw any exception or JVM error. This happens on certain machines
    evrytime and never on some machines. The applet hangs only in Microsoft IE 5 & 5.5 and never in Netscape
    4.x.
    What could be the problem?
    Can anyone help me with this problem? Its a deadline project and I can't get through.
    Thanks & Regards,
    Rahul

    Try making the register and getter methods of the intermediate class static synchronized. Then register the applets in their start() methods and unregister them in their stop() methods. Call the getter method of the intermediate class wherever you need access to another applet and never cache the instance you get. You may have to also synchronize all your start() and stop() methods to the intermediate class, as well as all methods that perform interapplet communication.
    Tell me what happenned ...

  • Applet to Applet communication in one browser process with 2 windows

    Applet to Applet communication in Same IE process bu in different IE windows
    I have two IE windows
    (1) base window
    (2) child window (created through wondow.open() and hence share the same IE process and same JVM)
    Now I have two applets in one in base window and other is in child window and I want to do applet to applet communication. Since both applets are in different windows so AppletContext will not work and I tried to use custom AppletRegistory class to keep each Applet in static Hashtable. Now here comes the problem, Each applet gets different copy of this static Hashtable. i have tried hard to find the reason why a static varible has multiple copies running in the same JVM. Then my friend told me about something called class loader which is according to him is different for each window. I have tried this with two different iframes but in same window and it works fine and the reason being is that they share the same JVM. But why this fails for different windows althougt they also have same JVM?
    I am using JRE v5 update 7 and IE6 on WIN XP SP2.
    Thanks in advance..

    Try this example :
    Files used :
    1). AppletCom.html
    2). First.java
    3). Second.java
    1).AppletCom.html
    <HTML>
    <BODY bgcolor="#FFFFFF" link="#0000A0" vlink="#000080">
    <LI><H2><I>Inter applet communication Applet</I></H2>
    <applet code=First.class name="theFirst" width=250 height=100></applet>
    <applet code=Second.class width=350 height=100></applet>
    <BR>
    Source First.java Second.java
    <P>
    <HR>
    <i>Last updated 8/5/97 Martin Eggenberger</i>
    <HR>
    </BODY>
    </HTML>
    2). First.java
    import java.awt.*;
    <applet code="First" width="200" height="200">
    </applet>
    public class First extends java.applet.Applet {
    //Variables for UI
    Label lblOutput;
    public void init() {
    //Create the UI
    add(new Label("The First applet."));
    lblOutput = new Label("Click on a button in the Second applet.");
    add(lblOutput);
    public Color getcc()
    return Color.pink;
    public String getnm(int a,int b)
    int cnt=a+b;
    String str;
    str="Sum is :_________"+cnt;
    return str;
    public boolean handleEvent(Event event) {
    if ("One".equals(event.arg)) {
    lblOutput.setText("You clicked: One");
    return true;
    } else if ("Two".equals(event.arg)) {
    lblOutput.setText("You clicked: Two");
    return true;
    } else if ("Three".equals(event.arg)) {
    lblOutput.setText("You clicked: Three");
    return true;
    return super.handleEvent(event); }
    3). Second.java
    import java.awt.*;
    import java.applet.*;
    <applet code="Second.java" width="200" height="200">
    </applet>
    public class Second extends java.applet.Applet {
    //Declare the UI variables
    Button btnOne;
    Button btnTwo;
    Button btnThree;
         Applet f;
    Label lb;
    public void init() {
    //Build the UI
    btnOne = new Button("One");
    add(btnOne);
    btnTwo = new Button("Two");
    add(btnTwo);
    btnThree = new Button("Three");
    add(btnThree);
    lb=new Label("SUNO RE KAHANI TERI MERI SHHHHHHH");
    add(lb);
    setLayout(new FlowLayout());
    // lb.setSize(100,100);
    public boolean handleEvent(Event event) {
    if (event.id == Event.ACTION_EVENT && event.target == btnOne) {
         f = getAppletContext().getApplet(new String("theFirst"));
    First applet1=(First)f;
    // int cnt=applet1.givenum(22,25);
    // String str="Sum is:"+cnt+" Fine";
    String str=applet1.getnm(22,25);
    lb.setText(str);
    Color cl=applet1.getcc();
    setBackground(cl);
    return f.handleEvent(event);
    } else if (event.id == Event.ACTION_EVENT && event.target == btnTwo) {
    f = getAppletContext().getApplet(new String("theFirst"));
    return f.handleEvent(event);
    } else if (event.id == Event.ACTION_EVENT && event.target == btnThree) {
    f = getAppletContext().getApplet(new String("theFirst"));
    return f.handleEvent(event);
    return super.handleEvent(event);
    I had this example, so i am sharing it as it is.. instead of giving you any link for tutorial... hope this helps.
    Regards,
    Hiten

  • Is jre1.4 still support javascript to applet communication?

    is jre1.4 still support javascript to applet communication?
    I can't get the method in applet from javascript in jre1.4. Are there have a different way to communication?

    I have a similiar problem. Left a post in the Signed Applet board. I can get the methods called on my applet when operating over HTTP, but when I am on a page served from HTTPS, the browser chews up memory, goes to 100% processor utilization, and the method is never called. This is with the 1.4 plugin.
    Suppose this is related ?

  • Applet Servlet communication (urgent)

    Hi,
    I m using Netscape Enterrpise server 4.0 as my web server. I am passing data from applet to servlet using BufferedInputStream(). But it takes about 30 seconds to send the data. If i don't use it, the data is not being read by the servlet. Is there any alternative to this ? Please help.
    Thanks

    It's only the primary key field that i am passing to the servlet from applet .. For this particular process, it takes 30 seconds + other things like loading the applet, etc. so in all, it takes about 1 minute just to fetch the data from servlet which is not reasonable. We have monitored the whole process. We found that other things like query, etc. does not take much time, but BufferedInputStream() itself takes 30 seconds. Regarding communication line, it is quite fast. We are a corporate sector, so no doubt about the speed of the communication line ...
    Thanks for help.

  • What ports need to be open on Fw for Waas Communication--Urgent

                       Hi All,
    This product is new to need your help in configuring this. I am explaining the architecture below:-
    We have a requirement to use WAVE-594-K9 Software Release 5.3.1 and in our Manila location and it will not talk to Waas central Manager in our client location instead client has installed one same model Wave-594 in PHX.
    So now client has said it will only be used for caching contents and not for optimizing, they have some video training on web which will be passed through this wave and for making them highly/fastly available to agents they want to use this.
    We have installed one Wave in Manila in application-accelerator mode and using PBR to redirect the desired traffic via Wave. As per our client Manila Wave will talk to PHX wave and PHX wave will get registered to Waas Manager in client network.
    We have firewall between PHX wave & Manila wave, please let me know do we need to opened tcp/udp ports on FW for opening the communication between these two waves?
    and what else i need to configure on Manila wave?
    This is very urgent quick reply will be highly appreciated!!
    Thanks!!
    Bhisham

    Thanks for the quick reply Kanwal!!
    I checked with my team in PHX and we have Juniper FW in between these two Wave's, so what i understand from the links which you have shared.
    In Manila Wave i need to configure that in Directed Mode and udp port 4050 needs to be opened bi-directionally on Juniper FW between IPs configured on wave devices.
    In Manila we have 10.111.x.189 (Virtual-Blade IP) & 10.111.x.190 IPs & in PHX we 63.149.23.x & 63.149.23.x (VB) so from both IPs we required to open udp 4050 bi-directionally? Want to be sure before raising any request :-)
    In PHX wave i am not sure whether we can configure that in directed mode and if it’s not then also it will work by opening port 4050 on FW Right?
    In last our client was saying that Manila Wave will only be used as cache engine (VB is configured as content-engine) and it will download contents from PHX Wave (which is registered to CM at client side), what does it mean and do i need to do any special config on wave to achieve this?
    I am very new to this device and lot of research on net confused me a lot, please don’t mind!!
    Will wait for your reply then only i will raise request with FWteam.
    Thanks,
    Bhisham

  • Applet communication with struts servlet

    Hi
    I�ve seen a lot of examples where a Java applet communicates with a servlet.
    I�ve made a web application using Struts, and i would like to know if it is possible to use an applet (View) and send to Stuts some data, I mean, call an action like http://localhost:8080/ViewRoads.do.
    Is it possible? ,Where can I find some examples about?, could anyone explain how would it work?, any good book to read about?.
    Thank you.

    I'm sorry but don't you have a communication source code example between a servlet and an applet that does work ? I'm looking for one of these since Two days already.
    thanks

  • Applet communication with DLL

    Hi,
    Can an applet communicate with Microsoft DLL.
    I want to save the content of an applet to database at server side.
    Problem is there is no java envirnoment at server side (it has dlls).
    What is the best way to do this. The content of the applet has to be savea at sever side not at client.
    Thanx

    deepakshettyk,
    Two options that come to mind are:
    1) have the applet use JDBC to connect to its host server's database directly. Typically this entails having type4 JDBC drivers installed and available.
    2) have the applet itself connect back to its host server's webserver (IIS?), and have a server-side agent (ASP?) record data sent back to a database. See Marty Hall's book, 'Servlets & JSP', from Prentice Hall, for code examples.
    --A                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Pls answer my three questions: custom install : web cache applet support: Urgent

    we are using 9iAS v 10200 in win2000 server.
    Here are my queries:
    1: Does 9iAS v 10200 support custom installation ? For example I
    want to install only web server,webcache,forms & reports support.
    If custom installation of individual components is not available
    on v 10200 then in which version it is supported ?
    2. whenever I try installs 9iAS v 10200 from network,then after
    rebooting(during start of installation)it gives JRE error. is
    this a limitation of 9iAS v 10200 ?
    3. 9iAS v 10200 web cache does not support applet. In which
    version of 9iAS web cache would support applet ?
    Its urgent. Thanks in Advance
    yogesh

    Custom installation is not supported for iAS but we have four
    different install types & you can select according to yor need
    these are all available with iAS10221 onwards.You check for
    installation docs related to the version you are using.

  • Clustered Servers and Applet (Very URGENT Please)

    Hi,
    I'm using win2k/CF application server 4.5/IPlanet web server/NN4.79/JRE1.4.1/.
    I have an applet in one of my web page which downloads a file from the web server(stored in http://www.abc.net/doc/zip directory on the server).
    Now when I run this code on the development server, everything works fine.
    But in production environment, we have 3 clustered web servers controlled by a controller (Local Cisco Director) machine. The applet code looks like this:-
    strURL = "http://www.abc.net/doc/Zip/"; //the URL from which the zip is to be downloaded. Basically it hits the Controller first
         strZipFileName=getParameter("zipFileName");
         strURL = strURL+strZipFileName;
              //Get Connection to Server and Download the file
              try{
              objUrl = new URL(strURL);
              httpCon = (HttpURLConnection) objUrl.openConnection();
                   //DownLoad the File
                   InputStream fileInputStrm = httpCon.getInputStream();
                   // create a file object which will contain the directory structure to copy in the local machine
                   localZipFile = new File(strLocalFilePath+strZipFileName);
                   FileOutputStream fileOutStrm = new FileOutputStream(localZipFile);
                   int ch;
              while ((ch = fileInputStrm.read()) != -1) {
                        fileOutStrm.write(ch);
                   // Close the InputStream, HTTP connection , File stream
              fileInputStrm.close();
              httpCon.disconnect();
              fileOutStrm.close();
    Now when the home page of the site is loaded it makes the connection and controller redirects this request to one of the web servers (say 1) which is least loaded.
    Now when the applet is loaded, the new connection is established to the controller and it may redirect the request to any one of the 3 web servers (not necessarily to 1 which is required). Now sometimes it hits the right web server on which the required zip file is stored, and sometimes it doesn't hit the correct server.
    Any clue what we can do in this scenario so that the applet downloads the correct file from the right server?
    Please help it is very urgent....
    Thanks

    Did you ever get a response to this or figure out how to run in a clustered environment? I am now running into the same issue and would be interested in whatever you learned.

  • Java Applet Communication

    I have discovered that a Java Applet in a browser (Win or Mac) can talk to a Servlet on a server to access a database.
    Is there anyway that a Java Applet in a browser (Win or Mac) can talk to a Java application running on the client system so that it can access local databases?
    I was thinking something like writing cookies and then using the java application to read the contents and act accordingly. This would obviously be slow as far as feedback is concerned, is there a quicker or better way?
    Thanks
    James.

    I had the same problem and i had to implement a server running on my local machine.
    The servlet on the server allow me to access the local database.
    As for trying to change the policy tool.....it's a nightmare.
    I would recommend you to use a applet-servlet communication..

  • DAC APPLET DEPLOYMENT(urgent)

    Iam getting problem when deploying DAC APPLET
    .iam getting exception of :
    cannot instantiateclass JboInitialContextFactory
    detail:DAC405:sessionInfo:oracle.jbo.common.jboInitialContextFactory
    applicationModuleCrationfailed
    pls Respond Immediately
    this is urgent

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Joe Martine ([email protected]):
    I have a similiar situation deploying to Visibroker. What are you trying to do? Maybe we can help each other????<HR></BLOCKQUOTE>
    Type 'Deplying a Java From' in Help. Under 'Deplying an Infobus Java applet' is a paragraph (maybe the second) which says that its not possible to use DAC Applet clients for EJBs, etc. (if that is what ur trying to do). However, it says that DAC applet client deployment is possible with Visibrobroker objects. Joe, what exactly is it that ur trying to do? I'm working on the
    applet --> servlet --> EJB --> Oracle
    walkaround for the applet --> EJB problem. If anyone had any success on this using JDeveloper or any leads please reply here or e-mail to [email protected]
    null

  • JSP to Applet Communication

    Hello Java Guys,
    We know how to communicate applet and servelt.But i have no idea on how to communicate JSP to applet.If anybody have any idea please let me know.Thanks in advance..
    with cheers
    Basha

    HI,
    When u use applet-servlet communication, servlet (which u've written in out.println()) writes the content in the streams,it get backs to the urlconnection.getOUtputStream(),u get only what written in out.println().
    when u using applet-jsp communication, servletengine converts jsp-servlet,servlet writes the total content (which present in jsp page) in the streams.u get all the content including ur html tags.

Maybe you are looking for