File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Call the action class from Applet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Call the action class from Applet" Watch "Call the action class from Applet" New topic

Call the action class from Applet

Shyam Hai
Ranch Hand

Joined: Feb 04, 2009
Posts: 68

I want to do file uploading from applet to action class.
How can i do.

But i tried file uploading from Applet to servlet.
its working fine.

But i need Applet to action class.

First i put the code for Applet to servlet.

Applet Class Code:

Servlet Code :

web.xml :

Its working fine.

But If i call Action class like this from applet.
it not working.

Its not working.
How can i call the action.

Or please give any idea
for uploading the file from applet to struts action class.

David Newton

Joined: Sep 29, 2008
Posts: 12617

Please read ItDoesntWorkIsUseless and TellTheDetails: you wouldn't expect an auto mechanic to diagnose and solve a problem with your car without being able to look at the car. We're not at your machine and have no other information other than what you choose to share--without knowing what's happening, what you expected, what (if any) errors you received, and so on, it's impossible to help.
Shyam Hai
Ranch Hand

Joined: Feb 04, 2009
Posts: 68

ok i understand.

Actually if i run
call Applet to servlet
the file upload from applet and stored in sevlet side.

but if i call applet from struts action.
then i will get waring only.

<Warning> <Socket> <BEA-000449> <Closing socket as no data read from it during the configured idle timeout of 5 secs>

please help how to upload the file applet to struts action calss.
I agree. Here's the link:
subject: Call the action class from Applet
jQuery in Action, 3rd edition