Well, I got my Java class working with just a simple html anchor/href tag, but how do get stuff to print to the screen from Actionscript. It seems web.xml and the way tomcat works is ok without actionscript, but when I start using URLRequests and Loaders and stuff, all i get is the “do u want to download this .class file” prompt. How does it all work?
Basically I am starting with a .class file, am communicating between flash and the Tomcat Server 6.0, and would like the contents of the out.println statement to print to the screen as it did with just html.
The way it worked in the helloworld tutorial:
here is the link:
<a href = “hello”> a servlet link</a>
click the link. “Hello World” is printed to screen because some java servlet is doing what it’s doing.
I’d like it to work this way just using a .class file and actionscript.
I never really had this kind of problem with php because there was only .php files. But in Java there’s .class files and .jsp pages and i’m just trying to figure it all out. They tell me that .jsp is compiled into .class or the other way around i forget.
Ok I figured it out now. What you defined in your web.xml is what you request from the server via Actionscripts HTTP requests. don’t use .class anywhere in the actionscript and the Tomcat server will take care of the rest.