faqts : Computers : Programming : Languages : Java : JSP

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

51 of 188 people (27%) answered Yes
Recently 3 of 10 people (30%) answered Yes

Entry

Like Applet to servlet communication is there a way to communicate between Applet & JSP

Mar 16th, 2005 18:17
Budarapu Sreenivasulu, Junaid Ansar, Ben Young, vinod kumar, Book: Java Servlet Programming (O'Reilly)


yes, we can have connection between applet and jsp by using follwing 
code in ur jsp file
<jsp:plugin type="applet" code="Clock2.class" 
codebase="/examples/jsp/plgin/applet" jreversion="1.2" width="160" 
height="150" >
    <jsp:fallback>
        Plugin tag OBJECT or EMBED not supported by browser.
    </jsp:fallback>
</jsp:plugin>
the code base attribute takes the path of the appet where u placed the 
applet class in webserver.
for ex in tomcat -> webapps->urproject_dir->jsp->plgin->applet here 
applet is a folder & in that the class is placed.
from 
sreenu