0

I have a spring project that works beautifully when it's located at the web root - i.e. http://myserver/index.html but it breaks terribly when it's not - i.e. http://myserver/spring-project/index.html

Is there a way to configure spring to live in a subdirectory? Going through docs has been entirely unhelpful.

maxdj
  • 427
  • 2
  • 5
  • 15
  • 1
    can you provide an stack trace or something like this? btw, it's not spring problem, it's because of the some hardcoded values at this app – Igor Artamonov Jun 22 '10 at 17:30
  • I guess there are at least 10 other libraries in your project, how did you assume it's spring's fault? – Bozho Jun 22 '10 at 17:31
  • There are no stack traces, I just can't access anything (404s everywhere) It's not necessarily spring's fault, but it seems like spring would have a configuration parameter somewhere to specify a base path. Which would, for example, set the contextPath for JSPs – maxdj Jun 22 '10 at 17:42
  • It does, but without seeing any of your config, we can't tell you what to do. – skaffman Jun 22 '10 at 17:46
  • @skaffman: what config would you like to see? In my applicationContext, I set up CAS authentication and DWR. in security.xml, I configure Spring Secuity. I've got a few entries in urlrewrite to make one of the admin pages have friendlier urls. My beans are declared in dispatcher-servlet, and I've got a handful of filters and servlets in web.xml. – maxdj Jun 22 '10 at 18:04

1 Answers1

1

Spring does not require that it be in the root directory to work.

If it's not working, it's because you configured, packaged, and deployed it incorrectly.

I would recommend putting AppFuse aside and figuring out how to configure, package, and deploy an app successfully by hand a few times until you know how to do it cold. Once you have that in hand, then bring AppFuse in to lighten your load.

duffymo
  • 305,152
  • 44
  • 369
  • 561