dynamic attributes in jsp:plugin tag

B

Bronwyn Howard

I need to know how to put dynamic attributes in my jsp:plugin tag.

I've tried a combination of things, but I essentially want to do this:

String codeBase = clientBean.getCodebase();
%>
<html>

<jsp:plugin
type="applet"
code="chatapplet.chatMain"
codebase=<%=codeBase%>
height="200"
width="300"
target="_blank"
jreversion="1.3"
nspluginurl="http://java.sun.com/products/plugin/1.3/plugin-install.html"
iepluginurl="http://java.sun.com/products/plugin/1.3/jinstall-131-win32.cab"
I've tried "<%=codeBase%>".. I've also tried escape characters, and a
combination of all of the above as well as just crazy stuff that would
obviously not work, just in case it did.

I've seen plenty of people on groups asking the same question, but
noone ever seems to get a reply, or leave an e-mail or other contact
so I can ask them.

Can someone PLEASE give me the answer!!

Bronwyn.
 
S

Sudsy

Bronwyn said:
I need to know how to put dynamic attributes in my jsp:plugin tag.

I've tried a combination of things, but I essentially want to do this:

String codeBase = clientBean.getCodebase();
%>
<html>

<jsp:plugin
type="applet"
code="chatapplet.chatMain"
codebase=<%=codeBase%>
height="200"
width="300"
target="_blank"
jreversion="1.3"
nspluginurl="http://java.sun.com/products/plugin/1.3/plugin-install.html"
iepluginurl="http://java.sun.com/products/plugin/1.3/jinstall-131-win32.cab"

Try this as your boilerplate:

<bean:define id="xxx" value="this_is_a_test"/>
<jsp:plugin
type="applet"
code="chatapplet.chatMain"
height="200"
width="300"
jreversion="1.3"

nspluginurl="http://java.sun.com/products/plugin/1.3/plugin-install.html"

iepluginurl="http://java.sun.com/products/plugin/1.3/jinstall-131-win32.cab">

<jsp:params>
<jsp:param name="java_codebase" value="<%= xxx %>" />
</jsp:params>
</jsp:plugin>

(I'm just using the bean:define and the variable xxx as examples)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top