Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Passing codebase attribute dynamically in Applet

650570Feb 2 2011 — edited Feb 3 2011
I am currently calling an applet inside a jsff page.
<jsp:plugin type="applet"
            code="TestApplet"
            codebase="http://localhost:8888/test/jars"
            name="applet" width="1" height="1"
            archive="test.jar, xerces-2.3.0.jar">
            <jsp:params>
                   <jsp:param name="param" value="${testManagedBean.param}"/>
            </jsp:params>
</jsp:plugin>
The code works just fine - What i need is to construct the codebase (http://localhost:8888/test/jars) programmatically using a managed bean the same way i've done with the jsp:param. The
problem is that when i type codebase="${testManagedBean.url}" the page doesn't compile:
The error says: "Static attribute must be a String literal, its illegal to specify an expression".
Does anybody know if there is any way to achieve this functionality (passing dynamic values in codebase)? Any suggestions would be much appreciated.

Cheers
George
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 3 2011
Added on Feb 2 2011
4 comments
333 views