George Hutto

Greenhorn
+ Follow
since Mar 12, 2003
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by George Hutto

Paul Clapham wrote:Yes, of course an applet can "call" other classes. (Note: Java programmers say that a class "uses" another class by "calling" methods from that class.)

If the applet code is throwing an exception (the most likely possibility) then you'll find the stack trace in the Java console. As for your APPLET element: it mostly looks okay to me, except of course I can't tell whether your relative URLs are correct; but I seriously doubt your applet is going to need anything from servlet.jar or servlet-api.jar. If it does, you must have misunderstood something.



Okay, still showing my newbishness. "Java Console" -- how does one access that? When I get an error in JDeveloper I can see it easily enough and I've been poking around in Firefox but seem to be missing something.

Ah Ha! I found Java Console ... now to figure out how to have it monitor my applet.
8 years ago
Okay, I'm new to a lot of this, so any help is appreciated.

I've written an applet that works just grand in the appletviewer.

In my apache 6.0.35 ROOT directory I've got the HTML file, the applet class and some supporting classes.

Here is my applet declaration:

<BODY>
<APPLET CODE="SterlingCC"
ARCHIVE="oc4j.jar,servlet.jar,servlet-api.jar,SterlingCC.jar"
CODEBASE="http://localhost:8080/"
HEIGHT="700" WIDTH="900" ALIGN="bottom">
This browser does not support Applets.
</APPLET>
</BODY>

Yes, I also have a jar file with the applet and supporting classes. Right now they are all right in the root directory.

The HTML screen comes up fine and shows the applet interface but when I click my submit button nothing seems to happen. I was wondering if there is some issue with an applet using other classes.

Also, is there a way to troubleshoot this? I don't get any errors showing up in Firefox so I was wondering if some log file might be generated that I can view.

Thanks,

George
8 years ago

Michael Dunn wrote:each container/parent has a getComponents() which you can iterate looking for instanceOf's,
or you can add the current textfields to an array, and iterate that array



Michael, thanks for the quick response.

I'm looping through the components and testing instanceof JTextField, etc. Oddly, the components don't seem to have any sort of name I can retrieve. yes, I need to treat some text fields one way and some other text fields another way. Any quick sugggestion on this? Am I stuck using a setName() on each textfield so I have a name to pull?
8 years ago
Hello all,

This is a newbish question but I'd like to be able to loop through the textboxes, etc on my page and either disable/enable them based on a condition and/or change the background color.

What "collection" of controls do I loop through or where do I look for more information? I've done this in other languages but in Java I'm drawing a blank.

Thanks,

George
8 years ago
Okay, I'm having much the same problem. I'm new to using JDBC so I've tried going through the same steps to resolve the issue but with no luck. Please help.

I'm using Eclipse and JDeveloper (having same problem in both environments) in Windows 7.

This is the entirety of my environment variable "CLASSPATH = c:\oracle\sqldeveloper\jdbc\ojdbc6.jar". Should there be more?

My code is as follows:

import java.sql.*;

public class ptSQL {

public static void main(String args[]) throws ClassNotFoundException, SQLException{
Class.forName("oracle.jdbc.driver.OracleDriver");

Connection conn = DriverManager.getConnection(
"jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(HOST=devel-ora-db1.bdainc.bda)(PORT=1521))" +
"(PROTOCOL=tcp)(CONNECT_DATA=(SERVICE_NAME=EBSDEVL)(INSTANCE_NAME=EBSDEVL)))",
someuserid,
somepassword);
conn.close();
}

}

Very basic, I just want to see if I can open the connection. Once I get to that point the rest will be easy.

thanks in advance.

I could use pointers to the right resource. The array of data and situations on the net is overwhelming.

I'm working with the interface between two companies.

The first wants to send a "silent post" to an https url hosted by the second company ( I am at the second company ). The first company doesn't need to see a web page, this is an automated process.

What I have to do is receive the post, parse out some data and then update a table in our database.

I presume from my readings this can be done as a servlet, am I correct? Should it be done as a servlet or is there a better approach that occurs to any of you off hand?

I know, they are newbish questions. I don't need anyone to write the code for me, just point me in the right directions. As usual, this has to be done in a short time frame and I'm under the gun.

Thanks
8 years ago

Paul Clapham wrote:Yes, your client will have to run an HTTP server to handle those requests.

And then, how can I grab the autcode that is sent to that "silent post" url, associate it to the orderid and then redirect the user to the data entry web page with this list of parameters?



It would help if you were more specific about what "I" means there. If "I" is the applet, then it already has that autcode so no "grabbing" is required. But if "I" means the HTTP server, then the applet has sent it as part of the URL. At this point I'm confused. You've said you're writing an applet, so you are already requiring an HTTP server to host it. But then you seem to be confused about the requirement for an HTTP server to receive "silent posts". Is this going to be a second HTTP server, or is it going to be the same server?



Fair question. From what I can tell in the documentation I've been given, the user enters the information one a web page on one server, the authorization code is posted to another page on a different server. So it seems like the initial applet will have to wait for a reponse from an applet or servelet on the second server to send it the authorization code. And then, once I have the authorization code to associate with this intial orderid that has been generated I use my initial applet to redirect the user to either an "approved" page or a "disapproved" page. I expect I'll have to do some html on the fly to present the right option to the user. BUT .. I am grateful for any help or pointers.

I know, in some ways it seems like going around your rump to get to your elbow.
8 years ago
Basic Tech Environment: Oracle DB & order processing.

Users place manual orders for customers who are calling in (these aren't tech-savvy customers since they're not using the company's website).

Once the order is placed in our system the user need to get authorization for the use of the customer's credit card.

So I'm to write an applet that sends basically a userid and orderid (plus other essential info) to a credit card processing site for authorization. Ideally, the cc processing site sends back a response that includes an authorization code (autcode) to a "silent post" URL that my client will host -- if the customer's card passed muster I then have to redirect the employee user to the cc processor's data entry page (passing along, of course, the unique orderid and associate autcode. The user enters all the correct information for the particular order (I know, it seems like a duplication of effort), saves it and we're on our merry way.

Now, I have an idea of how to post the data to the cc processing site's URL for authorization. What I need help with is listening at the "silent post" url. From what I've seen this will tie up port 80 on some dedicated server so that no other process/etc. can ever use that port? And then, how can I grab the autcode that is sent to that "silent post" url, associate it to the orderid and then redirect the user to the data entry web page with this list of parameters?

Sorry to ask such basic questions but it has been a while since I've worked with some of these concepts and then not all were in Java.

Thanks,

George
8 years ago