heretolearn
heretolearn

Reputation: 6545

Is it possible to invoke a python script from jsp?

I want to create a UI which invokes my python script. Can i do it using JSP? If so, can you please explain how ? Or can i do it using some other language. I have gone through many posts related to it but could not find much? please help me out? Explanations using examples would be more helpful.

Thanks In Advance..

Upvotes: 1

Views: 9881

Answers (3)

Edwin Dalorzo
Edwin Dalorzo

Reputation: 78589

I think I would go with Jython, once properly configured, you can define a servlet that understand Python code.

You can read a reference here.

Upvotes: 1

Sreehari Puliyakkot
Sreehari Puliyakkot

Reputation: 736

It would be neater to expose your python API as RESTful services, that JSP can access using Ajax and display data in the page. I'm specifically suggesting this because you said 'JSP' not 'Java'.

Upvotes: 1

madhairsilence
madhairsilence

Reputation: 3870

Calling Python in Java?

The above link shows how to call Python in Java

You just need to include to thing inside the jsp with <% %> Tag

Upvotes: 2

Related Questions