Win a copy of Head First Android this week in the Android forum!

Logan Owen

Greenhorn
+ Follow
since Dec 01, 2004
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 Logan Owen

I don't know how to get around this...but doing some research...it sounds like your compile time and run time JVM versions are different. 49.0 refers to J2SE 5.0, while 48.0 refers to JDK 1.4. Possibly you need to set the PATH system variable differently, so that it will only see J2SE 5.0 virtual machines?
16 years ago
Please change your display name to match the JavaRanch naming policy, that is, your 1st and last name.

As for your question...what access level did you make the helperclass (public, private, protected). Make sure that you have the constructor for the helperclass in place. The code for creating a new instance of it should be


If you have a default constructor in helperclass with the form


Hope this helped some...
16 years ago
Yes, all you have to do is put in your jsp:



That will create a new instance of your custom class. If I am totally misunderstanding what you want, just post back, and I'll try to help you out more.
16 years ago
JSP
With Java, you will have to do it in two steps...one have the action of the form go to an intermediate page, like so...



You can look that up in an HTML tutorial or resource.

Next on the page inputCheck.jsp, you would have something like this...



Then you can operate on the input, and check it as you need to. If you need simpler input checking you might try Javascript, because the request won't have to make a round trip to the server to verify the input. Hope this helps some.
16 years ago
JSP
I am not completely clear on what you are wanting, but my suggestion would to use a if else statement (actually, a switch statement, but I don't remember the exact syntax). Pull out the month, and try something like this:



so on and so forth. Also, it is best to put logic code in a class outside of the JSP and call it from the JSP. And always remember to include a default case, just in case something breaks down, the whole application will not fail.
16 years ago
JSP
1) obviously your path works, but just to check, go to the command line and type java, make sure that it can find that program.

2) next, you either need to navigate to the directory (chdir) and run it, or put the directory that your class file is in in an enviroment variable called CLASSPATH. This is different then the variable PATH, which is for windows to find its programs.

Hope this helps.
[ December 04, 2004: Message edited by: Logan Owen ]
16 years ago
Do you mean create a new instance? Because that would be:



Or whatever the constructor is.
I maybe way off mark...but is Apache even forwarding the request on to Tomcat? I mean, I though Apache only forwarded pages that had the .jsp suffix automatically, so you would need further Apache configuration to forward a servlet request. Just a thought...
16 years ago
Do you have to load all 14,000,000 at the same time? The easiest way would be to break it down into much smaller chunks, and operate only on those chunks, getting rid of them, and then loading up a new section of your 14,000,000.

EDIT:

Or get a computer with a hella lot more RAM... ;-)
[ December 03, 2004: Message edited by: Logan Owen ]
16 years ago
I really have no idea what cmp is...but just looking at the error, it looks like you can't connect to the SQL server, so it is returning a null resultset, or something similar. Make sure that you have registered the data source, and that is accessible/working to/on the 2nd computer.

LoDown
16 years ago
The <%= %> tags only work to print out a string that is returned by the code betweent them. This is the same as writing the code:

16 years ago
JSP
Looks good...I don't know if it will affect you at all, but the normal StringTokenizer() constructor will treat tabs, newlines, the carriage-return character, and the form-feed character as well as the space as a delimiter, so if you have any of those in your resultset, it could screw it up. Just something to watch out for. This is just conjecture, but it might be faster to use new StringTokenizer( name , " ") so that the tokenizer only has to check for the space.
16 years ago
Have you all forgotten "Topgun"? Highway to the danger zone, takin you right into the danger zooooonee.....

:-D
17 years ago
To be able to do something like this, you have to have something constant. So if you are ALWAYS adding it after the 1st two words, then it can be done. Or at a certain number of letters in, or some other way to determine where the location in the string is that you want to insert the word. But if it is highly random, then it will be extremely difficult to program. I am sure there is a better way to do this....but here is some messy code to add word after two other words...

17 years ago
1) you are missing the closing bracket
2) you need a diff iterator (not i) for inner loop, because you are setting i back to 1 every time, which will never let the outer loop get to 3, so the loop will go on infinitly.

Possible code:
17 years ago