Hi Fon Francis!
You probably call your servlet as
http://myhost/servlet/appletchooser
if you set codebase to "." the browser will try to load
http://myhost/servlet/A.class
which is probably not what you want.
BTW. I suggest using JSP for that kind of stuff:
<html>
<body>
<% String user = request.getParameter("user"); %>
<% if(user.equals("1")) { %>
<applet code = "A.class" codebase = "." width= 461 height=346>
<applet code = "B.class" codebase = "." width= 461 height=346>
<% } %>
<% if(user.equals("2")) { %>
<applet code = "C.class" codebase = "." width= 461 height=346>
<applet code = "D.class" codebase = "." width= 461 height=346>
<% } %>
</body>
</html>
>Hi guys, need your helps....
>
> I am trying to load an applet from my Servlet. The reason
> why I am doing this is because based on different users, the
> applet configuration will change and they will have different
> applets combination (e.g.: applet a & b for user 1, applet c & d for user
>2)
>
> So basically what I did was very simple ...
>
> out = response.getWriter();
> out.println("<applet code = "A.class" codebase = "." width= 461 height=
>346 > </applet>");
> out.close();
>
> However, it doesn't matter how I change the codebase,
> the browser doesn't seem to be able to find the A.class.....
> Any ideas? Any inputs will be greatly appreciated.
>
> Thanks
>
>Fran
>
>===========================================================================
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST"
.
>FAQs on JSP can be found at:
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
Ciao,
Carsten Heyl
Carsten Heyl [EMAIL PROTECTED]
NADS - Solutions on Nets http://www.nads.de/
NADS GmbH http://www.pixelboxx.de/
Hildebrandtstr. 4E Tel.: +49 211 933 02-90
D-40215 Duesseldorf Fax.: +49 211 933 02-93
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html