Forum: JSP Oct 13th, 2009 |
| Replies: 3 Views: 552 String pic = rs.getString("pincode");
not
String pic = rs.getString(pincode);
Also, use a preparedStatement, cobbling a statement together using String concatenation like you've done is just... |
Forum: JSP Jul 27th, 2009 |
| Replies: 4 Views: 432 So don't redirect. Have the servlet deliver it directly! As I have already said.
If the file is a pdf, set the response objects content type to pdf, read the PDF bytes and send them directly to... |
Forum: JSP Jul 27th, 2009 |
| Replies: 4 Views: 432 Like I have said before (and I believe to you) was write a servlet that takes a filename as one of the parameters and then have that servlet check the session information before returning the... |
Forum: JSP Mar 14th, 2009 |
| Replies: 2 Views: 1,155 What are you using to compile?
If you are using an IDE, then you need to add that jar as a library in the project properties.
Edit: As that is the CLASSPATH for an IDE. The System CLASSPATH... |
Forum: JSP Mar 12th, 2009 |
| Replies: 2 Views: 383 In Java regex, there is no reason to escape "/", and, if you do need to escape something, then you also need to escape the escape as the escape character also escapes characters in String, in general... |
Forum: JSP Feb 9th, 2009 |
| Replies: 4 Views: 1,797 Set the Content-type and content-disposition headers and send the bytes through exactly as you read them.
Edit: nevermind that. Set your file/program associations in FireFox. |
Forum: JSP Nov 26th, 2008 |
| Replies: 6 Views: 1,331 |
Forum: JSP Nov 24th, 2008 |
| Replies: 6 Views: 1,331 True, do not do this from a JSP.
If you feel you absolutely must do this (regardless of whether you do it from a JSP or not, and, again, you shouldn't do this from a JSP), check out JSch from... |
Forum: JSP Nov 7th, 2008 |
| Replies: 6 Views: 1,321 Uhm, Peter, what's this
authorsLastName = GetAuthorLastName();
;-)
However, with the way it's written (if it compiles at all) authorsLastName is an instance variable anyway (as it is not... |
Forum: JSP Oct 1st, 2008 |
| Replies: 6 Views: 1,332 No, you understood it right, and that's what I thought, you wanted, from the server, to use code on the client, when the client wouldn't even have it until the server is finished, since that is when... |
Forum: JSP Oct 1st, 2008 |
| Replies: 6 Views: 1,332 Not that I think it the right way to do it (and also not that I think it will work since you will probably be expecting to be able use document objects which are not going to be there) but
... |
Forum: JSP Sep 1st, 2008 |
| Replies: 21 Views: 19,393 Well, judging by the post before this one, yep. |
Forum: JSP Jul 25th, 2008 |
| Replies: 5 Views: 1,121 Also, that tutorial is bad in more ways than one (and not only because it's causing an exception). |
Forum: JSP Jul 25th, 2008 |
| Replies: 9 Views: 1,013 Yeah, I've pretty much scaled back on saying this (nobody listens, they all want the "easy way out", then cry when they need to fix or modify it), but, sometimes, I'll climb back onto that horse for... |
Forum: JSP Jul 25th, 2008 |
| Replies: 9 Views: 1,013 Did you mean maybe rs1.getString("Total"), seeing as how that statement seems to be in the rs1.next() while loop.
Also, you definately should not be doing this stuff as scriptlets in a JSP. This... |
Forum: JSP Jul 3rd, 2008 |
| Replies: 3 Views: 768 Other than the fact that you shouldn't be doing this in a JSP, I don't know, since you haven't bothered to tell us what is going wrong with it, and I am not even going to attempt to guess.
What... |
Forum: JSP May 5th, 2008 |
| Replies: 3 Views: 1,226 That is a legacy Driver. It is only around for backwords compatability. Use com.jdbc.mysql.Driver instead.
P.S. No need to change your jarfile (depending on the version of course), just change... |
Forum: JSP Feb 26th, 2008 |
| Replies: 6 Views: 4,966 You invalidate the session. I would have to look up how to do it in JSP myself, but if your using a servlet, or a filter to accomplish the logout, then that is going to be Java code, and there it is... |
Forum: JSP Feb 25th, 2008 |
| Replies: 6 Views: 4,966 Well, nothing is fool proof.
You need to use the no-cache and expires pragmas/headers, and use some JavaScript to wipe out the history on the browser (Google "javascript history", although this... |
Forum: JSP Feb 7th, 2008 |
| Replies: 2 Views: 2,104 What do you mean "refresh onload". That's useless. Do you mean that you don't want the browser, or any proxies in the middle, caching it. So that everytime the page is referenced it must be... |
Forum: JSP Oct 16th, 2007 |
| Replies: 5 Views: 11,274 Why are you doing System type stuff using Java? It is not designed for it. If you want a command line command to get the "application" list that appears in TaskManager, then why are you asking in a... |
Forum: JSP Sep 21st, 2007 |
| Replies: 21 Views: 19,393 What, three's the charm? Or what? Seeing as how the other two didn't get it, and the comments that went with their denials, what makes you think we'll give it to you? |
Forum: JSP Sep 19th, 2007 |
| Replies: 4 Views: 1,218 It is actually better to place it inside of WEB-INF/lib, unless you are certain that it is needed by, and will not interfere with, other applications on the same server. |
Forum: JSP Sep 3rd, 2007 |
| Replies: 2 Views: 1,198 Why did you start a new thread? Because you didn't like the answers you were getting?
Please, do not multi-post in this manner. Stick with the original thread. |
Forum: JSP Jun 6th, 2007 |
| Replies: 2 Views: 1,903 I will bet that currently, you have a JRE_HOME defined in your Tomcat configuration, but not a JAVA_HOME. Define JAVA_HOME in your Tomcat configuration and the problem should go away. |
Forum: JSP Apr 17th, 2007 |
| Replies: 4 Views: 5,061 Well, start coding. If you have a problem post again, with your code and a description of your problem, along with any error messages (complete) and we will help, but we are not going to write it... |
Forum: JSP Mar 6th, 2007 |
| Replies: 7 Views: 4,255 I assume, since you're using a textarea, that you are sending the mail in HTML format, right?
So simply place the href directly after the textarea. If it is not in HTML format, then simply placce... |
Forum: JSP Mar 6th, 2007 |
| Replies: 7 Views: 4,255 Place it as a normal link directly under the textarea. |
Forum: JSP Mar 5th, 2007 |
| Replies: 7 Views: 4,255 Don't put the link in a textarea. It won't work. |
Forum: JSP Mar 4th, 2007 |
| Replies: 21 Views: 19,393 Gods, what a bunch of lazy a**holes. Do your own homework. No one here, who has even a half an ounce of either sense and/or honor, will do it for you. God forbid if we did, and then had to work... |
Forum: JSP Oct 19th, 2006 |
| Replies: 7 Views: 4,955 Because you are defining the variable inside the loop. Change the following:
for(int i = 0; rst2.next(); i++){
String ca1 = request.getParameter("ca1_"+i);
String sa1 =... |
Forum: JSP Oct 18th, 2006 |
| Replies: 7 Views: 4,955 I think you can extropolate my answer from your other thread to fit this one. It seems to be the same thing. |
Forum: JSP Oct 18th, 2006 |
| Replies: 6 Views: 4,386 If what you mean, is that you want to concatenate all values into one string and then insert that then change
for(int i = 0; rst2.next(); i++){
if(request.getParameter("ca1_"+i) !=null){
... |
Forum: JSP Oct 18th, 2006 |
| Replies: 6 Views: 4,386 String ca1 = request.getParameter("ca1_<%=i%>");
should this not be
String ca1 = request.getParameter("ca1_" + i);
Assuming the parameter names are ca1_0, ca1_1, ca1_2, etc.
At this... |
Forum: JSP Mar 7th, 2006 |
| Replies: 3 Views: 2,377 I won't claim to know why you are converting this to a GregorianCalendar, but I
will show you two things that you can try. In both these examples the line
from your post for creating "sdf" and... |