wen i write the following codes in a jsp file it is not working prperly

the code is

<body>
<p>
<jsp:plugin 
	type="applet" 
	code="fphover.class" 	codebase="./" 
	width="120" height="24">
  <jsp:params>
    <jsp:param name="textcolor" value="#FFFFFF">
    <jsp:param name="text" value="page name">
    <jsp:param name="color" value="#808000">
    <jsp:param name="hovercolor" value="#FFFFFF">
    <jsp:param name="effect" value="glow">
    <jsp:param name="url" valuetype="ref" value="p1.jsp">
  </jsp:params>
</jsp:plugin>
</p>
</body>

When deployed in java web servr , it gives the eror message as follows
"org.apache.jasper.JasperException: /sample.jsp(20,48) The <jsp:param tag can only have jsp:attribute in its body."

Please explain wat the mistake was, and how to rectify it.
With Thanks....

Look closely at the code you have written. The tag <jsp:param> doesn't have a body and hence should be written as one. Leaving them open is what is causing the problems here. It should be: (notice the slashes at the end of the param tag)

<jsp:params>
<jsp:param name="textcolor" value="#FFFFFF" />
<jsp:param name="text" value="page name" />
<jsp:param name="color" value="#808000" />
<jsp:param name="hovercolor" value="#FFFFFF" />
<jsp:param name="effect" value="glow" />
<jsp:param name="url" valuetype="ref" value="p1.jsp" />
</jsp:params>

thank yu for the reply, and that problem have been solved, but I request yu to help me further.

now i ve changed the code as:-

<%@ page language="java" import="java.sql.*" 
import="java.util.*"%>
<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; 
charset=windows-1252">
<title>sample</title>
</head>

<body>
<p>
<jsp:plugin 
	type="applet" 
	code="fphover.class" 	codebase="./" 
	width="120" height="24">
  <jsp:params>
    <jsp:param name="textcolor" value="#FFFFFF" />
    <jsp:param name="text" value="page name" />
    <jsp:param name="color" value="#808000" />
    <jsp:param name="hovercolor" value="#FFFFFF" />
    <jsp:param name="effect" value="glow" />
    <jsp:param name="url" value="ref" value="p1.jsp" />
  </jsp:params>
</jsp:plugin>
</p>
</body>
</html>

now wen deploying the page to java server , there is no error reported, but when i open the page
"http://localhost:8080/olamroot/sample.jsp"
a blank page comes and at the bottom status line it displayes "Loading Java Applet Failed". and "FpHover cannot be initialized"

with Thanks
Expecting Reply...

There can be a host of problems / reasons causing that message to come up. Is the applet working in standalone mode? Which version of Java are you using? What is the directory structure of your application (as in the placement of JSP / class files)? What does the Java console show? Can you run other Java applets embedded in web pages of other sites? Have you got the latest plug in installed?

Maybe this thread will give you some leads.

This article has been dead for over six months. Start a new discussion instead.