pro_jsp thread: Re: from jsp i cant take a session beans instantiate at a servlet ---
Hi
If i have a servlet that instantiate a beans, and hava a dispatcher to a
jsp.
Portal.jsp call servlet.java (this instantiate the tablesBean and put some
data at the propierties.
servlet.java dispatcher with request and response the tables.jsp
can't this take the beans propierties of the servlet.java with the jsp:beans
or I have to instantiate the tables.beans at the portal.jsp...
tanks
Julio Oliveira
Using jsp:beans a cant' take the propierties of the beans...
-----Mensaje original-----
De: robinson p m [mailto:robinson_pm@r...]
Enviado el: Lunes, 19 de Noviembre de 2001 02:58 a.m.
Para: Pro_JavaServer_Pages
Asunto: [pro_jsp] Re: How to set Tomcat classpath for jsp Beans ---
hi,
Without getting in to details , i would say that
you have to put your compiled servlets in to
WEB-INF/classes forder. No need of making a jar file.
then use jsp:useBean....
hope this helps.
On Sun, 18 Nov 2001 Julio Oliveira wrote :
> >
> > Hi man's
> >
> > Sorry but i have a problem..
> >
> > do you now about this, or now a place where i have
> > to
> > pay for a service at the internet and i can't have
> > the
> > answer of this....
> >
> > Thanks in advanced....
> >
> > If you have time this is the problem................
> >
> > I have a page with several comboBox that I have to
> > take from a dinamic sql......
> >
> >
> ********************************************************-
> ********************************************************-
> *******
> >
> > If i compile the servlet all is good i put the
> > .class
> > at the web-inf\classes.
> >
> > The problem is when i have the .jsp and <jsp
> > use:bean class="MyClass"
> >
> > I don't know where to put it , i do a jar and put at
> > the jre of java and nothing happen,
> >
> > I'm doing a e-commerce jsp 1-> servlet -> Bean
> > 1->
> > Bean 2 -- (this have the data)
> >
> > And i have to take the data from Bean 2 at the jsp
> > 2
> > - final how is dispatcher from the servlet
> >
> > The servlet take the request from the jsp 1 ( a
> > botton submit )
> >
> > Instance the first bean 1 how instanciate another
> > bean
> > 3 how is the connection bean
> >
> > after the bean 1 whit the connection call the
> > database
> > and take the data, and put it in Bean 2 ( a Vector
> > with several items)
> >
> > The problem.
> >
> > 1. when i came back to the servet i put the
> > vector
> > in the session setAttribute but i do the
> > removeAllElements and nothing hapens
> > next time the Vector have the new items more the
> > others.
> >
> > 2. I have a dispatcher from servlet to a jsp2 how
> > is to take the Vector and see it at the browser,
> > (now
> > i get it with the getAttribute)
> >
> > 3. the problem if at the jsp2 i put the useBean
> > --> the class is not see for it (but is alive)
> >
> > *** the jsp2 is here
> >
> > <html>
> > <head>
> >
> >
> > <title> Simulación 1 </title>
> > </head>
> >
> > <body>
> >
> > calendar
> >
> >
> > <jsp:useBean id='hora' scope = 'session' class
> > 'dates.JspCalendar2' type='dates.JspCalendar2' />
> >
> >
> >
> > <jsp:useBean id='comBean' scope = 'session' class
> > 'ComboBeans' />
> >
> > // nothing happens with this line
> >
> > // where i have to put the ComboBeans for it work
> >
> > // Can´t i take the instance of the servlet
> > (comBean)
> > and take the control of the Beanssss
> >
> >
> >
> >
> > Hoy es : <jsp:getProperty name="hora"
> > property="dayOfMonth" />
> >
> > La hora es : <jsp:getProperty name="hora"
> > property="time" />
> >
> >
> >
> > <%
> >
> >
> >
> >
> > String value2
> > session.getAttribute("comboVector").toString();
> >
> > out.println("valor recuperado del grabado en
> > cargoCombo2 Nivel 2 " );
> > out.println( value2 );
> >
> > %>
> >
> >
> > </body>
> > </html>
> >
> >
> >
> ********************************************************-
> ********************************************************-
> *****************
> >
> > =====
> > Julio Oliveira
> > Oliveira_julio@y...
> >
> > Club de Usuarios de Java de Argentina
> > Subscribite en :
> >
> > mailto:AUBA-JBuilder-subscribe@y...
> >
> > Conectate a Internet GRATIS con Yahoo! Conexión:
> > http://conexion.yahoo.com.ar
> >
> > ---
> >
> > Your message: (INMAIL-ID:45047)
> >
> > Return-Path: <oliveira_julio@y...>
> > Received: from web10701.mail.yahoo.com
> > ([216.136.130.209]) by mail.p2p.wrox.com with SMTP
> > (ListManager WIN32 version 4.2); Sat, 17 Nov 2001
> > 20:25:20 -0000
> > Message-ID:
> > <20011117201625.39069.qmail@w...>
> > Received: from [200.32.115.129] by
> > web10701.mail.yahoo.com via HTTP; Sat, 17 Nov 2001
> > 17:16:25 ART
> > Date: Sat, 17 Nov 2001 17:16:25 -0300 (ART)
> > From: =?iso-8859-1?q?Julio=20Oliveira?
> > <oliveira_julio@y...>
> > Subject: How to set Tomcat classpath for jsp Beans
> > To: java e-commerce wrox
> > <java_ecommerce@p...>,
> > java howto wrox <java_howto@p...>,
> > pro jsp wrox <pro_jsp@p...>, Servlets
> > <servlets@p...>
> > MIME-Version: 1.0
> > Content-Type: text/plain; charset=iso-8859-1
> > Content-Transfer-Encoding: 8bit
> >
> > Hi man's
> >
> > Sorry but i have a problem..
> >
> > do you now about this, or now a place where i have
> > to
> > pay for a service at the internet and i can't have
> > the
> > answer of this....
> >
> > Thanks in advanced....
> >
> > If you have time this is the problem................
> >
> > I have a page with several comboBox that I have to
> > take from a dinamic sql......
> >
> >
> ********************************************************-
> ********************************************************-
> *******
> >
> > If i compile the servlet all is good i put the
> > .class
> > at the web-inf\classes.
> >
> > The problem is when i have the .jsp and <jsp
> > use:bean class="MyClass"
> >
> > I don't know where to put it , i do a jar and put at
> > the jre of java and nothing happen,
> >
> > I'm doing a e-commerce jsp 1-> servlet -> Bean
> > 1->
> > Bean 2 -- (this have the data)
> >
> > And i have to take the data from Bean 2 at the jsp
> > 2
> > - final how is dispatcher from the servlet
> >
> > The servlet take the request from the jsp 1 ( a
> > botton submit )
> >
> > Instance the first bean 1 how instanciate another
> > bean
> > 3 how is the connection bean
> >
> > after the bean 1 whit the connection call the
> > database
> > and take the data, and put it in Bean 2 ( a Vector
> > with several items)
> >
> > The problem.
> >
> > 1. when i came back to the servet i put the
> > vector
> > in the session setAttribute but i do the
> > removeAllElements and nothing hapens
> > next time the Vector have the new items more the
> > others.
> >
> > 2. I have a dispatcher from servlet to a jsp2 how
> > is to take the Vector and see it at the browser,
> > (now
> > i get it with the getAttribute)
> >
> > 3. the problem if at the jsp2 i put the useBean
> > --> the class is not see for it (but is alive)
> >
> > *** the jsp2 is here
> >
> > <html>
> > <head>
> >
> >
> > <title> Simulación 1 </title>
> > </head>
> >
> > <body>
> >
> > calendar
> >
> >
> > <jsp:useBean id='hora' scope = 'session' class
> > 'dates.JspCalendar2' type='dates.JspCalendar2' />
> >
> >
> >
> > <jsp:useBean id='comBean' scope = 'session' class
> > 'ComboBeans' />
> >
> > // nothing happens with this line
> >
> > // where i have to put the ComboBeans for it work
> >
> > // Can´t i take the instance of the servlet
> > (comBean)
> > and take the control of the Beanssss
> >
> >
> >
> >
> > Hoy es : <jsp:getProperty name="hora"
> > property="dayOfMonth" />
> >
> > La hora es : <jsp:getProperty name="hora"
> > property="time" />
> >
> >
> >
> > <%
> >
> >
> >
> >
> > String value2
> > session.getAttribute("comboVector").toString();
> >
> > out.println("valor recuperado del grabado en
> > cargoCombo2 Nivel 2 " );
> > out.println( value2 );
> >
> > %>
> >
> >
> > </body>
> > </html>
> >
> >
> >
> ********************************************************-
> ********************************************************-
> *****************
> >
> > =====
> > Julio Oliveira
> > Oliveira_julio@y...
> >
> > Club de Usuarios de Java de Argentina
> > Subscribite en :
> >
> > mailto:AUBA-JBuilder-subscribe@y...
> >
> > Conectate a Internet GRATIS con Yahoo! Conexión:
> > http://conexion.yahoo.com.ar
> >
>
> =====
> Julio Oliveira
> Oliveira_julio@y...
>
> Club de Usuarios de Java de Argentina
> Subscribite en :
>
> mailto:AUBA-JBuilder-subscribe@y...
>
> Conectate a Internet GRATIS con Yahoo! Conexión:
> http://conexion.yahoo.com.ar
>
> ---
> Do you need true END-TO-END (e2e) Java Messaging (JMS)?
> Softwired
> offers industry's ONLY complete 100% JMS messaging
> solutions for your
> needs TODAY.
> Visit http://adtracking.wrox.com/track.asp?x=p2p%2Fe%2Fj-
> ava%2Dsoftwired&url=www.softwired-inc.com NOW and find
> out more!
> Our unique product range includes: iBus//Mobile
> (wireless data),
> iBus//MessageBus (IP Multicast), iBus//MessageServer
> (store and forward)
> and much more!
> robinson_pm@r...
> $subst('Email.Unsub')
>
>
---
Do you need true END-TO-END (e2e) Java Messaging (JMS)? Softwired
offers industry's ONLY complete 100% JMS messaging solutions for your
needs TODAY.
Visit
http://adtracking.wrox.com/track.asp?x=p2p%2Fe%2Fjava%2Dsoftwired&url=www.so
ftwired-inc.com NOW and find
out more!
Our unique product range includes: iBus//Mobile (wireless data),
iBus//MessageBus (IP Multicast), iBus//MessageServer (store and forward)
and much more!
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com