Tim Baker

Ranch Hand
+ Follow
since Oct 04, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Tim Baker

For the sake of anyone who may find this thread via Google as it is one of the top results for this error:

This error is caused by a version of SSL Certificates that Java 1.3 can't cope with. The only known solution is to upgrade Java to 1.4
16 years ago
If you are using request.getParameter("billOptions") then it will return "1" or "2" etc depending on which they selected.
19 years ago
JSP
Firstly we need to see what the error is, when it says it can't compile the JSP, it always tells you why.

Secondly, you need to put .class files in your WEB-INF/classes folder and not .java files. You need to compile your .java files into .class files.
19 years ago
JSP
That is a very general error, check your tomcat logs to see what is going on.
19 years ago
No, you can't put an object there at all. Just a string. Remember what the <%= operator does, it prints out a String. Now Java has a little feature, where if you try and print out an object, it automatically calls the objects toString() function.

So what you have to do if you really want to do this, is convert it to a string, for example using ";" characters to seperate each string in the array. Then you have to read the string back in and create the objects from it again, for example using a StringTokenizer.

Other things you can consider are like said above, putting the objects on the Session object.

Perhaps just putting an 'id' in a hidden field, which refers to an item in a structure which is held at the application level.
19 years ago
JSP
Set a variable on the session that contains the URL the person requested before you give them the permission denied / login screen. Then once they are logged in, if this variable is set, simply forward them on to it.

For the first part use request.getRequestURI()
19 years ago
JSP
Quite a lot of errors there.

First I Would say Nper should be a bean withing it's own .java file.

Second you have a property that is trying to be another instance of the same class. I don't know what you are trying to do there.

Third you method getPeriod() is returning an instance of the same class.

(I think points 2 & 3 just mean you need to lookup how to use constructors)

Finaly you are trying to create an object outside of the %> tags, which means you are just printing out HTML. What you probably want to do is create a new Nper class, and then call some function on it to print out the value from it as HTML

19 years ago
JSP
Inside your doGet method:



You really do need to buy a book on JSP and Servlets
19 years ago
Give how similar those two pieces of code are, you can just use the Search / Replace function in your IDE. Most IDE's should support this, I know that Eclipse does.
19 years ago
My guess would be that your JDBC driver doesn't support the operation you are trying to carry out.
19 years ago
JSP
Next time please use the UBB Code buttons you see next to the post box. There is one specifically for Code, so it stops stuff like that smiley appearing.

I'm not totally familiar with everything your using but I hate a few questions:

1. Where is your <form> HTML element?
2. Where are you setting the SEARCHBY element? You need to set it somewhere for it to appear as a parameter to the next page.
[ June 26, 2005: Message edited by: Tim Baker ]
19 years ago
JSP
Given what I said you really should be able to work that out.

Seems as I don't know where you want to call the valid function from, i've just put it in another function, you can put it whereever your call is. Perhaps in the onload() event of the body.
19 years ago
JSP


Although I wouled rename your variable to something more readable and use standard naming conventions, ie personName.

The thing to remember is that Javascript is just like HTML. So anything in your JSP you output can be put inside a javascript function. The javascript will be created and sent to the users browser.
[ June 25, 2005: Message edited by: Tim Baker ]
19 years ago
JSP
The link that didn't work is now:

https://coderanch.com/t/347562/Servlets/java/Tomcat-Instructions-explained

Didn't take a genious to transform the old style into the new one

Hope this helps
19 years ago