File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Embeded applet within a JSP page.  Will it process on the server or client side? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Embeded applet within a JSP page.  Will it process on the server or client side?" Watch "Embeded applet within a JSP page.  Will it process on the server or client side?" New topic
Author

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

Daniel Hoffman
Greenhorn

Joined: Nov 05, 2003
Posts: 18
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

Joined: Nov 05, 2003
Posts: 18
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

Joined: Nov 08, 2001
Posts: 15376
    
    6
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

Joined: Jan 10, 2002
Posts: 61770
    
  67

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


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Daniel Hoffman
Greenhorn

Joined: Nov 05, 2003
Posts: 18
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

Joined: Oct 04, 2003
Posts: 541
well you have to convert it into an HTML interface that you dynamically generate and process through JSP or Servlets etc


Kim Jong II (North Korea's Dear Leader) said:Nuclear weapons don't kill people, people kill people.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Embeded applet within a JSP page. Will it process on the server or client side?