  | Mailing List | | Home | | Forum Home | | JBoss - Java Application Server | | Tomcat - JSP/Servlet container | | Struts - A MVC web framework | | iText - An open source PDF Java Library | | JDOM - JDOM XML Parser | | JSP - A mailing list about Java Server Pages specification and reference | | J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition | | J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog | | Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology | |
Struts & Hibernate
|
|
|
  | | | custom tag - param passing prob | custom tag - param passing prob 2007-03-08 - By Graeme McLaren
Back Hi there, prevMonth is defined in my extended BodyTagSupport class. I also tried something like this within the JSP which didn't work:
<%! int prevMonth = pageContext.getParameter("prevMonth"); int nextMonth = request.getParameter("nextMonth"); %>
Not really sure on this at all, any suggestions?
Thank you for your reply.
Graeme :)
>From: Fei Yang <fyang1024@(protected)> >Reply-To: A mailing list about Java Server Pages specification and >reference <JSP-INTEREST@(protected)> >To: JSP-INTEREST@(protected) >Subject: Re: custom tag - param passing prob >Date: Thu, 8 Mar 2007 15:55:01 +1100 >MIME-Version: 1.0 >Received: from swjscmail2.java.sun.com ([192.18.99.108]) by >bay0-mc12-f10.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2668); Wed, >7 Mar 2007 21:05:58 -0800 >Received: from swjscmail1 (swjscmail1.Sun.COM [192.18.99.107])by >swjscmail2.java.sun.com (Postfix) with ESMTPid 7B8B821A8B; Wed, 7 Mar 2007 >22:02:05 -0700 (MST) >Received: from JAVA.SUN.COM by JAVA.SUN.COM (LISTSERV-TCP/IP release 1.8e) >with spool id 13099812 for JSP-INTEREST@(protected); Wed, 7 Mar >2007 21:59:25 -0700 >Received: from ug-out-1314 (See http://out-1314.ora-code.com).google.com (ug-out-1314 (See http://out-1314.ora-code.com).google.com >[66.249.92.170]) by swjscmail1.java.sun.com (Postfix) with ESMTP >id A5D6A5BA3 for <JSP-INTEREST@(protected)>; Wed, 7 Mar 2007 >21:49:17 -0700 (MST) >Received: by ug-out-1314 (See http://out-1314.ora-code.com).google.com with SMTP id z38so880838ugc for > <JSP-INTEREST@(protected)>; Wed, 07 Mar 2007 20:55:02 -0800 (PST) >Received: by 10.115.74.1 with SMTP id b1mr2478586wal.1173329701280; Wed, 07 >Mar 2007 20:55:01 -0800 (PST) >Received: by 10.114.185.18 with HTTP; Wed, 7 Mar 2007 20:55:01 -0800 (PST) >X-Message-Info: txF49lGdW40/Xr+yw2JginRAHJKTIyxpTzio6/F1lg8= >X-Original-To: JSP-INTEREST@(protected) >Delivered-To: JSP-INTEREST@(protected) >DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; > >h=domainkey-signature:received:received:message-id:date:from:to:subject:in -reply-to:mime-version:content-type:references; > >b=n3SuD7Su3ZeJV34MPxtLCcO9ol9+ReXnjmMD73kton7YqwIGhlB0Mk0jAFhUtbS+Ko +C7uDBPFblsW2WTsYDo0bFfZyiqoFs2mm3MMLb+C /hBtn6ACBVUgBgQ8RxJnRpmGKozy8Lb6V5hGu0vY52tBmc3cGXoJ+vEVwDg/H1Hl8= >DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; > >h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content -type:references; > >b=Ej6IqSv5R0W6Z1R+GHoMCp5BM6DRV/CBDBMJOm4t8XG7dqku+UaNlDLxTl2s3DpOjcJ1nhuzrxI /fTr8VSGVME/4jS9j87sZhl60nS4qHvvT1kkXpdF13kQqDXKzQTgZsKNjLTAzYghuShr +8sQpKPsXgiRUt+S2UfYtqo+bXsE= >References: <BAY138-F267A9D37C8066B89A1FDAFD77A0@(protected)> >Precedence: list >Return-Path: owner-jsp-interest@(protected) >X-OriginalArrivalTime: 08 Mar 2007 05:06:04.0064 (UTC) >FILETIME=[78C94A00:01C7613F] > >Where did you define the "prevMonth" between "<%=" and "%>" ? > >On 3/8/07, Graeme McLaren <iamnotregistered@(protected)> wrote: >> >>Hi all, I am building my first custom tag and I want to pass a value to >>variable around from a jsp to the custom tag: >> >><JavaComponents:calendar prevMonth="<%= prevMonth %>" /> >> >>When I try to to run the JSP I get an error: >> >>org.apache.jasper.JasperException: Unable to compile class for JSP >> >>An error occurred at line: 23 in the jsp file: /calendarTag.jsp >> >>Generated servlet error: >> [javac] Compiling 1 source file >> >> >>C:\Tomcat\work\Catalina\localhost\_\org\apache\jsp\calendarTag_jsp.java:90: >>cannot resolve symbol >>symbol : variable prevMonth >>location: class org.apache.jsp.calendarTag_jsp >> _jspx_th_JavaComponents_calendar_1.setPrevMonth( prevMonth ); >> ^ >>1 error >> >> >>Can anyone suggest anything to help get this working? >> >> >>Cheers in advance, >> >>Graeme :) >> >> >>=========================================================================== >>To unsubscribe: mailto listserv@(protected) with body: "signoff >>JSP-INTEREST". >>For digest: mailto listserv@(protected) with body: "set JSP-INTEREST >>DIGEST". >> >>Some relevant archives, FAQs and Forums on JSPs can be found at: >> >>http://java.sun.com/products/jsp >>http://archives.java.sun.com/jsp-interest.html >>http://forums.java.sun.com >>http://www.jspinsider.com >> > >=========================================================================== >To unsubscribe: mailto listserv@(protected) with body: "signoff >JSP-INTEREST". >For digest: mailto listserv@(protected) with body: "set JSP-INTEREST >DIGEST". > >Some relevant archives, FAQs and Forums on JSPs can be found at: > >http://java.sun.com/products/jsp >http://archives.java.sun.com/jsp-interest.html >http://forums.java.sun.com >http://www.jspinsider.com
=========================================================================== To unsubscribe: mailto listserv@(protected) with body: "signoff JSP-INTEREST". For digest: mailto listserv@(protected) with body: "set JSP-INTEREST DIGEST".
Some relevant archives, FAQs and Forums on JSPs can be found at:
http://java.sun.com/products/jsp http://archives.java.sun.com/jsp-interest.html http://forums.java.sun.com http://www.jspinsider.com
|
|
 |