ResultSet problem plzz help me!! urgent!!
i am passing the result set to another jsp page through hidden variable..........
But it will return in string only.If i typecaste that.........
It is giving error......
In First page process the resultset and make a Vector of Properties out of it where each element in the Vector will be of type Properties representin each row of the database.
Vector vec = new Vector();
while(rs.next())
Properties prop = new Properties();
prop.setProperty(columnname1,value1); // get all strings from resultset and set them to this property
prop.setProperty(columnname2,value2);
vec.addElement(prop);
now set this vector vec object to session and access it in the second page.
Similar Messages
-
Problem with downloading images from image URL's _ Plzz help me urgent
Hello,
I have a set of URL's in a hashtable. Now using the the enumerator, for each URL, I am trying to download the Image. The example for the image URL is something like this:
http://gallery.hd.org/_exhibits/flowers/_more2003/_more09/flower-Holland-Netherlands-RF.jpgI am using ImageIO.read(new URL("URL")) for downloading the image
My problem is, if I get a URL which is broken link like the below exaple
http://www.ossrc.org.in/images/cii-shiksha.jpgmy code is waiting for for the data to come in. The code is hanging there. My code does not terminates but hangs and does not proceed futhur. How to resolve this problem. Please tell me.
Its very urgent plzzzzzzzzz.
Thanks,
chaitanya
Message was edited by:
RKCOh, too bad, it's urgent. I must be too late.
-
HI,
to all experts.
i am facing a problem..plzzz help
we have several different modules which are .ear file..
now we have to combine those modules into one a big application,and we want to add new modules also..this is one task..
the other one is,we 've already delivered some modules to client.now the client want to update his application by adding the new modules .he doesn't want to change his entire application.
those modules r in ear format.
we have to develope an executable which detects already existing modules and it should add the new modules..
the technologies what we used is Jsp,servlets...ant
what we r going to use is ejb3.0,ant,other tech like xml also..
Any ideas how to do,
ThanksRestart. If that doesn't help, re-install. Your JVM installation can't access its rt.jar.
-
JDesktop Problem plz help me urgent
sir
i do the following
class mydesk extends JDesktop
mydesk()
//some code here but not using layered pane
class main extends JFrame
public static mydesk desk=new mydesk();
main()
//container here
cp.add(desk);
now i create a menu bar class and write events in this class
then i make a internal frame class and initilize that in menu class
now i write action performed method here
public void actionPerformed(ActionEvent e)//in menu class
main.desk.add(frame);//frame is the object of IntenalFrame
The problem is that it throws a exception illegal component position
but when i add frame object in main class it works well
what is the problem when call in menu class
thanks in advanceFormatting the code makes it easier to read, which means more people may attempt to read your code and answer your questions. Click on the "Help" link at the top of the page.
import java.awt.*;
import javax.swing.*;
import javax.swing.table.*;
public class TableHeader extends JFrame
public TableHeader()
JTable table = new JTable(5, 5);
table.setPreferredScrollableViewportSize(table.getPreferredSize());
JScrollPane scrollPane = new JScrollPane( table );
getContentPane().add( scrollPane );
table.getTableHeader().setBackground( Color.red );
public static void main(String[] args)
TableHeader frame = new TableHeader();
frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
frame.pack();
frame.setLocationRelativeTo( null );
frame.setVisible(true);
} -
Procedure Problem (PLEASE HELP. URGENT!!!!!)
Hi all,
I am getting a weird problem.
This has to do with ORDSYS image signature. I think it might not appear
in the table for some reason. Could you please tell me what is wrong
with it because it drives me crazy!
The procedure statement is:
CREATE OR REPLACE PROCEDURE assign_loadimage
(filename IN VARCHAR2)
AS
obj ORDSYS.ORDImage;
sig ORDSYS.ORDImageSignature;
ctx RAW(4000) := NULL;
cursor get_current_img is
select max(id) from assign_photos;
item_id NUMBER(10);
BEGIN
INSERT INTO assign_photos VALUES
ASSIGN_PHOTO_SEQ.nextval,
null,
null,
ORDSYS.ORDImage
ORDSYS.ORDSource(empty_blob(),NULL, NULL,
NULL,SYSDATE,NULL),NULL,NULL,NULL,NULL,NULL, NULL,NULL
ORDSYS.ORDImage
ORDSYS.ORDSource(empty_blob(),NULL, NULL,
NULL,SYSDATE,NULL),NULL,NULL,NULL,NULL,NULL, NULL,NULL
ORDSYS.ORDImageSignature.init(),
empty_clob(),
empty_clob());
COMMIT;
open get_current_img;
fetch get_current_img into item_id;
SELECT picture INTO obj FROM assign_photos
WHERE id = item_id FOR UPDATE;
obj.importFrom(ctx,'FILE','ISAD303_PHOTOS', filename);
UPDATE assign_photos
SET picture=obj WHERE id = item_id;
COMMIT;
SELECT picture,image_sig INTO obj,sig
FROM assign_photos
WHERE id = item_id FOR UPDATE;
sig.generateSignature(obj);
UPDATE assign_photos SET image_sig = sig
WHERE id = item_id;
COMMIT;
close get_current_img;
END assign_loadimage;
As you can see I am generating a signature using:
sig.generateSignature(obj);
When I execute it I get:
SQL> exec compareimagescore(1, 100);
BEGIN compareimagescore(1, 100); END;
ERROR at line 1:
ORA-29400: data cartridge error
IMG-00805: SIGNATURE data has been corrupted or is invalid
ORA-06512: at "ORDSYS.SCOREFUNC", line 0
ORA-06512: at "ORDSYS.SIMILARFUNC", line 22
ORA-06512: at line 1
ORA-06512: at "ZKOSTASP.COMPAREIMAGESCORE", line 7
ORA-06512: at "ZKOSTASP.COMPAREIMAGESCORE", line 20
ORA-06512: at line 1
Could you please let me know what I have done wrong?
Thank you,
KostasWhat exactly is your problem? Or are you just expecting somebody to do your homework for you?
The more specific you are the more likely somebody is to help you. This is a voluntary forum and most of us have to work for a living.
Regards, APC -
JTable problem plz help me urgent
sir
i carefully read the swing tutorial for JTable for the purpose
of rendring specially header rendring.
first u see the code
import java.awt.event.*;
import javax.swing.*;
import java.awt.*;
import javax.swing.border.*;
import java.util.*;
import javax.swing.table.*;
public class Myscrollpane extends JScrollPane
ImageIcon icon=new ImageIcon("images/beach1.jpg");
Image img;
int w,h,wi,hi;
TableColumn column = null;
/*Vector cols=new Vector();
cols.addElement("Company Code");
cols.addElement("Company Name");
String[] names = {"Company Code", "Company Name"};
DefaultTableModel model=new DefaultTableModel(names,0);
JTable table=new JTable(model);
LogoViewport vp;//custom class extends with JViewport
Myscrollpane(int width,int height)
vp= new LogoViewport(width,height);
setOpaque(false);
setMinimumSize(new Dimension(width,height));
setPreferredSize(new Dimension(width,height));
setSize(350,125);
///////////here r the table methods to control /////////////////////
table.setPreferredScrollableViewportSize(new Dimension(width,height));
table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF );
table.getTableHeader().setReorderingAllowed(false);
table.setBackground(new Color(245,235,237));
table.setForeground(Color.black);
table.setOpaque(true);
table.setEnabled(false);
table.setFont(new java.awt.Font("Dialog", Font.ITALIC, 12));
table.setGridColor(Color.pink);
table.setRowHeight(22);
table.setSelectionBackground(Color.lightGray);
DefaultTableCellRenderer renderer=new DefaultTableCellRenderer();
TableColumn code=table.getColumnModel().getColumn(0);
renderer.setBackground(Color.red);
????//if i use the setIcon method then the data comes from the database
????//is not shown because the icon paint above the data.
code.setCellRenderer(renderer);
TableCellRenderer headerRenderer = table.getTableHeade.().getDefaultRenderer();
TableColumn column1=null;
???//i use this to change the color of header column but it is not work
for (int j = 0; j < 2; j++) {
column1 = table.getColumnModel().getColumn(j);
Component comp = headerRenderer.getTableCellRendererComponent(
null, column1.getHeaderValue(),
false, false, 0, 0);
comp.setBackground(Color.red);
???//if i use following it also not work
TableCellRenderer headerRenderer = table.getTableHeader().
getDefaultRenderer();
if (headerRenderer instanceof DefaultTableCellRenderer) {
((DefaultTableCellRenderer)headerRenderer).setBackground(Color.red);}
for (int i = 0; i <=1; i++)
column = table.getColumnModel().getColumn(i);
if (i == 0) {
column.setPreferredWidth(100);
else
column.setPreferredWidth(225);
vp.setView(table);
this.setViewport(vp);
plz help me with the code.
i also want to draw the image on the table with the use of DefaultTabel
Model and data set from the data base.Initally no row is shown.
plz help me
shown(???) are the quesstion which i am unable to solve.
thanks in advance.Formatting the code makes it easier to read, which means more people may attempt to read your code and answer your questions. Click on the "Help" link at the top of the page.
import java.awt.*;
import javax.swing.*;
import javax.swing.table.*;
public class TableHeader extends JFrame
public TableHeader()
JTable table = new JTable(5, 5);
table.setPreferredScrollableViewportSize(table.getPreferredSize());
JScrollPane scrollPane = new JScrollPane( table );
getContentPane().add( scrollPane );
table.getTableHeader().setBackground( Color.red );
public static void main(String[] args)
TableHeader frame = new TableHeader();
frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
frame.pack();
frame.setLocationRelativeTo( null );
frame.setVisible(true);
} -
JTable problem plz help me urgent withDefault TableModel
sir
i carefully read the swing tutorial for JTable for the purpose
of rendring specially header rendring.
first u see the code
import java.awt.event.*;
import javax.swing.*;
import java.awt.*;
import javax.swing.border.*;
import java.util.*;
import javax.swing.table.*;
public class Myscrollpane extends JScrollPane {
ImageIcon icon=new ImageIcon("images/beach1.jpg");
Image img;
int w,h,wi,hi;
TableColumn column = null;
String[] names = {"Company Code", "Company Name"};
DefaultTableModel model=new DefaultTableModel(names,0);
JTable table=new JTable(model);
LogoViewport vp;//user class extends with JViewport
Myscrollpane(int width,int height){
vp= new LogoViewport(width,height);
setOpaque(false);
setMinimumSize(new Dimension(width,height));
setPreferredSize(new Dimension(width,height));
setSize(350,125);
///////////here r the table methods tocontrol /////////////////////
table.setPreferredScrollableViewportSize(new Dimension width,height));
table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF );
table.getTableHeader().setReorderingAllowed(false);
table.setBackground(new Color(245,235,237));
table.setForeground(Color.black);
table.setOpaque(true);
table.setEnabled(false);
table.setFont(new java.awt.Font("Dialog", Font.ITALIC, 12));
table.setGridColor(Color.pink);
table.setRowHeight(22);
table.setSelectionBackground(Color.lightGray);
DefaultTableCellRenderer renderer=new DefaultTableCellRenderer();
TableColumn code=table.getColumnModel().getColumn(0);
renderer.setBackground(Color.red);
//if i use the setIcon method then the data comes from the database is
//not shown because the icon paint above the data.Iwant to paint the
//image on the table dynamically means as table populated the image is
//paint on the table means no fix no of rows.How can i
//do.
code.setCellRenderer(renderer);
TableCellRenderer headerRenderer = table.getTableHeade.().getDefaultRenderer();
TableColumn column1=null;
//i use this to change the color and paste icon of header column
//but it is not work
for (int j = 0; j < 2; j++) {
column1 = table.getColumnModel().getColumn(j);
Component comp = headerRenderer.getTableCellRendererComponent(null, column1.getHeaderValue(), false, false, 0, 0);
comp.setBackground(Color.red);
comp.setIcon(new ImageIcon("myimage.gif")); }
//if i use following it also not work
TableCellRenderer headerRenderer = table.getTableHeader().getDefaultRenderer();
if (headerRenderer instanceof DefaultTableCellRenderer) {((DefaultTableCellRenderer)headerRenderer).setBackground(Color.red);} vp.setView(table);
this.setViewport(vp);
}plz help me with the code.
stated as above i also want to draw the image on the table with the use of DefaultTabel
Model and data set from the data base.Initally no row is shown.
plz help me
thanks in advanceimport java.awt.*;
import javax.swing.*;
import javax.swing.table.*;
public class TableHeader extends JFrame
public TableHeader()
Object[] columnNames =
new ImageIcon("copy16.gif"),
"Some Text",
new ImageIcon("add16.gif")
// Columns headings are cast to a String when created automatically.
// We want Icons, so use a special renderer and create the columns manually
JTable table = new JTable();
table.getTableHeader().setDefaultRenderer( new HeaderRenderer() );
for (int i = 0; i < columnNames.length; i++)
TableColumn newColumn = new TableColumn(i);
newColumn.setHeaderValue( columnNames[i] );
table.addColumn(newColumn);
table.setPreferredScrollableViewportSize(table.getPreferredSize());
JScrollPane scrollPane = new JScrollPane( table );
getContentPane().add( scrollPane );
class HeaderRenderer extends DefaultTableCellRenderer
public Component getTableCellRendererComponent(
JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int col)
setBorder(UIManager.getBorder("TableHeader.cellBorder"));
setHorizontalAlignment(CENTER);
// color each cell
if (col == 1)
setBackground( Color.yellow );
else
setBackground( Color.green );
// display text or icon
if (value instanceof Icon)
setIcon( (Icon)value );
setText( "" );
else
setIcon( null );
setText((value == null) ? "" : value.toString());
return this;
public static void main(String[] args)
TableHeader frame = new TableHeader();
frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
frame.pack();
frame.setLocationRelativeTo( null );
frame.setVisible(true);
} -
Emctl problem pl help..urgent....
Sirs,
We are running Oracle 10g/red hat linux.
We have two databases running A and B.
if i run "emctl start dbconsole" only am able to access db A.
can we have two OEM running?
thanks and regards,
ktFollowing are steps to do to use EM console for Database B :
- set ORACLE_SID for Database B
- run emca or dbca command to create DB Control Repository. See http://download-west.oracle.com/docs/pdf/B12013_01.pdf
- run "emctl start dbconsole"
Normally 5500 is port for first DB (A in your case), 5501 for second (B). -
Urgent: Sessions problem pls help me
Hi all,
Its already late to post this problem.pls help me urgently.
I have a servlet & two jsp's. first i request servlet, it processes something and forwards request to my first jsp. In that jsp on a button click, i'm displaying a new popup by calling showModalDialog. this dialog gets data from the same servlet but it forwards to my second jsp.(second jsp can be seen in dialog)
Now if i submit form from my second(dialog) jsp, the servlet reports that session has expired. I tried a lot but invain. any one who helps me is appreciated well by all of our forum.
waiting 4 u r reply,It could be that you have cookies turned off and you're not using URL Rewriting.
In J2EE, the first time your browser makes a request to the server, the server responds and appends a SESSION_ID parameter to the request as well as storing a cookie with the SESSION_ID.
The second time your browser makes a request, the server checks for the cookie. If it doesn't exist it checks for the parameter. If neither exist the server assumes its the first time your browser has made a request and behaves as describe in the previous paragraph.
In your case when you submit the form if you have disabled cookies and the action attribute doesn't have the SESSION_ID paramter appended to the url, the browser will assume it's a first request. The user will not be logged in, hence your session has expired error.
To fix this you need to encode the URL in your JSP. You can use the struts html:rewrite tag or the HttpServletReponse.encodeURL method, or if you're using JSP 2.0 the JSTL c:url tag. -
it is shwing that it has ebcountered an eror from reading from its preview cache and needs to qiut...
after re-instalation also it i still showing the same thing... plzz help me.That error message indicates that your preview cache files have become corrupt. This is not a critical problem to solve. Just delete the previews file it carries the same name as your catalog file with the extension ending "Previews.LRDATA" see the screen capture. Delete this file and when you next restart Lightroom it will rebuild the previews.
The link below will let you know where the file is located.
Preference and other file locations | Lightroom 4 -
URGENT: REGARDING ROUTING REPORT(plzz help me out)
Hi,
I am making a report in which i have to display the stock during the routing i.e. in CA03 we get to know which are the operations are implemented on a material. the requirement is if there are 50 pcs of material are in 1st operation and only 10 materials are able to reach next stage of operations ,then how many pcs of a material are left among them? i want to know which are the tables used for these qtys as i am checking that in CA03 the values are in structure and i want to know in which tables these quantities to be present.
plzz help me out as it is really urgent and help will be definitely rewarded.
Edited by: ric .s on Apr 1, 2008 7:45 AMhi,
can anybody tell me which are the tables used in the routing? -
I want to buy an in-app purchase but i don`t remember my security questions and i cant access my recovery email either, what can i do? i have 100$ on my account and cant use it because of that problem, please help URGENT
If you have a rescue email address on your account then you can use that - follow steps 1 to 5 half-way down this page will give you a reset link on your account : http://support.apple.com/kb/HT5312
If you don't have a rescue email address (you won't be able to add one until you can answer your questions) then you will need to contact Support in your country to get the questions reset : http://support.apple.com/kb/HT5699 -
Date format Problem in OAF R12 Urgent Please help!!!
We have acustom application in OAF which was developed in 11i. Now we migrated the same to R12.
In this there are two date fileds getting dispayed on the page and the query for the same is
SELECT TO_CHAR (SYSDATE, 'dd-mm-yyyy') AS CURRENT_DATE, UPPER (TO_CHAR (SYSDATE - 10, 'mon-yy')) AS g_period, UPPER (TO_CHAR (SYSDATE + 5, 'mon-yy')) AS gnext_period, TO_CHAR (sysdate,'dd-mon-yyyy') as today_date, TO_CHAR (sysdate - 1,'dd-mon-yyyy') as yesterday_date FROM DUAL
In 11i version the output is dispaying correctly but in R12 the current date is dispayed as
Start Date 04-Nov-5242
End Date 04-Nov-5241
As per logic it should be
Start Date 09-Feb-2012
End Date 10-Feb-2012
Please help..Urgent issue.Here are the answers to your problems :
1. Once u restart , the oracle services and the database is not mounting automatically.That is because, when you install the Oracle Oracle8i Standard Edition Release (8.1.7), the two key services namely
OracleOraHome81TNSListner and
OracleService<your SID name>
are configured as manual start ( check the NT --> start>setting>control panel>services. )
For the database to start automatically the next time you start your machine, these two services will have to be put into "Automatic Start" mode.
< for this double click on the respective service, select the "Automatic" radio button and click on ok>.
Now when you restart the machine, your database will be automatically mounted.
2. this as explained above is a corollory to the above problem. you can start or stop your database on NT using the "Services" window....
hope this helps.
bye.
Hi All,
I have installed Oracle Oracle8i Standard Edition Release (8.1.7) from technet site.
I have installed it on windows NT 4.0 .
Installation is fine.
I can access or get into SQL prompt .
I have created a database also.
1st problem
My problem is once I restart the Machine and try to access SQL plus .it gives me an error
ORA-01034: Oracle not available
ORA-27101: shared memory realm does not exist.
2nd problem
I dont know how to start and stop the database , as there is nothing to do that in the start menu of Oracle .
How do i do this .
This is very urgent please help.
regards,
Preeti -
Urgent.. JSTL problem. plz help
I need some help with JSTL string comparison. Plzz someone help!
I am retrieveing values from an xml file and checking for equality between two strings. Even though the strings are same it does not go in the if condition where I check for equality. I am able to retrieve the correct value from xml and also it is same because I am dispalying the values but its comparison is false. Could someone tell me a possible reason for the same.
Plzzz help..I am stuck up with this problem since quite long and not able to get a solution.
this is the code where I compare
<c:out value="${d} : ${e} : ${d == e}"/>
the output i get is
[name="ROSS"] : [name="ROSS"] : false
I even calculated the length of the string ..that too is same 4, 4 ! So I do not think there are any blank spaces.
Plzz help!
Thanks a lot!It looks like you are comparing two objects that both have a toString method that returns the same value. Doesn't mean the objects are equal.
what are d and e?
if they are objects I'm not sure the best way to compare the two values...
perhaps add a getValue method to the object and then compare {d.value==e.value} -
Problems with the Strings Urgent Help needed
I have a unique problem. I have to retrieve a particular value from a String. I tried using String tokeniser but in vain. I cannot use java.util.regex package to match the expressions as the version of java on the client m/c is 1.1.8 and they are not ready to upgrade the same.
The string From which I have is a very long one running into more than 100 lines which can vary from case to case all I know is to retrieve the value which is just in front of "TestValue" which occur only once in the String Can Anybody suggest a bettter alternative.
Thanx.
ebistrioStringTokenize on TestValueHow would you suggest that was done?
As I understand it StringTokenizer tokens = new StringTokenizer(string, "TestValue"); would not tokenize on the string "TestValue" but on any of the characters 'T', 'e', 's', 't', 'V', 'a', 'l' or 'u'. This is a common java pitfall in my opinion due to bady named parameters (I feel it should be called "delims" not "delim") or in other people's opinion due to bad parameter type (should be a char[] not a string).
A clearer explanation of the problem would help.
Maybe you are looking for
-
Dynaset cannot be created in Windows client if you bypass onames/tnsnames
Overview: We were having a problem with slow (60 seconds) login times from our OO4O application using onames. SQL*Plus was just as slow to process a login. Using a TNSNAMES.ORA file caused the login to be almost immediate, but the solution was not ac
-
Page reload using Ajax/ Javascript
Hi All, I am new to Ajax, in my application i have to reload the page once i click on the link on a report column. Another one is how to call "On load process" by clicking on the report link. Can anybody help on this. thanx Madhu
-
Extreme base station+express "n" as booster
Hi I'm having difficulty connecting my AX 1264 as booster to my AE (802.11n) i read the threads, so i know the general procedure. however when i went to AU->wireless mode->extend a wireless network->wireless network name the network on my AE is not
-
Hello - I have 1:57 mins. of video that I exported from FCP (MOV) Self Contained. Now to make a _GOOD QUALITY_ dvd. Do I take it to Compressor then DVD Studio Pro or straight to DVD Studio Pro? Additional info: -Imported Video to FCP from MINI-DV tap
-
Firefox comes up only in basic HTML mode
Firefox displays the first stage (?) and stops there. Tries again and goes no further. I have to click on basic HTML for it to proceed.