score:52
You will find it in
projectworkspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0
This is the default place where Eclipse 3.4 publishes the project. However, this can be changed by changing the settings in your 'Server' view.
score:-1
I assume it would be the same location relative to your workspace.
score:0
If you're using the Tomcat Maven Plugin in Eclipse, then your Tomcat related files would be in <project folder>/target/tomcat
instead, including the tomcat work folder at <project folder>/target/tomcat/work
, and you can descend from there to find your jsp .java files, etc.
(I know this may not apply to everyone, but since Tomcat Maven Plugin is a popular way to develop with tomcat and using maven to manage dependencies and help with the build process, I hope this info may be helpful for some people).
score:1
You can change it by setting scratchDir parameter in web.xml configuration of your server (in Servers project, not in your application web.xml!).
score:3
On Windows, the easiest way to go to your Eclipse's Tomcat deployment location is to just right-click on the Tomcat instance in the Servers view and click "Browse Deployment Location..."
You should see Eclipse neatly opening a Windows explorer taking you to the exact location. In my case it takes me to:
C:\eclipse4.3.2-jee-kepler-SR2-win32\workspaces\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps
From there, you can easily browse to the "work" directory as shown below.
If you follow this, you never have to remember the location!
Eclipse Servers View:
Windows Explorer Opens:
Windows Explorer (click on address bar to reveal full path):
On Amazon EC2 Linux (this has nothing to do with Eclipse however), the Tomcat work directory is at
/var/cache/tomcat7/work
[ec2-user@ip-172-31-xx-xx ~]$ uname -a Linux ip-172-31-xx-xx 4.1.10-17.31.amzn1.x86_64 #1 SMP Sat Oct 24 01:31:37 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux [root@ip-172-31-xx-xx] /usr/share/tomcat7 $ ls -l total 4 drwxr-xr-x 2 root root 4096 Jan 5 15:18 bin lrwxrwxrwx 1 root tomcat 12 Jan 5 15:18 conf -> /etc/tomcat7 lrwxrwxrwx 1 root tomcat 23 Jan 5 15:18 lib -> /usr/share/java/tomcat7 lrwxrwxrwx 1 root tomcat 16 Jan 5 15:18 logs -> /var/log/tomcat7 lrwxrwxrwx 1 root tomcat 23 Jan 5 15:18 temp -> /var/cache/tomcat7/temp lrwxrwxrwx 1 root tomcat 24 Jan 5 15:18 webapps -> /var/lib/tomcat7/webapps lrwxrwxrwx 1 root tomcat 23 Jan 5 15:18 work -> /var/cache/tomcat7/work [root@ip-172-31-xx-xx] /var/cache/tomcat7/work/Catalina/localhost/init/org/apache/jsp $ ls -la total 180 drwxr-xr-x 2 tomcat tomcat 4096 Jan 6 06:37 . drwxr-xr-x 3 tomcat tomcat 4096 Jan 6 06:37 .. -rw-r--r-- 1 tomcat tomcat 54172 Aug 17 2012 index_jsp.class -rw-r--r-- 1 tomcat tomcat 2106 Jan 6 06:37 index_jsp$FileComp.class -rw-r--r-- 1 tomcat tomcat 1034 Jan 6 06:37 index_jsp$FileInfo.class -rw-r--r-- 1 tomcat tomcat 6460 Jan 6 06:37 index_jsp$HttpMultiPartParser.class -rw-r--r-- 1 tomcat tomcat 89445 Aug 17 2012 index_jsp.java -rw-r--r-- 1 tomcat tomcat 2210 Jan 6 06:37 index_jsp$UplInfo.class -rw-r--r-- 1 tomcat tomcat 1208 Jan 6 06:37 index_jsp$UploadMonitor.class -rw-r--r-- 1 tomcat tomcat 1184 Jan 6 06:37 index_jsp$Writer2Stream.class
score:15
The easiest way is most likely to ask a compiled JSP page about the source of the byte code.
From http://www.exampledepot.com/egs/java.lang/ClassOrigin.html:
// Get the location of this class
Class cls = this.getClass();
ProtectionDomain pDomain = cls.getProtectionDomain();
CodeSource cSource = pDomain.getCodeSource();
URL loc = cSource.getLocation(); // file:/c:/almanac14/examples/
Hopefully this helps. What is it you want to do?
score:19
Go to "Servers" window -> double click on your tomcat instance -> clik "Open launch configuration" -> go to "Arguments" tab.
Look for variable definition like this:
-Dcatalina.base="/Users/dirtyaffairs/Documents/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0"
Source: stackoverflow.com
Related Query
- Where is the "work" directory located for a Tomcat instance running in Eclipse?
- Where is the location of 'plugins' directory for eclipse mars in mac OSX?
- How do I change the directory where CVS in Eclipse asks me to create the known_hosts for SSH2?
- Where is the build.properties file located for an Eclipse Java Project?
- Running the tomcat server getting output as directory listings for /
- Multiple contexts with the same path error running web service in Eclipse using Tomcat
- Where can I find the source code for the Android Development Tools (ADT) plugin for the Eclipse IDE?
- How do I get Logcat for multiple devices running at the same time in Eclipse
- How to set JVM arguments in tomcat that work both in eclipse and using the startup.bat
- Why does Eclipse consider that the app engine sdk jar is the directory where the app engine SDK is?
- What is the shortcut for running java application in mac eclipse
- Where is the build.gradle file located for my Android project?
- Where can I find the setting for folding / unfolding the import statements in java in eclipse by default
- Where does Tomcat in Eclipse store the expanded WAR?
- How to set JVM options for Tomcat instance executed from eclipse
- Where are plugins/tools installed from the Eclipse marketplace located on linux? (Mars)
- Where do we need to pass the value for System.getProperty in Eclipse
- How can I get eclipse to wipe the user data for my app before running it again
- Why won't the GWT designer for eclipse work with GXT 3 widgets?
- Maven3 eclipse:eclipse does not work - Not running eclipse plugin goal for pom project
- Spring MVC with Spring Boot doesn't work with the Tomcat server of Eclipse
- Where is the "Refresh Automatically" option in Eclipse Kepler for Mac?
- Content assist (Ctrl-Space) in does not work in Eclipse in Debian Gnome running in VMWare for Windows
- Can't configure Eclipse for running a perl script using the EPIC plugin?
- Maven not looking inside project directory for web.xml when running from eclipse
- Where can I find the eclipse plugin for hadoop 1.0.4
- browse to the Tomcat installation directory in the Eclipse mars version
- Maven 3 Eclipse Kepler is it necessary to have the environment variable to work for embedded Maven?
- Where are the global settings for eclipse m2e?
- How do I set the Eclipse preference for where to put the + when breaking a String up over multiple lines?
More Query from same tag
- Openocd reports "Failed with code (1)" for eclipse debugging a STM32F429 Discovery board
- Eclipse and python: library will import in interprer, but not in IDE
- How to detect Files being opened at the startup of an Eclipse-Plugin
- Eclipse won't delete mp3
- Subversion (Subclipse) in Eclipse - History, why latest revision is not the current version?
- How to profile execution time of methods in a JUnit Test in Eclipse
- LibGDX -class TagGame contains a signature 'LArrayList<>;' ill-formed at position 11
- Jersey ClientBuilder.newClient(): source not found
- How to delete a commit after "sharing a new project using SVN" Eclipse
- Is it possible to make Eclipse ignore syntax checking/formatting for one specific file?
- Null Pointer Exception In sqlite Database
- I'm Still Getting Gray Tiles In Android MapView?
- Activate virtual environment within Pydev
- Where should I put my resources for a Java program?
- how to tell yoxos that my update site has changed
- How to build PCL+OpenCV+OpenNI project in eclipse
- RCP based on plugins or features?
- Eclipse SWT Hello world tutorial: Display cannot be resolved to a type
- Eclipse : clientBuilder.sslSocketFactory not supported on JDK 9+
- List of SVN changes in working copy in Eclipse
- @Given statement is not running in cucumber-jvm
- android eclipse using string resource for text size in layouts
- Ant debug and ant release failed
- Running Ruby debugger on Eclipse PDT
- Context issue whilst adding IUndoableOperation to my EditorPart
- JavaFX FXML:How to create new instances of a self made fxml to VBox
- Eclipse Luna (4.4.0) and Subclipse not working
- relative path for file.getPath()
- WSo2 ESB - XML XSD for API and Proxy DSL source code validation
- Create documentation for PHP code using Eclipse