Stop direct execution of JSPs

Hi,
Is it possible to stop the user from deirectly executing a jsp file by typing the url in browser. I want to use the jsp only as a include file in other jsp pages.
Thanks a lot,
Chamal.

http://forum.java.sun.com/thread.jspa?threadID=630236

Similar Messages

  • How can I stop the execution on a JSP page and start it again

    Hi
    I am making a program that simulates how to manage transactions when accessing a database by using locks. I have run into a problem and I hope someone has the time to help me.
    When a user does an update the transaction commits and releases its locks when the program executes
    <%stmt.executeUpdate("commit!"); %>
    I need to put a break in to stop the program executing this statement, to illustrate the lock is set correctly.
    I have tried to put in an alert box but this does not prevent the rest of the java code being executed.
    I have tried to use prompt boxes, JavaScript functions, but these functions cannot have any java code in them.
    I have tried using the java.swing JOptionPane boxes but this didn?t work either
    I have tried to get input from the user but I don?t know how to retrieve this data on the same page. (As far as I know you have to use submit and even refresh the page or retrieve it on the next page).
    Does anyone know how I can stop the execution on a JSP page and start it again (on same page)
    Mette

    I already have another client (Tomcat jsp application) running and it throws a SQLException correctly when I don�t put in a commit=true statement and don't close the database connection.
    But the problem is how to get the code above to stop to illustrate I have set this lock.
    I have tried to use the JOptionPane but because my program is running in a web browser I cannot use the JOptionPane dialog box.
    I have tired using an alert box but it executes the commit statement before the alert box is dispayed. So this does not work
    While (i < 2)
    if( i==1)
    %>alert(�The transactions commits when you press Ok�); <% //what it to stop execution here
    else
    stmt.executeUpdate(�commit�);
    I am not using threads so I cannot use the sleep function.
    I am using mysql and have already configured it to detect deadlocks and how long to wait for locks.
    Thanks for your help
    Mette

  • Stop direct calls to a jsp

    Hi,
    Is it possible to stop users from directly calling a jsp file by typing the address in browser. I just want to include this jsp file in other jsp files.
    Thanks a lot,
    Chamal.

    Put the JSP under your WEB-INF directory:
    <APP-BASE>/publiclyAvailable.jsp
               WEB-INF/jsps/onlyIncludeMe.jspThen when you want to include it, use
    <jsp:include page="/WEB-INF/jsps/onlyInvludeMe.jsp"/>Users will be unable to access the page directly because the WEB-INF is not visible to them. But it is available to your JSPs (or servlets) to do an include/forward to...

  • How to prevent the direct execution of a Z T.Code

    Hello Friends,
    The scenario is like this :
    I am going to create an Z T.Code. I have to block this T.Code from direct execution(means executing it directly by calling from Command Field). But I must be able to execute the same T.Code from within a program by calling it using LEAVE TO TRANSACTION <T.CODE>./ CALL TRANSACTION <T.CODE>.
    Is this possible with any form of Basis configurations? Please help.
    Regards,
    Abijith

    The scenario you are trying is what we call a Function Module in ABAP. You can implement the same code as your program in an FM and simply call it. FM has options for test execution, incase you are worried about that. There are various features associated with FM execution i.e. Background, Foreground, RFC, Asynchronous, Synchronous etc all you need is to press F1 and check documentation. Even screen processing can be done using the same but incase you are not comfortable create a program and use Submit. No need to create a transaction itself. Moreover pls check the neccessity of preventing the tcode to be used. Because a user will never know about a tcode unless you tell them. So why worry about it's execution. Check autorization and roles as well in order you need the program to be run by specific users only.

  • Direct Execution of query having Unicode Characters

    Direct Execution of query having Unicode Characters
    Hi All,
    In my application I am firing a Select Query having Unicode characters in Where Clause under condition like '%%'
    to Oracle 10g DB from a Interface written in VC6.0...
    Application funcationality is working fine for ANSI characters and getting the result of Select properly.
    But in case of Unicode Characters in VC it says 'No Data Found'.
    I know where the exact problem is in my code. But not getting the exact solution for resolving my issue...
    Here with I am adding my code snippet with the comments of what i understand and what i want to understand...
    DBPROCESS Structure used in the functions,_
    typedef struct
    HENV hEnv;
    HDBC hDbc;
    HSTMT hStmt;
    char CmdBuff[[8192]];
    char RpcParamName[[255]];
    SQLINTEGER SpRetVal;
    SQLINTEGER ColIndPtr[[255]];
    SQLINTEGER ParamIndPtr[[255]];
    SQLPOINTER pOutputParam;
    SQLUSMALLINT CurrentParamNo;
    SQLUSMALLINT OutputParamNo;
    SQLUSMALLINT InputParamCtr;
    SQLINTEGER BatchStmtNo;
    SQLINTEGER CmdBuffLen;
    short CurrentStmtType;
    SQLRETURN LastStmtRetcode;
    SQLCHAR SqlState[[10]];
    int ShowDebug;
    SQLCHAR* ParameterValuePtr;
    int ColumnSize;
    DBTYPE DatabaseType;
    DRVTYPE OdbcDriverType;
    BLOCKBIND *ptrBlockBind;
    } DBPROCESS;
    BOOL CDynamicPickList::GetResultSet(DBPROCESS *pDBProc, bstrt& pQuery, short pNumOdbcBindParams, COdbcBindParameter pOdbcBindParams[], CQueryResultSet& pQueryResultSet)
         int               lRetVal,
                        lNumRows;
         bstrt               lResultSet;
         wchar_t               lColName[[256]];     
         SQLUINTEGER          lColSize;
         SQLSMALLINT          lColNameLen,
                        lColDataType,
                        lColNullable,
                        lColDecDigits,                         
                        lNumResultCols;
         wchar_t               lResultRow[[32]][[256]];
    OdbcCmdW(pDBProc, (wchar_t *)pQuery); *//Query is perfectly fine till this point all the Unicode Characters are preserved...*
         if ( OdbcSqlExec(pDBProc) != SUCCEED )
              LogAppError(L"Error In Executing Query %s", (wchar_t *)pQuery);          
              return FALSE;
    Function OdbcCmdW_
    //From this point have no idea what is exactly happening to the Unicode Characters...
    //Actually i have try printing the query that gets stored in CmdBuff... it show junk for Unicode Characters...
    //CmdBuff is the Char type Variable and hence must be showing junk for Unicode data
    //I have also try printing the HexaDecimal of the query... I m not getting the proper output... But till i Understand, I think the HexaDecimal Value is perfect & preserved
    //After the execution of this function the call goes to OdbcSqlExec where actual execution of qurey takes place on DB
    SQLRETURN OdbcCmdW( DBPROCESS p_ptr_dbproc, WCHAR      p_sql_command )
         char *p_sql_commandMBCS;
         int l_ret_val;
         int l_size = wcslen(p_sql_command);
         int l_org_length,
    l_newcmd_length;
    p_sql_commandMBCS = (char *)calloc(sizeof(char) * MAX_CMD_BUFF,1);
    l_ret_val = WideCharToMultiByte(
                        CP_UTF8,
                        NULL,                         // performance and mapping flags
                        p_sql_command,          // wide-character string
                        -1,                         // number of chars in string
                        (LPSTR)p_sql_commandMBCS,// buffer for new string
                        MAX_CMD_BUFF,                    // size of buffer
                        NULL, // default for unmappable chars
                        NULL // set when default char used
    l_org_length = p_ptr_dbproc->CmdBuffLen;
    l_newcmd_length = strlen(p_sql_commandMBCS);
    p_ptr_dbproc->CmdBuff[[l_org_length]] = '\0';
    if( l_org_length )
    l_org_length++;
    if( (l_org_length + l_newcmd_length) >= MAX_CMD_BUFF )
    if( l_org_length == 0 )
    OdbcReuseStmtHandle( p_ptr_dbproc );
    else
    strcat(p_ptr_dbproc->CmdBuff, " ");
         l_org_length +=2;
    strcat(p_ptr_dbproc->CmdBuff, p_sql_commandMBCS);
    p_ptr_dbproc->CmdBuffLen = l_org_length + l_newcmd_length;
    if (p_sql_commandMBCS != NULL)
         free(p_sql_commandMBCS);
    return( SUCCEED );
    Function OdbcSqlExec_
    //SQLExecDirect Requires data of Unsigned Char type. Thus the above process is valid...
    //But i am not getting what is the exact problem...
    SQLRETURN OdbcSqlExec( DBPROCESS *p_ptr_dbproc )
    SQLRETURN l_ret_val;
    SQLINTEGER l_db_error_code=0;
         int     i,l_occur = 1;
         char     *token_list[[50]][[2]] =
    {     /*"to_date(","convert(datetime,",
                                       "'yyyy-mm-dd hh24:mi:ss'","1",*/
                                       "nvl","isnull" ,
                                       "to_number(","convert(int,",
                                       /*"to_char(","convert(char,",*/
                                       /*"'yyyymmdd'","112",
                                       "'hh24miss'","108",*/
                                       "sysdate",     "getdate()",
                                       "format_date", "dbo.format_date",
                                       "format_amount", "dbo.format_amount",
                                       "to_char","dbo.to_char",
                                       "to_date", "dbo.to_date",
                                       "unique","distinct",
                                       "\0","\0"};
    char          *l_qry_lwr;  
    l_qry_lwr = (char *)calloc(sizeof(char) * (MAX_CMD_BUFF), 1);
    l_ret_val = SQLExecDirect( p_ptr_dbproc->hStmt,
    (SQLCHAR *)p_ptr_dbproc->CmdBuff,
    SQL_NTS );
    switch( l_ret_val )
    case SQL_SUCCESS :
    case SQL_NO_DATA :
    ClearCmdBuff( p_ptr_dbproc );
    p_ptr_dbproc->LastStmtRetcode = l_ret_val;
    if (l_qry_lwr != NULL)
         free(l_qry_lwr);
    return( SUCCEED );
    case SQL_NEED_DATA :
    case SQL_ERROR :
    case SQL_SUCCESS_WITH_INFO :
    case SQL_STILL_EXECUTING :
    case SQL_INVALID_HANDLE :
    I do not see much issue in the code... The process flow is quite valid...
    But now i am not getting whether,
    1) storing the string in CmdBuff is creating issue
    2) SQLExecDirect si creating an issue(and some other function can be used here)...
    3) Odbc Driver creating an issue and want some Client Setting to be done(though i have tried doing some permutation combination)...
    Any kind of help would be appreciated,
    Thanks & Regards,
    Pratik
    Edited by: prats on Feb 27, 2009 12:57 PM

    Hey Sergiusz,
    You were bang on target...
    Though it took some time for me to resolve the issue...
    to use SQLExecDirectW I need my query in SQLWCHAR *, which is stored in char * in my case...
    So i converted the incoming query using MultibyteToWideChar Conversion with CodePage as CP_UTF8 and
    then passed it on to SQLExecDirectW...
    It solved my problem
    Thanks,
    Pratik...
    Edited by: prats on Mar 3, 2009 2:41 PM

  • Submit is not working in direct execution

    Hi All,
    I want to pass multiple values to the order number(select-options) in the selection screen,
    and skip this first screen and should change these order values in the screen.
    for this i am using submit statement,it is working in debug mode but not working in direct execution.
    Could please any one tell me why it's happening like this.
    Below is the code for submit if there is any wrong correct me.
              SUBMIT riaufk20 USING SELECTION-SCREEN '1000'
                                    WITH SELECTION-TABLE lt_rsparams
                                    WITH dy_tcode = lc_tcode
                                    AND  RETURN.
    Thanks,
    Suresh.

    Hi Suresh,
    Your question has been asked many times but there is no direct solution found till now.
    Your one option is Copy the code from RIAUFK20 after event START-OF-SELECTION. and call it in your own program
    Note that you will have to also declare the data(selection criteria and other tables) as well fill them in your program
    Example.
    RANGES: gr_date  FOR sy-datum.
    DATA: datuv TYPE i_termab,
          datub TYPE i_termbi.
    PERFORM create_date_range_f67(riaufk20) TABLES gr_date
                                    USING  datuv datub.
    Regards,
    Jovito

  • How to halt the execution of JSP page..

    Hello all,
    I want to halt the execution of JSP page suppose for 10 seconds
    can anyone tell me how to do this
    Thanks
    Uttam

    ok
    thanks
    but this code will refresh the page after every 10 seconds.
    what i want that when click on a button on a page it will wait for 10 seconds
    then it should get refreshed only once i mean whenever i click on button
    not in ever 10 seconds
    thanks
    Uttam

  • Behavior of "Stop Filter Execution" filter action

    What is the intended behavior of the "Stop Filter Execution" filter action? I cannot find any recent documentation on that issue. When part of manually run filters, is "Stop Filter Execution" designed to stop all remaining filters for all messages if the filter that contains it matches once? That appears to be the behavior for me. When included in the first filter of several filters, only the first filter matches and the log only indicates instances of matching of the first filter, although several other subsequent filters should match for several messages that do not match the first filter.
    I appreciate the functionality of Thunderbird's filters, but am trying to find a solution for implementing more complex boolean logic for moving messages from my Inbox using manually run filters. I have several filters set up for categorizing messages, but I would like to implement the filters such that they are not applied to starred messages. Currently, I have logic in most of the filters to not match a starred message by using the "Match all of the following" option, however this prevents use of OR logic in the filter and leads to an increased number of filters. I would like to set up the filters such that a first filter matches starred messages and prevents the remaining filters from being run only for those messages which match the first filter.
    It may be that the behavior that I am seeing is a bug specific to my installation, but I'd like to get confirmation on the expected behavior and see if others have encountered this issue. I am working under the assumption that the behavior of "Stop Filter Execution" should stop subsequent filter processing only for messages on which a containing filter matches as indicated in the old post at https://groups.google.com/forum/#!topic/mozilla.feedback.thunderbird.prerelease/rUXaQ0NdZvM, but that assumption may be wrong.
    Any help or suggestions are appreciated.

    Ok, it looks like this is a documented bug, for example at https://bugzilla.mozilla.org/show_bug.cgi?id=552936. I should have searched bug reports before posting here. I'll track things with the bug reports. Thanks.

  • Program running fine in Debug mode but failing in direct execution

    Hi All,
    I am facing a peculiar problem, I have created a report that create STO then Delivery and then Shipment one after one. I have used BAPI to do so. If STO creation is successful then Create Delivery and if delivery creation is also successfull then create Shipment.
    When I run this program by pressing execute button it is only creating STO and coming out ,but if I run it in Debug mode I get all the three( STO, Delivey,Shipment). Since it run fine in debug so I can't found where the problem is.
    Can any one help???
    Regards
    Hemant

    Hi guys,
    A learning for me .... how important WAIt parmeter is in commit work .. Initially i have not set WAIT paramater in commit BAPI to X due to this further processing.. Delivery and Shipment creation was failing in direct execution ... as after STO creation I was reding EKPO and that was failing in direct execution , but in backgroung everything was ok.
    Thanks for your time.
    Cheers
    Hemant

  • Stopping the execution in between

    Hi,
    I am using a Event structure to Start and Stop the test. In the Start event i will be having a stacked sequence which consists of many sequences. In the Stop Event I will be stopping the execution. If I press Start button the sequence under this event will start running. I want to Stop the execution or skip the next set of sequences in between the sequence. During this I lose the control over the GUI and I cannot do anything until the sequence under the Start event is completed. I can stop the execution by pressing the abort button but i want do it programmatically.
    Regards,
    Rajashekar

    Here you go...your code with state machine implementation. If you implement it this way, you can definitely take care of the case that you have mentioned.
    Example in LV 8.6.
    Adnan Zafar
    Certified LabVIEW Architect
    Coleman Technologies
    Attachments:
    Sample_State_Machine.zip ‏14 KB

  • App store Will download, but stops directly ? Why, and Howards to repair  this problem. Martin from Holland

    App store Will start to download à app, but stops directly and want run and finisch the Job.
    Wat to do to fix THE problem.

    I have the opposite problem. for me I can't get Mavericks to install period. I keep getting the message "cannot install on macintosh hd"
    what am i doing wrong or missing?

  • Need to stop servlet execution until another thread completes its execution

    Hi all,
    i created servlet & in the doPost method i run a thread,after the thread end its execution, the servelt takes a result from this thread & do something in it.
    my problem is that , i need to make the servlet stop the execution until this thread ends, & then the servlet continue in executing the remaining code.
    welcome to any help.

    This appears to be a threads related problem. Try Thread.join - http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Thread.html#join()

  • How can i stop directly??

    That is my Programm , i want to stop directly not until the process finished:--------->Please Help
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import java.util.*;
    import java.applet.*;
    import java.util.Random;
    import java.util.Hashtable;
    public class FigureTe extends java.applet.Applet
    public Scrollbar scrollbar;
    public Scrollbar scrollbar2;
    public Button button, button_reset;
    public Label label_T, label_Z, label1,label2,label3,label4,label5;
    int delay=10;
    int e=0;
    int x;
    boolean filly = false;
    boolean filly1 = false;
    Thread th;
    public void init() {
    Panel pan = new Panel();
    NullPanel ana = new NullPanel();
    Steuerung is = new Steuerung(ana) ;
    ana.setBackground(Color.white);
    pan.setBackground(Color.white);
    label1= new Label("Schwellwert nach");
    label2= new Label("AD Wandlung");
    label3= new Label("additives Rauschen");
    label4= new Label("Niedrig");
    label5= new Label("Hoch");
    //add(is);
    Panel Panelwael = new Panel();
    /*setLayout(new BorderLayout());
    Panelwael.setLayout(new GridLayout(1,2));
    ana.setBackground(Color.white);
    is.setBackground(Color.white);
    setLayout(new BorderLayout());
    Panelwael.setLayout(new BorderLayout());
    Panelwael.add(ana);
    add(Panelwael) ;
    //pan.setLayout(new GridLayout(6,1,100,10));
    pan.setLayout(new BulletinLayout());
    //add (button1)
    //pan.add(label_T);;
    pan.add (scrollbar);
    pan.add (scrollbar2);
    pan.add (button);
    pan.add (button_reset);
    label_T.setForeground(Color.blue);
    pan.add(label_T);
    pan.add(label1);
    pan.add(label2);
    label3.setForeground(Color.red);
    pan.add(label3);
    label4.setForeground(Color.red);
    pan.add(label4);
    label5.setForeground(Color.red);
    pan.add(label5);
    //pan.add(label_Z);
    scrollbar.setLocation(0, 45);
    scrollbar.setSize(30,140);
    scrollbar2.setLocation(0, 200);
    scrollbar2.setSize(30,140);
    button.setLocation(0, 360);
    button.setSize(70,20);
    button_reset.setLocation(0, 390);
    button_reset.setSize(70,20);
    label_T.setLocation(35, 90);
    label_T.setSize(40,140);
    label1.setLocation(30, 40);
    label1.setSize(40,160);
    label2.setLocation(30, 60);
    label2.setSize(40,100);
    label3.setLocation(35,250);
    label3.setSize(120,70);
    label4.setLocation(35,180);
    label4.setSize(120,70);
    label5.setLocation(35,300);
    label5.setSize(120,70);
    add(Panelwael) ;
    add(pan,"East");
    class NullPanel extends Canvas {
    private boolean running=false,clear=true;
    //private int delay=4000;
    int x1,y1,y2,x2;
    int i;
    int h;
    int x=0;
    //Listener List=new Listener();
    Random random = new Random();
    public int FeldSize = 60;
    //int t = ((int) (Math.random()*10));
    public double[] t= new double[FeldSize];
    int puls;
    double[] l= new double[8];
    double[] yala= new double[60];
    int s;
    int s2;
    int ma�stab = 20; // 1 == 20 Pixel;
    int y= -15*ma�stab;
    int c;
    private Color[] colors = {
    Color.black};
    NullPanel sidi;
    Steuerung is = new Steuerung(sidi);
    public int setvar(int var) {
    s=var;
    return s;
    public int setvarY(int vary) {
    s2=vary;
    return s2;
    public void paint(Graphics g) {
    // Dimension d = size();
    Font font = g.getFont();
    g.setColor(Color.black);
    g.translate(1*ma�stab,20*ma�stab);
    // Koordinatensystem zeichnen
    g.drawLine(-20*ma�stab, 0, 30 * ma�stab, 0); // X-Achse
    g.drawLine(0, -20*ma�stab, 0, 20*ma�stab); // Y-Achse
    // Achsen beschriften
    g.drawString("x", -ma�stab,- ma�stab);
    g.drawString("y", -ma�stab, -19 * ma�stab);
    // und Einheiten zeigen
    for(int i = -20; i <= 30; i++)
    g.drawLine(i * ma�stab, - 4, i * ma�stab, 4);
    g.drawLine(- 4, i * ma�stab, 4, i * ma�stab);
    //painto();
    g.setColor(Color.blue);
    g.drawLine(0*ma�stab, -15*ma�stab+3*setvar(s),820,-15*ma�stab+3*setvar(s));
    g.setColor(Color.black);
    g.drawRect(0*ma�stab, -2*ma�stab,30*ma�stab+8,4*ma�stab);
    g.setColor(Color.black);
    g.setFont(font = new Font("Timesroman", Font.PLAIN, 14));
    g.drawString ("zeitlicher Verlauf des Signals am Empf�nger", 1*ma�stab-1, -19*ma�stab-10);
    g.setFont(font = new Font("Timesroman", Font.PLAIN, 16));
    g.drawString(" zuf�llige Pulsfolge am Eingang der �bertragungsstrecke", 1*ma�stab -5, -3*ma�stab);
    g.drawString(" detektierte Pulsfolge am Empf�nger nach AD-Wandlung", 1*ma�stab -5, 4*ma�stab);
    g.setColor(Color.red);
    g.drawRect(0*ma�stab,5*ma�stab,30*ma�stab+8,4*ma�stab);
    g.setColor(Color.black);
    g.drawLine(0,7*ma�stab, 30*ma�stab, 7*ma�stab);
    /*g.setColor(Color.black);
    g.drawLine(0,70+(d.height/4),240,70+(d.height/4)); */
    //g.drawLine(0,70,240,70);
    if (filly) { // Start Button
    for (i=0; i<t.length; i++) {
    c=i;
    //zuf�lige gaussische Zahlen werden erzeugt
    t[i] =((random.nextGaussian())) ;
    //Signal 0
    if (t<=0.0 ) {
    puls = -1;
    //Signal 1
    else puls = 1;
    g.setColor(colors[(int)(Math.random()*1)]);
    //int t1=100;
    // wenn die Signal 0 ist, dann ezeugen
    if (puls ==-1 ) {
    //---------> negative Signal gezeichnet
    Out:
    for (e=0 ; e< 10000 ;e++){
    g.fillRect(i*10,0*ma�stab,10,10);
    g.fillRect(c*10,7*ma�stab,10,10);
    //<----------
    // g.fillOval(i*5, -5*ma�stab+10, 2, 2);
    for (int j=0; j<=19;j++) {
    if (setvar(s)> yala[j] & t[3*j]<0 & setvar(s)!=0 & setvar(s2)!=0 ) {
    t[3*j]=2.0321; t[3*j+2]=2;
    g.setColor(Color.gray) ;
    g.fillRect((i)*10,6*ma�stab+ma�stab/2,10,10);
    g.setColor(Color.white) ;
    g.fillRect((i)*10,7*ma�stab,10,10);
    if (puls ==1 ) {
    //--------->HIER wird die positive Signal gezeichnet
    // for (e=0 ; e< 10000;++e){
    g.setColor(Color.black) ;
    g.fillRect(i*10,-ma�stab/2,10,10);
    g.fillRect(c*10,6*ma�stab+ma�stab/2,10,10);
    //g.fillOval(i*5, -6*ma�stab, 2, 2);
    for (int j=0; j<=19;j++) {
    if (setvar(s)<= yala[3*j] & t[3*j]>0 & setvar(s)!=0 & setvar(s2)!=0) {
    t[3*j]=0;t[3*j+2]=0;
    g.setColor(Color.gray) ;
    g.fillRect(i*10,7*ma�stab,10,10);
    g.setColor(Color.white) ;
    g.fillRect(i*10,6*ma�stab+ma�stab/2,10,10);
    if (setvar(s)<= yala[3*j+2] & t[3*j+2]>0 & setvar(s)!=0 & setvar(s2)!=0) {
    t[3*j+1]=0;t[3*j+2]=0;
    g.setColor(Color.gray) ;
    g.fillRect(i*10,7*ma�stab,10,10);
    g.setColor(Color.white) ;
    g.fillRect(i*10,6*ma�stab+ma�stab/2,10,10);
    //////////Erg�nzung/////////////////
    for (int j=0; j<=19;j++) {
    yala[i] = t[i] ;
    System.arraycopy(t, 0, yala, 0, t.length);
    //System.out.println(t[j]);
    l[j/3] =((random.nextGaussian())) ;
    /* if (setvar(s)<= yala[3*j] & t[3*j]>0 & setvar(s)!=0 & setvar(s2)!=0) {
    t[3*j]=0;t[3*j+2]=0;
    g.setColor(Color.gray) ;
    g.fillRect(i*10,7*ma�stab,10,10);
    g.setColor(Color.white) ;
    g.fillRect(i*10,6*ma�stab+ma�stab/2,10,10);
    if (setvar(s)<= yala[3*j+2] & t[3*j+2]>0 & setvar(s)!=0 & setvar(s2)!=0) {
    t[3*j+1]=0;t[3*j+2]=0;
    g.setColor(Color.gray) ;
    g.fillRect(i*10,7*ma�stab,10,10);
    g.setColor(Color.white) ;
    g.fillRect(i*10,6*ma�stab+ma�stab/2,10,10);
    // System.out.println(l[i]) ;
    if (t[3*j]>0 && t[3*j+1]<= 0 && t[3*j+2] >0 ) {
    for (int k=10; k<=2*ma�stab ;k+=5){
    g.fillOval((int)(4*ma�stab+k),(int)(-18*ma�stab+7*k/2), 2,2);
    g.fillOval((int)(10*ma�stab+k),(int)(-11*ma�stab-7*k/2), 2,2);
    if (setvarY(s2)>5){
    g.fillOval((int)(4*ma�stab+0.5*k),(int)(-18*ma�stab+7*k/2), 2,2);
    g.fillOval((int)(11*ma�stab+0.5*k),(int)(-11*ma�stab-7*k/2), 2,2);
    for (int k=10; k<=4*ma�stab ;k+=30){
    // erste Signal
    g.setColor(Color.black);
    g.fillOval((int)(0*ma�stab+k),(int)(-18*ma�stab), 2,2);
    g.fillOval((int)(6*ma�stab+k),(int)(-11*ma�stab), 2,2);
    g.fillOval((int)(12*ma�stab+k),(int)(-18*ma�stab), 2,2);
    if (t[3*j]<=0 && t[3*j+1]> 0 && t[3*j+2] <=0 ) {
    for (int k=10; k<=2*ma�stab ;k+=5){
    g.setColor(Color.black);
    g.fillOval((int)(4*ma�stab+k),(int)(-11*ma�stab-7*k/2), 2,2);
    g.fillOval((int)(10*ma�stab+k),(int)(-18*ma�stab+7*k/2), 2,2);
    if (setvarY(s2)>=5){
    g.fillOval((int)(4*ma�stab+0.5*k),(int)(-11*ma�stab-7*k/2), 2,2);
    g.fillOval((int)(10*ma�stab+0.5*k),(int)(-18*ma�stab+7*k/2), 2,2);
    for (int k=10; k<=4*ma�stab ;k+=30){
    // erste Signal
    g.setColor(Color.black);
    g.fillOval((int)(0*ma�stab+k*l[j/8]),(int)(-11*ma�stab+setvarY(s2)*l[j/8]), 2,2);
    g.fillOval((int)(6*ma�stab+k*l[j/8]),(int)(-18*ma�stab+2*setvarY(s2)*l[j/8]), 2,2);
    g.fillOval((int)(12*ma�stab+k*l[j/8]),(int)(-11*ma�stab+setvarY(s2)*l[j/8]), 2,2);
    // 0 1 1 //
    if (t[3*j]<=0 && t[3*j+1]> 0 && t[3*j+2] >0 ) {
    for (int k=10; k<=2*ma�stab ;k+=5){
    g.fillOval((int)(4*ma�stab+k),(int)(-11*ma�stab-7*k/2), 2,2);
    if (setvarY(s2)>=7){
    g.fillOval((int)(4*ma�stab+k*0.6),(int)(-11*ma�stab-7*k/2), 2,2);
    for (int k=10; k<=4*ma�stab ;k+=10){
    // erste Signal
    g.setColor(Color.black);
    g.fillOval((int)(0*ma�stab+k),(int)(-11*ma�stab+setvarY(s2)*l[j/8]), 2,2);
    g.fillOval((int)(6*ma�stab+k),(int)(-18*ma�stab+setvarY(s2)*l[j/8]), 2,2);
    g.fillOval((int)(10*ma�stab+k),(int)(-18*ma�stab+setvarY(s2)*l[j/8]), 2,2);
    g.fillOval((int)(12*ma�stab+k),(int)(-18*ma�stab+setvarY(s2)*l[j/8]), 2,2);
    //////// // 1 0 0////
    if (t[3*j]>0 && t[3*j+1]<= 0 && t[3*j+2] <=0 ) {
    for (int k=10; k<=2*ma�stab ;k+=5){
    g.fillOval((int)(4*ma�stab+k),(int)(-18*ma�stab+7*k/2), 2,2);
    for (int k=10; k<=4*ma�stab ;k+=30){
    // erste Signal
    g.setColor(Color.black);
    g.fillOval((int)(0*ma�stab+k*l[j/8]),(int)(-18*ma�stab+setvar(s2)*l[j/8]), 2,2);
    g.fillOval((int)(6*ma�stab-k*l[j/8]),(int)(-11*ma�stab+setvar(s2)*l[j/8]), 2,2);
    g.fillOval((int)(10*ma�stab+k*l[j/8]),(int)(-11*ma�stab+setvar(s2)*l[j/8]), 2,2);
    ////1 1 0///
    if (t[3*j]>0 && t[3*j+1]> 0 && t[3*j+2] <=0 ) {
    for (int k=10; k<=2*ma�stab ;k+=5){
    g.fillOval((int)(10*ma�stab+k),(int)(-18*ma�stab+7*k/2), 2,2);
    for (int k=10; k<=4*ma�stab ;k+=30){
    // erste Signal
    g.setColor(Color.black);
    g.fillOval((int)(0*ma�stab+k*l[j/8]),(int)(-18*ma�stab+setvarY(s2)*l[j/8]), 2,2);
    g.fillOval((int)(6*ma�stab+k*l[j/8]),(int)(-18*ma�stab+setvarY(s2)*l[j/8]), 2,2);
    g.fillOval((int)(10*ma�stab+k*l[j/8]),(int)(-11*ma�stab+setvarY(s2)*l[j/8]), 2,2);
    /// 0 0 1 ////
    if (t[3*j]<=0 && t[3*j+1]<= 0 && t[3*j+2] >0 ) {
    for (int k=10; k<=2*ma�stab ;k+=10){
    g.fillOval((int)(10*ma�stab+k),(int)(-11*ma�stab-7*k/2), 2,2);
    for (int k=10; k<=4*ma�stab ;k+=30){
    // erste Signal
    g.setColor(Color.black);
    g.fillOval((int)(0*ma�stab+k*l[j/8]),(int)(-11*ma�stab+setvarY(s2)*l[j/8]), 2,2);
    g.fillOval((int)(6*ma�stab-k*l[j/8]),(int)(-11*ma�stab+setvarY(s2)*l[j/8]), 2,2);
    g.fillOval((int)(10*ma�stab+k*l[j/8]),(int)(-18*ma�stab+setvarY(s2)*l[j/8]), 2,2);
    g.fillOval((int)(12*ma�stab+k*l[j/8]),(int)(-18*ma�stab+setvarY(s2)*l[j/8]), 2,2);
    if (t[3*j]>0 && t[3*j+1]> 0 && t[3*j+2] >0 ) {
    for (int k=10; k<=14*ma�stab ;k+=30){
    // erste Signal
    g.setColor(Color.black);
    g.fillOval((int)(0*ma�stab+k*l[j/8]),(int)(-18*ma�stab+setvarY(s2)*l[j/8]), 2,2);}
    if (t[3*j]<=0 && t[3*j+1]<= 0 && t[3*j+2] <=0 ) {
    for (int k=10; k<=14*ma�stab ;k+=30){
    // erste Signal
    g.setColor(Color.black);
    g.fillOval((int)(0*ma�stab+k*l[j/8]),(int)(-11*ma�stab+setvarY(s2)*l[j/8]), 2,2);}
    //filly boolean End
    //e end
    class Steuerung extends Panel implements AdjustmentListener, ActionListener
    NullPanel ana;
    Figure1 fig;
    int endstate;
    //Panel pan = new Panel();
    public int varT=0,varB=0;
    // Label label_T, label_Z;
    // public Scrollbar scrollbar;
    //public Scrollbar scrollbar2;
    int scry;
    double scrolly;
    public int h=7;
    int varZ;
    // Ausgang freq=new Ausgang();
    //public Button button;
    public Steuerung (NullPanel ana) {
    //setLayout(null);
    create();
    GridBagLayout gridbag = new GridBagLayout();
    setLayout(gridbag);
    GridBagConstraints c = new GridBagConstraints();
    this.ana=ana;
    c.fill = GridBagConstraints.BOTH;
    c.weightx = 2;
    c.weighty = 2;
    c.gridwidth = 1;
    c.gridheight =1;
    gridbag.setConstraints(scrollbar,c);
    //4444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444
    label_T = new Label ("= " + ( (double) (scrollbar.getValue())));
    gridbag.setConstraints(label_T, c);
    add(label_T);
    c.weightx = 0.0;
    c.gridwidth = GridBagConstraints.REMAINDER; //end of row
    c.fill = GridBagConstraints.BOTH;
    c.weightx = 4;
    c.weighty = 4;
    c.gridwidth = 3;
    c.gridheight =3;
    gridbag.setConstraints(scrollbar2, c);
    c.weightx = 0.0;
    c.gridwidth = GridBagConstraints.REMAINDER; //end of row
    label_Z = new Label (" ");
    gridbag.setConstraints(label_Z, c);
    add(label_Z);
    this.ana = ana;
    scrollbar.addAdjustmentListener (this);
    scrollbar2.addAdjustmentListener (this);
    button.addActionListener(this);
    button_reset.addActionListener(this);
    public void create(){
    ///16 mitte 33 100
    scrollbar= new Scrollbar(Scrollbar.VERTICAL, 0,1,-14,24);
    scrollbar2= new Scrollbar(Scrollbar.VERTICAL, 0,1,0,10);
    //label_T = new Label ("Schwellwert f�r AD-Wandlung = " + 0.1* (double) scrollbar.getValue());
    button = new Button ("start");
    button_reset = new Button ("reset");
    public void actionPerformed(ActionEvent event)
    //String arg = e.getActionCommand();
    if(event.getSource() == button )
    // button_reset.setEnabled (true);
    //button.setEnabled (false);
    filly=true;
    ana.repaint();
    if(event.getSource() == button_reset )
    // button_reset.setEnabled (false);
    // button.setEnabled (true);
    filly=false;
    //filly=false;
    ana.repaint();
    /* public boolean mouseDrag(Event e,int xd,int yd){
    int i;
    if(e.target == button_reset){
    repaint();
    return true;
    public void adjustmentValueChanged (AdjustmentEvent event) {
    int doit;
    scry= (scrollbar.getValue());
    doit=(scrollbar2.getValue());
    label_T.setText("= " + (float) (0.1* scry));
    ana.setvar(scry);
    ana.repaint();
    ana.setvarY(doit);
    // Positioierung von Komponeneten
    class BulletinLayout implements LayoutManager {
    private Hashtable hash = new Hashtable();
    public void addLayoutComponent(String s, Component comp) {
    public void removeLayoutComponent(Component comp) {
    public Dimension preferredLayoutSize(Container target) {
    Insets insets = target.getInsets();
    Dimension dim = new Dimension(0,0);
    int ncomponents = target.getComponentCount();
    Component comp;
    Dimension d;
    Rectangle size = new Rectangle(0,0);
    Rectangle compSize;
    for (int i = 0 ; i < ncomponents ; i++) {
    comp = target.getComponent(i);
    if(comp.isVisible()) {
    d = comp.getSize();
    compSize = new Rectangle(comp.getLocation());
    compSize.width = d.width;
    compSize.height = d.height;
    size = size.union(compSize);
    dim.width += size.width + insets.right;
    dim.height += size.height + insets.bottom;
    return dim;
    public Dimension minimumLayoutSize(Container target) {
    Insets insets = target.getInsets();
    Dimension dim = new Dimension(0,0);
    int ncomponents = target.getComponentCount();
    Component comp;
    Dimension d;
    Rectangle minBounds = new Rectangle(0,0);
    Rectangle compMinBounds;
    for (int i = 0 ; i < ncomponents ; i++) {
    comp = target.getComponent(i);
    if(comp.isVisible()) {
    d = comp.getMinimumSize();
    compMinBounds =
    new Rectangle(comp.getLocation());
    compMinBounds.setSize(d.width, d.height);
    minBounds = minBounds.union(compMinBounds);
    dim.width += minBounds.width + insets.right;
    dim.height += minBounds.height + insets.bottom;
    return dim;
    public void layoutContainer(Container target) {
    Insets insets = target.getInsets();
    int ncomponents = target.getComponentCount();
    Component comp;
    Dimension sz, ps;
    Point loc;
    for (int i = 0 ; i < ncomponents ; i++) {
    comp = target.getComponent(i);
    if(comp.isVisible()) {
    sz = comp.getSize();
    ps = comp.getPreferredSize();
    loc = getComponentLocation(comp);
    if(sz.width < ps.width || sz.height < ps.height)
    sz = ps;
    comp.setBounds(loc.x, loc.y, sz.width, sz.height);
    private Point getComponentLocation(Component comp) {
    Insets insets = comp.getParent().getInsets();
    Point loc = comp.getLocation();
    if( ! hash.containsKey(comp)) {
    addComponentToHashtable(comp);
    else {
    Point oldLocation = (Point)hash.get(comp);
    if(oldLocation.x != loc.x ||
    oldLocation.y != loc.y) {

    Learn how to use the code tags. No one, not even nice people, want to try and read unformatted code. And why are you posting (what looks like) the same question multiple times? Ask short specific questions, and post back to the same thread. Learn how to use the forum and people will try and answer your questions.

  • To skip the html code execution in jsp

    Hello,
    I wan to skip a part of html code from execution in jsp.I would like to know how can I do that
    For example : Here is a part of my jsp code
    <%String sample = "Hello <html>world!</html>"; %>
    <!DOCTYPE HTML --- >
    <HTML>
    <BODY>
    Sample Msg is : <%= sample%>
    </BODY>
    </HTML>
    when I run this jsp the mesage that is been displayed in the
    browser is "Sample Msg is : Hello world!"
    But what I want to display in the browser is "Sample Msg is : Hello <html>world!</html>"
    How can I do that

    Try escaping the opening tag characters. Change this
    <%String sample = "Hello <html>world!</html>"; %>to this
    <%
    String sample = "Hello & lt;html>world!& lt;/html>";
    %>or maybe even this
    <%
    String sample = "Hello & lt;html& gt;world!& lt;/html& gt;";
    %>
    Don't put spaces between the "&" and the "lt" or "gt". I had to do that so that it would display properly in the forum.
    (The tags mean less than and greater than)

  • How to stop an execution from a method and thread?

    1,
    public void method(){
    if( something is true)
    //I want to stop this method
    //or if something is false, go on
    blablablablabla
    }Does any one know how to solve the above??
    2,
    Thread t = new Thread(){
    public void run(){
    if( something is true)
    //I want to stop and kill this Thread
    //or if something is false, go on
    blablablablabla
    }Again, how do I solve the above??
    I know this is very simple, but I just hit a wall when I encounter this on making a program for my project.
    please help
    thanks alot

    warnerja, for the method, I have tried "return" but
    it does not work... will it work on the run method of
    thread object??
    Secondly, doesn't "break" keyword only stops the
    execution of a loop/condition, but not the method's
    scope??yes. break breaks the loop. I thought your method doesnt have any other code except the condition.
    use return with thread.

Maybe you are looking for

  • Plugin created using C++ 6 and Acrobat 6 SDK Not Working in Windows

    I have an Acrobat plugin compiled in Visual C++ 6 using Acrobat 6 SDK. The plugin works flawlessly in Acrobat versions 6 to 9 in Windows XP. While the plugin is able to add a menu iterm and tool bar icon in Windows 7, it causes Acrobat to hang everyt

  • "Net use" not working in application that runs as "system"

    Hello, I am trying to create an application object to distribute a program which during the setup procedure creates two local users on the workstation. I tried to set up the application to run as an unsecure system user and start the setup.exe. This

  • Code Coloring - black background

    Has somebody Dreamweaver 8 configured to use black background in Code Editor? If so, please distribute the ColorCodings XML files somewhere. Thank you very much cs

  • E-bay listing in safari shrinks uncontrollably

    When I browse E-bay listings in safari with my I-pad the text shrinks uncontrollably and gets too small to be read. This has only happened recently and makes e-bay unusable. I have never had a similar problem with a PC using IE. is this a known issue

  • User Role empty - Cannot connect to DB2

    Hello, I'm having trouble with a WLSE 2.13 that we have installed. It doesn't let us access via web to the software; the error that appears when trying to do so is "User role is empty". There also appears a moving banner saying "Database failed to re