Error in calling servelt from html file

Hi All,
In my application
Servlet class looks like this:
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Iterator;
import java.util.List;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class SelectBeer extends HttpServlet {
     public void doPost(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException {
     response.setContentType("text/html");
     PrintWriter out =response.getWriter();
     out.println("Beer Selection Advice<br>");
     String c= request.getParameter("color");
     out.println("<br>Got beer color"+ c);
     BeerExpert be = new BeerExpert();
     List list=be.getBrands("amber");
     Iterator it = list.iterator();
     while(it.hasNext()){
          out.print("<br>try:"+it.next());
}The XML file as follow:
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app version="2.5"
     xmlns="http://java.sun.com/xml/ns/javaee"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
     http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
  <servlet>
    <description>This is the description of my J2EE component</description>
    <display-name>This is the display name of my J2EE component</display-name>
    <servlet-name>HelloWorld</servlet-name>
    <servlet-class>HelloWorld</servlet-class>
  </servlet>
  <servlet>
    <description>This is the description of my J2EE component</description>
    <display-name>This is the display name of my J2EE component</display-name>
    <servlet-name>SelectBeer</servlet-name>
    <servlet-class>Test/SelectBeer</servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>HelloWorld</servlet-name>
    <url-pattern>/servlet/HelloWorld</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>SelectBeer</servlet-name>
    <url-pattern>SelectBeer</url-pattern>
  </servlet-mapping>
  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>
</web-app>The html file as follow:
<html><body>
<h1 align="center">Beer Selection Page</h1>
<form method="POST"action="Test/SelectBeer">
     Select beer characteristics<p>
     Color:
     <select name="color" size="1">
          <option>light
          <option>amber
          <option>brown
          <option>dark
     <select>
     <br><br>
     <center>
          <input type="SUBMIT">
     <center>
     </form></body></html>but after running the form.html i am geeting Selelctbeer is unavailable?
Could you please explaing if i am missing anything?
Regards,
Divya

hi,
make sure that the class is in the package TEST.
manik;

Similar Messages

  • How to read .html file and store values into oracle table  from html file

    Hi all ,
    How to read .html file and store values into oracle table from html file using pl/sql
    Please Help.....

    Hi,
    Kindly find following sample html code ,i want to store every value in different column in database .
    <html><body><p/>
    <div style="position:absolute;top:47px;left:37px;font-family:'Times New Roman';font-size:10pt;white-space:nowrap;"> 
    </div>
    <div style="position:absolute;top:47px;left:680px;font-family:'Times New Roman';font-size:10pt;white-space:nowrap;">  
    </div>
    <div style="position:absolute;top:94px;left:151px;font-family:'Times New Roman';font-size:1pt;white-space:nowrap;"> 
    </div>
    <div style="position:absolute;top:1080px;left:115px;font-family:'Times New Roman';font-size:8pt;white-space:nowrap;">4497743
    </div>
    <div style="position:absolute;top:1079px;left:442px;font-family:'Times New Roman';font-size:9pt;white-space:nowrap;"> Miclyn Express Offshore Pre-Quotation Disclosure
    </div>
    <div style="position:absolute;top:1079px;left:680px;font-family:'Times New Roman';font-size:9pt;white-space:nowrap;"> 
    </div>
    <div style="position:absolute;top:1079px;left:723px;font-family:'Times New Roman';font-size:9pt;white-space:nowrap;">page 5
    </div>
    <div style="position:absolute;top:1083px;left:151px;font-family:'Times New Roman';font-size:1pt;white-space:nowrap;"> 
    </div>
    <div style="position:absolute;top:107px;left:151px;font-family:'Times New Roman';font-size:10pt;white-space:nowrap;"><b>Attachment 2 ¿ indicative statement of 20 largest shareholders </b>
    </div>
    <div style="position:absolute;top:139px;left:262px;font-family:'Times New Roman';font-size:10pt;white-space:nowrap;"><b>Name </b>
    </div>
    <div style="position:absolute;top:131px;left:415px;font-family:'Times New Roman';font-size:10pt;white-space:nowrap;"><b>Number of Shares </b>
    </div>
    <div style="position:absolute;top:147px;left:458px;font-family:'Times New Roman';font-size:10pt;white-space:nowrap;"><b>Held </b>
    </div>
    <div style="position:absolute;top:131px;left:560px;font-family:'Times New Roman';font-size:10pt;white-space:nowrap;"><b>Percentage of </b>
    </div>
    <div style="position:absolute;top:147px;left:567px;font-family:'Times New Roman';font-size:10pt;white-space:nowrap;"><b>shares held </b>
    </div>
    <div style="position:absolute;top:179px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Macquarie Capital Group Limited 92,378,000
    </div>
    <div style="position:absolute;top:179px;left:531px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;"> 
    </div>
    <div style="position:absolute;top:179px;left:618px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">34.00%r
    </div>
    <div style="position:absolute;top:179px;left:663px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;"> 
    </div>
    <div style="position:absolute;top:212px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">HSBC Custody Nominees (Australia)
    </div>
    <div style="position:absolute;top:227px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Limited
    </div>
    <div style="position:absolute;top:220px;left:464px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">36,458,220
    </div>
    <div style="position:absolute;top:220px;left:531px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;"> 
    </div>
    <div style="position:absolute;top:220px;left:618px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">13.42%
    </div>
    <div style="position:absolute;top:220px;left:663px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;"> 
    </div>
    <div style="position:absolute;top:260px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Ray Rider Limited 27,170,000
    </div>
    <div style="position:absolute;top:260px;left:531px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;"> 
    </div>
    <div style="position:absolute;top:260px;left:618px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">10.00%
    </div>
    <div style="position:absolute;top:260px;left:663px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;"> 
    </div>
    <div style="position:absolute;top:300px;left:531px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;"> 
    </div>
    <div style="position:absolute;top:300px;left:625px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">7.96%
    </div>
    <div style="position:absolute;top:300px;left:663px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;"> 
    </div>
    <div style="position:absolute;top:333px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">National Australia Bank Custodian
    </div>
    <div style="position:absolute;top:348px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Services
    </div>
    <div style="position:absolute;top:341px;left:464px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">12,866,550
    </div>
    <div style="position:absolute;top:341px;left:531px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;"> 
    </div>
    <div style="position:absolute;top:341px;left:625px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">4.74%
    </div>
    <div style="position:absolute;top:341px;left:663px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;"> 
    </div>
    <div style="position:absolute;top:381px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Citigroup Nominees Pty Ltd 6,942,541
    </div>
    <div style="position:absolute;top:381px;left:531px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;"> 
    </div>
    <div style="position:absolute;top:381px;left:625px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">2.56%r
    </div>
    <div style="position:absolute;top:381px;left:663px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;"> 
    </div>
    <div style="position:absolute;top:421px;left:531px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;"> 
    </div>
    <div style="position:absolute;top:421px;left:625px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">2.14%r
    </div>
    <div style="position:absolute;top:421px;left:663px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;"> 
    </div>
    <div style="position:absolute;top:462px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">UBS Securities Australia Ltd 4,806,760
    </div>
    <div style="position:absolute;top:462px;left:531px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;"> 
    </div>
    <div style="position:absolute;top:462px;left:625px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">1.77%
    </div>
    <div style="position:absolute;top:462px;left:663px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;"> 
    </div>
    <div style="position:absolute;top:494px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Merrill Lynch Equities (Australia)
    </div>
    <div style="position:absolute;top:510px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Limited
    </div>
    <div style="position:absolute;top:502px;left:472px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">4,325,000
    </div>
    <div style="position:absolute;top:502px;left:531px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;"> 
    </div>
    <div style="position:absolute;top:502px;left:625px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">1.59%
    </div>
    <div style="position:absolute;top:502px;left:663px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;"> 
    </div>
    <div style="position:absolute;top:550px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Equities Ltd
    </div>
    <div style="position:absolute;top:542px;left:472px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">4,150,000
    </div>
    <div style="position:absolute;top:542px;left:531px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;"> 
    </div>
    <div style="position:absolute;top:542px;left:625px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">1.53%
    </div>
    <div style="position:absolute;top:542px;left:663px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;"> 
    </div>
    <div style="position:absolute;top:575px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Bond Street Custodians Limited - A/C
    </div>
    <div style="position:absolute;top:590px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Institutional
    </div>
    <div style="position:absolute;top:583px;left:472px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">2,750,000
    </div>
    <div style="position:absolute;top:583px;left:531px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;"> 
    </div>
    <div style="position:absolute;top:583px;left:625px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">1.01%
    </div>
    <div style="position:absolute;top:583px;left:663px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;"> 
    </div>
    <div style="position:absolute;top:623px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Cogent Investment Operations Pty Ltd 2,599,321
    </div>
    <div style="position:absolute;top:623px;left:531px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;"> 
    </div>
    <div style="position:absolute;top:623px;left:625px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">0.96%
    </div>
    <div style="position:absolute;top:623px;left:663px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;"> 
    </div>
    <div style="position:absolute;top:663px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Skeet Nominees Pty Ltd 2,276,736
    </div>
    <div style="position:absolute;top:663px;left:531px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;"> 
    </div>
    <div style="position:absolute;top:663px;left:625px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">0.84%
    </div>
    <div style="position:absolute;top:663px;left:663px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;"> 
    </div>
    <div style="position:absolute;top:704px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Diederik de Boer 1,917,561
    </div>
    <div style="position:absolute;top:704px;left:531px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;"> 
    </div>
    <div style="position:absolute;top:704px;left:625px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">0.71%
    </div>
    <div style="position:absolute;top:704px;left:663px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;"> 
    </div>
    <div style="position:absolute;top:744px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Ecapital Nominees Pty Limited 1,594,736
    </div>
    <div style="position:absolute;top:744px;left:531px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;"> 
    </div>
    <div style="position:absolute;top:744px;left:625px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">0.59%
    </div>
    <div style="position:absolute;top:744px;left:663px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;"> 
    </div>
    <div style="position:absolute;top:777px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Neweconomy Com Au Nominees Pty 9
    </div>
    <div style="position:absolute;top:792px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Limited &#60;900 Account&#62;
    </div>
    <div style="position:absolute;top:784px;left:472px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">1,594,7360
    </div>
    <div style="position:absolute;top:784px;left:531px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;"> 
    </div>
    <div style="position:absolute;top:784px;left:625px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">0.59%
    </div>
    <div style="position:absolute;top:784px;left:663px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;"> 
    </div>
    <div style="position:absolute;top:825px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Sonray Capital Markets Pty Ltd 1,236,842
    </div>
    <div style="position:absolute;top:825px;left:531px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;"> 
    </div>
    <div style="position:absolute;top:825px;left:625px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">0.46%
    </div>
    <div style="position:absolute;top:825px;left:663px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;"> 
    </div>
    <div style="position:absolute;top:865px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Argo Investments Limited 1,050,000
    </div>
    <div style="position:absolute;top:865px;left:531px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;"> 
    </div>
    <div style="position:absolute;top:865px;left:625px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">0.39%
    </div>
    <div style="position:absolute;top:865px;left:663px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;"> 
    </div>
    <div style="position:absolute;top:905px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Idameno (No 79) Nominees Pty Limited 724,210</div>
    <div style="position:absolute;top:1103px;">
    </body></html>
    Thanks..........................

  • Safari is sandboxed to not reveal filepath from html file select to Javascript ?

    I know safari is sandboxed not to reveal filepath from html file select control to Javascript via the Value attribute , but i am unable to find any documentation regarding how this is done and since when this is present .. Can somebody please guide me with this ..?

    Since Safari is able to save as HTML file a page if it is opened online (from web), making "Save as...", and it is unable to make so if the webarchive file is on the hard disk...I tried to upload on a web server some .webarchive files.
    Then I went online in the web page with the list of all the uploaded .webarchive files... (ex.: http://....filename1.webarchive, etc...)...
    My goal was to open ONLINE (not on hard disk) the files and then make "save as...",... but... SURPRISE!!! Safari is UNABLE to open a webarchive file from the web, it asks me where to save the file... it can only save it, it writes that it is an "application"...
    I think this happens because .webarchive is not a real web page but a "package"... but my displeasure is this:
    Once opened an hard disk's webarchive file, its content is loaded in ram and it appears like a normal web page (html + images + etc...)... so, in this moment, Safari should be able to save it "as...." HTML file too.... discarding images and other objects....
    Any advice?
    Thank you!!!

  • Pick Image from Html file

    I want to retrieve the image from html file & then save this file in jpg format.
    I have a html file with following contents.
    Patient id = 1
    Dated = 03/06/2008
    Pcr_Volume = 0.5
    Notes:
    Principle :
    after principle heading there is a graph file attached.
    Result:
    Remarks:
    I want to pick this graph file which is present after Principle heading and save it to jpg format.
    Regard's

    I want to pick Image(which is actually a graph image of patient test). This image is present is html file with some contents and this file is auto generated by the machine in which test perform.
    I just open that html file and click on that image which is pasted in between that html file when i clik on that image a toolbar appear with save & some other button & then I press
    save button and save that image in jpg format.
    After that i use this image to display in patient report.

  • Error when call fmx from browser

    I have used OAS 4.0.7 with yt40.dll upgraded, NT 4.0
    SP4 and Developer 6.
    I have configured application cartridge according Developer6
    Server doc instructions.
    When I call fmx from browser Netscape 4.6
    (http://hostname/webforms?module=fmx_name) the error "Applet
    oracle.forms.engine.Main class oracle.forms.engine.Main could not
    be loaded".
    OAS inserts in file \orant\ows\website40\log the message
    "Parameter module is missing from URL and cartridge settings"
    Can anybody help me please?.
    Ruy Chicaco
    null

    Hi Adnan
    I have configured my apps similary the example in
    \orant\tools\devdem60\web then it rans fine.
    Thanks,
    Ruy Chicaco.
    Adnan Imtiaz (guest) wrote:
    : Hi there,
    : I'm facing the same problem myself...but mine goes into doing
    : something & returns an "Internal Error" message in the
    : browser....
    : Try running the static HTML file from its directory & see
    whether
    : that even runs or not....
    : Any helpp would be greatly appreciated.....
    : Thanks.
    : Ruy chicaco (guest) wrote:
    : : I have used OAS 4.0.7 with yt40.dll upgraded, NT 4.0
    : : SP4 and Developer 6.
    : : I have configured application cartridge according Developer6
    : : Server doc instructions.
    : : When I call fmx from browser Netscape 4.6
    : : (http://hostname/webforms?module=fmx_name) the error "Applet
    : : oracle.forms.engine.Main class oracle.forms.engine.Main could
    : not
    : : be loaded".
    : : OAS inserts in file \orant\ows\website40\log the message
    : : "Parameter module is missing from URL and cartridge settings"
    : : Can anybody help me please?.
    : : Ruy Chicaco
    null

  • Error when call javabean from form6i

    I try to call javabean from Form6i. I have downlaoded four excample from Oracle Sample Code. But I can't run the example whenever from Form Builder or browser. When I run the html in IE or Natscape browser, I meet a eorror message :
    java.lang.NoClassDefFound Error: sun/applet/AppletViewer
    I have copy all example classes into e:\orant\forms60\java\oracle\forms\demos\ directory and the jar file copy into e:\orant\forms60\java directory.
    Inside the html I set the codebase to e:\orant\forms60\java.
    Is there any error or I still need to set some anothers settings?
    Help please?
    null

    Hi Adnan
    I have configured my apps similary the example in
    \orant\tools\devdem60\web then it rans fine.
    Thanks,
    Ruy Chicaco.
    Adnan Imtiaz (guest) wrote:
    : Hi there,
    : I'm facing the same problem myself...but mine goes into doing
    : something & returns an "Internal Error" message in the
    : browser....
    : Try running the static HTML file from its directory & see
    whether
    : that even runs or not....
    : Any helpp would be greatly appreciated.....
    : Thanks.
    : Ruy chicaco (guest) wrote:
    : : I have used OAS 4.0.7 with yt40.dll upgraded, NT 4.0
    : : SP4 and Developer 6.
    : : I have configured application cartridge according Developer6
    : : Server doc instructions.
    : : When I call fmx from browser Netscape 4.6
    : : (http://hostname/webforms?module=fmx_name) the error "Applet
    : : oracle.forms.engine.Main class oracle.forms.engine.Main could
    : not
    : : be loaded".
    : : OAS inserts in file \orant\ows\website40\log the message
    : : "Parameter module is missing from URL and cartridge settings"
    : : Can anybody help me please?.
    : : Ruy Chicaco
    null

  • Page fault error while calling reports from forms

    dear friends.
    when a report is called from forms, just before opening up of background engine the application gets hanged with page fault. One has to forcibly shut down the application before loggin again.
    The error mesage generated from log file is
    Fatal NI connect error 12203, connecting to:
    (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=BEQ)(PROGRAM=oracle80)(ARGV0=oracle80orcl)(ARGS='(DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))')))(CONNECT_DATA=(SID=orcl)(CID=(PR OGRAM=C:\ORAWIN95\BIN\RWRBE60.EXE)(HOST=SOUMYADIP)(USER=Soumya))))
    VERSION INFORMATION:
    TNS for 32-bit Windows: Version 8.0.5.0.0 - Production
    Oracle Bequeath NT Protocol Adapter for 32-bit Windows: Version 8.0.4.0.0 - Production
    Time: 06-MAY-00 14:03:32
    Tracing not turned on.
    Tns error struct:
    nr err code: 12203
    TNS-12203: TNS:unable to connect to destination
    ns main err code: 12560
    TNS-12560: TNS:protocol adapter error
    ns secondary err code: 0
    nt main err code: 102
    TNS-00102: Keyword-Value binding operation error
    nt secondary err code: 0
    nt OS err code: 0
    After closing if we run the report next time it runs, but after 3/4 attempts the above error again occurs.
    Please Help
    Prashant

    I'm getting this also. I thought it was
    due to my use of DATA PARAMETER. I've
    logged TARS on this and have yet to hear
    back from Oracle.
    Maybe if enough of us get the error Oracle
    will give some guidance on this one.

  • What is the syntax for calling function from class file by jsp

    does anyone here knows what is the syntax of how to call a function from java class file by javascript code or any way to call it?
    and where should i put the calling function code? because the function is called depend on the user click.
    for example
    <%=pc.functionName(a,b)%>
    for the variable a and b, how can i get the value from html textbox and put it in a and b...
    urgent needed...
    thx

    Jsp's are executed before the Html forms are created and loaded. Dont try to use a java code function calling on a javascript click. You'll have to explicitly redirect it into a servlet where in you can call the function you want.
    Well! another way could be using AJAX. That seems to be powerfull enough and it might also serve your purpose.
    Hope this helps

  • Unable to Display Background Graphic From HTML File Generated from AI File

    I am trying to figure out if this is a MAC OS X or Safari issue. I have already a message into the author of the plug-in as well as created a posting on the Adobe Forum.
    I am following a tutorial on Lynda.com called "Design the Web: Illustrator to Animated HTML5 Canvas." I am using a plug in called Ai2CanvasMac with Adobe Illustrator, It essentially generates an HTML file from an Illustrator file. The Illustrator file has an embedded PNG file as a background image and a small vector graphic in front and centered. After the plug-in generates the HTML file, it automatically opens the file up in the browser. This is where I am getting mixed results.
    Safari: The small vector does appear and in the center where the embedded background should appear. But the background image isn't displaying, only a white background is showing.
    Firefox and Chrome: The page is totally blank. Not even the vector graphic appears.
    It will work with two different approaches.
    1. If I edit the source image web links in HTML file and use links from any graphics I find off the web. That works fine. The images are displayed in the browser window.
    2. If I embedded PNG images from my desktop into the Illustrator file and generate the HTML file. That works fine too.
    Does anyone have any ideas as to why I can't the graphics to display properly in the browser without doing this workaround?

    Hi,
    Ex. 1 - If the Index file is in the same directory, called "test"
    tales/numbers.jpg
    Ex. 2 - If the image is in a subdirectory, called "test1" within "test"
    test/test1/numbers.jpg
    img src="test/test1/numbers.jpg"
    Regards
    Ayyapparaj

  • How to generate PDF file from HTML file using Acrobat API's

    Hi,
    I want to generate a PDF file from an HTML file on server side(C# .Net).
    Their is a COM interop called "AcrobatWeb2PDF" availaible but could not find any document regarding how to use it.
    I cant use "Adobe live cycle PDF Generator" as we just have license for Adobe Acrobat 8 Professional.
    Please help...
    Thanks and Regards,
    Anand Mahadik.

    > It is hard to believe that Adobe doesn't provide a toolkit for generating PDF files, so many web based applications have vector based content that needs to be converted to PDF!!!!
    They do, it's just not free (A company in business to make money? I'm sure IBM would never think this way... ;)). As mentioned you have Adobe LiveCycle PDF Generator, which you can customize and extend with Java. You also have the Adobe PDF Library SDK, which is written for use with C/C++ although if you license it from Datalogics (the only company in NA Adobe allows to license the PDF Library) you will also get .NET and Java interfaces (part of the DLE - DataLogics Extensions).
    > There must be a way to generate PDF dynamically on a server or from Javascript!
    JavaScript? Not really, no. As far as I'm aware JavaScript has no file system access capabilities without some form of intermediary (like sending the data to a webservice that writes it out to file). How would you create a PDF file with JavaScript?
    The PDF Standard is also in ISOs hands now (ISO 32000-1:2008), it is no longer owned by Adobe - you can download a copy of the specification from them and write your own library based on that as well.

  • Calling method from jsp file

    Hi
    is it possible to call any method with in the class except handle method from jsp file?

    You can call , but it would not be a good design approach.A droplet can do the same task for you.
    otherwise :
    eg :
    <%@ page import="com.mypackage.MyClass"%>
    for Static access :
    <%
    String test= MyClass.myMethod();
    %>
    for normal classes :
    <%
    MyClass object = new MyClass();
    String test= object .myMethod();
    %>
    http://stackoverflow.com/questions/10918526/call-java-method-in-jsp-file
    http://www.javaworld.com/javaworld/jw-05-2003/jw-0523-calltag.html?page=2
    ```
    Praveer
    Edited by: Praveer Rai on Mar 26, 2013 5:08 PM

  • Calling  Midlets from WML file

    Hi all,
    We are developing a J2ME application to download and Play ringtones from a server. We need to integrate this with a WAP browser application. Our client has a WAP site used to browse for different kind of tones. But, they don't have any option to download and preview the tone. We have a J2ME Midlet which can do that. So, How can we embed this Midlet in the wml file ( like embedding an applet in HTML file) . I understood that we can install the Midlet by giving links to the .jad file from wml file. Once it is installed how do I invoke that MIDlet for different events in the WML file.
    Thanks
    Ibrahim

    Hi ,
    No answers to this good question :-) . I got an answer which says it is NOT possible to invoke MIDlet application from a WML code . All we can do is download the .jad file using a WML page . JAM ( Java Application Manager) will install the app using the information in the downloaded .jad file .
    If this is true , What does this following Paragraph, extracted from one of the papers of Mr.Bill day, (Technical Evangelist from SUN) mean
    " In a sense, then, Java technology is very good at many of the things in which WAP is
    lacking: Java techology and WAP are complementary technologies.
    One option for using the two together is to have a WAP browser in the phone, and to
    have a VM that implements the CLDC and MIDP specifications. This virtual machine
    might be the KVM, or it might be another VM, so long as it is compliant with the J2ME
    CLDC and MIDP specifications. The WAP browser and the J2ME environment could
    then call each other via an API between the two. When the JAM wants to run a Java
    application, it has the WAP browser do the download via its standard mechanisms,
    and then the JAM manages the installation of the Java application and its execution
    by the JVM. If the JVM wants to put some text up in the device screen, it tells the
    browser that, "This is what I'd like you to display" via the standard callback
    mechanism.
    Hopefully, what we will see in the longer term are WAP and other micro browsers
    written in the Java programming language themselves. (In fact, there are several
    Java technology based WAP micro browsers available already; refer to the J2ME
    Archive for examples.) In most of the non-Java technology browsers in phones now,
    if you want a new version or a new feature you have to buy a new phone. A micro
    browser based on Java technology could give you extra flexibility in that you could
    update your WAP browser itself, on-the-fly, ieven over the air. You could keep the
    same phone and download browser updates as they become available. This would
    benefit consumers by keeping their handset costs down and benefit operators by
    allowing them to add new features to their service more easily and quickly. ".
    Can any one explain what he was trying to say, if calling Midlet application from WML is NOT possible.

  • Find Info from HTML file

    I am trying to develop a program to read URLS and extract specific content from the source of the URLS. So far my program
    Returns the HTML of a URL and writes the HTML to a file called Results.txt.
    I now need to write a program that opens up this Results file and extracts the info that appears after certain tags. Some of these files are rather large to say the least and parsing HTML files is no simple task compared to files separated by simple white space.
    Can anyone advise how I can search an HTML file for A particular tag. Is tokenisaing the file the answer? If so How can I define a token since HTML does not separate tokens by white spaces always.
    Thanks for your help
    Ross

    Well ok I agree with you in what you say however I have designed my final year at uni project for parsing HTML and that's what Im commited to doing now. In hindsight I would have done things differently.
    I am having difficulty knowing how to parse the HTML tho. Basically to look at, it's not nice at all. For example the HTML below how would I extract the info after the words "Double Rooms from" ?
    </td></tr>     <tr><td colspan="2"><hr size="1"/>
         <font size="3"><b>Orwell Lodge Hotel, Dalry</b></font>
    (2.6 miles / 3.6 km from the centre of Sighthill)
    </td></tr>
         <tr><td><img src="http://www.activehotels.com/photos/218697/AAB218697.jpg" border="0" width="96" height="72" alt="hotel" /></td>
         <td><font size="2">Single rooms from: &pound;40.00, Double rooms from: &pound;40.00</font>     
         <p /><font size="3"><b>For more details and online booking click here.</b></font>
         <p /><font size="2">Hotel details in other languages:
         <a href="http://www.orwelllodgehotel.activehotels.com/KNW&LANGUAGE=fr&subid=                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Calling JSP from HTMl

    Hi,
    I want to call a JSP file from HTML. Is it possibel? How can it be done.
    Thanks.

    download a standalone server like tomcat or jswdk. tomcat is recommended.
    if you know how to write html then make a form with your action forwarding to your jsp page and use a post or get method. actually just look here.
    http://www.coreservlets.com/Apache-Tomcat-Tutorial/

  • How can i get all links from html file ?

    I tried some code:
    List<string> metas = new List<string>();
    string text = "";
    string mys = "";
    public List<string> LockedThreads(string filename)
    HtmlWeb web = new HtmlWeb();
    HtmlAgilityPack.HtmlDocument doc = new HtmlAgilityPack.HtmlDocument();
    doc.Load(filename, Encoding.UTF8);
    var metaTags = doc.DocumentNode.SelectNodes("//meta");
    if (metaTags != null)
    foreach (var tag in metaTags)
    if (tag.Attributes["name"] != null && tag.Attributes["content"] != null)
    text = tag.Attributes["name"].Value;
    mys = tag.Attributes["content"].Value;
    var linksOnPage = from lnks in doc.DocumentNode.Descendants()
    where lnks.Name == "a" &&
    lnks.Attributes["href"] != null &&
    lnks.InnerText.Trim().Length > 0
    select new
    Url = lnks.Attributes["href"].Value,
    Text = lnks.InnerText
    foreach (HtmlNode node in doc.DocumentNode
    .SelectNodes("//a/@href | //img/@src"))
    metas.Add(node.Name);
    In the var linksOnPage i'm getting all the links but some of them not only links for example the first item i see:
    [0] = { Url = "/", Text = "&nbsp;&nbsp;&nbsp;&nbsp;" }
    Then the second item:
    [1] = { Url = "http://rotter.net/cgi-bin/forum/dcboard.cgi?az=login", Text = "התחבר" }
    Next i want to add another loop or variable that will contain only the links after im src for example:
    <img
    src="http://mysite.com"
    border="0"></a></TD><TD
    ALIGN="right"
    VALIGN="TOP"
    WIDTH="55%">
    So to get only http://mysite.com
    So in the end i will have two Lists:
    First List will contain all links from the html file.
    Second List only links that are in img src

    Ok i'm using regex now and i can get the links i need:
    List<string> metas = new List<string>();
    List<string> metas1 = new List<string>();
    string text = "";
    string mys = "";
    public List<string> LockedThreads(string filename)
    string[] fall = File.ReadAllLines(filename);
    foreach (string hh in fall)
    if (hh.Contains("http://rotter.net") && hh.Contains("locked")||
    hh.Contains("locked_icon_general") ||
    hh.Contains("locked_icon_anchor") ||
    hh.Contains("icon_anchor") ||
    hh.Contains("locked_icon_fire") ||
    hh.Contains("locked_icon_sport")||
    hh.Contains("locked_icon_camera")||
    hh.Contains("locked_icon_movie"))
    Regex linkParser = new Regex(@"\b(?:https?://|www\.)\S+\b", RegexOptions.Compiled | RegexOptions.IgnoreCase);
    foreach (Match m in linkParser.Matches(hh))
    metas.Add(m.Value);
    So now in the metas i have in this case two links.
    For example the first link is from this block in the file:
    The link i got is : http://rotter.net/forum/Images/hot_icon_anchor.gif
    And this is the right link from this block but now how do i get the text from this block and how i connect how do i know that this text belong to the link ? I need to add this text from this block to a new List. Before all that i counted on my own lines
    and got the text but that's a bad idea.
    I need somehow to get: שרשור תשדירי בחירות מרוכז:
    To get the text between the ToolTip',' and the second ',' but not from all the html file only in places of this two links i extracted.
    <TD ALIGN="RIGHT"
    VALIGN="TOP">
    <body onmousemove="overhere()">
    <a onmouseover="EnterContent('ToolTip','שרשור תשדירי בחירות מרוכז:','<u><span style=color:#000099;>כתב: menahem בתאריך: 03.03.15
    שעה: 08:51</span></u><br>1.<br>http://youtu.be/utUaqyiRkJ8<br><br><br>...'); Activate();"
    onmouseout="deActivate()"
    href="javascript:void(0)">
    <img src="http://rotter.net/forum/Images/hot_icon_anchor.gif"
    border="0"></a></TD><TD
    ALIGN="right"
    VALIGN="TOP"
    WIDTH="55%">
    <FONT CLASS='text15bn'><FONT
    FACE="Arial">
    <a href="http://rotter.net/cgi-bin/forum/dcboard.cgi?az=read_count&om=187966&forum=scoops1"><b>
    <font color="red">שרשור תשדירי בחירות מרוכז:</b>
    </a></font></TD>

Maybe you are looking for