Re: Frames using Response.redirect

2001-05-23 Thread Ashish Shrestha

You could try using a JavaScript with the onLoad event of
the page to ensure that it is the top most! I believe such
scripts are readily available to enable you to have your
pages hosted in free servers with frames loaded with out the
frames.
--
a s h i s h @ j d g n p . o r g
Get Headlines 0.5.2 for free at
http://headlines.sourceforge.net/

===
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 at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: FW: Help, Image processing.

2001-05-23 Thread Ashish Shrestha

Search the Java Tech Tips at developer.java.sun.com.  One of
the tips had an article on generating thumbnails!
--
a s h i s h @ j d g n p . o r g
Get Headlines 0.5.2 for free at
http://headlines.sourceforge.net/

===
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 at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: jsp ide

2001-05-23 Thread Ashish Shrestha

why don't you try some free ides
i. forte 2 community edition (written in java, based on
netbeans' ide)
ii. jcanvas web edition (available for Win platform, Linux
coming out soon)

Ashish

---
a x h i x h @ y a h o o . c o m
Get your Headlines 0.5.2 for free at
http://headlines.sourceforge.net

===
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 at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: Problems with for loop (!)

2001-05-30 Thread Ashish Shrestha

just replace Integer.valueOf(...) with Integer.parseInt(...)

horwat wrote:
>
> If you look at the JDK API docs:
>
> http://java.sun.com/j2se/1.3/docs/api/index.html
>
> You will notice that Integer.valueOf() returns a new Integer object
> initialized to the value of the specified String. You're attempting to
> assign an Object to an int and that's why you get the error.
>
> What you probably want is Integer.intValue() which returns the value of this
> Integer as an int.
>
> Justy
>
> - Original Message -
>
> > Sometimes the simplest things cause the most problems...
> >
> > The following code is giving me problems:
> >
> > for (int t = Integer.valueOf("minModStr"); t <= 25; t++) {
> > out.println("" + t + "");
> > }
> >
> > The error it returns is:
> >
> > Error: The type of the left-hand side in this assignment, "int", is not
> > compatible with the type of the right-hand side expression,
> > "java/lang/Integer".
> >
> > I have tried to declare t as Integer, but doing that gives
> >
> > Error: The type of this expression, "Integer", is not numeric.
> >
> > Hay-ulp.
> >
> > - James
> >
> >
> ===
> > 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 at:
> >
> >  http://java.sun.com/products/jsp/faq.html
> >  http://www.esperanto.org.nz/jsp/jspfaq.html
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
> >
> >
> ===
> > 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 at:
> >
> >  http://java.sun.com/products/jsp/faq.html
> >  http://www.esperanto.org.nz/jsp/jspfaq.html
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
> >
>
> ===
> 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 at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

--
a s h i s h @ j d g n p . o r g
Get Headlines 0.5.2 for free at
http://headlines.sourceforge.net/

===
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 at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: Database connection Pool in Tomcat

2001-05-30 Thread Ashish Shrestha

You can also try PoolMan (forgot the URL).

You just use jdbc:poolman://yourdatabase instead of the real
url.
Configure poolman using the poolman.xml

code the program as you normally do without a connection
pool or cache.

when you do someConnection.close() instead of closing it
just returns it to the pool.

Ashish
a x h i x h @ y a h o o . c o m
Get your free headlines at http://headlines.sourceforge.net

--
"Chawla, Mehar" wrote:
>
> Hi all,
>
> Can anyone tell me how to implement JDBC connection pooling in Tomcat.
> Basically I want the following things :
>
> 1. Setup the connection pool in web.xml or server.xml with oracle user
> name and password set up in that file itself to avoid harcoding the username
> and password
> in the servlets or jsp files.
> 2. Create a Servlet with methods GetConnection and ReleaseConnection
> (not close connection) to return the connection back to the pool and which
> should be loaded on startup of the web server (Tomcat)
> 3. And finally the jsp code to get the connection from that servlet.
>
> I would appericiate if you could help me in setting this up by providing
> the sample code.
>
> P.S. I have Tomcat 3.2.1 and Oracle 8.1.7
>
> thanks very much.
>
> ===
> 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 at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



===
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 at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: Jikes and Tomcat for JSP compilation

2001-06-07 Thread Ashish Shrestha

Hi Chris,

I tried this and it seems to work!

Tomcat+Jikes info is out of date
Yair Zadik, Mar 20, 2001

Tomcat 3.2 doesn't read the conf/web.xml file anymore.
If you want Jikes to be your java compiler you need to add
the
lines from conf/web.xml to your webapp's web.xml file.


Adding:


  
jsp
  
  
org.apache.jasper.servlet.JspServlet
  
  
jspCompilerPlugin

org.apache.jasper.compiler.JikesJavaCompiler
  
  
-2147483646
  



  
jsp
  
  
*.jsp
  


seems to do the trick.

Hope this helps!

--
a s h i s h @ j d g n p . o r g
Get Headlines 0.5.4 for free at
http://headlines.sourceforge.net/

===
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 at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: JSP Compilation

2001-06-08 Thread Ashish Shrestha

Rice Jim wrote:
>
> Hi All,
>
> On bit of a time crunch and hope I can find a quick answer.
>
> Is there a procedure (without having to manually hit each page) or script for 
>pre-compiling my JSP's prior opening them up to the public.
>
> The purpose is to provide better response time to the first person hitting the page.
>
> Thanks,
>
>

Hi Jim,

I don't know about other servlet engines, but in Tomcat  you
can use jspc found in the tomcat/bin directory!

Ashish
--
a s h i s h @ j d g n p . o r g
Get Headlines 0.5.4 for free at
http://headlines.sourceforge.net/

===
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 at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: dynamic inlcude and page context

2001-06-17 Thread Ashish Shrestha

Bernard Granier wrote:
>
> Hi,
>
> Is it possible to do a dynamic include and to keep the page context ?
>
> I mean :
>
> If I used these lines in a test.jsp file :
>
> <% String myUrl = "test2.jsp"; %>
> 
>
> In the file test2.jsp I lost the page context of test.jsp.
> Is there a work around ?
>

Yes, put the stuff you need in the request using
request.setAttribute() in the
first page and take it out in the second page using
request.getAttribute()
--
a s h i s h @ j d g n p . o r g
Get Headlines 0.5.4 for free at
http://headlines.sourceforge.net/

===
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 at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: restoring the jsp form values.

2001-07-05 Thread Ashish Shrestha

Why do you want to be able to go back?

If it is for processing errors/ invalid values in the
submission why don't you check out the article on javaworld
on form processing in jsp?

Let me explain the basic idea

mainForm.jsp  -> mainBean (request scope)

in mainBean process the stuff and generate a map with the
field name and error value.

if okay then forward to success page.

if invalid then forward to retryMainForm.jsp

in retryMainForm.jsp decleare mainBean with request scope
and get the previous fields values and error messages.

Write to me if you need an example.
Ashish

--
a s h i s h @ j d g n p . o r g
Get Headlines 0.5.4 for free at
http://headlines.sourceforge.net/

===
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 at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: data encryption

2001-07-16 Thread Ashish Shrestha

We are using md5 for saving passwords in database.

===
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 at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



MD5 example

2001-07-18 Thread Ashish Shrestha

Dear Hardeep,

I have included an example of MD5 for you.
If you want to use the 16 byte data instead of convert it to hex string
just return the md5.digest().

Hope this helps.

Ashish
http://headlines.sourceforge.net

/**
Generate a MD5 digest and return as hex.

@param s String for which MD5 is to be generated.
@returns 32 character hex representation of the MD5
digest.
*/
public static  String md5Hex(String s)
throws NoSuchAlgorithmException{

MessageDigest md5 = MessageDigest.getInstance("MD5");
md5.update(s.getBytes());

return bytesToHexString(md5.digest());
}

public static String bytesToHexString(byte[] b){
char[] hexChars = {'0','1','2','3','4','5','6','7',
'8','9','A','B','C','D','E','F'};

StringBuffer hexString = new StringBuffer();

for (int i = 0; i < b.length; i++){
hexString.append(hexChars[(b[i] >> 4) & 0x0f]);
hexString.append(hexChars[b[i] & 0x0f]);
}

return hexString.toString();
}

===
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 at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: MD5 example

2001-07-19 Thread Ashish Shrestha

First, MD5 and SHA are in the java.security.* package!

And about decrypting MD5's -- MD5 is a one way function so you can not
decrypt it or reverse it. To compare the password. Encode the password
and compare with the prestored digest.

What is an one way function?

Well, if I take 531 then generate a digest 5 + 3 + 1, I will get 9.
However, from 9 I can not tell what were the numbers used to generate
it. Or how many numbers were there. MD5 is similar. It generates a 16
byte digest (number) for any set of bytes. The only difference is that
it is pretty unique unlike my example where 5+1+1+2 would also have
generated 9.

Hope that helps!

Ashish
http://headlines.sourceforge.net

===
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 at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: AutoRefresh

2001-07-24 Thread Ashish Shrestha

If you mean refreshing the client's page without using the refresh
meta-tag, I think a simple solution might be to use an applet.

A simple applet with a ServerSocket on particular port. When the
database is changed, the server sends a message to the applet which
tells the browser to refresh the page.

Alternatively, the applet can periodically check if the database has
been modified and then request the page.

I would prefer to have a single thread checking for database
modification and all change listening applets register with it so
multiple copies of the same query are not run on the database.

Regards,
Ashish

Check out Headlines at http://headlines.sourceforge.net/

===
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 at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: How to create JAR file?

2001-07-26 Thread Ashish Shrestha

"Pantarotto, Sio" wrote:
>
> How can I create a jar file??? Is there a product like winzip (to create zip
> files) that creates jar files???
>
JAR files are just zip files with .jar extension and some like the
MANIFEST file.
You can use the jar command to create a jar file.

jar cvfm

===
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 at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: How to create WAR file?

2001-07-26 Thread Ashish Shrestha

Hamid Mukhtar wrote:
>
> How can we create Web ARchive file? Is it same as creating JAR files but
> different extensions or what? What is difference between the two?
>
Yes they are the same. WAR files usually have the WEB-INF directory with
its associated files.

Ashish

===
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 at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: Possible to add dynamic string in an include directive?

2001-08-09 Thread Ashish Shrestha

"Duffey, Kevin" wrote:
>
This is what you want:
>
> <%
>   String contextPath = request.getContextPath();
> %>
>
> <%@ include file="<%= contextPath %>/path/header.inc" %>
>
> stuff..
>
> <%@ include file="<%= contextPath %>/path/footer.inc" %>
>


This is what you do:

<%
  String contextPath = request.getContextPath();
  String headerPath = contextPath + "/path/header.inc";
  String footerPath = contextPath + "/path/footer.inc";
%>

<%@ include file="<%= headerPath %>" %>
stuff
<%@ include file="<%= footherPath %>" %>

--
You cannot mix the <%= %>  with a String.

Hope this helps!

Regards,
Ashish

PS: I don't have any books so you don't have to read any chapters.

===
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 at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: How to imlement a scrollable Result set without JDBC 2.0

2001-08-15 Thread Ashish Shrestha

"Opoku-Boadu, Samuel" wrote:
> I am having a problem with how to implement a list of records, say, 10 rows
> at a time using a "NEXT" AND "PREVIOUS" BUTTON in my JSP page. The back end
> database is Oracle Rdb whose driver is non-JDBC 2.0 compliant.
>

Use the normal resultset. Move through it once taking out the stuff you
need and filling it in a List - ArrayList, Vector...

Then use this List to make a scrollable collection.

Ashish Shrestha

===
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 at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: DSN less connection for SQLServer/Oracle in java

2001-08-15 Thread Ashish Shrestha

SriHari wrote:
>
> Hi
> Can any one send me code for connecting to database with out a system DSN
> (DSN less connection using jdbc the server i am using is SQLServer
> Pl mention can the same be used for any database ex Oracle/SyBase  etc
>
Look up the JDBC driver for the database you are interested in.

You can use FreeTDS (or is it FreeDTS) for MSSQL if you want a free JDBC
driver. You don't need to set up DSN or anything for this.

Ashish Shrestha

===
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 at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: sql server insert

2001-08-20 Thread Ashish Shrestha

Here is something from the list archive


Use java.sql.PreparedStatement for creating and executing your queries.

PreparedStatements are simple to use ; they're like template SQL strings
with ? symbols marking all your changeable values to include in the SQL
statement.  After creating the PreparedStatement based on the template,
use
its "set...()" methods (such as "setString()", "setInt()") to replace
the ?
symbols with your values.  This avoids worrying about character
encodings,
data formats, and enclosing strings with quotes.  However, your JDBC
driver
and database must also be able to handle such characters... the Java
language can, but it depends on everything else in your system.

Just try it if you can!   You should be able to construct test strings
by
using an input method editor, or by creating strings based on Unicode
characters (based on numeric escape codes such as \u1234 if necessary)
in
JavaScript or by "pre-filling" your HTML with characters appropriate for
your locale.

-Chris
Re: Internationalization Issue
Date: Mon, 20 Aug 2001 15:04:10 +0200
From: chris brown <[EMAIL PROTECTED]>

===
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 at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: sql server insert

2001-08-20 Thread Ashish Shrestha

Use a PreparedStatement!

Ashish Shrestha

===
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 at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: Bulk Printing from JSP's???

2001-08-23 Thread Ashish Shrestha

For our project, we have two methods.

When a user generates single bill we use the browser to print it. The
browser handles everything.

When we need to do bulk printing, the stored procedure in database
generates the bills as text files in a temporary directory. The text
files are printed with a Java servlet in the background. Actually, once
the text files are generated any method can be used to print them. The
files are deleted once the printing is finished.

It works fine for us as we do not have any graphics or fancy fonts in
our bill. If you want to use graphics and fonts may be you could try
generating pdfs and getting another program to print it?

Of course, there is still the option of writing your own print engine in
Java using Graphics2D.

Ashish Shrestha
http://headlines.sourceforge.net

===
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 at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: Printing a JSP Page

2001-08-27 Thread Ashish Shrestha

Smita Kotnis wrote:
>
> Hi all,
> Is it possible to save a JSP page as HTML, in to a folder on click of a 
>button within that JSP? If possible how to do this? I am having a JSP page contaning 
>some data, on click of a button of that JSP, the whole file should be stored as HTML. 
>I appriciate any sort of help...


Try Javascript on the client side.

Ashish Shrestha

===
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 at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: Help

2001-08-28 Thread Ashish Shrestha

Dinesh Somasundram wrote:
>
> String myParam = "NAME";
>   String myParam;  <-- the myParam here is supposed to be the
> value "NAME"
>


Sorry it will be either null or you will be not allowed to declare it
depending on your exact code.

If you declare a variable and initialise it. Next time you want to refer
to it simply use the variable name. Putting a data type in front of it
tries to redeclare it. This either results in an error or a new variable
that hides the orignal one. In the second case the value will be null.

Why don't you get a basic Java book and learn some Java before working
with JSP.

Ashish Shrestha

===
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 at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: 404 errorpage customization

2001-08-28 Thread Ashish Shrestha

Hi,

I put it in the web.xml in the conf directory of tomcat.

Ashish Shrestha

===
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 at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: offtopic : to truncate a double

2001-08-28 Thread Ashish Shrestha

Hi
for working with numbers and date check out the java.text package.

In your case, try the java.text.DecimalFormat.

You could also round a number to two decimal places by multiplying it by
tens multiple, taking the integral part and dividing by tens multiple.

Ex
x = x * 100;
x = integral part of x
x = x /100;


Hope this helps.
Ashish Shrestha

===
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 at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: Currency format

2001-08-29 Thread Ashish Shrestha

You can work with double and use java.text.DecimalFormat to display the
currency info in the end.

Alternatively you can use BigDecimal.

Ashish Shrestha

===
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 at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: Client Identification in JSP

2001-09-19 Thread Ashish Shrestha

May be you could try hidden fields + client ip address.

Ashish

===
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 at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: Logout problem...

2001-09-19 Thread Ashish Shrestha

Let's go over an example.


You login with login.jsp

you are authenticated with authenticate.jsp

then it sends you to loggedin.jsp

at the end you go to login.jsp when you log out.




assumptions:

1. you are doing session.invalidate() in login.jsp
2. you want to be "efficient" and are using  tag. for
example authenticate.jsp send to loggedin.jsp using 

or
   you are always in authenticate.jsp and you use  to
include the relevant page. A controller!



what is most probably your problem:

after you have logged out, does pressing the back button send you to
authenticate.jsp? if it does, then the browser is resending your login
information (with or without asking you depending on the browser) and
reauthenticating you.



solution:

instead of  use response.sendRedirect() to send from
authenticate.jsp to loggedin.jsp

basically, ensure that authenticate.jsp is never displayed on the url
textbox of the browser so that the browser does not automatically
reauthenticate you.

when you manually type authenticate.jsp on the browser's url textbox
there is no problem as you don't have the login information. however,
browser tend to remember the information used to get a page and can
repost the same information.

----

hope this helps!

Ashish Shrestha
http://headlines.sourceforge.net

===
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 at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: Database Connection tuning (Evaluate the two processes explained)

2001-09-24 Thread Ashish Shrestha

> Process-1:
>
> In each page of pages where i require i am creating the connection bean
> instance by
>
> My Connection bean is executing three basic Functionality
>
> 1.connect() --returns a boolean object on the status of the connection.
> 2.ExecSelect() --returns a resultsetobject  of the query executed
> 3.ExecDML() ---returns a int on no of rows effected by the execution of the
> query(for insert,delete,Modify)
>

> Process-2
>
> I got a Recommandition from my senoirs that
>
> Creating a Connection object for every Client after login in the Session
> variableand use the Connection object
>
> How?
> 1.Pass the Connection Object to the methods in Other bean or in the jsp page
> and executing the queries

> 2.Passing Connection object and statement objects to bean for execution of
> the query from a jsp page
>
> here i dont have the guarentee of closing the connection not all users may
> Logout( where i have to close the connection)


First let me answer a few hows in process 2.
a. You could just have a method called setConnection(Connection c) in
your beans.

b. You can have a HttpSessionBindingListener to ensure that all
Connections are closed when the session terminates by either user
logging out or session timing out.

I have seen a lot of code and books doing the second way.

Yet, I myself am using the first method most of the time because I like
to design my webapps such that the beans hide all the info about the
database from my jsp pages. The beans act as a layer between the
database (or any other information source) and the jsp pages.

For the actual database connection, I use PoolMan to pool and cache my
interactions with the database. Why don't you try it out at
www.codestudio.com

Hope it helps,
Ashish

===
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 at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: Include JSP file to show form

2001-09-25 Thread Ashish Shrestha

If you want to avoid JavaBeans you could store your old information in a
hashmap and put it in session.

JavaWorld has an article on this. About allowing users to correct errors
in forms and displaying error messages and old data. Sorry, I don't
remember the exact url.

Ashish.

===
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 at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: offtopic: running commands on remote unix box

2001-10-04 Thread Ashish Shrestha

Sure!

Use SSH to run the script on the Unix box. Then just read the
OutputStream to get the output. Check out the java.lang.Runtime and
java.lang.Process classes.

Ashish Shrestha

===
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 at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: cookie trail in JSP's

2001-10-19 Thread Ashish Shrestha

check out the breadcrumb tag library at www.jsptags.com

ashish shrestha

===
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 at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: Session timeouts, security, and JSP

2001-10-21 Thread Ashish Shrestha

Steve Bang wrote:
>
> When a user session times out and an application server's console says that
> the user has been logged out, I would have assumed that the user would have
> to re-authenticate to get back into the system.  Instead, what I've seen on
> both Tomcat and WebLogic is that pressing the Refresh/Reload button on a
> browser will allow the user to continue using an application.  Clearly, this
> is not acceptable for many applications.  Someone at work is telling me that
> session logouts are merely for resource conservation, not security.
> Assuming this is true, is there a recommended approach, using JSP(?) to
> force reauthentication?  I would have expected this to be managed by
> application servers, but it seems that I need to code this behavior.  Hans'
> excellent book (JavaServer Pages) has a good chapter on security and
> authentication, but I couldn't find any discussion about forced
> reauthentication after a session timeout.
>
> Steve
>

Hi Steve,

I have also seen this  in the following senario:

login page login.jsp has a form that points (action) to authenticate.jsp

authenticate.jsp checks for the login and sends to say loggedin.jsp.

if loggedin.jsp is a frame and authenticate.jsp uses  then
the whole time the url stays as authenticate.jsp

now, even if the session is now timed out, on pressing the
reload/refresh on the browser, most browser will ask to repost data and
if you select yes it will automatically send the username and password.

my solution was to use response.sendRedirect() instead of 

this is not usually a problem when we don't use frames.

of course, you need to have a session variable and check if it exists in
all protected pages.

Hope this was useful.

ashish shrestha

===
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 at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: How to put getRemoteAddr() into SQL server table?

2001-10-23 Thread Ashish Shrestha

Hi!

I don't know if this is the problem but I was just wondering!

May be the connection is set as false for autocommit and when you don't
commit the driver does a rollback?

Ashish Shrestha

===
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 at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: Services or Daemons in java

2001-10-23 Thread Ashish Shrestha

"Bommakanti, Vamsee" wrote:
>
> Hello All
> I am developing an intranet site for my company. I need to send emails to
> who r part of some list which is internally maintained in the system, when
> ever there is some change in the congiguration database or periodically.
> Presently we are developing the system using Tomcat and java on windows NT
> server, but the actual production env could be either unix or linux. Is
> there any way to do this which is platform independent. Ideally i was
> looking at writing the alerts on oracle side itlself as a service inside
> oracle. Does any one know if this is possible or do you have any
> suggestions.
> I am using oracel 8 i.
> Thanks in advance


We have a background process which keeps scanning the links between
router and various NAS and send out alert emails when the link is down.
We have made this a background servlet that loads when Tomcat is
started.

We develop in Linux and deploy in Solaris. We have made Tomcat a daemon
by starting it from the rc.local file.

I think it can be made a service in Windows NT/2K too. I believe it is
documented in the document explaining installing it on WinXX platform.

Regards,
Ashish Shrestha

===
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 at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: Refreshing parent page

2001-10-24 Thread Ashish Shrestha

The *best* solution would be to use client side JavaScript!

Ashish Shrestha

===
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 at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: Platform choice advice for deploying a website

2001-10-24 Thread Ashish Shrestha

Hi,

We have about 90% dynamic and 10% static content(few help pages and
mostly images). Yet we are using Apache + Tomcat 3.2.3.

Why? Well, our site is access with SSL (https) only. Though we did not
test it to verify, we were told that SSL in native library is faster
than Java. Basically, Apache provides us with a native SSL library with
OpenSSL + mod_ssl so that we can avoid that in Tomcat which would use a
Java version.

May be once we pass the acceptance test and have more time we will
actually measure it.

If anyone has done it do let us know.

Ashish Shrestha.

===
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 at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: Escaping quotes in SQL string

2001-10-24 Thread Ashish Shrestha

Yes, use PreparedStatement instead of Statement. It does it for you.

Ashish Shrestha

===
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 at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: Iterator.next to String

2001-10-27 Thread Ashish Shrestha

If you are using a custom class inherited from java.lang.Object or some
other classes that has not overridden toString() then you will get the
address of the object instance rather than a descriptive string.

In order to use iterator.next().toString() you need to make sure that
you have overridden the public String toString() method properly.

Alternatively you can do,

YourObject yourObject = (YourObject) iterator.next();

String title = yourObject.methodThatGivesTheTitle();

Ashish Shrestha

===
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 at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: JSP editor

2001-11-02 Thread Ashish Shrestha

"Haseltine, Celeste" wrote:
>
> Forte is also very resource intensive, if I remember correctly.  I believe
> it requires 64K of memory to run.

now 64K isn't really resource intensive. even my pda has 4MB. i must say
this is the finest ide.

which version are you running? mine takes 128MB (min).

ashish shrestha

ps: just kidding!

===
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 at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: help me

2001-11-02 Thread Ashish Shrestha

what about pushlets.

I don't remember the url right now, why not do a search in google. but i
guess the basic idea was to use the http 1.1 keep alive and use dynamic
html to refresh the section on the page.

ashish shrestha

===
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 at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: free jsp editor?

2001-04-04 Thread Ashish Shrestha

You can try jEdit. It is open source, you can use the
plugins to enhance it.

http://jedit.sourceforge.net
--
a s h i s h @ j d g n p . o r g
Get Headlines 0.5.2 for free at
http://headlines.sourceforge.net/

===
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 at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: JDBC Driver

2001-04-26 Thread Ashish Shrestha

Celeste Haseltine wrote:
> If you are looking for a free jdbc driver for MS SQLServer, good luck.

Why don't you try FreeTDS?
Source: ftp://freetds.internetcds.com/pub/freetds_jdbc
Info: http://sunsite.unc.edu/freetds

Ashish
--
a s h i s h @ j d g n p . o r g
Get Headlines 0.5.2 for free at
http://headlines.sourceforge.net/

===
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 at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: Urgent !!!! - loading a web browser

2001-04-26 Thread Ashish Shrestha

Hi Sumeet

You can load the default web browser on WinXX platform
using:

Runtime rt = Runtime.getRuntime();
rt.exec("rundll32 url.dll,FileProtocolHandler " + url);

The url must have the proper protocol of the url mentioned,
for example http://headlines.sourceforge.net

For a more complete example download headlines from
headlines.sourceforge.net and checkout the Utilities.java
file.
--
a s h i s h @ j d g n p . o r g
Get Headlines 0.5.2 for free at
http://headlines.sourceforge.net/

===
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 at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: JDBC Driver

2001-04-28 Thread Ashish Shrestha

Celeste Haseltine wrote:
> I must admit that I had not heard of the FreeTDS driver.  I've already
> purchased a Type 4 JDBC driver, but just out of curiousity, is FreeTDS a
> type 4 driver, or a type 2?  For my production internet application, I
> needed a Type 4 driver, and one that included the extended API.

It is a Type 4 driver, but I think the implementation is not
complete.
--
a s h i s h @ j d g n p . o r g
Get Headlines 0.5.2 for free at
http://headlines.sourceforge.net/

===
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 at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: 3 classes in same dir can't see each other

2001-05-02 Thread Ashish Shrestha

put the class files in a subdirectory called project.
make sure the directory containing the subdirectory project
is in the class path!

--
a s h i s h @ j d g n p . o r g
Get Headlines 0.5.2 for free at
http://headlines.sourceforge.net/

===
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 at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: how to set the for each on the jsp ?

2001-05-02 Thread Ashish Shrestha

have a look at request.getParameters("item");

and check out iterators and enumeration in java.util
package.

--
a s h i s h @ j d g n p . o r g
Get Headlines 0.5.2 for free at
http://headlines.sourceforge.net/

===
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 at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: PROBLEM-Changes in included pages not updating?

2001-05-06 Thread Ashish Shrestha

Hi!

I believe you used the include directive to include a file.
<%@ include ... %> includes the file and then compiles it
into servlet. So if you want the changes in the included
file to be reflected you need to change the date of the main
file using utilities like touch or making dummy changes as
you mentioned.

If don't want to do this and want you changes to reflect
immediately, use


Ashish
--
a s h i s h @ j d g n p . o r g
Get Headlines 0.5.2 for free at
http://headlines.sourceforge.net/

===
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 at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets