Mike T
Mike T

Reputation: 415

Installing Tomcat 6 on STS 2.9.1

I am having difficulty installing Tomcat 6 under SpringSource Tool Suite (STS) running on Ubuntu 11.10. When I try to install Tomcat 6 using STS, while the server appears to install correctly (I can see Tomcat 6 as a server) and when I run Tomcat 6 from STS the console shows that it is starting correctly.

However, I cannot run my grails app on that server because the server does not appear as an option despite that the server is both available in the server pane and can be started from that pane. Another oddness is that when I run the server from the server pane and can see from the console that it is running on port 8080 I cannot bring up the default tomcat root. Tomcat is running, but it is looking for the war elsewhere (in /target???).

I then tried to install a local instance of tomcat and having STS use that. I ran:

sudo apt-get install tomcat6-user tomcat6-instance-create ~/tomcat6

Then trying to add a server to STS by pointing to ~/tomcat6. In this scenario, STS doesn't even recognize the server to put it in the list of servers available for running my grails application.

Anyone have any thoughts on this?

Upvotes: 1

Views: 3292

Answers (1)

Ravi Kadaboina
Ravi Kadaboina

Reputation: 8574

You need to add Dynamic Web Module facet to your project to be able to see the Run on Server option. For that Right Click the project -> Properties -> Project Facets -> Check Dynamic Web module.

If you install tomcat inside an IDE like eclipse/STS then you won't be able to see the default Tomcat Home page as "C:\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\ROOT" does not have the welcome page. As when compared to standalone tomcat 7 installation has the index.jsp inside "C:\tomcat7\webapps\ROOT".

So you always need to point to your own page in your web application something like this "http://localhost:8080/MyWebApp/index.jsp"

[UPDATE] As per comment

Change the Installed location JRE to "/usr/lib/jvm/java-6-openjdk". This should be enough no need to install Oracle Java. To do this go Window->Preferences->Java->Installed JREs -> Add.

More info here

Upvotes: 3

Related Questions