当前位置: 动力学知识库 > 问答 > 编程问答 >

Compilation in JSP

问题描述:

During compilation of a JSP file, it will be first converted into a .java file then .class file after that it will be loaded by the container to serve request. I want to know where container put converted .java and .class file. will it be available after request has been fulfilled.

Thanks in advance!

网友答案:

If you are using tomcat then it would be in work directory:

tomcat
    work
        catalina
            localhost
                webappName/context
                    java package directories
                           xyz.java
网友答案:

During compilation of a JSP file, it will be first converted into a .java file then .class file after that it will be loaded by the container to serve request

The servlet container will compile JSP into a class extending HttpServlet and use it for the webapp's lifetime.

Want to know where container put converted .java and .class file

You can find the generated source code in the application server's work directory. In for example in Tomcat, /work directory.

will it be available after request has been fulfilled.

On a JSP request, the servlet container will execute the compiled JSP class and send the generated output get displayed it in the web browser. Servlet container will have the file till the app's lifetime

网友答案:

Thanks fa ur quick responses..

I am using Netbeans 8.0.. During compilation in JSP whether same work directory to know java file and class file?

分享给朋友:
您可能感兴趣的文章:
随机阅读: