Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link

Danny Mui

Ranch Hand
+ Follow
since Dec 14, 2000
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 Danny Mui

I'd like to totally advocate stylesheets. With JAvaScript and Server-generated pages, you can make a page look SWEET in any browser on any platform.
If you're using a server page/servlet technology, you can stuff a token in the session to validate with a page (i.e. page 1 expects token 234223 and gets assigned a diff one after page 2 is loaded...).
it would help if you posted up the html that you use, so we can test it .
i'm too lazy too be creative hehe.
The servlet only knows how to stream data to the client. As far as I know, I don't think there is a .PDF API to disseminate a .PDF file through Java (i.e. send a particular page..).
So one way is to create a separate .PDF for each page and send out the correct file/page (ew!).
sorry if i don't have a clue but would like to know if there is a solution for your problem. you can never have enough tricks in the bag hehe.
21 years ago
Well i don't quite understand your question, but the basic java syntax to check whether or not a variable string equals another string is to use the .equals() function.
paramname.equals("x")
21 years ago
the radio buttons with the same name will only allow you to choose one value from it. so if you label them all with the same name, only one choice will be made
so, each row has to have a diff radio button set name
<tr>
<td><input type="radio" name="row1" value="and"><...put or here here ..></td>
</tr>
<tr>
<td><input type="radio" name="row2" value="and"><...put or here here ..></td>
</tr>
....
you don't need getParameterValues() for radio buttons, only for multiple entries..
so assuming the rows are labeled in sequential order (if there is no value, i'm done)...
this should retrieve what you need
String and_or;
for (int i = 1; (and_or = request.getParameter("row"+i)) != null ;i++){
//and_or is set to whatever it is, and or or hehe
}
hope that helps a tad!
if not, i'll go hide now.

[This message has been edited by Danny Mui (edited January 23, 2001).]
[This message has been edited by Danny Mui (edited January 23, 2001).]
21 years ago
I'm not too sure of IPlanet's directory structure, but in tomcat and resin's structures for web applications, the servlets need to be in a WEB-INF/classes directory with a structure that matches the package hierarchy.
One thing i'd try,
1) do a search on your computer/server for the .class that represents your servlet.
2)Assuming the output is not cached by the browser, delete/rename the class file that is not in the Jbuilder output directory (ie any instances that are old).
3) fire up the servlet, it shouldn't work hehe.
4) copy it back to the directory. What I do when writing stuff (im not recommending this, only telling you what I do) is to compile directly to the servlet runner's web application class directly.
if that don't work...
1) restart the stupid server
2) check the servlet refresh settings..

if that don't work...
have a beer.
hehe
21 years ago
It's an IE extension. Use the view-source feature to see how hotmail.com uses it (window.RichEdit) or something or another javascript object.
If you are not adverse to using JavaScript, I believe you can just output after the form post/get:
<script language="JavaScript">
parent.location.href = "http://newurl";
</script>
or put a variant of that script in the onClick method of a Link or button.
for example, if you need the form submitted :
<a href="#" onClick="document.form.submit();parent.location.href='http://newurl'">
I'm not entirely sure if the syntax is correct, but this is the general idea.
[This message has been edited by Danny Mui (edited January 16, 2001).]
Maha,
For a free FTP server (that's pretty easy to configure) try WAR ftp (find it on http://www.tucows.com).
For a webserver/jsp/servlet runner try using http://www.caucho.com/resin since your load will be relatively small, you won't have to learn/deal with apache (tomcat has a default webserver too if you're more comfortable there).
[This message has been edited by Danny Mui (edited January 16, 2001).]
21 years ago
You can also use the getParameterValues() function call in the javax.servlet.http.HttpServletRequest (inherited from javax.servlet.ServletRequest).
Using this call will return an array of Strings which is nice and clean .
21 years ago
If you want to display the value of any jsp variable (assuming a proper toString() conversion) just type <%= variable %> inline to the javaScript code.
ie.
var javascriptVar = '<%= jspVariable %>';
21 years ago
I think it is highly likely that the operating system would not allow you to prevent a user doing what they want (like loading additional programs).
I don't know how the applet/browser jvm works, but if the jvm is the same for all instances of the browser you can have the applet display some message (detected via a static variable) saying you don't want to have multiple applets open. Lots of other fun stuff can be done too (IIOP/RMI etc).
21 years ago
If you want to treat gets and posts the same, override the doService() method so that a post and get will result in the same output. On the other hand, if you need to be specific (ie ignore post methods) then override the doGet() and doPost() methods as needed.
of course all IMHO.
21 years ago
Resin is my favorite too, but the URL is http://www.caucho.com
21 years ago