Compilation of .java files on tomcat server -


Is it possible to compile .java files in Tomato Server? I searched the net, but the required answer was not found, if yes, please explain how!

PS: I am new to the development ... so apologies if this is a stupid question :)

Not possible

Tomcat is expected to code .class compiled Java files. But you can still compile the Java file to generate the .class file and replace it under the class folders in the tomcat and redoplen it.

To

Tomatik can not work with source files (* .java) For example you should compile your application with Javak and do some such war- Web Collection- A zip file that contains your compiled class and adheres to some EE standards that understands tokket (instead it is possible to use a folder instead of zip, but put it inside

among others In this war (once compiled correctly) Your Compiler Sublet Class will be included in the HelloWall.class.

Once Tomcat has started and recognizes your war file in the deployment folder, opens it and loads it in runtime, only a runtime loading.

Now people talk about JSP here. In fact, JSP is something that is technically equal to servlet but like HTML, you put the file with the extension jjp Java compiler can not read JSP files, so you should put it in your war file in any way (usually the tool / IDE is intended for you). You have JSP files in the bottom line, Which you have built in your war Now you put your own war in the tomcat, it recognizes it as first and weight. At this point it does nothing with your JSP.

So, your war has been deployed, the tomatoes have started, and in the browser you go to '/myfirstjsp.jsp' (this is the first appeal of your JSP at this time) There is a lot of things:

  Tomcat gets your browser's http request Tomcat has accepted that it should parse JSP file on TomCase Your JSP file Tomcat intrinsically compiles some class files that you do not know (It's internal in Tomcat ), Tomcat loads this file in runtime and behaves as a compiled Java class.  

The next time you press jsp, it will already be compiled.


Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -