• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to pass values from jsp to applet

 
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,

i want to pass values from Jsp to applet and to read them in applet code

here is my code

<%String empid= request.getParameter("ID");%>

<jsp:plugin type="applet"
code="applet/PrintApplet.class"
codebase="http://localhost:8080/myadmin"
jreversion="1.6.0"
archive="http://localhost:8080/myadmin/PrintApplet.jar"
name="PrintApplet"
width="520"
height="520">
<jsp:params>
<jsp:param name="empID" value="<%=empid%>">
</jsp:params>
<jsp:fallback> Your browser do not support applets! </jsp:fallback>
</jsp:plugin>


the following is the error

org.apache.jasper.JasperException: /CaptureFinger.jsp(122,36) The <jsp:param tag can only have jsp:attribute in its body.
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:405)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:130)
 
Bartender
Posts: 1952
7
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You're missing a "/" somewhere in there.
 
Ranch Hand
Posts: 77
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

sreenivas jeenor wrote:
<jsp:plugin type="applet"
code="applet/PrintApplet.class"
codebase="http://localhost:8080/myadmin"
jreversion="1.6.0"
archive="http://localhost:8080/myadmin/PrintApplet.jar"
name="PrintApplet"
width="520"
height="520">



I suggest 3 changes to the element.



  • Change the code attribute to a fully qualified class name
  • Shortened the code base to make it portable across domains
  • Shortened the archive attribute to be relative to code base


  • Those changes will not solve the problem though (or if they do, it would be pure luck).
     
    Rancher
    Posts: 43081
    77
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    I generally advise to create an APPLET tag directly instead of relying on jsp:plugin to do the right thing.
     
    Andrew Thompson
    Ranch Hand
    Posts: 77
    5
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Ulf Dittmer wrote:I generally advise to create an APPLET tag directly instead of relying on jsp:plugin to do the right thing.



    I don't use JSP at all. For embedding applets and JWS launch buttons, I use deployJava.js .
    reply
      Bookmark Topic Watch Topic
    • New Topic