Maching Chart on jsp page by retriving the data from database
Hi.
I want to draw bar, pi etc chart on the web page by getting the values from database oracle while implementing in jsp. kindly tell me how i can do this. Please write down the detailed code for it. Thankx.
Maybe you should try Cewolf which is a chart tag library based on JFreeChart to generate all kinds of charts in a JSP. See http://cewolf.sourceforge.net.
Regards,
Guido
Similar Messages
-
Can we retrive the data from Maintainence view
Hi Guys,
Can we retrive the data from Maintainence view...
Thanks,
Gourisankar.Hi,
Data can be retrived only from following type of views:
Projection view
Database View -
Problem in printing the data from database when i print inside servlet
hi to all!
the objective of the code below is getting the data from database table and has to send that data to the web browser using out.println .note: out - PrintWriter object
In a getQuestion method, i am getting the data from database table and store it in String q and when i print the q within this method it is getting printed, but i got the null value when i printed the String q inside service method doPost. why..? its puzzling me.
package servlet;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
public class test extends HttpServlet {
Connection con;
ResultSet rs;
Statement s;
StringBuffer q;
StringBuffer o1;
StringBuffer o2;
StringBuffer o3;
public void getQuestion() throws Exception
if(rs.next())
q=new StringBuffer(rs.getString("question"));
o1=new StringBuffer(rs.getString("option1"));
o2=new StringBuffer(rs.getString("option2"));
o3=new StringBuffer(rs.getString("option3"));
System.out.println(q);
System.out.println(o1);
System.out.println(o2);
System.out.println(o3);
public void connect(){
try
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:ds","sa","server");
s=con.createStatement();
rs=s.executeQuery("select * from qa order by newid()");
getQuestion();
catch(Exception e)
System.out.println("erroe");
public void doPost(HttpServletRequest request,HttpServletResponse response)
throws IOException,ServletException
response.setContentType("text/html");
new test().connect();
PrintWriter out=response.getWriter();
request.setAttribute("question", q);
request.setAttribute("option1", o1);
request.setAttribute("option2", o2);
request.setAttribute("option3", o3);
//RequestDispatcher rd=getServletContext().getRequestDispatcher("/show.jsp");
//rd.forward(request, response);
out.println("<html>");
out.println("<head>");
out.println("<title>" + "shock!!!" + "</title>");
out.println("</head>");
out.println("<body>");
out.println("<h2>"+"Read twice before u answer"+"<h2>");
out.println("<p></p>");
//why the value of q is not getting printed, instead i get null
out.println("<h2>"+ q +"<h2>");
out.println("how is it");
out.println("</body>");
out.println("</html>");
Edited by: Mahesh_yeswecan on Nov 29, 2008 10:42 AMAs u said , i have done a silly mistake earlier. though i have corrected the code still i am getting the same null value
package servlet;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
public class test extends HttpServlet {
Connection con;
ResultSet rs;
Statement s;
StringBuffer q;
StringBuffer o1;
StringBuffer o2;
StringBuffer o3;
public void getQuestion() throws Exception
if(rs.next())
q=new StringBuffer(rs.getString("question"));
o1=new StringBuffer(rs.getString("option1"));
o2=new StringBuffer(rs.getString("option2"));
o3=new StringBuffer(rs.getString("option3"));
System.out.println(q);
System.out.println(o1);
System.out.println(o2);
System.out.println(o3);
public void connect(){
try
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:ds","sa","server");
s=con.createStatement();
rs=s.executeQuery("select * from qa order by newid()");
getQuestion();
catch(Exception e)
System.out.println("erroe");
public void doPost(HttpServletRequest request,HttpServletResponse response)
throws IOException,ServletException
response.setContentType("text/html");
connect();
PrintWriter out=response.getWriter();
request.setAttribute("question", q);
request.setAttribute("option1", o1);
request.setAttribute("option2", o2);
request.setAttribute("option3", o3);
//RequestDispatcher rd=getServletContext().getRequestDispatcher("/show.jsp");
//rd.forward(request, response);
out.println("<html>");
out.println("<head>");
out.println("<title>" + "shock!!!" + "</title>");
out.println("</head>");
out.println("<body>");
out.println("<h2>"+"Read twice before u answer"+"<h2>");
out.println("<p></p>");
//why the value of q is not getting printed, instead i get null
out.println("<h2>"+ q +"<h2>");
out.println("how is it");
out.println("</body>");
out.println("</html>");
} -
[webdynpro] How to get the data from database and store in Excel sheet
Hi All-
I am developing an application in Webdynpro and I need to provide a URL ( link ) which if clicked , need to collect the data from Database ( SQL Server ) and puts in an Excel Sheet corresponding fields and opens the sheet.....
Please look into this issue and help me out......
Regards,
CrisHi Cris,
Add-on to wat santosh has pointed to:
Exporting table data to MS-Excel Sheet(enhanced Web Dynpro Binary Cache)
(Or) If you have implemented your logic to get Database records below Blog should guide you in opening an excel with ur records.
Exporting table data to MS-Excel Sheet(enhanced Web Dynpro Binary Cache)
Regards,
N. -
Pull the data from database.
Hi EveryBody,
I have a requirement in universe if the end user will select the date from (1/8/14 to 10/8/14) then pull the data from the database. but when the end user select the data more than 10 days(e.g 1/8/14 to 15/8/14 etc...) then no need to pull the data from database.
how will write the filter in the universe?
how will achieve this? please help me.
Thank you.Hi ,
I am assuming you are giving prompt for start date and end date respectively start_date and end_date.
please see the below work around. (below is pseudo code)
1. create one dummy objects as
case when @prompt(end_date) - @prompt(start_date) <= 10 then = 1 end
Remember text used in dummy object should be same as you use it for you date prompts
2. pull this objects in where clause along with your date prompts as
dummy_object = 1
It will work as below :=
your report will be prompted for start_date and end_date .
Same values will be passed to dummy objects.
When dummy object will be executed , it will check for end_date-start_date <=10 or not.
If it is less then 10 then query will executed else it will come out as where clause is not satisfied.
Hope this answers your question :-).
Regards
Jeevan -
Problem with displaying the data from Database on swf file.
Hi ,
I am new to flash.Thanks in Advance Please help me....
Actually my requirement is my application consists a button(submit_Btn) when we click on the button(submit_Btn), each time it must to database(through servlet) and brings the data from database and places it on the flash swf file.Here my problem is for the first time when we click on the button it goes to database and place the data(which was returned from database) on the swf file.Next when we click on the button for the second time(or anytime) it is not going and bringing the new data from database(if some data is modified in database or not),Infact it is showing the old data(the data that was collected from previous ClickListener) only on the swf file and it is also not showing any complile time or run time error.
my Code looks like this:
submit_Btn.addEventListener(MouseEvent.CLICK,onCheck2);
function onCheck2(evnt:MouseEvent):void {
var xmlLoader:URLLoader = new URLLoader();
var xmlurl:String = "http://localhost:8888/xmlServlet";
var xmlrequest:URLRequest = new URLRequest(xmlurl);
xmlLoader.dataFormat = URLLoaderDataFormat.TEXT;
xmlLoader.addEventListener(Event.COMPLETE, xmlcompleteHandler);
xmlLoader.load(xmlrequest);
function xmlcompleteHandler(event:Event):void {
var loader:URLLoader = URLLoader(event.target);
var succData:String=loader.data;
var xmlData:XML = new XML();
var xmlList:XMLList;
xmlData = XML(loader.data);
xmlList = xmlData.children();
for (var i=0; i<xmlList.length(); i++) {
for (var n=0; n<xmlData.UserHumanap[i].HumanapDot.length(); n++) {
var x_coordinate:Number = xmlData.UserHumanap[i].HumanapDot[n].@x;
var y_coordinate:Number = xmlData.UserHumanap[i].HumanapDot[n].@y;
var point2:Point = new Point(x_coordinate,y_coordinate);
var circle:Sprite = new Sprite();
circle.graphics.beginFill(0x00ff00);
circle.graphics.drawCircle(point2.x,point2.y,3); //Placing the data as dots on the swf file
Thanks in Advance.......Please Help me..........
its Urgent..........
Thanks,
SwarthiCheckout following line in your code
var xmlurl:String = "http://localhost:8888/xmlServlet";
now change it to
var xmlurl:String = "http://localhost:8888/xmlServlet?random="+String(MAth.random());
I think you will get the point now -
How to display the data from database(MS access) to a textbox
anyone know ?
how to display the data from database(MS access) to a
textboxThe reply hasn't changed over these years. Read the tuutorial on how to fetch the data. You can display it anywhere you feel like. :)
http://java.sun.com/docs/books/tutorial/jdbc/ -
hey guys
i installed the sqlite and sqlite-net as requested in other answers i found, changed to x86, and add the .db3 file in my project.
but the problem is how to retrive the data that already in the file( i am not creating any table or data in the app, just read)
all the answer i found is to create a table first and then read the table, i tried to skip the step of creating a table, and read from the table directly, but failed with " no such table", by the way, i set the property of the .db3 file as "content",
"copy if newer"
can anyone please help? i appreciate that !Hello,
From your description, you want to read data from available sqlite file. When you add the sqlite file into your project, you need to change the sqlite file build action to content. After deploying to device, the sqlite file is located in installation folder,
you need to copy that file into storage folder before reading data. Please try the following code snippets.
private async void Button_Click_9(object sender, RoutedEventArgs e)
//check if file exists in storage folder, and then copy to local storage
bool flag = await FileExistsAsync("Data.db3");
if (!flag)
var folder = await Package.Current.InstalledLocation.GetFileAsync("Data.db3");
await folder.CopyAsync(Windows.Storage.ApplicationData.Current.LocalFolder);
// open sqlite and read data
public async Task<bool> FileExistsAsync(string fileName)
try
await Windows.Storage.ApplicationData.Current.LocalFolder.GetFileAsync(fileName);
return true;
catch (FileNotFoundException)
return false;
Regards,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate
the survey. -
Root disk craches how to retrive the data from ZFS file systems.
Hi Friends,
The solaris 10 OS (root disk) is crached.i have configered execpt root disk to all disks for ZFS file systems.We using to application.Now any possble to retrive the data.
Server model - V880
Pls help me.
Advance thanks.If the OS wasn't on ZFS, then just rebuild the server, hook up the drives and run 'zpool import'. It should find the pool on the disks and offer it up to be imported.
Darren -
Error while retriving the data from the database
morning we shutdown and start up the server.after that when i am retreving the data from the database it is giving the following error.
ora-04030: out of process memory when trying to allocate 64512 bytes(sort subheap,sort key)
pga_aggregate_target details are as follows
value=2147483648
display value=2g
is default=false
is sesmodifiable=false
hash=2184567208Please look at the following link :
how solve ORA-04030: out of process memory when trying to allocate
Cheers! -
Retriving the data from the database
HI
Hello Experts
I have to retreve the data from atleast 10 different tables which are co-releated to each other by DocEntry
field ,i have designed the query accordingly i need a single output but i am getting multiple rows in the output for single record (this tables are releated to each other which r also containing the data from matrix ) can u help.
With Regards
Satish.SELECT [@PACK].DocEntry, [@PACK].DocNum, [@PACK].U_PId, [@PACK].U_Name + ' ' + U_LName'Patient Name' , [@PACK].U_ISex, [@PACK].U_Age, [@PACK].U_Pulse,
[@PACK].U_Weight, [@PACK].U_BP, [@PACK].U_ALSTTIME, [@PACK].U_ALEDATE, [@PACK].U_ALETIME, [@PACK].U_ALSTDATE, [@PACK].U_VId,
[@PACK].U_PHI, [@PACK].U_FHis, [@PACK].U_Nurse, [@PACK7].DocEntry AS Expr1, [@PACK7].LineId, [@PACK7].U_ILid, [@PACK7].U_ILType,
[@PACK7].U_ILName, [@PACK7].U_Date, [@PACK7].U_LNo, [@PACK7].U_Remark, [@PACK8].DocEntry AS Expr2, [@PACK8].LineId AS Expr3,
[@PACK8].U_IRid, [@PACK8].U_IRType, [@PACK8].U_IRName, [@PACK8].U_Date AS Expr4, [@PACK8].U_Remark AS Expr5, [@PACK8].U_Rno1,
[@RISK].Code, [@RISK].DocEntry AS Expr6, [@RISK].U_PID AS Expr7, [@RISK1].Code AS Expr8, [@RISK1].LineId AS Expr9, [@RISK1].U_Status,
[@RISK1].U_RFactor, [@DRUG].Code AS Expr10, [@DRUG].DocEntry AS Expr11, [@DRUG].U_PID AS Expr12, [@DRUG1].Code AS Expr13,
[@DRUG1].LineId AS Expr14, [@DRUG1].U_DName, [@DRUG1].U_RDrug, [@DRUG1].U_RDate, [@DRUG1].U_Reason,
[@HIS_OTSCH].DocEntry AS Expr15, [@HIS_OTSCH].LineId AS Expr16, [@HIS_OTSCH].U_OTTable, [@HIS_OTSCH].U_Duration,
[@HIS_OTSCH].U_Date AS Expr17, [@HIS_OTSCH].U_DName AS Expr18, [@HIS_OTSCH].U_PName, [@HIS_OTPOS].DocEntry AS Expr19,
[@HIS_OTPOS].LineId AS Expr20, [@HIS_OTPOS].U_Recov, [@HIS_OTPOS].U_TOAne, [@HIS_OTPOS].U_Attend, [@HIS_OTPOS].U_ONotes,
[@H_IPDBR].DocEntry AS Expr21, [@H_IPDBR].LineId AS Expr22, [@H_IPDBR].U_BBNO, [@H_IPDBR].U_BGroup,[@H_IPDBR]. U_RHFac,
[@H_IPDBR].U_Volume, [@H_IPDBR].U_BCompo, [@H_IPDBR].U_DColl, [@H_IPDBR].U_DExpire, [@PACK11].DocEntry AS Expr23,
[@PACK11].LineId AS Expr24, [@PACK11].U_ANo, [@PACK11].U_DBy, [@PACK11].U_Source, [@PACK11].U_Desti, [@PACK11].U_Date AS Expr25
FROM [@PACK] INNER JOIN
[@PACK7] ON [@PACK].DocEntry = [@PACK7].DocEntry INNER JOIN
[@PACK8] ON [@PACK].DocEntry = [@PACK8].DocEntry INNER JOIN
[@PACK11] ON [@PACK].DocEntry = [@PACK11].DocEntry INNER JOIN
[@RISK] ON [@PACK].DocEntry = [@RISK].DocEntry INNER JOIN
[@RISK1] ON [@PACK7].LineId = [@RISK1].LineId INNER JOIN
[@DRUG] ON [@PACK].DocEntry = [@DRUG].DocEntry INNER JOIN
[@DRUG1] ON [@PACK7].LineId = [@DRUG1].LineId INNER JOIN
[@H_IPDBR] ON [@PACK].DocEntry = [@H_IPDBR].DocEntry INNER JOIN
[@HIS_OTSCH] ON [@PACK].DocEntry = [@HIS_OTSCH].DocEntry INNER JOIN
[@HIS_OTPOS] ON [@PACK].DocEntry = [@HIS_OTPOS].DocEntry where [@PACK].U_PId='P8'
Here is the query i am getting the multiple rows in the output i require a single row output and i m going to pass PId as parameter after obtaining the desired output. (i have tried with distinct) -
How to retrive the data from structure
Hi Guru's,
I have an doubt in how to retrieve the data from the standard structure or view .i want to retrieve the data from std structure name is (IOOPCOMP) in that structure i want to fetch the field DENMNG ,MENGE,EINHEIT how do i write select query to print the value . if any one can have any example structure related program give me its very helpful for me.
with regards,
senHello Senthil
The solution for your problem is trivial. Checking the Where-Used-List for structure IOOPCOMP (on release 4.6c) there is neither a function module nor a class using this structure (or fields of it).
However, the structure is used in the following list of programs:
PPIO_ENTRY
PPIOA000
PPIOB000
PPIOC000
PPIOD000
PPIOE000
PPIOF000
PPIOG000
PPIOH000
PPIOI000
PPIOK000
PPIOM000
PPIOO000
PPIOQ000
PPIOR000
PPIOS000
PPIOT000
PPIOW000
PPKALKFI
PPPIA000
PPPID000
PPPIG000
PPPIH000
PPPII000
PPPIK000
PPPIM000
PPPIO000
PPPIQ000
PPPIR000
PPPIT000
PPPIW000
RCCLORD
SAPDBIOC
SAPLCOWORK240
SELECT_OPERATION
If you know judging from your business context which program is the right one you are half-way on the home stretch.
Regards
Uwe -
NEED THE LOGIC TO RETRIVE THE DATA FROM IT2001 SUBTY 0910 AND 0100
HI ALL,
ITS URGENT
NEED THE LOGIC TO RETRIEVE THE DATA FROM IT2001(P2001) SUBTY 0910 AND 0100.
BEST REGARDS
SUNILHi,
Please find the logic to retrieve the data from IT2001.
<b>Infotypes : 2001 mode n."Declare the infotype in the infotypes declaration.
Get pernr.
RP-READ-ALL-TIME-ITY PN-BEGDA PN-ENDDA."Retrieves all the records of absence
LOOP AT P2001 WHERE SUBTY = XYZ.
Write the logic.
ENDLOOP.</b>
Regards,
Pavan Kattamuri. -
Selecting the data from database and sending to users using javamail
how to select the records from database table in oracle and send automatically to users using javamail. I am able to send the txt msg. but dont know how to send the selected table data to users automatically.
can anyone suggest how to write the steps with database connection to send msgs containing data to different users
Thank Youusing JDBC..you want to
1. create the connect
2. open the connection
3. query the table for the data
4. loop through the resultset to retrieve rows of data
5. do something with the data
6. email the result
once you have the data, it is up to you to determine the format to send to the user using JavaMail. It is easiest to send plain text
here's a site that give code example (for all steps above relating to JDBC):
http://javaalmanac.com/egs/java.sql/pkg.html -
Extract the data from database and send to XI in form of file
hi,
I am working on a scenario in which i am to extract thew data from an ODBC database. and send it to Integration Engine using a file adapter. In this case which adapter i should use? If i go for file adapter then how i will extract the data and if i go for JDBCadapter then i can't send the data in the form of file which is my basic requirement.
Can someone help me out.Hi,
You can Use JDBC Adapter to pull the data from Dbase very well.
Check this For Refference Use
PERIODIC SCHEDULING OF DATA BETWEEN ORACLE DB & R/3 SYSTEM
Regards
Seshagiri
Maybe you are looking for
-
HT201413 the apple mobile device wont even install on my pc
I have unisnstalled and reinstalled and i have tried going into services and starting there but its not in the services menu It also tells me that i must uninstall and reinstall the 64 bitversion which i have already done many times. Any fresh ideas?
-
Preceeding zeros disapprearing in the excel download.
I have programmed ALV report using function module REUSE_ALV_GRID_DISPLAY. I have declared my final output internal table's batch field as CHARG_D which is of 10 characters. I have passed field_catelog-no_zero = 'X'. for batch field. However when I
-
HT5544 I have deleted a book from iBooks but I also want to delete the cover
How do i delete the cover of a deleted book from ibooks?
-
JMS Deployment Descriptor Error
Hi, I am using Netbeans 6.0 and the Sun Application Server 9.1. I have an Enterprise project which includes an application client, and a message bean. When I attempt to run the project the following error crops up, Referencing error: this bundle has
-
Can't get rectangular bounds of a Group
In the program below, I expected the rectangle to be drawn around all the widgets in the testGroup but rectangle is only drawn around Button1. Tried boundsInLocal, boundsInParent, boundsInScene and layoutBounds without success. Any clues? import java