0

So I have a functioning eclipse/hibernate/spring webservice with some SOAP services, one of which is sayHello() wich returns a string

Calling sayHello with http://localhost:8080/myWebService/soapServices/sayHello yields:

<soap:Envelope>
  <soap:Body>
    <ns2:sayHelloResponse>
      <return>greetings from the web service! time is 2015-09-06T14:39:23.375
      </return>
    </ns2:sayHelloResponse>
  </soap:Body>
</soap:Envelope>

I've also created a companion webappp (the client) to access the web service. It needs an XSLT stylesheet to format this response, but where should I put myStylesheet.xsl within the project structure of my client webapp? Under new directory WEB-INF/stylesheets?

Abel
  • 56,041
  • 24
  • 146
  • 247
user1201168
  • 415
  • 6
  • 19
  • Please [refrain from "signing" your posts](http://meta.stackexchange.com/a/108452/137826), however good the intentions. You already have a signature, that is your avatar with your name (though currently, you did not set a name, but you can go ahead and [edit it and change it](http://stackoverflow.com/users/edit/1201168) to _Still-learning Steve_) – Abel Sep 07 '15 at 22:45

1 Answers1

2

Under new directory WEB-INF/stylesheets?

Yes, you are allowed to do so. The WEB-INF directory is hidden from requests by default, but is accessible by code with getResource and the like. See this post on structure and WEB-INF for some hints on what your options are.

Bottom line: it is up to your gut-feeling to what location you find most convenient. If you want the files to be accessible by browsing, it is probably better not to put them inside WEB-INF.

As an alternative, you can also compile the resources directly into your Java application as a compiled resource. But often it is easier to use a (configurable) location on disk, which allows post-compilation updates to your file.

Community
  • 1
  • 1
Abel
  • 56,041
  • 24
  • 146
  • 247