<<I prefer the ClassLoader since it abstracts the file location from
code.>>
File location is anyways in a properties file.

<<If you want clients to provide xls files, then obviously, they should
be uploaded to a file server and not to a deployed application.>>
Using Hunter's approach, this scenario is automatically handled and so
there will be no code change when the client decides to play arnd with
the templates. U will have to change ur code when the requirement
arises. So if u can provide more flexibility w/o any expense right from
the beginning, then why not!

<<Using the ClassLoader to load files or using the File API directly to
load files using a path, is not a matter of discussion in this mailing
list.>>
True...but metioning which is the more flexible option will enable
people to take the proper path.

-----Original Message-----
From: Sharma, Siddharth [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 10, 2004 11:10 AM
To: POI Users List
Subject: RE: help: i need to read an xls template file in a web
application

All the production systems I have seen, they are exploded during
deployment.
But of course I have not seen them all.

Anyway, it's a requirement thing. If you want clients to provide xls
files, then obviously, they should be uploaded to a file server and not
to a deployed application.
If you are using the excel file as a template for some excel reports,
then it makes sense to package it as part of the ear.

It's a matter of choice. Hunter believes he has more flexibility with
storing a file path and using the File API to load the xls file.
I prefer the ClassLoader since it abstracts the file location from code.

Using the ClassLoader to load files or using the File API directly to
load files using a path, is not a matter of discussion in this mailing
list. 

Folks, sorry for the cross-postings



-----Original Message-----
From: Pravin Pillai [mailto:[EMAIL PROTECTED]
Sent: Friday, September 10, 2004 2:00 PM
To: POI Users List
Subject: RE: help: i need to read an xls template file in a web
application

If it is exploded, then u cant really call it an EAR.
I don't think, in production systems, u have exploded deployments.
So Hunter Ren's suggestion is the best one "
What I did is, i store the path to the file into a property file, and
the application get this path when it's initialized. I like to put the
templates out of the war or ear file, so that i could update those
templates without redeploy the application.
"
Also, lets say u choose to go the exploded way. If the client has his
own templates or if the client is allowed to modify the existing
templates, would u want the client to be playing around amongst ur
deployed files. Not safe, I would say.


-----Original Message-----
From: Sharma, Siddharth [mailto:[EMAIL PROTECTED]
Sent: Friday, September 10, 2004 10:44 AM
To: POI Users List
Subject: RE: help: i need to read an xls template file in a web
application

Deploy the application exploded.
And then change it as a regular file using ms-excel provided you have
deployed on a windows system

On a unix system, change it manually on a windows box and then ftp it
over to all servers.

-----Original Message-----
From: Pravin Pillai [mailto:[EMAIL PROTECTED]
Sent: Friday, September 10, 2004 11:42 AM
To: POI Users List
Subject: RE: help: i need to read an xls template file in a web
application

How would u make changes to the xls template if it is within the ear? 

-----Original Message-----
From: Sharma, Siddharth [mailto:[EMAIL PROTECTED]
Sent: Friday, September 10, 2004 8:39 AM
To: POI Users List
Subject: RE: help: i need to read an xls template file in a web
application

You do not have to redeploy the application if you make a change to a
resource such as an xls file. You only have to bounce the clone/server,
and that too only if you are caching the stream, rather than reading it
each time you need it.

So placing it in the ear and referencing in the webapp (in the manifest)
seems the best option not only during development, but also
operationally.



-----Original Message-----
From: Hunter Ren [mailto:[EMAIL PROTECTED]
Sent: Friday, September 10, 2004 11:34 AM
To: POI Users List
Subject: Re: help: i need to read an xls template file in a web
application

What I did is, i store the path to the file into a property file, and
the application get this path when it's initialized. I like to put the
templates out of the war or ear file, so that i could update those
templates without redeploy the application.

Steve wrote:

>in a deployed web application.....
>from a java program on the web server (and also on the app server) I 
>need to read an xls file, as a template.
>any idea as to how to find out the path to the xls file, or to get it 
>as an InputStream?
>THANKS,
>Steve
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>  
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to