Focus on JSP Applet

Hi,
I have an application where an applet loads when the appropriate part is clicked from a tree. The problem here is the focus does not directly get on the applet and instead i first have to click on it to activate it. Can any one please tell me how to focus on the applet directly.
Thanks,
Sharath

r u use <applet> tag independently with out depending or inside any click or load functions...
check it ...
r post ur code

Similar Messages

  • Call a Form using Webutil from the Menu loose focus on the applet

    Hello,
    I have the following problem:
    When calling a form using webutil from the menu the focus on the applet (I mean the Forms Application window) is lost and I have to click on the window to get back the focus on the application.
    Any advice ?
    Env: Forms 9i / Webutil 1.06
    Rgds,
    Philippe

    Try to use the NO_HIDE parameter in the CALL_FORM() built-in.
    Call_Form( 'the_form', NO_HIDE ) ;Or maybe, in the[b] When-New-Form-Instance trigger of the called form, return the focus to the calling form
    Go_Form( Get_Application_Property( CALLING_FORM ) ) ;Francois

  • JSP applet tag X Html applet tag (what is the difference?)

    what is the advantage in using the JSP applet tag instead of a simple Html applet tag ?
    second question:
    I have an applet in a Html frame, and a menu on the left side.... When the user select the applet option at first time, everything runs ok.. after the user select another option and then select the applet again, it fails in some features .. Why ?

    well, if by "the JSP applet tag", you mean the jsp:plugin tag.. that will just generate the same HTML tag you would write. The only advantage would be it should be less typing to use the taglib.
    second answer:
    without seeing any code, it'd be hard to figure out the problem. The obvious thing is you are setting some state of something that is preventing further action.

  • JSP Applet communication

    Hi all ,
    I know this question has been asked so many times and I have read all the posts but still i was unsuccessful.
    I am trying to send a string from a jsp to another jsp which is loading the applet to display that string.
    In my first jsp:
    <form method=post action="hello.jsp">
    <input type="text" name="formDesc" value="IBMTR/ABMTR Form" size="20" maxlength="20">
    <input type=submit name="Go" class="submituttontext" value="Go">
    </form>     
    in my seccond jsp:
    <APPLET CODE="ParamTest.class" WIDTH="400" HEIGHT="50">
    <PARAM NAME="font" VALUE="Dialog">
    <PARAM NAME="size" VALUE="24">
    <PARAM NAME="string" VALUE="Hello, world ... it's me. :)">
    <PARAM NAME="formDesc" VALUE="<%=request.getParameter("formDesc");%>">
    </APPLET>
    in my applet:
    String myFont = getParameter("font");
    String myString = getParameter("string");
    int mySize = Integer.parseInt(getParameter("size"));
    String desc =getParameter("formDesc");
    Font f = new Font(myFont, Font.BOLD, mySize);
    g.setFont(f);
    g.setColor(Color.red);
    g.drawString(myString, 20, 20);
    g.drawString(desc, 40, 40);
    but nope i cannot see...formDesc ..I jus see the <%=getParameter%>
    Thanx

    At first glance the only error I see is:
    <PARAM NAME="formDesc" VALUE="<%=request.getParameter("formDesc");%>">
    should be changed to:
    <PARAM NAME="formDesc" VALUE="<%=request.getParameter("formDesc") %>">
    No semicolon in expressions. This should give you JSP compile error, so maybe that was just a typo in your post and not the real problem.
    Let me know.

  • JSP & APPlet - HTML

    Hi All,
    I am new to web development platform. I know core java, now as I need to proceed to web development I would like to know certain concepts / languages used.
    Jsp - Jsp is used to develop webpages, how does it differ from html.
    Applets - We can develop web pages using applets. Then what are the circumstance we use applets, jsp.
    JSP & Applets - Can JSP and Applet both used to create a webpage? If yes how?
    Kindly answer my question. Thank you.
    Regards,
    lg

    Go look up a basic tutorial dude.
    Basically JSP lets you create an HTML page on the fly. Rather than just serving up a static page, you customise it for each request.
    This gives a pretty good example of how JSP fits into things
    http://www.javaranch.com/journal/200510/Journal200510.jsp#a1
    Applets - Its a program running on a web page. I kinda lump them into the same box as "flash" and "activex". They let you step outside the bounds of html which a webpage is tied to. That has both advantages and disadvantages. Most web applications don't use applets.

  • JSP, APPLET and JNLP

    OK, here is my question, we have a simple (sic) application, which consists of jsps, applets ( Runtime.exec ), I have been suggested to use jnlp and jws, A typical JSP page looks like this.
    <% %>
    :Bunch of JSP /HTML stuff
    <APPLET>
    </APPLET>
    Bunch of jsp/HTML/javascript stuff
    How should i go about changing it to jsp + jnlp, Any insight is helpful.
    Thanks.

    OK, here is my question, we have a simple (sic) application, which consists of jsps, applets ( Runtime.exec ), I have been suggested to use jnlp and jws, A typical JSP page looks like this.
    <% %>
    :Bunch of JSP /HTML stuff
    <APPLET>
    </APPLET>
    Bunch of jsp/HTML/javascript stuff
    How should i go about changing it to jsp + jnlp, Any insight is helpful.
    Thanks.

  • Applet Focus in JSP.

    I have an applet embeded in a JSP page. In this applet I have some text feilds for data entry. After the each data entry this field get validated . If the entered data is wrong then it popup a message using the JOptionPane.
    Now the problem. :- after message, I want to set back the focus to the respective fields. I had used setfocus(), grabfocus() etc..But nothing get worked.. Please advice ... tanx in advance...........
    Rgds
    Joe

    Did you try requestFocus()? There is no setFocus().
    Although grabFocus() is supposed to do the same thing, I've never used it, probably part of that switch from AWT to Swing some 8 years ago.

  • JApplet focus in JSP page

    I have an applet embeded in a JSP page. In this applet I have some text feilds for data entry. After the each data entry this field get validated . If the entered data is wrong then it popup a message using the JOptionPane.
    Now the problem. :- after message, I want to set back the focus to the respective fields. I had used setfocus(), grabfocus() etc..But nothing get worked.. Please advice ... tanx in advance...........
    Rgds
    Joe

    That's struts-specific. We're here in a JSP/JSTL forum.

  • Webutil_host.nonblocking get focus back to applet

    When you launch a program using webutil_host.nonblocking(), is there a way to get the focus back to the Forms applet automatically without closing that program?
    In older Client/Server versions I believe this was possible using the constant SW_SHOWNOACTIVATE but in webutil I can not find an alternative.
    Thanks,
    Jeroen

    Controlling and external app's window focus and z-order from a java applet is not likely going to be a simple task. As I mentioned, the easiest approach would likely be to start the external app minimized or attempt to control the state of the Forms window. In other words, after calling the external app force the Forms window to the foreground. This is likely going to be the simplest place to start. You still may need to manage cursor focus, but this approach might at least get the Forms application back to the foreground where you can then figure out how to handle the cursor.
    So in other words,
    1. Add a java bean to your form which will control the state of the Forms applet window/frame. See the following:
    http://forms.pjc.bean.over-blog.com/article-2203967.html
    Understand that this will only work if Forms separateFrame=true.
    2. From the form, call your external app. Immediately after making the call to WebUtil to start the external app, execute a SYNCHRONIZE then call the above bean to bring the Forms separateFrame to the foreground using an "always on top" feature.
    3. Once the form is on the top of the z-order (in the foreground), disable the "always on top" option.
    In theory, the above should accomplish most of what you want. However, just because you brought the form to the foreground does not necessarily mean that the cursor focus will be in any particular item of the form. In fact, it is most likely that focus will be on the title bar of the form. The user would have to click on the desired field or button to perform their next task. Controlling the cursor focus at this point may be possible by executing a GO_xxxx to an item or block. If not, another bean or modifications to this one may be necessary in order to place the cursor back on the displayed canvas.
    if any of this stuff is something you are not familiar with, I suggest a google or similar search as what you are attempting to do is leaning into what many would call advanced tweaking ;)

  • WHEN-WINDOW-ACTIVATED gives focus back to applet window

    Testcase:
    Form A calls form B
    Form B performs this code:
    BEGIN
    web.show_document(url);
    exit_form;
    END;
    This should open a new browser window to the URL and keep the focus on it.
    However, when form A has a WHEN-WINDOW-ACTIVATED trigger (even when the only code is NULL;), it return the focus to the forms applet browser window the first time.
    This is very annoying because the new browser window can no longer be seen as it is put on the background. Strangly enough, the following times the focus remains on the new browser window.
    Is this a known bug?
    PS: The problem is that i really need a WHEN-WINDOW-ACTIVATED trigger in my form A to perform some webutil-functions.
    Environment:
    Forms Developer 10g Release 2
    Application Server 10g Release 2
    Window 2000/Xp
    Oracle Jinitiator 1.3.1.22

    In which trigger are you calling Form B? As I said, the EXIT_FORM event would take you back to Form A after opening the browser window, so what happens next depends on what code it fires once returning to Form A.
    Have you tried it with debug messages on to see what triggers it is firing? (both first time round & subsequently). Logically, I would have actually expected focus to return to Form A following the EXIT_FORM, but maybe I'm wrong ni thinking that.
    Have you experimented with the various WEB.SHOW_DOCUMENT options (e.g. WEB.SHOW_DOCUMENT(url, '_self') to get a different behaviour?

  • JSP & APPLET

    Hi guys,
    I am studying about Java Server Pages, I lear that the jsp:plugin tag of JSP techcnology have support for this. Then I create a simple swing applet and a JSP page like fellow:
    <jsp:plugin type="applet" code="package.MyApplet" width="450" height="350">
        <jsp:params>
            <jsp:param name="param1" value="value1"/>
        </jsp:params>
    </jsp:plugin>But when I try to load the jsp page the browser (Netscape run on linux) show the download plugin dialog!!! What I can do to the browser get the applet?!?! I install de j2sdk and I have the Java Plug in (do I need to create a environment variable for it, or configure in netscape?!?!)
    Another question, I am using the Tomcat, Do I need to "describe" the applet in the web.xml descriptor file?!! If yes How I can do this!?!?
    Thanks everyone.
    Giscard

    This question have been asked and answer before. Use the search button to locate issues.
    What OS
    In Windows, go to control panel by typing control in command line console, locate your java plugin and enable netscape and iexplorer. Does older browser do not support java plugin so you need the later version of browser. Mozilla is a good choice.
    You cannot configure XML descriptor file to use plugin.

  • Focus issues between Applets on a web page

    I have a web page that contains two applets(A1 and A2) each containing a JTable with editable cells.
    If I click on an editable cell in the table in applet A1 so this I can change it and I then click on an editable cell in the table in applet A2, I now have both cells available to edit.
    This is not the intent as I would like the focus to shift from A1 to A2 and editing stop on A1.
    I have tried a focusListener on the applet but that never seems to get called.
    Does anyone have an example of how to accomplish this?
    Jim

    I will try the newer SDK.
    Could you offer an example of how to setup the focusListener given the an applet declaration of:
    public class SimpleTableApplet extends JApplet {
        public void init() {
        public void foobar() {
    }and so forth.
    I would prefer not chasing phantoms.
    Thanks,
    Jim

  • JSP - Applet problem

    Hi
    How do I call an Applet from JSP?
    I have a applet that talks with jsp which talks to a bean, the connection between jsp and the bean is okay but between jsp and the applet im not sure how to do. Any suggestions?
    Jonas

    Yes JSP is an extension of Servlets, bu you have to understand the difference and the need why JSP's are created and where it fits the best. For you situation I assuming you want to access a JSP page which has an applet in a browser, then to interact the applet which needs to communicate the server it came from(not necessarily that particular JSP). If that is the case you need and a Servlet for the rest of the communication(Servlets are better choice whent there is no presentation going back to the client) which is just exchange of data between the servlet and the Applet.
    The Applet and the servlet could communicate through sockets or URLConnection or even RMI which ever you feel more convertible(RMI if you are passing objects).

  • Focus handling in applet

    I am designing an applet for entering your time worked. I have several text fields, and i want them to be able to have the current time inserted into them by pressing a JButton. Here is my actionPerformed() code:
    public void actionPerformed(ActionEvent e)
            String acts[] = {"Submit", "Insert Current Time", "Clear"}; 
            String action1 = e.getActionCommand();
            KeyboardFocusManager focusManager = KeyboardFocusManager.getCurrentKeyboardFocusManager();
            Component c = focusManager.getFocusOwner();  
            if (e.getSource().equals(timeIn1))
                timeIn1.setText("Good!");
            //timeIn1.setText(action1);
            String cN = c.getClass().toString();
            if (action1.equals(acts[1])) {
                    timeOut1.setText("crap");
                    timeOut2.setText(cN);
        }cN always returns information about the JButton pressed. How can I get the applet to recognize what the JTextField was that had focus before pressing the button?

    I got the code to work....I set an empty component to receive the object that has focus and did an instanceof to make it work

  • JSP- Applet- Servlet- JSP

    Ok, I know there are better ways to do what I am about to describe, but due to numerous circumstances this is my only option:
    I have a JSP that runs an Applet - All Good
    I have that Applet talk to a Servlet - All Good
    I need that Servlet to the load the original JSP - How?
    The entire process should look like this to the user:
    1) Load JSP
    2) Click a button, runs Applet
    3) Applet communicates with Servlet
    4) Servlet puts some data in the Request
    5) The original JSP is reloaded in the same browser window
    How do I do step #5?
    -or-
    Can I have the Applet put some data in the request and go directly to the JSP?

    You can use the "response.sendRedirect(<String url>)" for Servlet.

Maybe you are looking for

  • How do i repair my hard drive in single user mode when disk is full?

    Hi there Apple Community! I have an old Macbook Pro 17" with an upgraded 500GB harddrive and 4GB memory. I'm running Mac OSX Lion. Was hoping you could help me out.  THis is the situation: Long story short I spilt wine on my macbook and the screen we

  • Any way to stop accidental deletion of events

    I find is puzzling that it is necessary to double click an event and then click the edit button in order to change any aspect of an event, but you can easily delete an event by simply having it hi-lighted and hitting the backspace key. We have a shar

  • How to get the location of the caret?

    Hello I want to get the location of the caret. Not the offset of the document. I have tried the Caret.getMagicCaretPosition(), but I think it gives me a point in viewport. How can I get the absoult location of the caret(the location on screen ,not in

  • Validating a selection screen on input parameters

    hi, on my selection screen ,a parameter called no. of boxes and 3 select options are given. i want to validate the 3 select options according to the entry done in no. of box . ex. if 2 is entered in no. of boxes then only the 2 select options would b

  • Nokia N73

    Hi i have just bought a new Nokia N73 and i have a couple of questions and i carnt fine the answers in the manuel. 1 The light sensor on the top of the phone is blinking a blue light. why is this normal and why is it blinking. 2 As i am new to this p