• 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

Applet parameters using JSP

 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How do I pass parameters from a JSP to an Applet?
I tried several variations of the following:
<jsp :plugin type="applet" code="Trans.class" codebase="." jreversion="1.2" width="529" height="342"
</jsp :plugin>
<jsp :params>
<jsp :param name="userId" value="10" />
</jsp :params>

[This message has been edited by Angela Poynton (edited March 06, 2001).]
 
Ranch Hand
Posts: 4716
9
Scala Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Im not sure I understand your problem. You can use straight html.
<applet code="Trans.class" width="529" height="342">
<param name="userId" value="10">
</applet>
Unless I just dont understand.
 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need to nest the <jsp :params> inside the plugin tag. Judging from the code you posted, you're not.
See examples here:
http://java.sun.com/products/jsp/tags/11/syntaxref1113.html#8837
To the other respondent, the reason for using the plugin tag instead of straight HTML is that the JSP container is supposed to write browser-specific HTML for you, saving you the effort of doing browser detection and generating different HTML for IE and Netscape.
------------------
Scott Stirling
Author of Java Server Pages Application Development
[This message has been edited by Scott Stirling (edited March 06, 2001).]
[This message has been edited by Jim Yingst (edited March 06, 2001).]
 
Randall Twede
Ranch Hand
Posts: 4716
9
Scala Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Scott,
I see. I have been avoiding the problem of different applet tags for each browser by using java 1 in my applets. I still use html 3.2 mostly also.
 
reply
    Bookmark Topic Watch Topic
  • New Topic