I'm researching using JSP for a project that could be accessed locally and over the web. That is, I would be creating the project in JSP and would like to generate a kind of setup.exe that the client would run to set up the environment to run the JSP in their browser. For example, if I were to choose Tomcat, do I create a setup program that also installs Tomcat and then stores the JSP application in the proper directory? More specially, for those in the industry that program JSP professionally, how does your company deploy a JSP application to the client? If you host the JSP application on your server what about a solution where the client hosts a local server so they can run the application locally on their machine? Is that possible?
Asked
Active
Viewed 44 times
1 Answers
1
I think you have some confusion. In a JSP-based application (note that that technology is very old and you should use JSF instead) there are two sides: the server side and the client side.
The server side has Tomcat or any other Web Application Server that deploys the JSPs as you said.
The client side just needs a browser (e.g. Mozilla, Chrome, Lynx, etc) to access the JSP-based application via Web.
In other words, you don't deploy in client machines. You just deploy in the server and your clients access your application with, normally, a Web browser.
Further reading:

user1156544
- 1,725
- 2
- 25
- 51
-
Thank you for the response. I get that jsp is a server client setup with the server running on an outside machine and the client using a browser but what if the client runs the application without connecting to an outside server? Obviously a kind of server needs to be installed and able to be turned on and off from the client machine, a kind of local server emulator that is small. Does this make sense? When the program is run the server is initiated and the browser connects and runs the jsf. – DaveK Jun 07 '18 at 14:11
-
The client cannot run the application. The client just connect to the application. Imagine how you access `stackoverflow.com`. Do you (as a client) run any software from StackOverflow? No. You just access the application via Web with your Web browser. It is the same thing. In your scenario, SO provides your JSP-based application in a server and you are the client. The client never turns on/off: Any time the server is ON, the client can access. Any time the server is OFF, the client cannot access. It is the server who rules this. – user1156544 Jun 07 '18 at 14:16
-
I don’t think I am making myself clear then and it is probably based on semantics. I understand everything you just said and I shouldn’t have used the language “runs”. That was my mistake. I understand HOW the client/server works, my basic question is more along the lines of the ability for a client to access a JSF that is local to the machine. I have seen applications where I double click, a window opens telling me to initiate and start the server, then the browser connects and the JSF is run and the URL is local. That’s where I am going with this. – DaveK Jun 07 '18 at 14:49
-
1Oooh I see. Was it a JNLP file? Maybe what you mean is `Java Web Start`. See: https://www.java.com/en/download/faq/java_webstart.xml and https://en.wikipedia.org/wiki/Java_Web_Start – user1156544 Jun 07 '18 at 15:41
-
That’s a start! Thank you for that connection. I will have to look into it more but this is definitely a place to start as this assumes the user must download the application then first run it connected to the internet so that it will setup the user’s computer with the proper runtime environment. Then from there they could potentially run the application without an internet connection. I will have to look into how this works with JSF as well. I guess I have a little research to do now. Thanks for the tip! – DaveK Jun 07 '18 at 16:28