You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Shridhar Rangarajan <sh...@hotmail.com> on 2000/07/27 16:28:30 UTC

Issue with JSP tags

Hello all,

I used to use JSWDK v1.0.1 earlier where my JSP code was embedded in the JSP
XML tags such as
<jsp:scriptlet> java code </jsp:scriptlet> and so on.

I realized that Tomcat v3.1 does not interpret these tags appropriately and
instead, I had to use <% java code %>! Can anyone explain this? I thought
the original tag set was part of the JSP specification and therefore must be
supported by Tomcat.

Thanks!

Shridhar Rangarajan
shridharrangaraj@hotmail.com

Re: Issue with JSP tags

Posted by Danno Ferrin <sh...@earthlink.net>.
What you were using was a mis-implementation of the spec.  The XML core
syntax and the JSP <% %> syntax were never meant to be used on the same
page, and the XML syntax is not yet required to be implemented
(especially since the spec indicates no "official" way to implement it
yet)

--Danno

Shridhar Rangarajan wrote:
> 
> Hello all,
> 
> I used to use JSWDK v1.0.1 earlier where my JSP code was embedded in the JSP
> XML tags such as
> <jsp:scriptlet> java code </jsp:scriptlet> and so on.
> 
> I realized that Tomcat v3.1 does not interpret these tags appropriately and
> instead, I had to use <% java code %>! Can anyone explain this? I thought
> the original tag set was part of the JSP specification and therefore must be
> supported by Tomcat.
> 
> Thanks!
> 
> Shridhar Rangarajan
> shridharrangaraj@hotmail.com

Re: Issue with JSP tags

Posted by Eduardo Pelegri--Llopart <Ed...@eng.sun.com>.
check the errata 1.1_a that clarifies this.  at
http://java.sun.com/jsp/download.html.

	- eduard/o

Shridhar Rangarajan wrote:
> 
> Hello all,
> 
> I used to use JSWDK v1.0.1 earlier where my JSP code was embedded in the JSP
> XML tags such as
> <jsp:scriptlet> java code </jsp:scriptlet> and so on.
> 
> I realized that Tomcat v3.1 does not interpret these tags appropriately and
> instead, I had to use <% java code %>! Can anyone explain this? I thought
> the original tag set was part of the JSP specification and therefore must be
> supported by Tomcat.
> 
> Thanks!
> 
> Shridhar Rangarajan
> shridharrangaraj@hotmail.com

RE: class reloading bug?

Posted by Russell Gold <ru...@acm.org>.
At 1:38 AM -0400 7/28/00, Rob S. wrote:
>> I am using Tomcat 3.1. When I replace class files for my application, and
>> then run it, Tomcat gives me a class cast exception on the JavaBean class
>> used by the JSPs - even though that class has NOT changed. Why is this
>> happening?
>
>Going out on a complete limb here, but could it possible give you this
>message if one of its members had changed?

Nothing of the class has changed. Other classes have, but not this one.

------------------------------------------------------------------------
Russell Gold                     | "... society is tradition and order
russgold@acm.org    (preferred)  | and reverence, not a series of cheap
russgold@netaxs.com              | bargains between selfish interests."
rgold@thesycamoregroup.com       |   - Poul Anderson, "Iron"



RE: class reloading bug?

Posted by "Rob S." <rs...@home.com>.
> I am using Tomcat 3.1. When I replace class files for my application, and
> then run it, Tomcat gives me a class cast exception on the JavaBean class
> used by the JSPs - even though that class has NOT changed. Why is this
> happening?

Going out on a complete limb here, but could it possible give you this
message if one of its members had changed?

- r


class reloading bug?

Posted by Russell Gold <ru...@acm.org>.
I am using Tomcat 3.1. When I replace class files for my application, and 
then run it, Tomcat gives me a class cast exception on the JavaBean class 
used by the JSPs - even though that class has NOT changed. Why is this 
happening?


Re: Issue with the jsp:useBean

Posted by Christopher Go <ch...@msmedia.com>.
Rui,

If your bean call looks like:
<jsp:useBean id="mybean" class="myBean" />

then your getProperty call is
<jsp:getProperty name="mybean" property="username" />

then the method that is invoked inside the bean is

getUsername().

It is always been case sensitive in my experience.  I think this is an
extension of the fact that Java is case sensitive.

- Chris


----- Original Message -----
From: "Rui Oliveira" <ol...@milu.ipn.pt>
To: <to...@jakarta.apache.org>
Sent: Thursday, July 27, 2000 8:31 AM
Subject: Issue with the jsp:useBean


> Hello,
>
> when we are writting a JSP and the JSP uses a Bean, if we do something
> like:
> <jsp:getProperty name="mybean" property="username" />
>
> the JSP and the Bean itself already know that the method to be invoked
> inside the bean is the "setUsername" method?
>
> Is it allways case sensitive? I mean, if we have for instance the
> property "password" we would have a correspondent method called
> "setPassword"?
>
>
> Best Regards
>
> Rui Oliveira
>
>
> P.S.: we can I find extended info on the JSP tag?
>


RE: Issue with the jsp:useBean

Posted by "Rob S." <rs...@home.com>.
Hiya Rui,

> the JSP and the Bean itself already know that the method to be invoked
> inside the bean is the "setUsername" method?

Yep, via reflection/introspection.

> Is it allways case sensitive? I mean, if we have for instance the
> property "password" we would have a correspondent method called
> "setPassword"?

Your example is correct.  You'll want to check the link below for more info
as well!

> P.S.: we can I find extended info on the JSP tag?

Issue with the jsp:useBean

Posted by Rui Oliveira <ol...@milu.ipn.pt>.
Hello,

when we are writting a JSP and the JSP uses a Bean, if we do something
like:
	<jsp:getProperty name="mybean" property="username" />
	
the JSP and the Bean itself already know that the method to be invoked
inside the bean is the "setUsername" method?

Is it allways case sensitive? I mean, if we have for instance the
property "password" we would have a correspondent method called
"setPassword"?


Best Regards

Rui Oliveira


P.S.: we can I find extended info on the JSP tag?


R: Issue with JSP tags

Posted by Dominik Enkelmann <do...@next.it>.
Hello Shridhar,

the standards have evolved. Tomcat is a Servlet 2.2 container and expects
JSP 1.1 pages.
Read the documentation from Sun

   http://java.sun.com/products/servlet/index.html
   http://java.sun.com/products/jsp/download.html

Dominik


-----Messaggio originale-----
Da: Shridhar Rangarajan [mailto:shridharrangaraj@hotmail.com]
Inviato: giovedì 27 luglio 2000 16.29
A: tomcat-user@jakarta.apache.org
Oggetto: Issue with JSP tags


Hello all,

I used to use JSWDK v1.0.1 earlier where my JSP code was embedded in the JSP
XML tags such as
<jsp:scriptlet> java code </jsp:scriptlet> and so on.

I realized that Tomcat v3.1 does not interpret these tags appropriately and
instead, I had to use <% java code %>! Can anyone explain this? I thought
the original tag set was part of the JSP specification and therefore must be
supported by Tomcat.

Thanks!

Shridhar Rangarajan
shridharrangaraj@hotmail.com