Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Embeded applet within a JSP page. Will it process on the server or client side?

 
Daniel Hoffman
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I have a java class file that I am trying to implement on a web server. However, the class requires certain files that are stored on the local system (server) to process the clients button click (the cacerts file (SSL) and some *.jar files (HHTPUNIT). I am trying to discover a method by which I can run the page from the web server, send the html to the client but the client request is completed on the server. I will have to convert my application to an applet to get it to work on a jsp page. However, before I do that I would like to now if what I proposed will work. From my understanding of Applets they are sent to the client machine for procesing. However, I thought if I embed it in a jsp page (which I believe is server-side) it just might work. The application I have to change is around 5000 lines of code so I rather know for certain that what I want to do can be done before I change the code to an applet.
Any assistance would be appreciated.
Thanks
Daniel
 
Daniel Hoffman
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Another thought. If there is a way to embed the class file without converting it an applet would be even better
Daniel
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am going to ramble and not sure if this is going to answer your question.
just because jsp is considered server side does not mean that you can do anything with it on the client side. The code is rendered on the server and passed to the client. A button push can not activate code on the server. You need to resubmit the code to run more code on the jsp.
Eric
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64631
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To emphasize what Eric said: it is completely moot whether your applet is in a JSP page or an HTML page. JSP executes on the server to create the HTML content that is sent to the client browser. From the browser's point of view whether the HTML sent to it was simply read from a file, or generated by a JSP (or generated by ASP, generated by a Sevlet, or any other of the various server-side means ) makes no difference at all. The result is that the browser receives a good-old, vanilla, old-fashioned HTML page.
There is no way you can get server-side classes to execute from the browser.
bear
 
Daniel Hoffman
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for the quick response.
Since I cannot achieve what I need to do with JSP, do you have any suggestions as to how I can get this done. I have a java application that presents the user with a gui and several buttons to perform various httpunit tests. My app makes use of the httpunit *.jar files and a few other classes I wrote to perform website availability tests. I have now been asked to see if I can have this gui run from a central website instead of multiple copies of the stand alone.
Your thoughts would be appreciated.
Daniel
 
Tim Baker
Ranch Hand
Posts: 541
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well you have to convert it into an HTML interface that you dynamically generate and process through JSP or Servlets etc
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic