0

I am unable to find the generated servlet class for a JSP on Mac(after I run my project in eclipse). I have checked in almost all the folders, where should I look up for it?

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Mayank Sharma
  • 203
  • 1
  • 14
  • In Eclipse, in the project where you wrote that servlet? What are you asking, and what are you looking for exactly? What are you trying to achieve? – JB Nizet Dec 30 '15 at 20:24
  • I wrote a jsp but internally that jsp gets converted into a Servlet. I want to know where is that servlet created? – Mayank Sharma Dec 30 '15 at 20:25
  • Answer depends on the server used, the server plugin used, and their configuration. – BalusC Dec 30 '15 at 20:27
  • AFAIK, in memory only, unless you tell your servlet container to keep the generated files. Which servlet container are you using? Why do you want that servlet code? – JB Nizet Dec 30 '15 at 20:27
  • @BalusC I am using TOMCAT server. I don't know how to check the server plugin and its configuration. – Mayank Sharma Dec 30 '15 at 20:29
  • @JBNizet Container is TOMCAT. I want to see how jsp compiles into Java code by the container. – Mayank Sharma Dec 30 '15 at 20:30
  • Read https://tomcat.apache.org/tomcat-8.0-doc/jasper-howto.html. Make sure keepgenerated is set to true, deploy your war file by dropping it in the webapps folder, and the files, AFAIR, should be generated somewhere under the work folder. – JB Nizet Dec 30 '15 at 20:38
  • I checked the main web.xml and keepGenerated is set to true. So, this part is good. 1) I don't understand what AFAIR is? 2) Deploy your war by dropping it in the webapps folder? What does this mean? I am still unable to locate the file. My work folder is empty. :( – Mayank Sharma Dec 30 '15 at 20:54
  • AFAIR is web slang. It means "As Far As I Remember". "Deploy your war by dropping it in the webapps folder" means just that: a Java EE web appllication is a war file. To deploy it in tomcat, you just need to copy and paste it into the tomcat webapps folder. – JB Nizet Dec 30 '15 at 20:59

1 Answers1

0

Run command in terminal find ~/ -type f -name YourFile.ext to look for a file somewhere inside your home folder. Or find / -type f -name YourFile.ext everywhere on filesystem.

Valeriy Van
  • 1,851
  • 16
  • 19