• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

How can i embedded Perl Script in JSP?

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there any way i can embedded Perl Script in JSP and get the value of the JSP variable into Perl Script?

Can anyone show me some guidelines. The server i use is Tomcat 5.0.

Thanks
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If your container supports cgi (Tomcat as a standalone has a cgi-servlet) or if you are using a container in conjunction with a webserver that does. You could use sendRedirect to get the user to your perl script.

You could also make a post directly to your perl script (whereever it's running) from your JSP/Servlet app with java.net.URLConnection or with a framework like http://jakarta.apache.org/commons/httpclient. This way you could send Post data to it, and read the results back within your JSP. The end user wouldn't know you were calling a Perl script. This could get pretty complicated if the perl script needs to set cookies, read cgi headers, and or send redirect calls itself.

Another approach would be a shared file or shared database together with either of the above ideas.

No matter how you approach it, it will probably get ugly.
What's the Perl script doing that can't be implemented in JSP?
 
daniel ong
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm facing a problem with JavaMail, sending an internal mail from a jsp webpage, a UNIX operation machine to workers in the same domain.

The problem is our network is design that the UNIX operation machine did not connect to the exchange server under the same domain as the mail domain.

Since i do not have much knowledge in the connection cobnfiguration to the exchange server, so i try to send mail through perl script that can be use in the UNIX operation machine.

Do you think it can works?
 
Water proof donuts! Eat them while reading this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic