Paras,
Check into theResultSetMetaData class. there is a function
getColumnCount which can be used to do what you need.
Heres a snibbit of code:
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("Select * from TABLENAME");
ResultSetMetaData meta = rs.getMetaD
You can code as follows (using Batch Update requires JDBC 2.x supporting
driver)
// turn off autocommit
con.setAutoCommit(false);
PreparedStatement stmt = con.prepareStatement("INSERT INTO TableName VALUES
(?, ?)");
stmt.setString(1,value1a); // get values from recordset of select statement
stmt.
hi,
You are getting syntax error since your SQL syntax in incorrect.
One method you can adopt is first select all records to be inserted into a
recordset.
Then write your prepare statement i.e.
"insert into TableName (Name, Age, ?,?, Sponser_Name, Sponser_country) "
Then use prepare statement se
Hi Andrew,
could u suggest any JSP editor which is downloadable from any site.
Thanks
Joydeep
-Original Message-
From: Andrew Craig <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Tuesday, July 11, 2000 5:59 PM
Subject: Re: Using Runtime.getRuntime().exec() function
u should use order by clause in sql,
no need to sort resultset.
-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Phil Campbell
Sent: Tuesday, July 11, 2000 11:53 PM
To: [EMAIL PROTECTED]
Subject: sorting jav
hi folks,
Sorry for bit off topic question, but i hope somebody
can thru light on it!.
I have problem on setting String values in the
prepared statement.I have a sql statement
somthing like,
"insert into TableName (Name, Age, ?,?, Sponser_Name,
Sponser_coun
Dear Artthur
Can I deploy my EJB by using JRUN 3.0?
BR
Senaka
-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of arthur alexander
Sent: Wednesday, July 12, 2000 9:34 AM
To: [EMAIL PROTECTED]
Subject: Re: who
I want to add one more point.
If you use taglet to instantiate JavaBeans, you can enjoy the
benefits of bean "Introspection".
cheers,
dinesh.
- Original Message -
From: Rathinavel Palaniappan <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 11, 2000 6:13 PM
Subject: Re:
Hey,
How come there is no mention of Allaire's JRUN ??
Very inexpensive (free for dev), the smallest, and
super fast. It is always up to date, and has EJB
and JMS built in.
Their transaction monitor is 100% pure JAVA!
-aa-
- Original Message -
From: Kevin Duffey <[EMAIL PROTECTED]>
T
Resin is very fast indeed. Resin has some nice features too, that recently
Orion incorporated as well. Orion in my opinion offers the best bang for the
buck. First..its free for all use except commercial use. Its a full J2EE
implementation app server, where as Tomcat and Resin are Servlet 2.2/JSP
Hello All,
Sorry to be off-topics, but I'm looking for some Java developer(s) who are
familiar with JSP to help me on my project and having some problem getting hooked
up with the right candidates.
Any pointers are GREATLY appreciated.
Regards,
Victor Tran
Hello,
Which JSP engine to use ---Tomcat, Resin, orion, websphere ?
Which is the most popular/supported?
Resin seems very fast
Keith
===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
I get a null error when trying to use pool with mySQL. Here is the source
and error. Database is active and all classes are loaded. When I run the
same script without pool, directly, it returs all the values in the table.
Also the table is populated completely and there are no NULL values or empty
Hi,
Are you passing more than one parameter, from one file to another or are
you referring to multiple values of a single parameter?
Vasudha
- Original Message -
From: Liart Martins <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 11, 2000 8:23 PM
Subject: pick more th
Hi,
You will need to check the version of Servlet.jar you are using.
JspWriterImpl.flush method is in the servlet.jar version2.2.
Also check you classpath,probably it is using the older version
somewhere.
Vasudha
- Original Message -
From: phil bartholo <[EMAIL PROTECTED]>
T
Do you mean more than one value from a list-box that is set to allow
mulitple selections?
Cj
Liart Martins wrote:
>
> How can I get more than one value using request.getParameter method?
>
> I'm using:
>
> request.getParameter("mySelect")
>
> Thank's
>
> Junior
> WebDeveloper
>
> ===
How can I get more than one value using request.getParameter method?
I'm using:
request.getParameter("mySelect")
Thank's
Junior
WebDeveloper
===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
I'm using JSP's on iPlanet Web Server. After every request,
the exception below appears in the log file. I appears to me
that iPlanet is compiling the jsp with a more recent jsdk than
when it tries to run the resulting servlet. As required, I
installed iPlanet with my own JDK (1.2.2). One fix
Kevin,
all these things are actually on our todo list. Many people ask about a
single window mode, and this is planned as a feature for the version which
will come out in about 6-9 months from now. Better handling of projects is
the single biggest feature for this version, too.
I didn't see many
If you install tomcat, then no need to install Jserv.
You can try Jrun3.0 (http://www.allaire.com/Products/JRun/) and it is free
for development use. It have a connector to apache, and it is so easy to
configure.
There are many application server, but i'm not sure there can talk to linux
apache o
Sorry for the typo...
That should be
.append(lineBreak);
not
.append(newLine);
-Original Message-
From: Dinkelbach, Eric
Sent: Tuesday, July 11, 2000 2:38 PM
To: 'A mailing list about Java Server Pages specification and reference'
Subject: RE: Replace a character (or gro
try this:
String lineBreak = System.getProperty("line.separator");
StringTokenizer tokenizer = new StringTokenizer(oldString, "~");
StringBuffer sb = new StringBuffer();
while(tokenizer.hasMoreTokens()) {
sb.append(tokenizer.nextToken()).append(newLine);
}
String newString = sb.toString
you can use a regular expression to do this quickly and easily.
i use regexp from GNU (http://www.gnu.org). i think sun and IBM also
may have regular expression packages.
-steve
-Original Message-
From: Phil Campbell [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 11, 2000 3:10 PM
To:
Thanks, Nick, for pointing out my oversight...
select ... order by ... does the trick
-Original Message-
From: Nick Wesselman <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Tuesday, July 11, 2000 1:07 PM
Subject: Re: sorting java.sql results set
>Why not just use
Ken:
String.replace( '~', x ), where x is the char value for new line (\n), may
work, but it only replaces char occurrences within a String. I prefer
another route...
Something like this may prove more useful:
String s = "This~is~a test of~parsing text" ;
String sOld = "~" ;
String
Why not just use SQL to sort it?
- Original Message -
From: "Phil Campbell" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 11, 2000 1:52 PM
Subject: sorting java.sql results set
> Is there a (what is the) class that enables sorting of ResultSet data?
>
>
===
Is there a (what is the) class that enables sorting of ResultSet data?
===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/
Is there a way to take a string of text like:
This~is~a test of~parsing text
...and replace each tilde with a line break?
So I get...
This
is
a test of
parsing text
TIA from a newbie who will be buying "Core Servlets..." soon.
Ken Martin
=
Hi folks,
I am new to JSP and Servlets. I have just started going thru Java Servlet
Programming - by O'Reilly.
I need to get my hands on a good JSP book. Has anyone read thru "Web
Development with JSP " by Duane Fields and Mark Kolb ?
Appreciate your comments in advance.
Thanks.
Hi,
can someone tell me how to set up initParameter for servlet application in
TomCat environment? so I can use " config.getInitParameter(initparamname);"
in my servlet code to find that initparamter when the servlet is loading?
say, which config file should I go and do the set up there? (tomcat.
There is more than one way to run JSP on Linux. Check the list of App
Servers that support JSP on Linux at:
http://www.flashline.com/components/appservermatrix.jsp
There is also more than one good JSP book on the market and more on the way
I'm sure. Generally it's better to refer to the app sp
Scott Evans wrote:
> Is it reasonable to assume that the thread of execution that represents a
> request ceases execution after the request has been fulfilled?
> I ask because I'd like to know if in my controller servlet I can maintain a
> list of currently executing requests.
>
>From the perspe
Nadler Paul wrote:
>
> Folks -
>
> I have a site in which JSPs call other JSPs, which often call other JSPs, etc.,
> all using . In this setting, how can any given JSP determine its
> own path and name, and the path and name of the JSP that called it?
>
> I have tried request.getServletPath() and
What are the components required to be able to run JSP web pages on a
Linux/Apache Web Server?
Do I install JServ first then Tomcat-Jakarta... is that all that is needed?
I have tried searching for some definitive info on just exactly what
software components are needed to run JSP on Linux/Apach
If you have to go back to the server and read the database, just use some
JavaScript to call a function when the user makes a choice from the city
combobox. In the function, just call a servlet, have it read the places
relative to the city was selected from the database, put the list in the
reques
>> Actually I don't believe I am. I believe some people in this forum have
>> experience with ASP. You might not but other people may have. Don't
assume
>> everybody is like you. Web Professionals consider all technologies in
order
>> to maximize their opportunities. Sure some people may have rece
Thanks for the tip.
>-Original Message-
>From: Dina Johnson [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, July 11, 2000 9:57 AM
>To: [EMAIL PROTECTED]
>Subject: Re: JSP book
>
>
>I just got through reading this book last week and I am
>completely new to
>JSP. I thought it was excellent! I
All:
I believe it would be very useful to include author name and publisher as
well as the book title in mails regarding recommended bibliography.
This will cut down on email volume (which has a tendency to be a mite
overwhelming on Monday mornings !-).
BTW, I would also recommend Java Report, an
Bill,
Just to check a small detail with you ...
A search on bookpool.com and amazon.com revealed a book called
Building Web Applications With Uml (Addison Wesley Object Technology Series)
By Conallen Jim
http://www.bookpool.com/.x/r9izdwzvmn/sm/0201615770
Is this the one you are recommending??
I just got through reading this book last week and I am completely new to
JSP. I thought it was excellent! I actually read it in two days. There
were lots of examples and very good language for beginners.
Dina
-Original Message-
From: Arthur Yeo [mailto:[EMAIL PROTECTED]]
Sent: Tuesda
Sneha Sharma@CONTEXT
07/11/2000 09:46 AM
Hey Rupali!
I have been using the following approach.
Before forwarding to another page,
I set the request.setAttribute("a","b");
and in 1.jsp
i say request.getAttribute("a");
and it works.
Try giving the absolute path in jsp:forward for ur page.
A
Hi,
I liked this book very much. I generally find the SUN books and Oreily books
on Java VERY good. It didn't get into superb detail on every aspect of JSP
programming, or servlet programming, but it does get into some good details.
Our developers here are all reading this book.
> All:
>
> I kno
hi,
I don't know about sendRedirect but jsp:forward
should work. I am passing on parameters form a jsp to
servlet, servlet to jsp and jsp to jsp. It is working
fine with all three modes.
You have to use requestDispatcher inorder to pass
the paramters from servlet to jsp though.
thanx,
All:
I know this is a fairly new book but can anyone share their experiences about their
early
encounters with this book:
"Core Servlets and JavaServer Pages"
===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
I like the book "Professional Java Server Programming" by Wrox. It covers
JSP, servlets, XML, Jini, database connections, servlet communication, and
Enterprise JavaBeans. It covers just about everything.
-Original Message-
From: mike dell [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 1
So ... try to use another port (trial and error is so underappreciated as a
problem solving technique). If that does work, it could mean that another
application is using that port. Do you get an address in use error? Please
supply more detailed information (screen output, error dump etc etc) when
I know this question has been posted before and I have tried the solutions
but somehow it doesnt work for me
JSP1
response.setAttribute("AdminName","AccountManager");
response.sendRedirect (response.encodeRedirectURL("Success.jsp"));
In success.jsp
out.print ("The user is : " + request.getAtt
Try these codes in your JSP file
out.println(config.getServletContext().getServerInfo()+"");
out.println(request.getRequestURI()+ "");
out.println(config.getServletContext().getRealPath(request.getServletPath())
+"");
out.println("http://"+ request.getHeader("Host")+
request.get
Is it possible that there is an issue with the runtime location of the
servlet? Is the java program you're trying to run in your classpath? Make
sure that the VM can find the class w/out being called from the directory
that it is contained in.
Nick
- Original Message -
From: "Ritesh_Sriv
Hi:
I have been using Tomcat on Windows 98 for sometime. Recently, I was unable
to start Tomcat. Looks like it failed during the execution of server
configuration file. Can anyone tell me to way to detect the problem
associated with the port 8080 (default configuration for Tomcat)? I
suspecte
That solves mine too!!!
Thanks
raman
-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Veena
Sent: Wednesday, February 02, 2000 09:23 AM
To: [EMAIL PROTECTED]
Subject: Re: Pass my custom class across a JSP P
Wrox is definitely the way to go for ASP books ...
steer clear of the O'Reilly ASP books (but their Perl/UNIX/Java books are
superb!)
-Original Message-
From: Robert Nicholson [mailto:[EMAIL PROTECTED]]
Sent: 11 July, 2000 6:31 AM
To: [EMAIL PROTECTED]
Subject: Good ASP book?
Now that
To whom it may concern,
Does anyone know of an interest group for Java AI? I
have looked around the Sun site for information on
this topic. Also, is the Java AI supported by JSP??
Thanks,
Steve
__
Do You Yahoo!?
Get Yahoo! Mail Free email you ca
the code works fine for a stand alone java application , but if the same
code is written in a servlet, it does not work.
> --
> From: Andrew Craig[SMTP:[EMAIL PROTECTED]]
> Reply To: A mailing list about Java Server Pages specification and
> reference
> Sent: Tuesday,
the code works fine for a stand alone java application , but if the same
code is written in a servlet, it does not work.
> --
> From: Sven van 't Veer[SMTP:[EMAIL PROTECTED]]
> Reply To: [EMAIL PROTECTED]
> Sent: Tuesday, July 11, 2000 6:16 PM
> To: [EMAIL PROTECTED]
> Actually I don't believe I am. I believe some people in this forum have
> experience with ASP. You might not but other people may have. Don't assume
> everybody is like you. Web Professionals consider all technologies in
order
> to maximize their opportunities. Sure some people may have recently
- Original Message -
From: Vini Sethi <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 11, 2000 9:19 AM
Subject: Re: Pass my custom class across a JSP Page
> Thanks for the reply Veena,
>
> I tried the workaround and it definitely works. However, i have a few
> questions:
Hi,
I am Hanumantha Raju require list of Webservers which suport JSPs
with CUSTOM Tags. Could you please list out them
Thanking you,
Hanumantha Raju
===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
Sneha Sharma@CONTEXT
07/11/2000 07:17 AM
Look into the class HttpUtils.There is a static method : getRequestURL.
Use HttpUtils.getRequestURL(request) on the JSP.
It reconstructs the URL the client used to make the request, using
information in the request object. The
returned URL c
I had a similiar problem, which was solved by changing the html extension to
jsp
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
==
Folks -
I have a site in which JSPs call other JSPs, which often call other JSPs, etc.,
all using . In this setting, how can any given JSP determine its
own path and name, and the path and name of the JSP that called it?
I have tried request.getServletPath() and request.getHeader('REFERER'), but
Good books for ASP are as follows:
Using Active Server Pages: ISBN 0-7897-1389-6 Bye QUE
AND the WROX book ASP 3 for professionals
There is many more WROX books, I would also look a VB6 active-x and MTS if
you are doing a DB project of any size.
Cheers
Graham Cruickshanks
www.itsnotrocketsci
Ritesh_Srivastava wrote:
>
> Runtime.getRuntime().exec("notepad") works but
> Runtime.getRuntime().exec("java ApplicationName") does not works.
>
Create a batch file that cd's to the startup dir os the java app, and
then calls "java appname". Then in your app call the batchfile.
sven
--
A Preview of Active Server Pages + (ISBN: 1-861004-75-3).
Manu Chandra
Intern, ITG
91-11-6294600/1 Ext:101
-Original Message-
From: joydeep [mailto:[EMAIL PROTECTED]]
Sent: July 11, 2000 5:24 PM
To: [EMAIL PROTECTED]
Subject: Re: Good ASP book?
you can browse thru the wrox site for A
One reason where I find mechanism useful over any
other equivalent technique is use of getProperty and setProperty , using these
functions and a bean id input fields can be mapped to database fields.
If you are using the * attribute for setProperty then all the fields are mapped
on to your table
you can create a bean instance by using the
scriptlet but the advantage you get over
useBean tag is the scope of the bean.
If i remember correctly , the difference between the
scopes are,
session - life time is equvalent to session expire time
(which is configurable).
request - fo
How can I get the directory path where my servlet runs ?
Thanks in advance.
===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.s
You are trying to exec a program called "java ApplicationName" by doing
that.
Instead try :
String cmd[]=new String[2];
cmd[0]="java";
cmd[1]="ApplicationName";
try {
Runtime.getRuntime().exec(cmd);
} catch(java.io.IOException e) {
}
As far as I remember this should work...
Andrew
>
Runtime.getRuntime().exec("notepad") works but
Runtime.getRuntime().exec("java ApplicationName") does not works.
What can be the possible reason.?
Ritesh
===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-
Yes, you can provided you are using JDK1.2. Use a scrollable ResultSet and
execute its method last() and first() to move to last and first row of your
ResultSet. When pointing to the last row, call ResultSet's getRow() method
to get the number of row you are pointing.
regards
Y
- Original Me
you can browse thru the wrox site for ASP books http://www.wrox.com
1) professional ASP
2) Using the ASP
-Original Message-
From: Robert Nicholson <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Tuesday, July 11, 2000 5:08 PM
Subject: Re: Good ASP book?
>Actually I
... and you need driver supporting jdbc 2.0 API
-
Sanjay Kumar,
Software Consultant,
Addcon India Pvt Ltd.
New Delhi.
Emails : [EMAIL PROTECTED]
[EMAIL PROTECTED]
Phones : 6423907,6201330 (Office)
"Keep Smilling. I
You can access database either directly from your JSP page or using a class
or bean.
Directly from your JSP page
type_Document_Title_here
<%@ page language="java" import="java.sql.*, java.util.*"%>
<%try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverMan
I'm sure this isn't new to anybody who posts on this list.
Could you please remove all imageinfo subscribers so we don't get their
autoresponder everytime we post a message?
Any imageinfo subscriber please resubscribe via your qrs.com address.
-
Please note: Email addresses at imageinfo.c
Actually I don't believe I am. I believe some people in this forum have
experience with ASP. You might not but other people may have. Don't assume
everybody is like you. Web Professionals consider all technologies in order
to maximize their opportunities. Sure some people may have recently migrate
Hi,
Im trying to get a JavaBeans property using the following line
:
In the JSWDK all works fine, but when I try to execute the same JSP in the
Apache nothing is returned (no errors too). Does anybody know why ? If I
change the line by the method (using lineType
Sorry, you are asking question at wrong forum.
--
Sanjay Kumar,
Software Consultant,
Addcon India Pvt Ltd.
New Delhi.
Emails : [EMAIL PROTECTED]
[EMAIL PROTECTED]
Phones : 6423907,6201330 (
Paras Sharma wrote:
>
> hi
>
> can some tell me when we access database how to get the number of rows
> in table like the sql statement is
>
> select * from tablename;
>
rset.last();
rset.getRow();
sven
hi
can some tell me when we access database how to get the number of rows
in table like the sql statement is
select * from tablename;
can i know how many rows r there (without moving all the rows )
or if i use select count(*) from table in the excutequery() then
what will b
Hi Diwakar,
I got this piece of info from a JSP faq.Hope it may be helpful to u.
---
What are the important steps in using JDBC in JSP?
1) Instantiate an instance of the JDBC driver you're trying to use (jdbc-odbc
bridge n
Hi Diwakar
Sample code that shows you how to do it without a bean is here:
http://www.nagarathar.com/keywords/jsp1.html
regards
Gary
- Original Message -
From: Diwakar Killamsetty <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 11, 2000 10:30 AM
Subject: How to access
is Class.forName what you're looking for?
> -Original Message-
> From: Chad Pitt [mailto:[EMAIL PROTECTED]]
> Sent: 10 July 2000 16:29
> To: [EMAIL PROTECTED]
> Subject: setting ClassPath Help!
>
>
> Hi:
> does anyone know how to instatiate the object from
> arbitrary class? i don't kn
I am trying to display results retrieved from a database. (using model from
Fields book)
The debug shows that the prodList Vector is sucessfully populated.
else if (cmd.equals( "cat3prod")){
DbProdBean db;
ProdUtils utils = new ProdUtils();
Vector prodList = utils.fetchAll
Now that I understand JSP and the concepts of the Web application paradigm
I'd like to read up on ASP. In particular I'd like to know if there are any
books that focus on keeping business logic out of the presentation layer. I
know there's a chapter in WROX's Professional JSP , which I'm currently
simple using a class or a bean.
Diwakar Killamsetty <[EMAIL PROTECTED]> on 07/11/2000 04:00:01 PM
Please respond to A mailing list about Java Server Pages specification and
reference <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
cc:(bcc: Kher Tamanna-SWD-ITIL-UB/Itilmail)
Subject:
Hi,
How can I access database directly from JSP?
Thanks in advance.
regards,
Diwakar
Tel: +91-40-3308600, ext. 8547.
===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JS
Is it reasonable to assume that the thread of execution that represents a
request ceases execution after the request has been fulfilled?
I ask because I'd like to know if in my controller servlet I can maintain a
list of currently executing requests.
I imagined getting the current thread my using
Your MailServlet is trying to use the class junk.BasicStatementService,
which apperantly cannot be found by the server within its classpath.
make sure that the class is located according to its package, so if you
don't have it in a JAR file it has to be located in a directory called junk
in your c
Hi,
the examples from my book "Java Server Pages" are now available
online in two languages: German and English (Adjust your browser
settings!). The source code can viewed online and is available for
download. Topics covered:
-- JSP scripts
-- JSP standard actions
-- Integration of beans
-- User
89 matches
Mail list logo