my dog learned polymorphism*
The moose likes JSP and the fly likes existed code in perl and need to enhance in jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "existed code in perl and need to enhance in jsp" Watch "existed code in perl and need to enhance in jsp" New topic
Author

existed code in perl and need to enhance in jsp

Shaveta Chawla
Greenhorn

Joined: Aug 01, 2007
Posts: 13
Hi

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.


Thanks
Shaveta
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

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.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Also, by the way.
Much of JavaRanch is running in a servlet container but the core of the bulletin board is still a CGI application.
So... yes, they can be integrated.
Akhilesh Trivedi
Ranch Hand

Joined: Jun 22, 2005
Posts: 1526
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??


Keep Smiling Always — My life is smoother when running silent. -paul
[FAQs] [Certification Guides] [The Linux Documentation Project]
Shaveta Chawla
Greenhorn

Joined: Aug 01, 2007
Posts: 13
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.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

My point was that we can't really give you a lot of direction for something like this.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: existed code in perl and need to enhance in jsp
 
Similar Threads
Servlet to Jsp Conversion tool
Java vs Perl/Python etc for dynamic web content
MS student looking for career in java
deploying java web application having huge class files
Why so many cookies?