0

As described here JAR and WAR are packeged in EAR file. I have a Java Servlet packaged and a index.html that uses Angular.js to send HTTP requests to the Servlet, here is my URL (running on localhost, using Tomcat).

var baseUrl = http://localhost:8080/GM/deploy  //GM - my project name

And in the servlet :

@WebServlet("/deploy")

My question is, after deploying my EAR file on WebShpere, what is the URL that goes inside baseUrl? Is there a way to send the request using relative path?

Community
  • 1
  • 1
Itsik Mauyhas
  • 3,824
  • 14
  • 69
  • 114
  • Your question is confusing. URLs have got nothing to do with EARs. Perhaps your actual concern is the dynamicness of WAR's context path? In that case, is this helpful? http://stackoverflow.com/q/4764405 – BalusC Mar 20 '16 at 11:05
  • My question is : how to get from my javascript file to the servlet ? – Itsik Mauyhas Mar 20 '16 at 11:50
  • I didnt notice the link, it looks like that what I was looking for. – Itsik Mauyhas Mar 20 '16 at 11:56

0 Answers0