I have a servlet that sends the HTML for a frameset to the
client.  In the frameset, the source of a couple of the frames
is a call to the same servlet.  I'm having problems getting the
synchronization right in a multi-threaded environment.  (All
works fine in STM)   In a multithreaded environment, the frameset gets
displayed fine along with the last frame, but the other two result in
"no content" errors.  Reloading the frames loads them OK.

I'm thinking that I have to synchronize the member functions
responsible for sending the HTML to the client, but can't
seem to find *what* to synchronize them on.  A static servlet
member value?  This?

Any help would be appreciated.  HELP STAMP OUT STM!

Michael
---------------------------------

sample servlet code:

public void doGet(HttpServletRequest req, HttpServletResponse res) {
    String action = _req.getParameter("a");

    if (action == null) {
        // send HTML code for frameset
        sendFrameset();
    }
    else if ( action.equals("f1") ) {
        // send HTML code to populate frame 1
        sendFrameF1();
    }
    else if ( action.equals("f2") ) {
        // send HTML code to populate frame 2
        sendFrameF2();
    }

}

---------------
frameset code (headers and other stuff omitted):

    <FRAMESET   BORDER="3" FRAMEBORDER=yes COLS="275,*">
        <FRAMESET BORDER=3 FRAMEBORDER=yes ROWS="180,*">
              <FRAME
                     MARGINHEIGHT="0"
                     MARGINWIDTH="0" NAME="searchframe"
                     SRC = "http://host/servlet/servletname?a=f1"
              >
              <FRAME MARGINHEIGHT="0"
                     MARGINWIDTH="0" NAME="tocframe"
                     SRC="http://host/servlet/servletname?a=f2">
        </FRAMESET>
        <FRAME
               NAME="contentframe"
        >

    </FRAMESET>
------------------
---
Michael Stacey
Lexi-Comp, Inc.
1100 Terex Road
Hudson OH 44236
(330) 650-6506

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to