Ash sav

Ranch Hand
+ Follow
since Apr 14, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Ash sav

Hi Dave,
thanks for your response. Suppose first time I just want to display selected value in the list and I am not going to consider null value at all. So I did the following chages in my code. But when I hit the submit button I can see that value is actually stored into the myclient table but it's not displaying on the form.
Can u tell me where I am doing wrong?
Thanks,
ASH

if (rowfunction.equals("addrow")) {
String query = "INSERT INTO client ( client_id, skill) " +
"VALUES ( " +
"'" + request.getParameter("client_id") + "', " +
"'" + request.getParameter("skill"));
try {
statement.executeUpdate(query);
}
catch (SQLException se) {}
}
else { }
<%
rs = statement.executeQuery("select * from myclient where client_id = " +
request.getParameter("client_id"));
while(rs.next()){
%>
<Table>
<TR><TD> ID </TD>
<TD><input type = "text" name = "client_id" value=<%= rs.getString("client_id")%>> </TD> </TR>
<TR><TD> Desired Skills </TD>

<TR> <TD> Skill Set </TD><TD><SELECT NAME="skill" size="1" OPTION VALUE="<%=rs.getString("skill")%>">


</SELECT> </TD></TR>
23 years ago
JSP
If I just have simple form having one textfield and list, how can i access the selected element in list?

<html>
<body>
<form name="clientform" method="post" action="database.jsp">

<Table><TR><TD> ID </TD>
<TD><input type = "text" name = "client_id"> </TD> </TR>

<TR><TD> Desired Skills </TD>
<TR> <TD> Skill Set </TD><TD><SELECT NAME="skill">
<OPTION VALUE="">
<OPTION VALUE="os">OS
<OPTION VALUE="rdbms">RDBMS
<OPTION VALUE="gui">GUI
<OPTION VALUE="lang">Languages
</SELECT> </TD></TR>

</Table align = "center">

<Table>
<TR><TD><input type = "radio" name="rowfunction" value="addrow" CHECKED>Add Client</TD>
</TR>
<TR><TD> <INPUT TYPE=Submit name="submit" value="submit"> </TD>
<TD><INPUT TYPE=Reset name="Reset" value="reset"> </TD>
</table>
</form>

</Body>
</Html>
//////////////////////////////////////////////////////////////////////
below is my jsp code. I am not giving complete code just part of it.
//////////////////////////////////////////////////////////////////////
if (rowfunction.equals("addrow")) {
String query = "INSERT INTO client ( client_id, skill) " +
"VALUES ( " +
"'" + request.getParameter("client_id") + "', " +
"'" + request.getParameter("skill"));
try {
statement.executeUpdate(query);

}
catch (SQLException se) {}

}
else { }

I know by applying above code it shows me only client_id value not the selected value in the list.
Thanks in advance,
Ash
23 years ago
JSP
Hi All,
I am trying to develop a form with jsp and mysql having basic functionality like add, update, delete. I am having some difficulty. Can somebody suggest me the link for that?
Thanks,
Ash
23 years ago
JSP
Hi All,
I know this is not a place to discuss mysql problem but I am assuming lot of people used mysql with jsp. Today when I installed mysql and try to run I got following error.
C:\mysql\bin>mysqld --standalone --debug
C:\MYSQL\BIN\MYSQLD.EXE: Can't change dir to 'C:mysql\' (Errcode: 2)
020313 21:03:58 Aborting
020313 21:03:58 C:\MYSQL\BIN\MYSQLD.EXE: Got signal 11. Aborting!
020313 21:03:58 Aborting
I will really appreciate if somebody can help me to solve this problem
Thanks in advance,
Ash
23 years ago
JSP
I was trying to solve the exercise at jguru.com about form processing. And i am using the server provided by school.
(http://developer.java.sun.com/developer/onlineTraining/JSPIntro/exercises/Forms/)
I stored form.jsp in webapps/jsp/jdc/forms/form.jsp and you can view it from
http://calvin.eece.mu.edu/sawalea/webapps/jsp/jdc/forms/form.jsp
I also compiled FormBean.java and stored class file in
webapps/WEB-INF/classes/com/jguru/FormBean.class
Whenever i am trying to hit the submit button I got following error
Not Found
The requested URL /jsp/jdc/forms/form.jsp was not found on this server.
--------------------------------------------------------------------------------
Apache/1.3.22 Server at calvin.eece.mu.edu Port 80
Can somebody tell me why is that?
Thanks in advance,
Ash
23 years ago
JSP
Hi all,
I created a bean compile it on c:\java directory and then I placed my java file and class file in
TOMCAT-HOME\webapps\examples\WEB-INF\classes When I tried to acces my form and hit the submit button I got Internal server error as follows.
type Exception report
message Internal Server Error
description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 1 in the jsp file: /SaveName.jsp
Can Somebody tell me where I m wrong?
Is it possible to directly compile java program in TOMCAT-HOME\webapps\examples\WEB-INF\classes directory instead of compiling in other directory and then copied java file and class file in tomcat classes directory.
Thanks,
Ash
23 years ago
Hi all,
I created a bean compile it on c:\java directory and then I placed my java file and class file in
TOMCAT-HOME\webapps\examples\WEB-INF\classes When I tried to acces my form and hit the submit button I got Internal server error as follows.
type Exception report
message Internal Server Error
description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 1 in the jsp file: /SaveName.jsp
23 years ago
JSP
Thanks all, everything works fine now.
Ash
23 years ago
I am sorry I combined my previous error message with this one.
http://localhost:8080/myjsp/first.jsp
I got following erroe message.
Apache Tomcat/4.0.1 - HTTP Status 404 - /myjsp/first.jsp

type Status report
message /myjsp/first.jsp
description The requested resource (/myjsp/first.jsp) is not available.
Hoping to get some help.
Thanks,
Ash
23 years ago
Hi All,
Let me explain my problem. My directory structure
c:\Apache Tomcat 4.0
..webapps
|--example
|--manager
|--Root
|--tomcat-docs
|--webdev
|--index.html
My WEB-INF directory is inside of webdev directory.
I have created a directory called myjsp inside webapps where I stored first.jsp. When i type http://localhost:8080/myjsp/first.jsp I got following error
Apache Tomcat/4.0.1 - HTTP Status 404 - /welcome.jsp
type Status report
message /welcome.jsp
description The requested resource (/welcome.jsp) is not available.
I hope this description will help you to understand my problem.
Thanks,
ASh
23 years ago
I also set up tomcat and try to see my index.html file from webapps directory, I am also getting same page as David. Can somebody tell me what is wrong?
Thanks in advance
Ash
23 years ago
I am using windows 98.
Ash
23 years ago
I have downloaded Tomcat 4.0 but I am little confuse how to start the server. Documentation says following.
"There are two techniques by which Tomcat 4.0 can be started:
* Via an environment variable:
- Set an environment variable CATALINA_HOME to the path of the directory
into which you have installed Tomcat 4.0."
So how do I have to set env variable? Can somebody tell me?
Ash
23 years ago
Process is nothing but different program running on computer concurrently e.g. Microsoft word and Microsoft Paint are running on same computer at the same time.
But the thread is nothing but part of the program which run concurrently on the computer e.g formatting and printing word document. The are two tasks would correspond to executing parts of the program concurrently. Each such part define separate path of execution which is called thread.
Ash
Sun certified Java Programmer
Hi All,
Today I tried to run startJQPlus batch file and I got following error. i checked my path and classpath setting, everything looked fine to me, I also tried to compile and run some java program, they worked fine too. Can somebody help to solve this problem
Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/object
Thanks in advance
Ash