How to forward an applet page to servlet/jsp?

I have an applet in imageMap.jsp file. This applet displays a map. When user enters the page of imageMap.jsp, they will see the map . If user clicks a point of the map, the latitude and longitude of that point should be sent to Search.java servlet and search results should replace the current page.
My Search.java servlet works well.
I think I should add mouse event in the applet. I can use MouseEvent.getX() and MouseEvent.getY() in the applet to get latitude and longitude. But I do not know how to go from this applet to servlet. How can I forward applet page to servlet?

The <jsp:plugin> action is used in pages to generate client specific HTML tags involving download and execution of the applet that is specified in the tag.

Similar Messages

  • How to call a Applet from a servlet and vice versa...?

    Hi all
    Can anyone help me how to call a applet from a servlet and vice versa. When the applet is called it should contact the database (oracle8i) and get the data. When i submit the applet form the data in the applet should be saved in the database.
    Thanks in advance
    Kamalakannan

    Sweep is correct about requestDispatcher being another approach for inter-servlet delegation; the only issue that i recall with this approach is that it defaults the method of the destination servlet to the one it was called from...for example, calling servlet2 from within servlet1.post() resulted in the dispatcher attempting to utilize servlet2.post() - i believe that i searched for a parameterize solution to no avail :( (ended up handling the request by placing a "fake" doPost() in servlet2 that simply called servlet2.doGet())
    however, if your application is functioning correctly on your pc/webserver then the problem may be external to servlet communication (e.g. client webserver's ports not configured or blocked, missing runtime classes, etc.)
    my suggestion would be to set aside the programmatic concerns for the moment - what is the response if you open a browser on a client's machine and access the URL in question (i.e. http://clientserver:port/stefanoServlet)? If it will not respond to access in this manner then it certainly won't when your application calls for it.
    It's possible that there is a coding error but, given the info supplied, i'd start examining the environment, first. Let us know if you have any luck with the test i recommended or not (please provide abundant detail). Or, if you've found the solution then you may want to post back with a quick blub so the next person knows how to escape the trap.
    D

  • JDev 10.1.2 [UIX]: After uploading a file, how to forward to next page?

    Hello guys,
    I've got a DataPage to upload a file, I followed the example in JDeveloper's help (Using a Controller in ADF UIX -> Uploading Files Using the UIX Servlet). The files are uploaded fine. But I can't figure out how to forward to the next page (or struts action) to process the file, after uploading it just returns to the upload page. Can anyone give me a hint?
    Thanks.
    Fer.

    Dear sir...
    i faced the same problem before, and yet no one helped me, however there is a workaround, though i do not think it should be done. however the steps are as follows:
    1- go to the code of the page.
    2- override the processupdatemodel method, adding only this line:
    actionContext.setActionForward("nextpage");
    3- draw a forward from the upload page into the next page.
    i hope this would help solving your problem.
    please if you find a better solution, post it here.
    good luck.

  • How to call an HTML page from a JSP

    Hi,
    I am getting problem in calling an html page from a jsp
    The Sample code is
    int rowsAffected = stm.executeQuery("Select * From Table");
    if (rowsAffected == 1)
    {   %>
    <jsp:forward page="xyz.html" />
    <%

    See the other forum where you asked the same question http://forums.java.sun.com/thread.jsp?forum=45&thread=158981
    Please refrain from cross posting.

  • How to include other web page in servlet response?

    Is there any way how to include the contents from some other web page in my own response? For example, I wish to printout some text and below that to put the complete contents of let's say Google's page, so something like:
    include("www.google.com");
    ...So far I found that I can either redirect to that page and l fully lose the control or include the contents of the other jsp or servlet that I made in the same project. I know I can just send the request to that outside page and read the response and print it out on my page, but the problem is when there is a JavaScript and I can't get the rendered contents but just that script. Also, I will not be able to see the images in that case, so I prefer to give the command to web browser to render and show it for me.
    Thanks a lot for any help!

    I already tried with streams but then just original source is written, so it means that if it is calling some scripts I will get JavaScript code instead of executed result. I thought I must somehow make the browser to process the page and just display the output because it knows how to deal with scripts.

  • How to forward to another page when checking session managed bean in jsf 2

    When I do it in jsp page I write:
    <c:if test="${sessionScope.role != 'user'}">
        <jsp:forward page="login.jsp" />
    </c:if>And in jsf 2.0 I use ManagedBean as session and I want to check session in per page. But I cannot do it in jsf 2.0 (.xhtml). Please help me. Thanks
    Edited by: tuanbs on May 12, 2010 1:19 AM

    I included this code in the PartnerManagementBean.java:
         public class PartnerManagementBean {
         protected List<SelectItem> partners;
    //other properties....
    public String addPartner() {
    // code to insert new partner into db
    // Add the newly added partner to the partner list
              addToPartnerList(partnerBO);
              FacesContext.getCurrentInstance().getExternalContext().getSessionMap().remove("PartnerManagementBean");
              FacesContext.getCurrentInstance().getExternalContext().getSessionMap().put("PartnerManagementBean");
    Still, the new partner added is not reflecting in the session variable and hence it is not reflecting when I look for the new partner in "Modify Partner" page.
    What could be the solution ?

  • How to forward to another page from beginDisplay

    I have to forward to Page 2 in beginDisplay method of Page1 based on
    some parameters. I am having trouble aborting the current page
    (Page1) load.
    I tried the following:
    if (from.equals("xyz"))
    ViewBean targetView = getViewBean(pgPage2ViewBean.class);
    targetView.forwardTo(getRequestContext());
    throw new CompleteRequestException();
    Both Page1 and Page2 are getting loaded. Page2 on top and Page1 at
    the bottom.
    Thanks,
    Ravi

    Ravi,
    Please see this solution.
    Inside the beginDisplay() method of ViewBean :
    public void beginDisplay() throws ModelControlException
    super.beginDisplay();
    // Do your processing here ?.
    // You detected not to display this page?and want to display Target.jsp
    // implement this method in your super class
    setRequestAborted(true);
    // forward to TargetPage
    ViewBean targetView = getViewBean(TargetViewBean.class);
    targetView.forwardTo(getRequestContext());
    Add thse two methods in your superclass of the viewBean.
    // These two method are used to forward the control from one page to another
    page.
    public void setRequestAborted(boolean requestAborted)
    this.requestAborted = requestAborted;
    public boolean isRequestAborted()
    return requestAborted ;
    - Also, code the following scriplet inside the JSP of this ViewBean so that no
    content would be rendered.
    --- (BOF) ---
    <useViewBean ...>
    <%
    if(!viewBean.isRequestAborted())
    %>
    <html>
    ... all HTML content here ...
    </html>
    <%
    } //End of if(viewBean.isRequesteAborted())
    %>
    </jato:useViewBean>
    --- (EOF) ---
    - JATO:Content tag can also be used for this purpose.
    Hope this solves your problem.
    Thanks,
    Subir.
    ravi_ponnaganti@y... wrote:
    I have to forward to Page 2 in beginDisplay method of Page1 based on
    some parameters. I am having trouble aborting the current page
    (Page1) load.
    I tried the following:
    if (from.equals("xyz"))
    ViewBean targetView = getViewBean(pgPage2ViewBean.class);
    targetView.forwardTo(getRequestContext());
    throw new CompleteRequestException();
    Both Page1 and Page2 are getting loaded. Page2 on top and Page1 at
    the bottom.
    Thanks,
    Ravi
    For more information about JATO, please visit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp
    Information transmitted by this E-MAIL is proprietary to Wipro and/or its
    Customers and
    is intended for use only by the individual or entity to which it is
    addressed, and may contain information that is privileged, confidential or
    exempt from disclosure under applicable law. If you are not the intended
    recipient or it appears that this mail has been forwarded to you without
    proper authority, you are notified that any use or dissemination of this
    information in any manner is strictly prohibited. In such cases, please
    notify us immediately at mailto:mailadmin@w... and delete this mail
    from your records.
    [Non-text portions of this message have been removed]

  • How to read XML from web page inside servlet/jsp ?

    i have a url, which on sending request, shows XML in browser.
    Now i need to read this XML in browser and then manipulate it according to my need and display it on another page.
    actually the process is. :
    1) i have to first retrieve an xml from other site. (XML will only be shown in browser)
    2.)then i have to read the Xml and show it in according to my requirements.
    Is there any way to read XML directly from a Web Page ??
    is their logic to accomplish this.
    e.g in Servlet i can do somewhat like this :
    String wholeXml=Somemethod(url);
    Please Advice

    Hi,
    if u wanna extract data from XML. you can use Digester(Apache-jakarta) parser. All u need to create the beans(as per the data in xml), that will be populated by Digester.
    Digester takes xml(string) as parameter and populates the bean specified.
    U can use this bean in ur JSP.
    :::Note:::; use Digester in ur servlet.
    for more read:::
    http://www.onjava.com/pub/a/onjava/2002/10/23/digester.html
    I hope it shall work..
    @mit

  • How to call a html page from servlet

    i want to link a servlet to a html page, if i use requestdispatcher, it says XXX.html is not available, can anybody help

    Can you be more specific about what you're trying to do? Can't read your mind =). But if you mean you want to just have an static HTML page such as a header read by the servlet you can you the requestdispatcher include().
    Create a servlet to generate a page, and then map it as /getPage in the web.xml file. Then you can use:
    // header
    RequestDispatcher rd = ...getRequestDispatcher("/getPage");
    rs.include(req, res);
    // the rest of the servlet output
    // and you can do another one for the footer down here
    rd = ...getRequestDispatcher("/getPageFooter");
    rs.include(req, res);
    and it'll output the HTML in the servlet.
    Hope this helps

  • How to display a website page in a JSP textarea ?

    Hi all...
    I am developing an application where i need to display a web page in a text area, the same
    way it gets displayed in a web browser (like IE, mozilla). After that i will read the page and will extract text from it for further processing.
    My JSP contains a text field where i can type the URL address (say http://www.yahoo.com)
    What i want is, when i will click a submit button, the web page at the given URL should be retrieved and should get displayed in the textarea that is present on the same page. (It should be displayed in the same way as it
    gets displayed on the browser.)
    Is that possible ? Can it be done using some other ways ?
    It is a small application that i am developing using struts 1.1.
    Can some one help in this regard ?
    Thanks in advance..
    Regards
    Prasad

    Thanks BalusC..
    I have used iframe now and it is working for the URL specified.
    But even then i have couple of doubts..
    1. How should i use the iframe if i want to navigate on the further web pages within the same frame ?
    (e.g. if with URL say http://www.yahoo.com, the home page is displayed in the frame, now if i click any link
    on the page the next navigation should occur within given frame only.)
    2. Can i read the page from the frame and write the text into some file say text file ?
    Hope you understand my problem...
    Thanks a lot..
    Prasad

  • How to call the EJB methods from servlet/jsp

    Hello ,
    i have write one ejb signOn having the method validateUser(username,password).i can able to call this function from client.java class.i want to know whether i can call this function from servlet.if yes then where to write that servlet and web.xml file.
    At present i m using weblogic server 8.1and i create directory call c:\ejb\demo and put the ejb files(home ,remote,ejb class ,client.java) then i have created .jar file and put in application file.
    Now i want to create a servlet for that i have to create a new directory and put the servlet,web.xml,weblogin-web.xml file and then create one .war file and put in application directory or do some thing extra.Please help me.
    Thanks In Advance
    [email protected]

    I think this might not be the most appropriate forum for your question. You might try a forum about ejb, or weblogic, or jndi.

  • Need to Call OA Page from Servlet

    Hi All,
    My requirement is to call OAF page from the servlet.
    Can anyone please give me some pointers to achieve this.
    Thanks
    Anoop

    hi
    anoop ,check if this thread can help u
    how to call a OA page from a jsp page
    thanx
    Pratap

  • How to Redirect to a page From a link in Header.

    Hi , I have a link in the Header.jsp to Contactus page. How to navigate to that page From header.jsp.
    Can any one please help me on this

    User render:pageUrl tag
    http://download.oracle.com/docs/cd/E13155_01/wlp/docs103/javadocjsp/framework/render/pageUrl.html
    I assume you mean that you wish to goto the page and not a 'redirect'

  • How to include an ASP page from JSP?

    I had a working ASP page to be repeated on each page of the web site as an navigation bar updated from a single SiteMap.xml. Anyone knew how to include the ASP page from the JSP app?
    Thanks

    You might achieve your desired result by calling the ASP page from your JSP controller (server side) using the standard JAVA HTTP classes you could then process the resulting XML. I suggest you look at the JAVA API for more information in particular the JAVA.NET package and the HTTPUrlConnection class...
    http://java.sun.com/j2se/1.4.2/docs/api/java/net/HttpURLConnection.html
    Hope this helps,
    BRgds,
    Simon

  • Distinguishing between bookmark page and ordinary jsp

    If I bookmark a page in my project and close the browser , and again on restarting the browser
    viewing the same bookmark page without logging in,
    All the links should work.
    It is working , but problem arises here
    how to
    distinguish between bookmark page and ordinary jsp
    which is viewed with login

    The problem is not the bookmark.
    Review your JSP, you may find it does not check the session id.
    In this case, everyone can access the page without login.

Maybe you are looking for

  • Apple tv + project viewable size is small

    Hello! If I plug my iPad into the projector using the vga cord, I get a full size image.  When I switch to the apple tv using hdmi, I get a full size image.  However, when I then do airplay wirelessly through the apple tv with my iPad, it is no long

  • Date parsing problem

    Hello! I am trying to parse stock-csv data from finance.yahoo.com. One line looks like this one: 13-May-05,95.00,96.30,94.10,96.19,34627,87.50 I extracted the date "13-May-05" and now I want to parse it. I tried: x = "13-May-05"; - DateFormat df = Da

  • NullPointerException during Deploying ESB

    Hi All, When I deploy my ESB, I am getting the following error. Any pointer??? error code: 0 : 10 summary: An unhandled exception has been thrown in the ESB system. The exception reported is: "java.lang.NullPointerException      at oracle.tip.esb.con

  • Email addresses included with webBasic and video on associating domain with websites

    Do the five included (or for that matter any additional paid) web sites provide for email accounts?  Are there any videos on how to move a site to one of these and connect my URL to it?

  • WEB UTIL error.

    Urgent help needed I am using webutill. pll and trying to save a file to the client machine. I have configured webutil properly. I am also able to use CLIENT_GET_FILENAME to get the dialog box to select the filename. Now after selecting the file name