Problem JSP Bean data sharing with some Servlets

From: Jose Munoz (jmunoz61_at_hotmail.com)
Date: 11/26/03


Date: 26 Nov 2003 04:08:13 -0800

Hi all,
I want to share some data for all my applications (servlets and jsps).
For this i am using a JSP to set the variables with scope=application.
When i get this data from some JSP all is o.k, i can see the data that
i saved, but when i get access with my servlets, i can't see data
saved prev.
My request is simple: save data with a JSP and read this data with
servlets.? please if you send me a small sample to do this. or tell me
where is my mistake:
In the JSP (A):
<jsp:useBean id="facturacionLogonBean" class="FacturacionLogonBean"
scope="application" />
In the Servlet (B):
FacturacionLogonBean myfacturacionLogonBean = new
FacturacionLogonBean();
String aafsistema = myfacturacionLogonBean.getFsistema();

the statement System.out.println("+++my data" + aafsistema); don't
display my data
Thanks
JMUNOZ



Relevant Pages

  • Re: J2ME or network programming or...what do you recommend?
    ... I started doing the servlets along with the JSP. ... Well depending on how dynamic you want the client to ... needed) to java server programs? ...
    (comp.lang.java.programmer)
  • Re: Expression Language (EL) vs. Scriptlets in JSP
    ... is using servlets and utility classes for all real code ... I gave up on taglibs, EL, ... and unit test them with mock objects. ... code in JSP, you won't know if it's even legal syntax, let alone if it's ...
    (comp.lang.java.programmer)
  • Re: Need help with Tomcat/JSP website design
    ... so mostly I need help with the JSP side ... I mean, you could just do the whole thing in servlets, but then ... java the language ... your database. ...
    (comp.lang.java.programmer)
  • Re: newbie: sample Java applications?
    ... applications with web interface (JSP, Servlets). ... sample applications (called Starter Kits) which can be dowloaded from ...
    (comp.lang.java.programmer)
  • Re: put application on server ??!!!!
    ... > I am new to web service programming and I just start to learn jsp. ... > make my application into a bean? ... separate those two pieces into separate code bases with published APIs ... Have forms submit to servlets. ...
    (comp.lang.java.programmer)