- This topic has 5 replies, 2 voices, and was last updated 11 years, 11 months ago by support-tony.
-
AuthorPosts
-
Narahari LakshminarayanaMemberFriends:
Happy New Year to every one.
I use Myeclipse 1.7 Blue.
I am currently trying to deploy to TOMCAT 7.0.33
The context for one of my WebProject is /portal
It deploys fine to Tomcat.
The context for one of my other WebProjects is /portal/cms
But this one does NOT deploy well.
When I change the context in the properties of the WebProject and I go to the deployment window I see a invalid.
I have attached pics. Kindly help.
-Narahari
Attachments:
You must be logged in to view attached files.
support-tonyKeymasterNarahari,
A Happy New Year to you too!
I’m afraid that you can’t have embedded contexts. The first web application is servicing the /portal context and so that will also try servicing the /portal/cms context. However, I don’t think any context with multiple elements is valid.
You can check this by exporting both web applications to a WAR file, using the Export->Java EE->WAR file (MyEclipse) function, exporting to the webapps folder of your Tomcat installation and see if you can access both web applications.
Please let us know if this helps.
Narahari LakshminarayanaMemberHello Tony:
Tomcat 7 does allow you to do that. If the folder name is portal#cms inside the webapps folders then it is treated as a valid context by Tomcat.
It is just that I am unable to do this using MyEclipse 10.7 as it I am unable to deploy that into the webapps folder in the portal#cms format.
Here is the reference for the same:
http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Defining_a_context-Narahari
support-tonyKeymasterNarahari,
Thanks for pointing out my mistake. You’re right, the nested context root is valid. I have raised a problem report for this, to get it fixed in a later release.
In the meantime, here is a possible workaround:
Instead of selecting the Tomcat server connector, when deploying, select “<Custom Location>” (don’t select the suffixed custom location), then enter or browse to the Tomcat webapps folder and add the folder /portal#cms to the deployment location path (that is, it should end in “webapps/portal#cms”). You will have to launch Tomcat using the Tomcat server connector, of course.
Please let us know if this helps.
Narahari LakshminarayanaMember@support-tony wrote:
Narahari,
In the meantime, here is a possible workaround:Instead of selecting the Tomcat server connector, when deploying, select “<Custom Location>” (don’t select the suffixed custom location), then enter or browse to the Tomcat webapps folder and add the folder /portal#cms to the deployment location path (that is, it should end in “webapps/portal#cms”). You will have to launch Tomcat using the Tomcat server connector, of course.
A few screenshots to show me how this looks will help. I am not able to find this easily.
Regards,
-Narahari
support-tonyKeymasterNarahari,
Go to the New Deployment window, as you did previously when deploying to Tomcat but, instead of choosing Tomcat, choose <Custom Location>, as below:
Then specify the deployment location. For Tomcat, this will be the webapps folder, in the Tomcat installation. For example:
Note that you may have to deal with existing deployments at that location. If so, choose an appropriate option, such as in the image above.
Now click the Finish button and your project will be deployed to Tomcat, assuming you gave a valid deployment location.
Start the Tomcat server as normal. For example, right click on the Tomcat server (shown in the image below) and select Run Server or Debug Server. You won’t be able to start the server using the Custom Location line in the servers view but that line will show any deployments made via Custom Location.
Please let us know if this works for you.
-
AuthorPosts