Re: SQL statement.

2002-02-21 Thread Joe Cheng
Try this: SELECT RequestID FROM TRequest WHERE OrderNum = (SELECT MAX(OrderNum) FROM TRequest); === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body:

Re: FileWriter question

2002-02-12 Thread Joe Cheng
perhaps string.trim() will serve this purpose? -Original Message- From: sufi malak [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 12:25 PM To: [EMAIL PROTECTED] Subject: Re: FileWriter question no, it does not work. another question please how to get rid of an \n from a

Re: Javascript Clock

2002-02-08 Thread Joe Cheng
That was seriously off topic, but really cool nonetheless... Kind of irritating to cut and paste that HTML though. I've posted it here instead: http://www.joecheng.com/clock.html -Original Message- From: A mailing list about Java Server Pages specification and reference [mailto:[EMAIL

Re: Sort of OT: Getting data from database to JavaBeans

2002-02-08 Thread Joe Cheng
Each Action class should correspond to one request type, so if you support retrieving data with one request and update with another, you should have two Access classes. If you have one request type that combines multiple database operations, say update information and then retrieves the updated

Re: Sort of OT: Getting data from database to JavaBeans

2002-02-07 Thread Joe Cheng
The run-time performance of this class is fine, but with multiple developers everyone want to access this file at the same time. :( If this is the only reason you're abandoning the one-class approach, perhaps you should consider a source control system that will let multiple developers easily

Re: TEI classes

2002-02-06 Thread Joe Cheng
The getVariableInfo method is not called each time the JSP page is executed; it only gets called when the JSP is being translated to a .java file and then compiled. (I think that's called translation time) In other words, only the first time after you've made a modification to the page.

Re: Catching a 500 error

2002-02-06 Thread Joe Cheng
I doubt it, just like you can't really catch a 404, right? Look in your server's documentation, there should be somewhere you can at least assign a static HTML page to a 500 error. And information about the 500 should be written to server logs somewhere.

Re: Invalid Date error when using Jakarta datetime taglib

2002-02-06 Thread Joe Cheng
How about %= vBirthDate.getTime() % === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets

Re: How to convert hostname to IP address ?

2002-02-06 Thread Joe Cheng
ia.getHostAddress() how did you find getHostName but not getHostAddress?? they're right next to each other in the javadocs. === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto

Re: increment IP address ??

2002-02-05 Thread Joe Cheng
That's good to know. But, 155.108.0.1 *is* a valid IP address, right? Is 155.108.255.1? -Original Message- From: Clayton Nash [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 05, 2002 6:09 AM To: [EMAIL PROTECTED] Subject: Re: increment IP address ?? Note that 155.108.0.0 is not a

Re: java.lang.OutOfMemory: request vs. session scope memory use

2002-02-04 Thread Joe Cheng
That's an incredible amount of memory to be using up!! Are you sure it's not buggy application-level code or perhaps a poorly implemented third-party library? (Didn't the ODBC-JDBC bridge used to have a memory leak?) What kind of data are you storing in the session/request? How much traffic

Re: increment IP address ??

2002-02-04 Thread Joe Cheng
This will print out all IP addresses in 155.108.x.x. public static void main(String[] args) { final int start = 0; final int end = 255; for (int i = start; i = end; i++) { for (int j = start; j = end; j++) { System.out.println(155.108. + i + . + j); } } }

Re: compiling JSPs with Ant

2002-02-01 Thread Joe Cheng
Depends very much on what servlet container you're using... I believe there's an optional task included with the distribution that does the job for WebLogic (oops, 4.5.1 only). I don't know why nobody seems to have written one for Tomcat, as it supports command line jsp compiling...?

Re: compiling JSPs with Ant

2002-02-01 Thread Joe Cheng
I spoke too soon. Apparently there is an Ant jspc task, it exists in the CVS repository but I guess it hasn't been released yet...? Here's the manual page on it: http://cvs.apache.org/viewcvs/~checkout~/jakarta-ant/docs/manual/OptionalTas ks/jspc.html?rev=1.5 Here's the page for the actual

Re: compiling JSPs with Ant

2002-02-01 Thread Joe Cheng
Hmmm. I'd be surprised if Jasper (what JspC) doesn't support proper handling of taglibs... cause if I'm not mistaken it's the same JSP compiler that tomcat uses for on the fly compilation. Maybe it was a configuration issue...? Well, Phil, let us all know how it turns out.

Re: getting parameters from a multipart/form-data

2002-02-01 Thread Joe Cheng
The library com.oreilly.servlet has classes for handling multipart requests. http://www.servlets.com/cos/index.html === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL

Re: looking for a little help!!!

2002-01-30 Thread Joe Cheng
I found this list: http://tcl.activestate.com:8002/resource/software/tools/www/?sortby=date Maybe WinCGI is what you're looking for? I can't imagine it'll be very fast/efficient since it's a regular CGI implementation, but if you need better TCL support you might have to move to AOLserver or

[no subject]

2002-01-29 Thread Joe Cheng
I have placed all my Beans in a package called mybeans in the web-inf\classes directory. only unpacked classfiles go into /WEB-INF/classes directory. jar files go into the /WEB-INF/lib directory. Tomcat should then automatically pick them up.

Re: Book

2002-01-29 Thread Joe Cheng
Yeah, Hans is great. I'd also recommend Core Servlets and JavaServer Pages, by Marty Hall. -Original Message- From: Steve Bang [mailto:[EMAIL PROTECTED]] Sent: Monday, January 28, 2002 6:33 PM To: [EMAIL PROTECTED] Subject: Re: Book Buy either: JavaServer Pages ~ -

Re: Bar graph in JSP

2002-01-24 Thread Joe Cheng
Agreed... the 1-pixel GIF in table approach is pretty foolproof. If you need more than bar charts, check out this lib... not bad, and it's open-source. http://www.jrefinery.com/jfreechart/ -Original Message- My own use has included tiny, 1-pixel gifs in a TD width= Plenty

Re: serverside caching of a jsp

2002-01-24 Thread Joe Cheng
Yes, there are two ways I know of. The best way is to write a tag that does this for you. In other words: a:cache id=thispage.jsp_js1 timetolive=200 %-- any arbitrary JSP/HTML/JavaScript here --% /a:cache Capturing the output is quite easy to do if you're familiar with writing tags. Just

Re: JSP Beans

2002-01-18 Thread Joe Cheng
Tim, Do you know if this is true just for Tomcat (or even specific versions of Tomcat) or is it true for all servlet containers? -jmc === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For

Re: Importing classes

2002-01-18 Thread Joe Cheng
IMHO, it's a bad practice to rely on your system's CLASSPATH. Instead, if your classes and/or jar are specific to one web application, put it in /WEB-INF/classes and/or /WEB-INF/lib. If you have a jar that needs to be used across all web applications, use tomcat/lib. For compiling your

Re: Downloading files with jsp/servlets...

2002-01-15 Thread Joe Cheng
Zvika, The default behavior for servlets is to have a *single* servlet instance serve all incoming requests for that servlet, simultaneously. In other words, it's not that each incoming request instantiates your servlet; on the contrary, the servlet only gets instantiated once in the lifetime

Re: Downloading files with jsp/servlets...

2002-01-15 Thread Joe Cheng
I'm afraid we're having somewhat of deaf people's conversation here. Read Brian's original post and his response and see what I mean. Zvika, I thought you were replying to my message, not Brian's response... my apologies. FWIW, I haven't looked into it but it sounds like JDK 1.4's java.nio.*

Re: A java question.

2002-01-14 Thread Joe Cheng
Say what?!? I've written tons of Java applications that have more than one public class. I think he meant if you have more than one class in your FILE then only one of them can be public. === To unsubscribe: mailto

Re: A java question.

2002-01-14 Thread Joe Cheng
I didn't realize i will be initiated as 0 if it is not be specified, so you guys mean i=0 is system default? Apparently so. I wouldn't have believed it but it just worked, under JDK 1.3.1 on Windows 2000. The following code outputs 0. public class NotInit { static int i;

Re: Downloading files with jsp/servlets...

2002-01-14 Thread Joe Cheng
Can you post the servlet code? What servlet container are you using (WebLogic, Tomcat...?) The servlet should absolutely be able to handle two simultaneous requests, unless your service method is synchronized. === To

Re: session variables implementation

2002-01-14 Thread Joe Cheng
Depends on the servlet container implementation. I think usually (i.e. Tomcat) it's just stored in memory. With WebLogic it does at least sometimes persist to disk. How much stuff could you possibly be storing in memory? If you've got a reasonable server hardware configuration and you're

Re: A java question.

2002-01-14 Thread Joe Cheng
if (check == false) { i = 2; i = i + 2; } else i = i + 4; -Original Message- From: Miao, Franco CAWS:EX [mailto:[EMAIL PROTECTED]] Sent: Monday, January 14, 2002 5:35 PM To: [EMAIL PROTECTED] Subject: A java question. class test { static boolean check;

Re: Difference between html meta tag and jsp page directive

2002-01-11 Thread Joe Cheng
It's probably safer to do the page directive rather than meta tag. If you look at the generated .java file, you'll see that the content type header gets set before your JSP code even starts executing. In my installation of Tomcat 3.2.4 it's this line:

Re: Difference between html meta tag and jsp page directive

2002-01-11 Thread Joe Cheng
Title: RE: Difference between html meta tag and jsp page directive Hmm, good question. Seems worth a shot. Be sure to try it with different browsers, and if you run into problems try making the bean call happen before any data gets pushed to the browser--including whitespace. Also, you may

Re: Retrieving Multiple values of single Parameter

2002-01-09 Thread Joe Cheng
Don't forget to check for the case where getParameterValues(param) returns null. That's what happens when all the checkboxes are left blank... === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.

Re: 127.0.0.1

2002-01-08 Thread Joe Cheng
Believe it or not, it's a bug in Tomcat 3.3. Works fine in 3.2.4 and 4.x though. The bug has been fixed (twice) in 3.3 but the current release does not include that fix. Our company has experienced exactly this problem and it has forced us to go back to 3.2.4. -jmc

Re: Looking for a suggestion

2002-01-08 Thread Joe Cheng
How about using request.getParameterNames(). Another possibility is a hidden field with the form names. Those are two good suggestions. The second one is particularly well-suited for your example, since it will allow you to detect if any of the radio buttons were left blank.

Re: Sessions and URL-Rewriting?

2002-01-07 Thread Joe Cheng
Tim's right, you should ALWAYS use encodeURL from the beginning of your project--it doesn't take much effort and it will save you heartache in the future. And it's part of the Servlet spec, who knows if they will use it for something else in the future. Or even better, create your own method

Re: JumpStart For Jsp

2002-01-07 Thread Joe Cheng
I would like to know from where do i start for jsp and j2ee i hve the j2ee tutorial by sun only is that enough. learn Java first. then try Core Servlets and JavaServer Pages by Sun (www.corejsp.com). === To unsubscribe:

Re: Sessions and URL-Rewriting?

2002-01-05 Thread Joe Cheng
URL rewriting is part of the spec. You need to use response.encodeURL() around every one of the links you put on your site. For example, instead of: a href=page2.jspnext page/a you need to do: a href=%= response.encodeURL(page2.jsp) %next page/a If you do this, then the servlet container

Re: taking NT Authentication for JSP App.

2002-01-05 Thread Joe Cheng
Merrill's right, this technique absolutely won't work because the most it could do is get the username at the server, not the client. Maybe if you're using IIS as your webserver, you could set the directory security to enforce NT authentication, then see if the request has any security-related

Re: A JSP Question - model 1 architecture

2001-12-12 Thread Joe Cheng
It depends on how you are navigating from elmpleelist.jsp to EmployeeListView.jsp. If you are using response.sendRedirect then you must store it in the session. If you are using request.getRequestDispatcher().forward() or jsp:forward then you should store it in the request

Re: Substituting values in JSP code

2001-12-12 Thread Joe Cheng
I've never worked with jsp:param but I'm guessing the name attribute does not accept runtime values--taglib attributes can be specified as runtime or not. Another way to do it is to build a querystring with your new params and forward that way.

Re: Urgent !!!!!!!! Please help me

2001-12-12 Thread Joe Cheng
Ravindra, Since you're using the %! directive, you're just declaring methods, not actually calling them. You need to actually call them. You should also be aware that what you're doing is incredibly dangerous. If two requests hit this page at the same time your output will be corrupt. The

Re: TimeZone in jsp

2001-12-12 Thread Joe Cheng
I've never actually done this but I believe what you can do is create a DateFormat object and call its setTimeZone(TimeZone t) method, then parse a Date object with it. -Original Message- From: Boddula, Sridhar [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 12, 2001 10:46 AM To:

Re: newbie wanting to pass data from servlet to jsp

2001-12-11 Thread Joe Cheng
To me, the main advantage (or difference) to use a jsp bean (jsp:usebean ... over a class bean, i.e. a normal java class, is that you can clearly specify the life cycle of your bean objects using the scope attribute. How is this any different than simply placing the object/bean into the

Re: Problem deleting a file using JSP

2001-12-11 Thread Joe Cheng
Make sure you do not have any input/output streams open on the file. If you do, you won't be able to delete or rename the file. Can you post your Java code here? === To unsubscribe: mailto [EMAIL PROTECTED] with body:

Re: Automatic login

2001-12-11 Thread Joe Cheng
I don't think IP is necessarily the best way to do it, as IP addresses within an intranet can change if you use DHCP (as most LANs do). I've never tried it on a Java platform but I do believe using Internet Explorer and IIS there is some way to do NTLM authentication, i.e. Internet Explorer

Re: Session not working in Netscape 6.0

2001-12-11 Thread Joe Cheng
Do you have cookies enabled in Netscape 6? === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on

Re: Taglib and normal class in jsp/servlet

2001-12-11 Thread Joe Cheng
I prefer the second method. Taglibs tie your business logic too closely with JSP. Might I suggest a third possibility, to have normal Java classes for your business logic and then taglibs to call those classes from JSP.

Re: A JSP doubt

2001-12-10 Thread Joe Cheng
What is the diference between putting the resultset into a list and using the list as a session attribute, vs using a bean to hold the resultset values? They seem about the same to me (an ultra-newbie), except that a bean can have narrower scope. COuld somebody put qa piece of code showing the

Re: newbie wanting to pass data from servlet to jsp

2001-12-10 Thread Joe Cheng
You can store the objects you want to pass in the request scope. public void request.setAttribute(String attrname, Object value) public Object request.getAttribute(String attrname) Your servlet code would look like: request.setAttribute(myData, rs);

Re: newbie wanting to pass data from servlet to jsp

2001-12-10 Thread Joe Cheng
You do not have to do any declarations (of the %! % type) to do what you want to do. You would probably have to import the Employee class, is all. If Employee lived in a package com.mycom, just do %@ page import=com.mycom.Employee % I personally never use the JavaBean framework, e.g.

Re: JSP in Javascript...

2001-12-04 Thread Joe Cheng
yeah, should work fine. === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found

Re: Hello !!!

2001-12-04 Thread Joe Cheng
If I'm not wrong, you can't forward after being sent code to the client. So if you send some html code for the page, you can't use forward. You can do a server-side forward... you just can't do a response.sendRedirect().

Re: Help! Problem in logic to pass values between pages and then sort.

2001-12-03 Thread Joe Cheng
Keep in mind that if a checkbox is not checked, then NO value at all will be passed by that element. For example: input type=checkbox name=foo value=true If the checkbox is checked, then request.getParameter(foo) will be true. However, if it is not checked then request.getParameter(foo) will

Re: doubt regarding include files

2001-12-03 Thread Joe Cheng
As modern Java web apps go, 300+ strings being instantiated is no big deal. Resource bundles may or may not be a better approach, but if they are the right choice it's not because it will be less resource consuming, it will be because you get more flexibility/maintainability.

Re: Using a JSP value in javascript

2001-12-03 Thread Joe Cheng
I don't know if you mean to say javascript in your subject line. But if you are looking to use request parameters in your JavaScript (which is client-side) then you can either do what Tim suggested or use JavaScript to retrieve the parameters directly. You'll need this JS file:

Re: Session lost in IIS / Tomcat configuration.

2001-12-03 Thread Joe Cheng
I don't know the answer to your question. But, why would an encoded URL use a ; in place of ?? That would be a good candidate for breaking your IIS-Tomcat mapping. === To unsubscribe: mailto [EMAIL PROTECTED] with body:

Re: jsp-mysql auto_increment

2001-11-28 Thread Joe Cheng
Without using the LAST_INSERT_ID() (which is proprietary, and I don't know if there is a way to get to it through JDBC...??), there are a couple of ugly ways to do it that I know of. One way is to do the SELECT MAX, but also include a WHERE clause that includes all of the info you've just

Re: Get help on rounding.

2001-11-27 Thread Joe Cheng
The standard method if you are going to code it yourself is to multiply by 100, add 0.5, truncate the decimal portion, then divide by 100. That's for the nearest cent... I think what our friend actually wants is something like: double newValue = Math.floor(origValue * 20.0) / 20.0; Note that

Re: Documentation in JSP

2001-11-26 Thread Joe Cheng
Is there any utility to do documentation for JSP pages as we have JavaDoc Uitlity for Java. I'm pretty sure there isn't. Probably because if you use JSP the way Sun intends you to (i.e. no business logic), there should not be any need for JSP docs.

Re: Documentation in JSP

2001-11-26 Thread Joe Cheng
Title: RE: Documentation in JSP http://java.sun.com/blueprints/guidelines/designing_enterprise_applications/web_tier/index.html Look particularly at "Servlets and JSP", "JSP Page Design", and "Application Designs". But basically, ideally there should be no scriptlets (% % sections) in your

Re: Binary print....

2001-11-26 Thread Joe Cheng
How did you end up with an image file in a String? You'd probably rather have it in a byte array, ByteArrayInputStream, or FileInputStream. In any case, you want to use response.getOutputStream() in a servlet (not JSP) to push it to the web browser. Call ServletOutputStream.print(int) over and

Re: Slightly Offtopic: JVM slows a webserver down???

2001-11-26 Thread Joe Cheng
That's ridiculous. The comparison between Netscape 4.x and 6.x is not at all relevant, since that's talking about client-side applications. Sure, Java for client side applications has its share of problems, including performance and memory consumption. But Java on the server side is a far

Re: Java Swing and XP data

2001-11-20 Thread Joe Cheng
if you need code completion in an nice editor try Jext www.jext.org Ryan- Wow, Jext is cool... thanks for pointing it out. Probably the cleanest interface of any Java-based IDE I've used, and though it takes a little while to load it's reasonably snappy once it's running. I can't for the

Re: taglibs

2001-11-20 Thread Joe Cheng
i know that jsp:include works with jsp1.0 but does not with jsp1.1. Is that statement true? I don't think so... If it is true, you can always use this to do a runtime include: % request.getRequestDispatcher(/newpage.jsp).include(request, response); % where obviously /newpage.jsp should be

Re: Java Swing and XP data

2001-11-20 Thread Joe Cheng
so you mean after specify the class path in Vj++, then Vj++ will be able to run any Sun Java based native code? No... VJ++ uses jview(? I can't remember) and jvc instead of java and javac, which can potentially cause problems. I certainly don't recommend compiling, running, or interactively

Re: Tree Menu Implementation

2001-11-20 Thread Joe Cheng
if you can afford to do it in a Java applet, a quick search on Google resulted in this. i'm sure there are tons of others out there. http://javaboutique.internet.com/AJTree/ === To unsubscribe: mailto [EMAIL PROTECTED]

Re: %@ include file = %directory+pagename% %

2001-11-20 Thread Joe Cheng
I don't know for sure. But can you try out.flush() right before you perform the include? Perhaps that will help. -jmc === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL

Re: The Current URL

2001-11-20 Thread Joe Cheng
Use request.getRequestURI() I believe that actually will leave off the querystring? Craig, don't know if you intended that to be part of it or not. If you want the full querystring you can use this method: javax.servlet.http.HttpUtils.getRequestURL(HttpServletRequest req) whoops, I just

Re: web.xml application variables

2001-11-19 Thread Joe Cheng
If you're using the servlet method, and specify load-on-startup, you want to put the startup code in Servlet.init(), right? (as opposed to the Servlet.service() method.) I've never actually needed to use that parameter but it seems like a good thing to know...

Re: Java Swing and XP data

2001-11-19 Thread Joe Cheng
Macromedia stopped supporting Kawa some time before. Guys Dont stick with IDEs .Use simple editors like editplus,TextPad or the best VI or GVIM. I personally think code completion alone is reason enough to use an IDE. Visual SlickEdit (www.slickedit.com) is pretty good from what I hear. I

Re: Java Swing and XP data

2001-11-19 Thread Joe Cheng
hi, just wondering, import the latest JDK 1.3 rt.jar to which folder if I am goint to use Vj++6.0? and how to do the import job, copy the rt.jar file or do import job inside Vj++6.0? If c:\jdk1.3 is your java install dir, you want this jar file: C:\jdk1.3\jre\lib\rt.jar Don't copy it

Re: Login Authentication against database...

2001-11-18 Thread Joe Cheng
Aaargh. Why won't this thread die!! :) All you need to know is... use PreparedStatement (or properly escape your string values) and there is NO WAY the user can slip in SQL commands. NO WAY at all. If you don't believe me, just try it yourself. (unless there is a bug in the particular JDBC

Re: JSP/SERVLET DESIGN QUESTION

2001-11-15 Thread Joe Cheng
Actually, what you might want to do is have all your servlets extend one class, and have the include code there. For example: public abstract class MyBaseServlet extends HttpServlet { public abstract void MyService(HttpServReq request, HttpServResp response) {}; public void

Re: Please help me(ScrollableResultSet)

2001-11-15 Thread Joe Cheng
Can you post the line or section of code that is throwing the exception? === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.

Re: how to embed Javascript in Jsp?

2001-11-15 Thread Joe Cheng
but then I can not hide the Javascript file, I saw a website has floating object, I knew it is running Javascript, but can see it in Soure menul in brower, but frame somthing, just wondering how this web guy hide the javascript. I guess this guy program javascript run at server side.

Re: Error page in jsp

2001-11-15 Thread Joe Cheng
this technique worked fine for me on weblogic 5. I can't show you any examples though. === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set

Re: How to prevent data from being submited twice in a JSP page?

2001-11-15 Thread Joe Cheng
It's kind of a pain but the best way I know is to do it this way. In the form itself, have a hidden variable... we'll call it uniqueid. This needs to be dynamically generated every time the form is called from the server, and the value must be a unique ID... I'm lazy so I use

Re: Login Authentication against database...

2001-11-15 Thread Joe Cheng
Celeste, what's a more secure means? now you've got me curious. and Bob wasn't pointing out a loophole, just calling attention to the non-escaped values in the SQL statement below. -jmc === To unsubscribe: mailto [EMAIL

Re: Login Authentication against database...

2001-11-15 Thread Joe Cheng
I'm with Hans on this one. Any examples of a JDBC driver where PreparedStatement doesn't behave like that? I also agree with Hans. If you use PreparedStatement and setString(), or do the escaping yourself, there is NO loophole... at least not with any reasonably well-written JDBC driver. To

Re: Login Authentication against database...

2001-11-14 Thread Joe Cheng
Title: Message Praveen- It looks like your query is retrieving the whole set of users and then iterating in Java to see if any of them match the username/password the user entered. Why would you do that, rather than simply: SELECT * FROM users WHERE username = 'username entered by user' AND

Re: Login Authentication against database...

2001-11-14 Thread Joe Cheng
Praveen- Wait a minute, are you actually getting an exception thrown, or is that String comparison line just not getting executed? Your original e-mail implied the latter, but your second e-mail implies the former. If there is an exception being thrown, please let us know exactly what it is.

Re: Please help! Recursive loop in JSP

2001-11-13 Thread Joe Cheng
If you are selecting data from a database and that database happens to be Oracle look at the connect by clause. It does everything you are looking for. that's really interesting, I've never heard of connect by. can you or Ross provide more detail, i.e. what does the resulting recordset look

Re: Anyone ever tried running a web app (JSP) using Citrix 6.0?

2001-11-13 Thread Joe Cheng
My boss, who doesn't really know or understand anything about web applications, has decided to save some money on a JSP/Java web application that we have developed as an intranet site, by setting up the site to run as an internet site, but using Citrix to make it available to people outside the

Re: Please help! Recursive loop in JSP

2001-11-12 Thread Joe Cheng
I had to do this once... fun problem. First of all, forget about doing it in JSP... you should use Java classes for this. Two ways to do it, IMO. If you have a large and flat dataset, i.e. many records in the table but no trees that go more than a few generations deep, you can have a method in

Re: Enterprise JavaBean vs. JavaBean

2001-11-12 Thread Joe Cheng
I am probably asking way to much, but is there a magic program that will convert a Cold Fusion web site to JSP? you're asking way too much. :) although, there are rumors that CF 6 will be based on Java technology and that CFML will be implemented using taglib.

Re: Server crashes...

2001-11-08 Thread Joe Cheng
What database are you using? Is it possible that it's the database that is causing the problem? Also, what are you doing with the data--are you trying to store all 1 million records worth of data in some bean? It will almost certainly be better to retrieve/use each record one at a time, rather

Re: single quote problem

2001-11-02 Thread Joe Cheng
Doesn't too few parameters usually mean you've spelled one of the table/field names incorrectly? Are you sure it's the single quotes that's the problem... try removing the WHERE clause entirely. There's no reason your code shouldn't work, unless the variable search itself contains single

Re: single quote problem

2001-11-02 Thread Joe Cheng
Title: RE: single quote problem I thought "too few parameters" meant you are not passing enough variables... You'd think so, wouldn't you? I just tried querying my own Access db, "SELECT foo, bar, useridFROM users;". The table "users" and field "userid" exist but foo, bar don't. The error I

Re: javax.servlet.http.* not found

2001-11-02 Thread Joe Cheng
I wonder if the spaces in the classpath pose a problem... try using the shortnames for Program Files and Adaptive Server Anywhere 6.0... because servlet.jar is where those classes should live. === To unsubscribe: mailto

Re: http post to two differnet pages...is it possible.

2001-11-02 Thread Joe Cheng
just change the submit button's call to doublePost to customize it. use this.name (no quotes because its a variable) to post to the current window or frame. When you put '_blank' it will open a new window. I don't know if it's really necessary, but you also may want to have the doublePost

Re: generation of textbox thro' java script

2001-11-02 Thread Joe Cheng
If you can get away with targeting IE only, you can append the HTML to the .innerHtml property (a property of many objects including div and span). === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff

Re: help me

2001-11-01 Thread Joe Cheng
my requirement is to display the data on the front end without any time interval when ever the data changes in the table that perticular field of the record only must change on the front end without refreshing the entire page. (please don't recomend meta tags) I haven't heard of any really

Re: Embedding two MySQL cnnection statements

2001-11-01 Thread Joe Cheng
Chris is right, according to your example. And note that your second query actually executes once for *each row* that gets returned in the first query--so if your first query has more than a few rows, you're incurring a huge amount of overhead. So, first of all, try to use a join or subquery to

Re: help me

2001-11-01 Thread Joe Cheng
How about using a trigger on the database that instantly knows when the data has changed, like that no unnecessary refreshes have to be done on the client side when the data hasn't been changed? Can you elaborate? So the database tells some server-side Java code that the data has been

Re: Problem With Weblogic

2001-10-31 Thread Joe Cheng
Could any one of a million things. Does the JSP app not display this behavior on other app servers? Last time I saw this happen, the developer forgot to write code to close JDBC connections each time he opened them. So after a while, the database connection pool was getting used up and

Jikes with tomcat?

2001-10-31 Thread Joe Cheng
Anybody know how to make Tomcat (3.x or 4) use Jikes for compiling JSP's? Also, is there an easy way to precompile JSP's using Tomcat? thanks- jmc === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff

Re: Need Some Help with xml and jsp!

2001-10-29 Thread Joe Cheng
From what I remember, use JAXP to parse the XML document and return an org.w3c.dom.Document object, which has a getElementsByTagName(String) method. That will return a NodeList which is basically an array of nodes. Not familiar with JAXP? http://www.apache.org/~edwingo/jaxp-faq.html Javadoc:

Re: JSP editor

2001-10-29 Thread Joe Cheng
Is there a good JSP editor available anywhere to download? Such as MS Visual Studio for ASP... I've heard good things from a coworker about IntelliJ IDEA but haven't had a chance to try it myself. And there's an article on Orion's site about it that explains some of its features:

Re: Beginners tutorial

2001-10-29 Thread Joe Cheng
Does anyone know about a tutorial for a beginner of JSP, but has several years of experience of ASP and VBScript dev. Hi Henke- This is probably not what you want to hear, but I've always felt the best way to learn JSP is to learn Java first and try to forget what you know from your ASP days.

  1   2   >