- This topic has 8 replies, 3 voices, and was last updated 20 years, 7 months ago by Scott Anderson.
-
AuthorPosts
-
iklotzkoMemberWhen I update a jsp in my source it doesn’t move the resource to the web root and I have to manually move it there.
Is this normal behavior for MyEclipse?
Ira
Thank you for any help you can provide.
– System Setup ——————————-
Operating System and version: Windows A
Eclipse version: 3.0 M8
Eclipse build id: 200403261517
Fresh Eclipse install (y/n): y
If not, was it upgraded to its current version using the update manager?
Other installed external plugins: some, but they were removed
Number of plugins in the <eclipse>/plugins directory that begin with org.eclipse.pde.*: 8
MyEclipse version: 3.7.2
Eclipse JDK version: 1.4.2_03
Application Server JDK version: tomcat 5.x
Are there any exceptions in the Eclipse log file? ?– Message Body ——————————-
Riyad KallaMemberWhen I update a jsp in my source it doesn’t move the resource to the web root and I have to manually move it there.
I’m not clear what you mean by “update” here, but this sounds normal. MyEclipse does not modify the project structure at all during editing or at all during deployment.
Your JSPs need to be under your webroot at all times, or you get an error for the ones that are not. We will relax this requirement in future releases, but for now this is how it works.
iklotzkoMemberRiyad,
So, are you saying my jsps have to be seperate from my source? How do I manage a project whereby I keep all my source files in a central location: for instance, for cvs (source versioning control). Do I have to modify the jsps under my web root, then move these files back over to my source directory?
Thank you,
ik
Riyad KallaMemberAhh good question. See this FAQ entry for a good layout for the typical web project: http://www.myeclipseide.com/modules.php?op=modload&name=FAQ&file=index&myfaq=yes&id_cat=30#111
You’ll notice that /src is for your Java source files (beans, servlets, etc.) while /webroot and anyplace under it are for your JSP pages. /webroot and everything under it are typically what get deployed to the application server, so it is traditional to compile your /src files into /webroot/WEB-INF/classes so you don’t ever have your source code on your server.
In addition to that, you would typically have ALL of this (from the <project root>) under CVS. Of course you would add appropriate .cvsignore files for your classes directory and api directory… and other directories that had contents that could be regenerated. These are never meant to go into CVS.
iklotzkoMemberGreat, I think I get it. But, just to make sure, i’ll use actual paths:
I currently have my web-root to be: TOMCAT_HOME/webapps/
I reassign my web-root to cetova-src/backend/web
I retain my source root as cetova-src/backend/srcWhen I deploy, it should build it to: TOMCAT_HOME/webapps/app-name?
Will it place the jsps under the app-name dir. or under WEB-INF/classes, if it is the latter, can this be changed?Now, how do I reassign my web-root? It says I should use add/Remove Module dialog from my context menu, but I don’t have that, I have my project selected at the top node on package explorer.
Riyad KallaMemberI currently have my web-root to be: TOMCAT_HOME/webapps/
I reassign my web-root to cetova-src/backend/web
I retain my source root as cetova-src/backend/srcGood change, your previous webroot was incorrect so this should help.
When I deploy, it should build it to: TOMCAT_HOME/webapps/app-name?
The deployment tool will use the context name you setup (Right click on Project, go to MyEclipse-Web, setup Web Context-root… lets say you called it “/cetova”) to deploy your app to TOMCAT_HOME/webapps/cetova (or whatever you called it) automatically. You’ll notice in the deployment dialog the path field is not editable, its done for you automagically.
Will it place the jsps under the app-name dir. or under WEB-INF/classes, if it is the latter, can this be changed?
Our project structure requiretments are that of an exploded WAR for, so technically speaking your JSP files should all be under your WebRoot directory. Some people like to hide them in /WEB-INF/jsp for security reasons, but no they will never go into your /classes dir automatically. And if you put them there manually, they are in the wrong place. Only compiled Java source files should be in there.
Now, how do I reassign my web-root?
This will be editable in the future again, but for now you need to edit the .mymetadata file that is in your project root. If you open up the Navigator View, you will be able to see it. Its just a text file (xml). You can also see the file in the Package Explorer View if you turn off .* filtering (using that V down arrow in the top right of the view).
iklotzkoMemberOkay, I’ve done this, and I can make a change to a class and I see the corresponding change on the server via. hot swapping (which is a great feature by the way). However, my jsps are still not moving over.
iklotzkoMemberI’ve made these changes, and tried to compile jsps, but now i get this message… hmmm..
/cetova-main/cetova-src/backend/web/ListCategoriesReports.jsp) not in base path (C:/cetova-main/cetova/cetova-src/backend/web/)
This is my .mymetadata
<?xml version=”1.0″ encoding=”UTF-8″?>
<project-module context-root=”/cubewiz” name=”cubewiz”
archive=”cetova.war” type=”WEB” id=”myeclipse.1082047768953″>
<attributes>
<attribute name=”webrootdir” value=”cetova/cetova-src/backend/web”/>
</attributes>
</project-module>Any ideas?
ik
Scott AndersonParticipantClosed due to response in this related thread:
https://www.genuitec.com/forums/topic/jsps-won-t-compile-index-out-of-bounds-exception-closed/ -
AuthorPosts