RSS Forums RSS
Please support our JSP advertiser: Lunarpages JSP Web Hosting
Views: 793 | Replies: 3
Reply
Join Date: May 2008
Posts: 2
Reputation: ambarish510 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
ambarish510 ambarish510 is offline Offline
Newbie Poster

Problem With Hover Button

  #1  
May 2nd, 2008
wen i write the following codes in a jsp file it is not working prperly

the code is
  1. <body>
  2. <p>
  3. <jsp:plugin
  4. type="applet"
  5. code="fphover.class" codebase="./"
  6. width="120" height="24">
  7. <jsp:params>
  8. <jsp:param name="textcolor" value="#FFFFFF">
  9. <jsp:param name="text" value="page name">
  10. <jsp:param name="color" value="#808000">
  11. <jsp:param name="hovercolor" value="#FFFFFF">
  12. <jsp:param name="effect" value="glow">
  13. <jsp:param name="url" valuetype="ref" value="p1.jsp">
  14. </jsp:params>
  15. </jsp:plugin>
  16. </p>
  17. </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....
Last edited by peter_budo : May 3rd, 2008 at 2:45 pm. Reason: Keep It Organized - please use [code] tags
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jun 2006
Location: India
Posts: 7,052
Reputation: ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold 
Rep Power: 25
Solved Threads: 371
Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Lazy, Useless & Apathetic

Re: Problem With Hover Button

  #2  
May 2nd, 2008
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>
I don't accept change. I don't deserve to live.

Happiness corrupts people.

Failing to value the lives of others cheapens your own.
Reply With Quote  
Join Date: May 2008
Posts: 2
Reputation: ambarish510 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
ambarish510 ambarish510 is offline Offline
Newbie Poster

Re: Problem With Hover Button

  #3  
May 3rd, 2008
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...
Last edited by ~s.o.s~ : May 3rd, 2008 at 12:28 pm. Reason: Added code tags, learn to use them; last warning.
Reply With Quote  
Join Date: Jun 2006
Location: India
Posts: 7,052
Reputation: ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold 
Rep Power: 25
Solved Threads: 371
Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Lazy, Useless & Apathetic

Re: Problem With Hover Button

  #4  
May 3rd, 2008
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.
I don't accept change. I don't deserve to live.

Happiness corrupts people.

Failing to value the lives of others cheapens your own.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 11:31 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC