The Artima Developer Community
Sponsored Link

Java Answers Forum
jsp & applet param

4 replies on 1 page. Most recent reply: Aug 21, 2003 3:33 PM by janek

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 4 replies on 1 page
jan

Posts: 1
Nickname: johnnyg
Registered: Aug, 2003

jsp & applet param Posted: Aug 19, 2003 4:40 PM
Reply to this message Reply
Advertisement
hi

I have problem with receiving parameters in aplet class by getParameters() method. I am sending them on the jps page :
..
..
<% String miejsce="temp"; %>
..
..
<jsp:plugin type="applet" code="util.jbPack.Aplet.class" codebase ="file:/C:/eclipseOban/eclipse/workspace/sklep/WEB-INF/src" jreversion="1.4" align="center" width = "200" height = "200">

<jsp:params>
<jsp:param name="koszulka" value="<%=miejsce%>"/>
</jsp:params>

<jsp:fallback>
<p >dgsd<p>
</jsp:fallback>
</jsp:plugin>
..
..

but getParameter() return not "temp" but "miejsce".


I would be really thankful if someone can help me with this


Kishori Sharan

Posts: 211
Nickname: kishori
Registered: Feb, 2002

Re: jsp & applet param Posted: Aug 19, 2003 6:19 PM
Reply to this message Reply
I could get the parameter value as "temp" when I ran your JSP in Jaguar web server. If your applet is displaying and you are not able to get the desired value then there could be two reasons:
1. <jsp:param name="koszulka" value="<%=miejsce%>"/> tag is not substituing the value of miejsce variable or you are setting the value of miejsce to "miejsce" before your tag for applet.

2. YOu can check your applet code to make sure that your are using correct parameter name.

If everything looks ok to you, you can tell us what webserever you are using, and post your applet code too.

Thanks
Kishori

janek

Posts: 2
Nickname: janek
Registered: Aug, 2003

Re: jsp & applet param Posted: Aug 20, 2003 4:51 AM
Reply to this message Reply
hi its me- jan :) (something wrong with my account)

I'm using eclipse 2.0.2 and tomcat 1.4.

this is a part of the applet code:


public void init(){
....
...
this.sciezkaGrafika=getParameter("miejsce");
....
....
}

I think the problem is not with receiving this but with add this to the parametres at the jsp site.is't possible that this happens becouse of tomcat or eclipse version ??

Kishori Sharan

Posts: 211
Nickname: kishori
Registered: Feb, 2002

Re: jsp & applet param Posted: Aug 20, 2003 6:31 PM
Reply to this message Reply
I ran your example using Tomcat 4.1 and got the same result as you got. It is a bug in Tomcat 4.1. It doesn't evaluate the expression for value attribute. It treats it as if it is literal string.

I ran the same example in Tomcat 5.0 and it gave me correct result. So, download Tomcat 5.0 and will get correct result.

Thanks
Kishori

janek

Posts: 2
Nickname: janek
Registered: Aug, 2003

Re: jsp & applet param Posted: Aug 21, 2003 3:33 PM
Reply to this message Reply
ok thx - i will try :)

Flat View: This topic has 4 replies on 1 page
Topic: Why do i get a nullpointer exception here Previous Topic   Next Topic Topic: what we have to download to run servlets and jsp

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use