swati maken

Greenhorn
+ Follow
since Jan 12, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by swati maken

Thanks u all for ur help.
But still I am not able to get it. Actually I have to make the barcharts, the number of which,i.e bars no., will vary from time to time. And the parameters req. to draw barcharts are there in the db.
You have talked about 'chartgear' is this a s/w or a api? and where do get it?
Pl. help me out.
Swati
22 years ago
Hi! friends,
I am facing one problem for which I need ur help.
Actually I have to make a web based solution to draw the bar charts based on the data stored there in the database through a programme code, which I don't know how exactly its possible.
The other solution for this problem is that I should use a software for this, I have found one such software which is also db driven. But here the problem is that my db is there on the net i.e on the remote server, and my s/w is running on the local machine. The s/w can connect or take the values from Access only, so the problem is that how to connect or how to dump the db of remote machine to that of local machine.
I hope I have made u understand my problem.
Swati
22 years ago
Hi!
My problem is that if I want to create a dynamic query, in which I am successfull also, and I want to put this query in if -- else loop so how can it be possible.
Actually I have to do the search and show the result to the user which matches his or her search criteria and the result is to be fetched from the database. So I am creating the query dynamically and I have stored this query in a string now I want to put this query in if then else loop and fetch the records based on the query . But how this is possible I don't know.
Please help me out.
Waiting for ur reply.
Thanks.
Swati
Thanks for ur replies,
I have followed the steps which u have told me but even then also it is showing me the same error.
Please can anybody help me in finding the solution for tomcat.
I have tried this jsp in java web server but there also it is not working properly. I have written a very simple program for jsp, but the error is that it is not showing the output for the code which is written in "<% %>" tags. So please can anybody help me out in finding the solution for my problem.
waiting for ur replies.
Swati
23 years ago
Hello shailesh, thanks for ur reply.
The exact error which I get is :
"the name specified is not recognised as an internal or external command, operable program or batch file"
please help me out in solving my problem.
waiting for ur reply.
Swati
23 years ago
Thnaks for ur reply,
I have tried these steps but still I am getting the problem.
My classpath looks like :
----------
SET JAVA_HOME=d:\jdk;
SET TOMCAT_HOME=d:\tomcat\jakarta-tomcat;
SET PATH=%PATH%;d:\tomcat\jakarta-tomcat\bin;
SET CLASSPATH = %classpath%;d:\jdk\bin;
SET CLASSPATH=%CLASSPATH%;d:\jdk\lib\tools.jar;
SET CLASSPATH=%CLASSPATH%;d:\tomcat\jakarta-tomcat\lib\servlet.jar ;
--------------
Please help me out and tell me if I require any thing else to install tomcat.
Please can anybody tell me the alternative for tomcat and how to install it what changes r to be made at the initial stage.
Waiting for ur reply.
Swati.
23 years ago
My problem is that I have not able to set an initial environment required for jsp. As far as I have understood, pl. do correct me if I am wrong, we reqire to install Tomcat which act as jsp engine to communicate between client side and server side.
Now I will explain you step by step what I have done till now:
1)I downloaded tomcat from the net.
2)Unzipped the same in dir. where my jdk is installed (in my case it is d:\).
3)Then I set the path, classpath and Java_home and Tomcat_home also.
4)Now when i click on startup.bat in the bin dir. a window come on the screen but vanishes of in a second.
Now I am not able to figure out the problem and rectify the same.This I am talking about win NT platform .
Then I tried the same steps on win 98 there also I am finding the same problem,there I have increased my initial environment on dos window, but here the window does not vanishes but it displays 'Bad command or file name'.On both of these platform I have installed nothing else except Tomcat.
Please help me out, and do tell me if anything else is required to install or if we have to make any other changes in any of the files in tomcat directory.
Waiting for ur help.
Swati
23 years ago
Thanks for ur reply,but I have still not found the solution for my problem.
I have followed ur advice, but as soon as the servlet is called it shows me the error 'class not found'.
Actually at the time of compilation it gave me no error but at the run time it displayed the error on the screen.
I am enclosing my code so that u can help me out.Please give ur advice .
---------------------
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.util.*;
import java.sql.*;
public class sjvtechfin1 extends HttpServlet
{
String type[];
String typ,per,amount,formven,val;
int uid;
public void doGet(HttpServletRequest request,HttpServletResponse response)throws ServletException,IOException
{
doPost(request,response);
}

public void doPost(HttpServletRequest request,HttpServletResponse response)throws ServletException,IOException
{
type = new String[5];
response.setContentType("text/html");
PrintWriter out=response.getWriter();
out.println("<html><head></head><body>");
Enumeration parameters = request.getParameterNames();
String param = null;
uid = 012;
out.println("Welcome user "+uid+"<br>");
while (parameters.hasMoreElements())
{
param=(String)parameters.nextElement();
type[0]=param;
type[1]=param;
type[2]=param;
type[3]=param;

try
{
out.println("Swati <br>");

Class.forName("org.gjt.mm.mysql.Driver").newInstance();
Connection con = DriverManager.getConnection("jdbc:mysql://localhost/iba");

if (con!=null)
{
out.println("Swati");
Statement statement=con.createStatement();
PreparedStatement ps = con.prepareStatement("insert into sjvtechfin values(?,?,?,?,?)");
ps.setInt(1,uid);
ps.setString(2,type[0]);
ps.setString(3,type[1]);
ps.setString(4,type[3]);
ps.setString(5,type[2]);
ps.executeUpdate();
out.println("Swati");
}
}
catch (Exception ds)
{
out.println("error:"+ds);
}

out.println(param+":"+request.getParameter(param)+"<br>");
}

out.println("</body></html>");
out.close();

}
public String getServletInfo()
{
return "BasicServlet Information";
}
}
----------------------------
Waiting for ur reply.
Swati

Originally posted by Raukutam Sandeep:

Design u'r form just with HTML tags only and save the page with .html extension.
In action property of the form tag, give the path to .class(servlet) file.
As soon as u submit the form, it will look for the .class i.e., servlet file.
In the servlet write the code for inserting the values in a database. I think u know how to insert values in a database by retrieving the values from the form fields(using getParameter method of HttpServletRequest)...
Try this and get back...
Good luck!!!
regds,
Sandeep.


23 years ago
Hello,
I just want to know that if I had made one form using servlet and I want to store the values of form fields into a database, then what is the right procedure or method.
Actually firstly I have made the form using html tags in "out.println(" ");" command, but after that i was not able to submit the values into the database.
Then second time, first I made HTML package and import it into the servlet.But after I compiled my servlet and put the class file into Java web server's servlet directory,and when I want to load that servlet it shows me an error "Cannot upload servlet : null".
I am not able to catch the problem,pl. do help I am getting frustrated.Please can u explain me which method is correct and how to go about it.
I will be thankful to u if u just give me an example of making a servlet for submitting the values of form which consist of :
1)Label 'Name'; 2) Text field; 3)Submit button.
I will be very thanful to u. Pl. help me.
Swati
23 years ago
Hello,
I have made one servlet which is importing one package (HTML),which is again made of diff. classes:HTMLTable,HTMLForm etc.I have made all the classes for HTML pack. and it has compile without any error. And the servlet which is calling HTML package is:abc and this too has compiled without any error .
As I am working on java web server, so I have copied my abc.class file into the servlets directory of java web server.So now when i call my servlet in my browser by typing the url:http://localhost:8080/servlet/abc
it shows the page cannot be found.
So, I opened the admin page of java web server and tried to load the abc servlet but it show that "cannot upload the servlet:null"
I am not able to catch the problem so,please help me out and tell me that where I have got wrong.
Thanx.
(waiting for ur replies)
23 years ago
Hello Jayasri,
I am telling u the solution using java web server :
Steps:
1)Write one very simple servlet then compile it and copy the '.class' file into the java web server's 'servlet' directory.
2) open ur java web server admin page and add the name of ur servlet in servlets and then click on load button.
3) now open ur browser and write the following address in ur url: "http://localhost:8080/servlet/abc
where 'abc' is the name of ur servlet.
4) now ur servlet should work.
Do reply after u succeed.
Best of luck.
Swati
23 years ago

My question is that suppose we have created one html page which contains the following line - "invoke the servlet" in href tag like this line no.1)
<a href "http://localhost:8080/servlet/abcservlet">invoke the servlet</a>
where:
'abcservlet' is the name of a servlet.
My html page on local host works fine but if i have to host this page on internet i.e on one server then will there be any change in 'line no. 1' (i.e <a href ...> ) or not .If yes then what changes are to be made.
And my second question is : where to keep html pages and images which are calling/invoking the servlets i.e is it necessary to keep these files in public_html directory of java web server. Or there is any other way out
Thanx.
Waiting for ur reply.
Swati
23 years ago
jsp
to work on jsp i have downloaded jswdk and when i tried to start my server the dos windows opens up and quickly vanished away. I am not able to understand the problem , I have already set the classpath , but i am not able to catch the problem. Pl. can anybody tell me the right procedure to begin i.e to create the environment for start righting the jsp code . I have also tried using tomcat but that also didn't work out.
Pl. tell me from scratch - exactly what all is needed to download or install and how to configure the same.
I am just getting frustrated as i think half of our time is waisted on setting/creating the environment to work on.
Please help me out.

Thanx.
23 years ago
jsp
I am a novice in jsp so I want to know -
How can we setup an environment for running the jsp for the first time i.e what all is required to install and what all changes are to be made in classpath.
Waiting for the reply.
Thanx
23 years ago