Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!

lakshmi ananthamurthy

Greenhorn
+ Follow
since Apr 26, 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 lakshmi ananthamurthy

The requirement of the client is that he does not mind if the pop ups keep coming whether or not you wish to save the file or open it, but the user should not have to keep browsing and chosing the file to download.
20 years ago
What you could possibly do is call a single servlet which has include statements to call different servlets. This will probably mimic the call to multiple servlets.
However, I doubt there is a way (even using javascript) that you can call multiple servlets with a single click. Even if you use javascript, once a servlet is called, it loses control over the client and the control passes to the server.
You could probably use client pull type code if you want to call multiple servlets after intervals, but frankly, how it is implemented is something I have not tried as yet.
20 years ago
Well, thats the funny thing, it would not work even when the value was reflected in the source, but when I put the same thing inside out.println statements, the link got called and the servlet worked just fine.
lakshmi

20 years ago
Hi,
I had this problem in our project.
I needed to access a value in the <SCRIPT> tag in a jsp which I was obtaining from the request object.
Now, I needed to put a string dynamically in the page only if javascript was enabled and add that value to a href tag, calling a servlet and passing this value as a get variable.
But when I tried to access the variable using the jsp expression
<%= var name%>, the view source of the file showed the value, but on clicking the link, the servlet got called and did not function the way it should.
TO be precise the following code did not work fine:
<% String varname = (String)request.getParameter("somevar");%>
<BODY>
<SCRIPT>
document.write("<A HREF = \"Servletname?Variable=<%= varname%>\"></A>");
</SCRIPT>
</BODY>
But when I put all the above in out.println statements, it worked perfectly fine.
Any ideas how to make the above work without putting it into the out.println tags?
20 years ago
I need to know if there is any way that we can do a multiple file download using servlets, NOT using Client pull (cause we cannot use Javascript), and save the files as separate files and not as a single file, and all this in one single connection..
the user should not have to keep chosing the file which he wishes to download.
I tried setting the mime type and working that out, but it seems to be giving problems.
20 years ago