-
servlets
Concerning servlets,
If I have 2 different servlets, one called Print and another called List,
where Print prints a specified file (ie. http://localhost:33140/Print/test.txt)
and List prints out the names of files called from the Print servlet. How
do I share the data from Print into List?
So far, I've tried to store the file names in a Vector in the Print servlet
and when List is called (ie. http://localhost:33140/List), I try to instantiate
an instance of Print (in the run method) and call a getFiles function which
returns the Vector of file names previously mentioned. However, it appears
to create a new instance of Print with an empty Vector and not use the existing
one.
Any suggestions?
~Matt
-
Re: servlets
To share data between servlets you put it into (and take it out of) a
Session object.
PC2
"matt" <mrodgers@wam.umd.edu> wrote in message
news:3bbe1838$1@news.devx.com...
>
> Concerning servlets,
>
> If I have 2 different servlets, one called Print and another called List,
> where Print prints a specified file (ie.
http://localhost:33140/Print/test.txt)
> and List prints out the names of files called from the Print servlet. How
> do I share the data from Print into List?
>
> So far, I've tried to store the file names in a Vector in the Print
servlet
> and when List is called (ie. http://localhost:33140/List), I try to
instantiate
> an instance of Print (in the run method) and call a getFiles function
which
> returns the Vector of file names previously mentioned. However, it
appears
> to create a new instance of Print with an empty Vector and not use the
existing
> one.
>
> Any suggestions?
>
> ~Matt
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks