help regarding python and jsp

Discussion in 'Python' started by chandrapsg, Feb 26, 2007.

  1. chandrapsg

    chandrapsg Guest

    Hi,
    i am working with jsp ..
    i wanna help regarding how to import or how to call python modules to
    jsp

    if a piece of code is availabe will be very helpful for me



    chandra
     
    chandrapsg, Feb 26, 2007
    #1
    1. Advertisements

  2. chandrapsg

    Ant Guest

    You are aware that JSP's are a Java technology, and not Python. And
    that they are a templating language in themselves. And that scriptlets
    (Java code inside of a JSP) have not been regarded as good practice
    for years now, and that would be the only way of getting Python code
    inside a JSP (using an ugly hack such as creating a Jython engine and
    writing the python as strings to be eval'ed)

    So what is it that you are trying to do exactly here?
     
    Ant, Feb 26, 2007
    #2
    1. Advertisements

  3. First, a bit of grammar...

    "wanna" is a colloquialism for "want to"

    Your query thereby became an offer to assist others, not a request for
    assistance.


    However, JSP and Python are highly different languages. Actually,
    JSP is a technology built on top of Java -- one that, if I understand
    the terminology, uses Java code on the web server to dynamically
    generate the HTML that gets delivered. Java and Python use different
    runtime interpreters -- I believe the Jython variant generates Java
    bytecodes, allowing it to be interpreted by the JVM, and is capable of
    calling native Java compiled files. I don't know about the reverse.

    Python has a small slew of templating/server frameworks; perhaps one
    of them is suitable without needing to stay within the JSP model.
    --
    Wulfraed Dennis Lee Bieber KD6MOG

    HTTP://wlfraed.home.netcom.com/
    (Bestiaria Support Staff: )
    HTTP://www.bestiaria.com/
     
    Dennis Lee Bieber, Feb 26, 2007
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.