This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I have software that is a web based and is made in Perl and it is running through CGI. I have assigned the work of doing some enhancement in the software. As I don�t know Perl and I have been working through in JSP and servlets only. Is this possible that remaining code runs in Perl and I make the enhancement in jsp, servlets or I have to code the whole project in JSP code. Please advise me any solution.
It is possible to integrate some containers like Tomcat with the Apache Web Server, allowing both server side Java and CGI or other popular scripting languages such as PHP to be run at the same time from the same domain.
After that, all someone here can say is that it depends on the code. CGI is fundamentally different from servlets and JSP. Things like logins, sessions, concurrency issues, etc would need to be worked out. Without digging through what's already there, nobody on a forum or user list will be able to tell you with any degree of certainty how easy or difficult this will be.
Even I dont know perl and I am replying on whatever knowledge I have.
Perl scripts/programs run on CGI server. Just like java needs JVM, perl needs perl-software to be installed. Mostly they use Apache Web Server, install perl there and configure webserver to handle perl-requests.
You must be knowing what servlets are they run on servlet-containers/servers like Tomcat.
Now, the question is to have these both CGI-perl part and servlet part together or handle them separately? I dont know if there is any server which can do this both, that is handle perl requests and also handle servlets together, I think tomcat can be configured to handle CGI requests (by tuning some configuration file server.xml/web.xml?)but I doubt if that would suppress handling of servlets. Else you may need separate servers one for CGI and one for servlets, plus a common webserver that takes cares of requests. The webserver would find if request is CGi pass it to CGI server and if it is servlet pass it to servlet-container.
Overall, as Ben said, it would more be an analysis part than a direct solution available. What goes on client side? and what goes on server side? how much is CGI stuff, how much has to be coded in JSP? what server is currently in use, does it have the possibility to act as servlet container? if not then will it be required to transfer data to future-written servlets running on different server? how much will this delegation be... any session-management issues between CGI scripts and servlets??
Thank you so much. But i am still confused how would i do it. because i have to run both the parts at the same time. i have to run both perl and jsp code and infer something from the data which is the backend.