0

SUMMARY: I can't start up and see web pages of my Spring Security project using the internal STS/Eclipse VMware vFabric tc server. I think it is a configuration issue.

DETAILS: I'm ramping up work with Spring Security. I've a project from Websystque Spring Security 4 Hibernate Role Based Login Example that is working fine when installed in an external Tomcat 8 server (Windows 8.1). I have also configured STS to do remote debugging to that Tomcat server.

When compiled in Maven (mvn install) I configured it to eboard.war. Dialing up localhost:8080/eboard/login gives me the login page.

When using the external Tomcat it is inconvenient to build the WAR and copy it over to the Tomcat webapps directory, so I'd like to use the internal tc server of STS. My STS project has STS name Exchange_Board_Rest. My project was copied from the web and imported (the pom.xml file) into STS. To get it into the tc server I configured STS project facets Java 1.8 and Dynamic Web Project 3.0. STS itself added the Javascript 1.0 facet.

After adding the project to the tc server I cleaned/republished and started the tc server. However, localhost:8080/Exchange_Board_Rest/login yield a 404 error.

The files are in the ${something}\base-instance\wtpwebapps directory. There are no errors or console messages in my STS. Just two Catalina load/start messages.

BTW, I'm getting no logging to the STS console for errors, etc. I can't find where in STS or my project to turn logging on. My project uses Java class/annotation configuration and has no actual web.xml file for configuring.

The tc server works OK for this PC, as I used it to run/debug a different project I created from within STS. I believe I need to know some secret handshake to make this work.

My question: What configuration am I missing to make the internal tc server display my web pages?

Thanks, Jerome.

Jerome P Mrozak
  • 1,907
  • 4
  • 21
  • 33
  • are all necessary files in the deployed wtpwebapps directory? Sometimes bits and pieces are missing and they need additional configuration via the deployment assembly settings (just wildly guessing here). And do you use the STS distribution (which comes with m2e-wtp pre-installed)? If not, you might need to install that add-on yourself. – Martin Lippert Dec 04 '15 at 09:23
  • I am using STS 3.7.1 (with Eclipse Mars) with Java 1.8 SDK. The installation details shows m2e-wtp of 1.2.1. Things *might* be working and I don't know where to find the web page. I have projects ExchangeBoard and Exchange_Board_Rest. When running in tc ExchangeBoard responds to localhost:8080/exchangeboard. I'm not seeing (pom.xml file?, etc.) how tc decides to choose a name for which the server responds. Once I know how that works I can look to a similar place for the Exchange_Board_Rest that I can't make work. How is tc choosing its name? – Jerome P Mrozak Dec 04 '15 at 12:54
  • you can open the server editor (double click on the entry in the servers view) and switch to the applications and modules tab. There you can see the URL extension that is used (and you can change it there, too). Hope this helps. – Martin Lippert Dec 07 '15 at 10:31
  • I see I can change the URL extension, and used the info there. However, the site still doesn't load from the tc server. If I copy a WAR to an external Tomcat the Tomcat server does serve the site OK. Hmm... – Jerome P Mrozak Dec 08 '15 at 18:28
  • Looks like this one is hard to debug remotely. What about filing a ticket at our issue tracker and attach a sample project that reproduces the problem? We could take a more detailed look at that and find out what the problem might be. The issuetracker is here: https://issuetracker.springsource.com/browse/STS – Martin Lippert Dec 10 '15 at 10:48

0 Answers0