Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » .deployables and Tomcat "Run on Server"
.deployables and Tomcat "Run on Server" [message #119552] Mon, 11 July 2005 21:13
Andy Hoffman is currently offline Andy HoffmanFriend
Messages: 1
Registered: July 2009
Junior Member
Working with eclipse 3.1 final & wtp 0.7M5, I'm having an issue with
running JSP resources within Eclipse on Tomcat 5.5 server. My project
structure has several distinct JSP source folders, and "Run on Server"
seems to be working properly in one case and not the other... Here's my
project folder structure within Eclipse

/<project_name>/java_src - Source directory for java class files (non-JSP),
linked folder to source control repository directory. Source is correctly
compiling into webcontent's WEB-INF/classes folder

/<project_name>/WebContent - Default directory created by Eclipse at creation
of the Dynamic Web Project. This folder contains a single "loose" testing jsp
page, plus the project's WEB-INF and META-INF resources

/<project_name>/jsp - Secondary directory of JSP sourcefiles, which should
also reside at the webroot of the deployables. As with "java_src", this is a
linked folder to source controled "jsp" directory outside of the main project
directory structure.

Now, I've gone into the ".wtpmodules" file and edited the wb-resource
elements to reflect the source and deploy paths for each of these
resources (see below).

<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId">
<wb-module deploy-name="<project_name>">
<module-type module-type-id="jst.web">
<version>2.4</version>
<property name="context-root" value="<project_name>"/>
<property name="java-output-path" value="/bin/"/>
</module-type>
<wb-resource deploy-path="/" source-path="/jsp" />
<wb-resource deploy-path="/" source-path="/WebContent" />
<wb-resource deploy-path="/WEB-INF/classes" source-path="/java_src" />
</wb-module>
</project-modules>

Now, when I look at the ".deployables" structure within the "Resources"
perspective, everything looks the way I'd expect, with all the files in
the appropriate locations for deployment.

Now, if I go into my project sourcefiles, and click one of my JSP files
under the "jsp" directory structure and then right-click for "Run on
Server...", the server deployment does it's thing... BUT when the browser
tries to display the file, it's loading a URL with the "jsp" directory
still in the URL...
"http://localhost:8080/<project_name>/jsp/orders/manage_orders.jsp" (which
of course doesn't load), but the proper location (and properly created in
my .deployables) is
"http://localhost:8080/<project_name>/orders/manage_orders.jsp". If I
*manually* repoint the browser at the *proper* URL, the JSP page loads.

However, if I select the test jsp sourcefile within the WebContent
directory structure, the "Run on Server" loads the JSP properly (NOT
putting "WebContent" into the URL).

Is there perhaps some reason why the "Run on Server" command would be
looking differently at resources within the "WebContent" folder as opposed
to other folder's containing JSP pages, when it goes to launch the web
browser to the selected resource? Is the "Run on Server" checking the
wtpmodules file to see where particular source folders would reside in
the .deployables directory structure?
Previous Topic:Dynamic Web Project will not run...
Next Topic:How do I exclude a directory from WebTools?
Goto Forum:
  


Current Time: Fri Nov 08 22:33:14 GMT 2024

Powered by FUDForum. Page generated in 0.03083 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top