Sair Legge

Greenhorn
+ Follow
since Nov 23, 2001
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 Sair Legge

I'm using ServletExec to process my Servlets/JSPs and am having problems using the following code to forward a request on:
RequestDispatcher dispatcher = request.getRequestDispatcher(address);
dispatcher.forward(request, response);
If I put the servlet class in the default servlets directory it works no problem, however if I configure a Web Application and put the servlet class in the WEB-INF\classes directory it throws a NullPointerException as the getRequestDispatcher method returns NULL.
Any ideas why it works as a 'stand-alone' servlet but not as part of an app?
18 years ago
I want to read and separate a comma separated list, but I only want the StringTokenizer to use the comma to separate the words and not whitespace. I set the code as:
String text = "black white,blue green"
StringTokenizer st = new StringTokenizer(myString, ",");
String[] list = new String[2];
int count = 0;
while (st.hasMoreTokens()){
list[count] = st.nextToken();
count++;
}
I want "black white" to go into list[0], and "blue green" to go into list[1], however the StringTokenizer still separates the list on white spaces as well as the commas, and I end up with an IndexOutOfBoundsException occuring.
Any suggestions???
19 years ago
Oooo, life suddenly seems so much easier! Thanks
Having read some of the other postings I'm a bit confused about the maintenance of 'available seats'. The db.db file contains the file schedule and the number of available seats however, surely you can't just decrement this seat number as it just lists the day that flight flies on and not the date of the flight.
Whilst I don't really want to maintain multiple db files I can't think how else to handle it.
Any help/thoughts??