Problem with socket and object writing

Hi,
I programm this client/server app, the client has a point (graphic ) , the server has a point and when the mouse is moving it moves the point and the new position is send via the socket.
The probleme is that i don't receive the good thing.
When i display the coord of the point before sending it's good , but when receiving from the socket the coords are always the same ...
i don't understand .
Well , try and tell me ...
Thx.

oups, the program can be usefull ...
import java.applet.*;
import java.awt.*;
import java.util.*;
import java.awt.event.*;
public class server_JFrame extends javax.swing.JFrame implements MouseListener,MouseMotionListener{
point p1,p2;
server s;
public server_JFrame()
this.setSize(600,400);
addMouseListener(this);
addMouseMotionListener(this);
p2=new point(50,50,new Color(0,0,255));
p1=new point(200,200,new Color(255,0,0));
s = new server(p2,this);
public void paint(Graphics g)
super.paint(g);
g.setColor(p1.get_color());
g.fillOval(p1.get_x(), p1.get_y(),10,10);
g.setColor(p2.get_color());
g.fillOval(p2.get_x(), p2.get_y(),10,10);
public void mouseClicked(MouseEvent e) { }
public void mouseEntered(MouseEvent e) {}
public void mouseExited(MouseEvent e) {}
public void mousePressed(MouseEvent e) {}
public void mouseReleased(MouseEvent e) {}
public void mouseDragged(MouseEvent e) {}
public void mouseMoved(MouseEvent e)
p1.set_x(e.getX());
p1.set_y(e.getY());
s.write_point(p1);
repaint();
public static void main(String args[])
     server_JFrame sjf = new server_JFrame();
sjf.setDefaultCloseOperation(EXIT_ON_CLOSE);
     sjf.setTitle("server");
sjf.show();
import java.io.*;
import java.net.*;
import java.util.*;
import java.awt.*;
public class server {
point p_;
Container c_;
ObjectInputStream Istream_;
ObjectOutputStream Ostream_;
public server(point p,Container c)
p_=p;
c_=c;
try
ServerSocket server = new java.net.ServerSocket(80);
System.out.println("attente d'un client");
java.net.Socket client = server.accept();
System.out.println("client accept�");
Istream_ = new ObjectInputStream(client.getInputStream());
Ostream_ = new ObjectOutputStream(client.getOutputStream());
ThreadRead tr = new ThreadRead(Istream_,p_,c_);
catch (Exception exception) { exception.printStackTrace(); }
public void write_point(point p)
try
System.out.print("x="+p.get_x());
System.out.println(" y="+p.get_y());
Ostream_.flush();
Ostream_.writeObject(p);
Ostream_.flush();
catch (Exception exception) {exception.printStackTrace();}
import java.applet.*;
import java.awt.*;
import java.util.*;
import java.awt.event.*;
public class client_JFrame extends javax.swing.JFrame implements MouseListener,MouseMotionListener{
point p1,p2;
client c;
public client_JFrame()
this.setSize(600,400);
addMouseListener(this);
addMouseMotionListener(this);
p1=new point(50,50,new Color(0,0,255));
p2=new point(200,200,new Color(255,0,0));
c = new client(p2,this);
public void paint(Graphics g)
super.paint(g);
g.setColor(p1.get_color());
g.fillOval(p1.get_x(), p1.get_y(),10,10);
g.setColor(p2.get_color());
g.fillOval(p2.get_x(), p2.get_y(),10,10);
public void mouseClicked(MouseEvent e) { }
public void mouseEntered(MouseEvent e) {}
public void mouseExited(MouseEvent e) {}
public void mousePressed(MouseEvent e) {}
public void mouseReleased(MouseEvent e) {}
public void mouseDragged(MouseEvent e) {}
public void mouseMoved(MouseEvent e)
p1.set_x(e.getX());
p1.set_y(e.getY());
c.write_point(p1);
repaint();
public static void main(String args[])
     client_JFrame cjf = new client_JFrame();
cjf.setDefaultCloseOperation(EXIT_ON_CLOSE);
     cjf.setTitle("client");
cjf.show();
import java.io.*;
import java.net.*;
import java.util.*;
import java.awt.*;
public class client {
point p_;
Container c_;
ObjectInputStream Istream_;
ObjectOutputStream Ostream_;
public client(point p,Container c)
p_=p;
c_=c;
try
ipJDialog ipjd = new ipJDialog();
String ip = ipjd.getvalue();
Socket socket = new Socket(ip,80);
System.out.println("connection avec serveur reussi");
Ostream_ = new ObjectOutputStream(socket.getOutputStream());
Istream_ = new ObjectInputStream(socket.getInputStream());
ThreadRead tr = new ThreadRead(Istream_,p_,c_);
catch (Exception exception) {*exception.printStackTrace();*/System.out.println("connection avec serveur echou�");}
public void write_point(point p)
try
System.out.print("x="+p.get_x());
System.out.println(" y="+p.get_y());
Ostream_.flush();
Ostream_.writeObject(p);
Ostream_.flush();
catch (Exception exception) {exception.printStackTrace();}
import java.io.*;
import java.net.*;
import java.util.*;
import java.awt.*;
public class client {
point p_;
Container c_;
ObjectInputStream Istream_;
ObjectOutputStream Ostream_;
public client(point p,Container c)
p_=p;
c_=c;
try
ipJDialog ipjd = new ipJDialog();
String ip = ipjd.getvalue();
Socket socket = new Socket(ip,80);
System.out.println("connection avec serveur reussi");
Ostream_ = new ObjectOutputStream(socket.getOutputStream());
Istream_ = new ObjectInputStream(socket.getInputStream());
ThreadRead tr = new ThreadRead(Istream_,p_,c_);
catch (Exception exception) {*exception.printStackTrace();*/System.out.println("connection avec serveur echou�");}
public void write_point(point p)
try
System.out.print("x="+p.get_x());
System.out.println(" y="+p.get_y());
Ostream_.flush();
Ostream_.writeObject(p);
Ostream_.flush();
catch (Exception exception) {exception.printStackTrace();}
import java.io.Serializable;
import java.awt.*;
public class point implements Serializable{
private int x_;
private int y_;
private Color c_;
public point(int x, int y, Color c) {
x_=x;
y_=y;
c_=c;
public int get_x() { return x_ ; }
public int get_y() { return y_ ; }
public void set_x(int x) { x_=x ; }
public void set_y(int y) { y_=y ; }
public Color get_color() { return c_ ; }
}

Similar Messages

  • Problems with sockets and InputsStreams

    Hi,
    I ve this code:
    InputStream is = null;
    boolean ok=true;
    while(ok){
    //sc is an object instance of socketConnection
    is = sc.openInputStream();
    return this.parse(is);
    //is.close();
    return "";
    and this exception is produced:
    java.io.IOException: no more Input Streams available.
    This exception is produced in the line:
    is = sc.openInputStream();
    I m connecting to a server and this server sends data throw a socket... but the problem is that when i m reading from this socket and this socket doesn t have data in it...
    how could i solve this problem...?
    Thanks,
    Diego

    That would be the "real" code:
    public String process()throws IOException{
    InputStream is = null;
    is = sc.openInputStream();
    String result= this.parse(is);
    is.close();
    any suggestions?
    Thanks,
    Diego

  • Problem with Socket and dynamic IP

    The problem I have is the following: My domain has a dynamic IP, so after the IP changes the s.accept() does not work any more!
    try // Point 1 *)
    ServerSocket s = new ServerSocket(portNumber);
    for(;;)
    Socket incoming = s.accept(); // does not work after IP changes
    new ThreadedEchoHandler(incoming, i).start();
    So I have to detect that the IP has changed and have to start again at Point 1
    How can I do this?
    thx walter

    Something is vary wrong with your network software if your getting an error on that.
    When you start your computer connected to the network, a DHCP (in your case) Server sends your NIC a dynamic IP address, we call this process "binding". When the client computer connects it also is given an IP address to bind to. You can't connect to anything, or in your case create a ServerSocket, if you dont even have an IP. So your Server has an IP address, and so does the client. You should not be getting any errors unless the client/server network is using two different protocols. You can't run an IPX/SPX network and a TCP/IP network together without a Bridge.
    That does not seem to be your problem. I believe, then, that the problem is that your ThreadedEchoHandler is holding the CPU. Instead of having a client connect (s.accept()) outside of that thread. Have the thread be created by using the arugment of the ServerSocket instead and no the Socket object created.
    new ThreadedEchoHandler(ServerSocket ss);
    Then let it do it's thing. Also, you will need to call it's start() method to actually run the thread as a thread. Otherwise it runs as a simple class.

  • Problem with socket and Threads

    Hi,
    I have coded a package that sends an sms via a gateway.
    Here is what is happening:
    * I create a singleton of my SMSModule.
    * I create an sms object.
    * I put the object in a Queue.
    * I start a new Thread in my sms module that reads sms from queue.
    * I connect to sms gateway.
    * I send the sms.
    * I disconnect from socket! This is where things go wrong and I get the following error (see below).
    I have a zip file with the code so if you have time to take a look at it I would appreciate it.
    Anyway all hints are appreciated!
    //Mikael
    GOT: !LogoffConf:
    mSIP Kommando var: !LogoffConf
    CoolFlix log: MSIPProtocolHandler;setLoggedin(false)
    We got LogOffConf
    Waiting ......for thread to die
    java.net.SocketException: Socket operation on nonsocket: JVM_recv in
    socket input stream read
    at java.net.SocketInputStream.socketRead0(Native Method)
    at java.net.SocketInputStream.read(SocketInputStream.java:116)
    at
    sun.nio.cs.StreamDecoder$CharsetSD.readBytes(StreamDecoder.java:405)

    Off the top of my head, probably the garbage collector cleared your SMSModule coz all classes loaded through other classloaders will be unloaded when that classloader is unloaded.
    mail in the code if you want me to look at it with greater detail.

  • Problem with CASE and Object tables.

    Hi guys,
    Have a problem which I am unable to understand how to solve.
    I have the following object
    create type obj_numeric_id_table as table of number(30);
    create type obj_search_rec as object
    ( zones number(4),
      locs obj_numeric_id_table
    create type obj_search_tbl as table of obj_search_rec;
    /Now this object Obj_search_tbl is being passed as an IN parameter to a procedure...actually the object has many more columns but the problem at hand is with the locs column.
    The problem is - if I use the count for the locs column in an IF statement, then all works fine, but if I use it inside a CASE statement in the SELECT clause, it gives me an error.
    create proc proc_1 (abc obj_search_tbl) .....
    L_search obj_search_rec;
    begin
    L_search_rec := abc(1); -- for the moment there is only one record.
    IF L_search_rec.locs.count() > 0 then -- this works perfectly
    END IF;
    select (case when L_search_rec.locs.count() > 0 then 1 end) from some_table;
    -- now this case statement gives me the following error
    "PL/SQL: ORA-00904: "L_SEARCH_REC"."LOCS"."COUNT": invalid identifier"Am I doing something wrong....am unable to understand why this is so...
    Thanks,

    Other possibility:
    select count(t.column_value) from
    (select obj_search_rec(1, obj_numeric_id_table(1,2)) obj_search_rec from dual) l,
    table(l.obj_search_rec.locs) t;

  • Problem with socket and Flash

    I have a chat application where the client is written in Flash 9 and it connects an XMLSocket to my java server.
    Those that know Flash 9 know that it first makes a policy file request and all you have to do is provide a small chunk of xml stating the desired port and domain.
    To get a better understanding I adding some thread tracking to the server app. Now when I run the following:
    String policy_response = "<?xml version=\"1.0\"?><cross-domain-policy><allow-access-from domain=\"*\" to-ports=\"6000\" secure=\"false\" /></cross-domain-policy>"+ "\0";
    ErrorBroker.addError("name: " + this.currentThread().getName());
    String mes = "";
    if(cs.incoming.ready())
         mes = cs.readln();
         ErrorBroker.addError( this.currentThread().getName()+ " ready: " + mes);
    if(mes.equals("<policy-file-request/>" + "\0"))
         ErrorBroker.addError( this.currentThread().getName()+ " policy hit");
         cs.send(policy_response);
    counter++;
    ErrorBroker.addError( this.currentThread().getName()+" counter: " + counter);and the results I get are the following:
    name: Thread-34
    Thread-34 in ready: <policy-file-request/>
    Thread-34 policy hit
    Thread-34 counter: 1
    Thread-34 after read2: <policy-file-request/>
    END OF processClient()
      Closing socketThere is no second connection though there should be. On the flash end I get nothing..no message stating a connection made or lost.
    Now if I have the server as such:
    ErrorBroker.addError("name: " + this.currentThread().getName());     
    String mes = "";
    /* ---- policy response sent BEFORE readLine() ---- */
    cs.send(policy_response);
    if(cs.incoming.ready())
         mes = cs.readln();
         ErrorBroker.addError( this.currentThread().getName()+ " in ready: " + mes);
    if(mes.equals("<policy-file-request/>" + "\0"))
         ErrorBroker.addError( this.currentThread().getName()+ " policy hit");
    counter++;
    ErrorBroker.addError( this.currentThread().getName()+" counter: " + counter);The one difference being that the policy reply happens before any read.
    I get these results:
    name: Thread-34
    Thread-34 in ready: <policy-file-request/>
    name: Thread-35
    Thread-34 policy hit
    Thread-35 counter: 1
    Thread-34 counter: 2
    Thread-35 after read2:
    Thread-34 after read2: <policy-file-request/>
    io error1: java.lang.StringIndexOutOfBoundsException:String index out of range: 0
    END OF processClient()
    END OF processClient()
      Closing socket
      Closing socketDoes this make sense to anyone? How is it that if I do a readLine before sending the policy request file that nothing happens but I send after a readLine the second socket shows up.
    Any help is GREATLY appreciated.

    The second case does appear to be a threading issue.....but what bothers me the most is why I get nothing from flash when I readLine first. This doesn't seem to be an issue with anyone else and I've seen many examples (though almost all were written in PHP) that are exactly the same. Read first...look for the policy request...then reply accordingly.
    This is a small chat application running on Tomcat 5.5.
    It worked well back when I ran it with Flash 8 but since I upgraded to Flash 9 (had to...no other way around) I now have to deal with this policy issue (apparently it pissed off quite a few developers).

  • Problem with Socket and public IP

    Hi.
    I was create a program to tchat with my friend.
    This program turn good in à local network but i obtain
    A Connection refused: connect exception when I want
    to communiqué by internet :
    I write
    Socket client = new Socket("my public IP",12347);And I was configurate my router to mapping 12347 port.
    Help me please.

    the exception is :
    Connection refused: connect
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.PlainSocketImpl.doConnect(Unknown Source)
         at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
         at java.net.PlainSocketImpl.connect(Unknown Source)
         at java.net.SocksSocketImpl.connect(Unknown Source)
         at java.net.Socket.connect(Unknown Source)
         at java.net.Socket.connect(Unknown Source)
         at java.net.Socket.<init>(Unknown Source)
         at java.net.Socket.<init>(Unknown Source)

  • Problems with sockets and hex code

    When i try to send 0x9d on socket, it send 0x3f. Why?
    conexion = new Socket("server", 0000);
    escritura = new PrintWriter( conexion.getOutputStream(),true);
    escritura.write(0x9d);
    escritura.print("\u009d");
    It always send 0x3f.

    jotremar wrote:
    When i try to send 0x9d on socket, it send 0x3f. Why?
    conexion = new Socket("server", 0000);
    escritura = new PrintWriter( conexion.getOutputStream(),true);
    escritura.write(0x9d);
    escritura.print("\u009d");
    It always send 0x3f.My guess is 0x3f is a question mark, and since you're using PrintWriter which is geared for printing "strings" and the character 0x9d is not in the selected (default, since you didn't specify one) character encoding, it turns it into a question mark.
    Solution: Don't use PrintWriter for sending binary data.

  • Problem with ADS and LDAP

    Problem with ADS and LDAP
    I have installed Win2000 + sp1 and ADS on a computer. This computer is PDC.
    After connection via LDAP I cann't get any object ( users or goups etc. ).
    I try connect to ADS by java ( JNDI ).
    When I use another clients of LDAP ( eg. Maxware Directory Explorer) I have
    the same problem - no objects.
    Can anybody help me?
    Grzegorz Pszona
    my e-mail: [email protected]

    Thanks a lot.
    Softerra's browser is really good.
    Thanks
    Rashmi
    "Anant Kadiyala" <[email protected]> wrote:
    >
    I used Softerra's LDAP browser. The browser is free. There is also a
    java baded
    LDAP browser from Univ of Michigan. I found the Softerra browser to be
    more easier
    to use.
    -anant
    "rashmi" <[email protected]> wrote:
    Hi,
    Can you please let me know which exact ADS tool that you used to examine
    the
    DN. I have Active Directory Users and Computers, Sites and Servicesand
    Domain
    and Trusts installed on my machine but I am not able to figure out how
    to get
    the DN?
    Thanks
    Rashmi
    for Stephen Davies <[email protected]> wrote:
    Grzegorz,
    I have had WLS6.1 & ADS working ok using LDAP V2. Mind you it did take
    a
    fair bit of messing around to get it going. MS does have a few oddities,
    for example the Administrators DN might look something like this:
    cn=Administrator,cn=Users,dc=eglobal,dc=net
    One tool that I found invaluable came with the additional support tools
    for Windows 2000. The 'Active Directory Administration Tool' made it
    easy to list the directory contents and examine the DNs.
    Regards,
    Steve
    Stephen Davies
    Principal Consultant
    eGlobal Services Pty. Ltd.
    Sydney, Australia
    Ph. +61 2 9283 1033
    http://www.eglobal.net/

  • Problem with JTextPane and StateInvariantError

    Hi. I am having a problem with JTextPanes and changing only certain text to bold. I am writing a chat program and would like to allow users to make certain text in their entries bold. The best way I can think of to do this is to add <b> and </b> tags to the beginning and end of any text that is to be bold. When the other client receives the message, the program will take out all of the <b> and </b> tags and display any text between them as bold (or italic with <i> and </i>). I've searched the forums a lot and figured out several ways to make the text bold, and several ways to determine which text is bold before sending the text, but none that work together. Currently, I add the bold tags with this code: (note: messageDoc is a StyledDocument and messageText is a JTextPane)
    public String getMessageText() {
              String text = null;
              boolean bold = false, italic = false;
              for (int i = 0; i < messageDoc.getLength(); i++) {
                   messageText.setCaretPosition(i);
                   if (StyleConstants.isBold(messageDoc.getCharacterElement(i).getAttributes()) && !bold) {
                        bold = true;
                        if (text != null) {
                             text = text + "<b>";
                        else {
                             text = "<b>";
                   else if (StyleConstants.isBold(messageDoc.getCharacterElement(i).getAttributes()) && bold) {
                        // Do nothing
                   else if (!StyleConstants.isBold(messageDoc.getCharacterElement(i).getAttributes()) && bold) {
                        bold = false;
                        if (text != null) {
                             text = text + "</b>";
                        else {
                             text = "</b>";
                   try {
                        if (text != null) {
                             text = text + messageDoc.getText(i,1);
                        else {
                             text = messageDoc.getText(i, 1);
                   catch (BadLocationException e) {
                        System.out.println("An error occurred while getting the text from the message document");
                        e.printStackTrace();
              return text;
         } // end getMessageText()When the message is sent to the other client, the program searches through the received message and changes the text between the bold tags to bold. This seems as if it should work, but as soon as I click on the bold button, I get a StateInvariantError. The code for my button is:
    public void actionPerformed(ActionEvent evt) {
              if (evt.getSource() == bold) {
                   MutableAttributeSet bold = new SimpleAttributeSet();
                   StyleConstants.setBold(bold, true);
                   messageText.getStyledDocument().setCharacterAttributes(messageText.getSelectionStart(), messageText.getSelectionStart() - messageText.getSelectionEnd() - 1, bold, false);
         } //end actionPerformed()Can anyone help me to figure out why this error is being thrown? I have searched for a while to figure out this way of doing what I'm trying to do and I've found out that a StateInvariantError has been reported as a bug in several different circumstances but not in relation to this. Or, if there is a better way to add and check the style of the text that would be great as well. Any help is much appreciated, thanks in advance.

    Swing related questions should be posted in the Swing forum.
    Can't tell from you code what the problem is because I don't know the context of how each method is invoked. But it would seem like you are trying to query the data in the Document while the Document is being updated. Try wrapping the getMessageText() method is a SwingUtilities.invokeLater().
    There is no need to write custom code for a Bold Action you can just use:
    JButton bold = new JButton( new StyledEditorKit.BoldAction() );Also your code to build the text String is not very efficient. You should not be using string concatenation to append text to the string. You should be using a StringBuffer or StringBuilder.

  • Problem with list and map in GWT

    I have a problem with map and list in GWT. I need to put a map in to a list but GWT does not support ArrayList and HashMap since they are not serialized types.
    Exactly I want to create following list with out using ArrayList and HashMap
    ArrayList<HashMap<String, Object>> map = new ArrayList<HashMap<String,Object>>(); Thank you for new ideas,
    Regards

    If try to use ArrayList then I receive following exception when I make a rpc call.
    Caused by: com.google.gwt.user.client.rpc.SerializationException: Type 'java.util.ArrayList' was not included in the set of types which can be serialized by this SerializationPolicy or its Class object could not be loaded. For security purposes, this type will not be serialized.:

  • Problem with HttpURLConnection and HttpSession.

    Hi,
    Problem with HttpURLConnection and HttpSession.
    I created a HttpSession object in my main class and then called a URL via HttpURLConnection.
    I tried to access the same session object from the servlet called by the URL . but the main session
    is not returned a new seperate session is created.let me know how can we continue the same session in
    the called URL also which is created in main class.
    Thanks
    Prasad

    You are not supported to create a HttpSession by java client. Only J2EE web container can create it.

  • Problem with IE and pubblishedIntoWall

    Hi to all,
       i have a problem with InternetExplorer and CallBack
    In my flex code i have :
    flash.external.ExternalInterface.addCallback("pubblishedIntoWall", pubblishedIntoWall);
    The javascript code:
    function pubblishedIntoWallCarrello() {
            document.getElementById("composer").pubblishedIntoWall(1)
    In both Firefox and Chrome the javascript works in the right way.
    In internet explorer the function pubblishedIntoWall is not called.
    Have some one got an idea of this problem?
    Thanks for your time

    First of all, thank for your reply
    This is the code that i use in the HTML, i use   allowScriptAccess = sameDomain
    ----------- CODE -------------------
    <div id="divContainercomposer" style="position:absolute;left:50%;top:0px;width:930;height:100%;margin-left:-465px">
                <script language="JavaScript" type="text/javascript">
                <!--
                // Version check for the Flash Player that has the ability to start Player Product Install (6.0r65)
                var hasProductInstall = DetectFlashVer(6, 0, 65);
                // Version check based upon the values defined in globals
                var hasRequestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
                if ( hasProductInstall && !hasRequestedVersion ) {
                    // DO NOT MODIFY THE FOLLOWING FOUR LINES
                    // Location visited after installation is complete if installation is required
                    var MMPlayerType = (isIE == true) ? "ActiveX" : "PlugIn";
                    var MMredirectURL = window.location;
                    document.title = document.title.slice(0, 47) + " - Flash Player Installation";
                    var MMdoctitle = document.title;
                    AC_FL_RunContent(
                        "src", "playerProductInstall",
                        "FlashVars", "MMredirectURL="+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+"" ,
                        "width", "930",
                        "height", "100%",
                        "align", "middle",
                        "id", "composer",
                        "quality", "high",
                        "bgcolor", "#ffffff",
                        "name", "flashContent",
                        "allowScriptAccess","sameDomain",
                        "type", "application/x-shockwave-flash",
                        "pluginspage", "http://www.adobe.com/go/getflashplayer"
                } else if (hasRequestedVersion) {
                    // if we've detected an acceptable version
                    // embed the Flash Content SWF when all tests are passed
                    AC_FL_RunContent(
                            "src", "composer",
                            "width", "930",
                            "height", "100%",
                            "align", "middle",
                            "id", "composer",
                            "quality", "high",
                            "bgcolor", "#ffffff",
                            "name", "composer",
                           "allowScriptAccess","sameDomain",
                            "type", "application/x-shockwave-flash",
                            "pluginspage", "http://www.adobe.com/go/getflashplayer"
                  } else {  // flash is too old or we can't detect the plugin
                    var alternateContent = 'Alternate HTML content should be placed here. '
                      + 'This content requires the Adobe Flash Player. '
                       + '<a href=http://www.adobe.com/go/getflash/>Get Flash</a>';
                    document.write(alternateContent);  // insert non-flash content
                // -->
                </script>
                <noscript>
                      <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
                            id="flashContent" width="930" height="100%"
                            codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
                            <param name="movie" value="composer.swf" />
                            <param name="quality" value="high" />
                            <param name="bgcolor" value="#ffffff" />
                            <param name="allowScriptAccess" value="sameDomain" />
                            <embed src="composer.swf" quality="high" bgcolor="#ffffff" id="composer"
                                width="930" height="100%" name="composer" align="middle"
                                play="true"
                                loop="false"
                                quality="high"
                               allowScriptAccess="sameDomain"
                                type="application/x-shockwave-flash"
                                pluginspage="http://www.adobe.com/go/getflashplayer">
                            </embed>
                    </object>
                </noscript>
    </div>

  • Problem with Frameset and page session

    All,
    I am having a problem with Framesets and page session attributes. I
    have a client who's application uses a three frame frameset. They
    have a requirement on several pages that when a button is pushed two
    different pages load into the right and left frames. The way they
    are accomplishing this is that on the pages were this is required,
    they are adding target="_top" to the form declaration in their JSP.
    Then they store the page names they want to display in session,
    forward the request to the frameset, the frameset then determines
    which pages to display based on the session variables. This works
    exactly how they want it to.
    Here is our problem. We need to store some information in page
    session attributes. We have tried to get a handle to the desired
    view bean and call the setPageSessionAttribute method. However,
    since we are forwarding to the frame and the frame handles displaying
    the desired JSP, that view bean we had the handle to is not the one
    that is created to hand the display of the JSP.
    The next thing I tried was to use the request object. In the
    handleBtnRequest method, I set an attribute in the request object. I
    then query the request object in the beginDisplay event of the view
    bean. When the frame is reset the request object does not contain
    the attribute that I have set. I'm confused by this because I
    thought the request object would be available to me throughout the
    life of the request.
    Given the above information, does anyone have any suggestions? Also,
    am I going about this in the wrong manner.
    The client had been storing this information in user session, which
    seemed to work. However, since the data being stored dealt
    specifically with data for the requested page, we felt that storing
    it as page session was more appropriate.
    Thanks,

    The script on your page web page has some obvious bugs.. Best
    fix those
    first before looking to blame Flash.
    Jeckyl

  • Problem with BigInteger and MySql

    Hi !!
    I've a problem with BigInteger and MySql.
    I've a BigInteger object (suppose that value is 0.02270412445068359375).
    I must store that value in a database (MySql).
    The value of BigInteger object must be stored in a column of type Decimal.
    Stored value is 0.022704124450683594. Why ??
    My target is to store 0.02270412445068359375
    Can anyone help me?
    Thanks.

    Hi !!
    I've a problem with BigInteger and MySql.
    I've a BigInteger object (suppose that value is
    0.02270412445068359375).
    I must store that value in a database (MySql).
    The value of BigInteger object must be stored in a
    column of type Decimal.if this is the case I fear you are SOL. a decimal is the same size as a double but with a fixed max number of decimal places. if it isn't big enough then you have no real choice other than to VARCHAR it.
    Stored value is 0.022704124450683594. Why ??
    My target is to store 0.02270412445068359375
    Can anyone help me?
    Thanks.

Maybe you are looking for