|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
Can we add external programs to an architecture based on JSF?I have one situation where I have a Perl script that creates PDF files, and others, where programs written in FORTRAN or C++, produce mathematical results of analyses of certain data. Is there a relatively painless way to have these programs/scripts receive data from a JSF interface (where the user specifies what data goes into the PDF, or what data is analyzed) have these external programs do their thing, and pass the result back to the web application. Let's assume that the the web app interface is a visual web app. Let's also assume that the external applications/scripts are designed to run from the Windows command line, and in part are intended to also be executed (with different but specific inputs) in the Windows equivalent of a cron job. The perl script, for example, would email the PDF to some configured recipient, if a specific commandline argument is present (obviously, this would support a requirement that a user could request a given pdf and have it emailed somewhere). The compiled programs too may also, in some cases, produce output that is to be emailed somewhere (as determined by configuration or commandline arguments).
Obviously, I do NOT want to be writing these things multiple times. I'd rather just find a way to start them, pass the relevant input to them and collect and distribute their output appropriately. Can I do these things with relatively little pain? URLs to relevant documentation/examples/tutorials would be especially appreciated, if useful online documentation exists. Thanks Ted |
|
|
Re: Can we add external programs to an architecture based on JSF?Probably you could write a Servlet which knows how to execute these
external executables via JDK "Runtime" class and pass back the results to the browser. From Visual web page you can forward your request with parameters to this servlet. - Winston > I have one situation where I have a Perl script that creates PDF files, and > others, where programs written in FORTRAN or C++, produce mathematical > results of analyses of certain data. Is there a relatively painless way to > have these programs/scripts receive data from a JSF interface (where the > user specifies what data goes into the PDF, or what data is analyzed) have > these external programs do their thing, and pass the result back to the web > application. Let's assume that the the web app interface is a visual web > app. Let's also assume that the external applications/scripts are designed > to run from the Windows command line, and in part are intended to also be > executed (with different but specific inputs) in the Windows equivalent of a > cron job. The perl script, for example, would email the PDF to some > configured recipient, if a specific commandline argument is present > (obviously, this would support a requirement that a user could request a > given pdf and have it emailed somewhere). The compiled programs too may > also, in some cases, produce output that is to be emailed somewhere (as > determined by configuration or commandline arguments). > > Obviously, I do NOT want to be writing these things multiple times. I'd > rather just find a way to start them, pass the relevant input to them and > collect and distribute their output appropriately. > > Can I do these things with relatively little pain? > > URLs to relevant documentation/examples/tutorials would be especially > appreciated, if useful online documentation exists. > > Thanks > > Ted > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
| Free Forum Powered by Nabble | Forum Help |