khad M

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

Recent posts by khad M

Hi
Iam new to web sphere.
Hence let me know the URL to access the petstore example application.
Regards
Khad M
22 years ago
Hi
We have developed a application based on struts frame work.
I have observed one problem on our application.
i.e when a user clicks any button/performs any action,
the status bar in the browser will show the URL path mapped to that action.
And adjacent to the status bar a blue color bar will come indicating the % of completion of the response(i think so...).
How ever the problem....is ....even after the reponse was over. i.e
when the servlet execution over and reponse reaches to JSP.....even..then also the blue color bar is remaining visible(indicating that it was processing some request......while the fact is that the response was already finished).
So what could be the reason behind this....any ideas...???

Regards
Khad m
HI
Let say i want to use
system.out.println()
for printing onto the console of TOMCAT.
How to do that...!!!

Khad M
22 years ago

Originally posted by sandeep rane:
hi
i am new to taglib in jsp.
I have written
1)counter.tld
2)counter.java
3)counter.jsp
I am using weblogic5.1 version .
I placed counter.tld file in c:\weblogic\myserver\public_html\web-inf directory and
I placed jsp file in public_html
i placed counter.class file in servletclasses directory.But it is giving error that counter.class is bad file .please remove it or keep it in correct directory.
please help me for the correct location of all the files.


************************************
CAN ANY BODU TELL SOLUTION FOR THE ABOVE PROBLEM...???
KHAD M
22 years ago

Originally posted by sandeep rane:
hi
i am new to taglib in jsp.
I have written
1)counter.tld
2)counter.java
3)counter.jsp
I am using weblogic5.1 version .
I placed counter.tld file in c:\weblogic\myserver\public_html\web-inf directory and
I placed jsp file in public_html
i placed counter.class file in servletclasses directory.But it is giving error that counter.class is bad file .please remove it or keep it in correct directory.
please help me for the correct location of all the files.


************************************
CAN ANY BODY TELL SOLUTION FOR THE ABOVE PROBLEM...???
KHAD M
22 years ago
Hi Friends
Iam getting the follwoing Error.
What could be the Reason?
Iam using weblogic5.10 as app server.
*********************************************************************************
Parsing of JSP File '/Sample Hello.jsp' failed:
--------------------------------------------------------------------------------
/Sample Hello.jsp(1): Could not parse deployment descriptor: org.xml.sax.SAXParseException: Could not parse taglib, starting at line 2
probably occurred due to an error in /Sample Hello.jsp line 1:
<%@ taglib uri="/oreillySample.tld" prefix="sample" %>
--------------------------------------------------------------------------------
Fri Dec 13 17:18:54 GMT+05:30 2002
***********************************************************************************
thanks & Regards
Khad M
22 years ago

Originally posted by JiaPei Jen:
I am using the Weblogic 5.1.0 to try out the Tag Handler Class (Lisgings 14.10, 14.11, 14.12) in Marty Hall's book entitled "Core Servlets and JavaServer Pages".
After I typed: http://localhost:7001/HeadingExample.jsp
in IE browser window
I got error message:
Parsing of JSP file '/HeadingExample.jsp' failed: Could not parse deployment descriptor: org.xml.sax.SAXParseException:Could not parse taglib, starting at line 6.
probably occurred due to an error in /HeadExample.jsp line 16:
<%@ taglib uri="\Web-inf\csajsp-taglib.tld" prefix="csajsp" %>
I compiled HeadingTag.java and saved the compiled file in:
c:\weblogic\myserver\servletclasses\coreservlets\tags\HeadingTag.class
The library file csajsp-taglib.tld is in:
c:\weblogic\myserver\public_html\Web-inf\csajsp-taglib.tld
and the jsp file HeadingExample.jsp is in
c:\weblogic\myserver\public_html\HeadingExample.jsp
All three files are directly downloaded from the web www.coreservlets.com. Could anybody tell me what I did wrong and how to make this example work? Thanks a lot in advance.

IP: Logged



CAN ANY BODY tell me what is the right solution for this....!!!
22 years ago

Originally posted by sowmya vasisht:
solution is to give the complete path of tld file


*******************************************
CAN U tell me,
WHERE WE HAVE TO MENTION THAT tld FILE PATH....???

Khad M
22 years ago

Originally posted by Barry Gaunt:
Why do you want to read from an Output stream?



B'cas i ant to compare that character contained by the Byte with my own defined character.???
Is it sounds good..!!!
22 years ago
Hi Ranchers
Hope all are fine.
Here is a one tricky Q.
Iam using the following code
to read the contents from a file.
*********************************************
FileOutputStream fos1 = new FileOutputStream(file);
for(long i=0;i<filelength;i++)
{
int b = fis1.read();
}
*******************************************
Question is,
After reading using read() method.......i want to print to console that particular character the Byte contains.How to do that..???

Regards
Khad M
22 years ago
Hi Friends,
Hope all are fine.
Here is my question follows.
I have swing applet java program and a corresponding html file.

Iam able to run the program by using the following command.
"appletviewer javafilename.html"

But the same program when iam trying to run by browsing html file in IE brower the applet is not getting loaded....In the status bar it is showing that
"java.lang.classnotfound"
Iam really wondering how to run the swing applet from browser....!!!
22 years ago
Iam alsp facing the SAME PROBLEM.

what is this java plgin mean by..???

will this not come with jdk1.3...???
DO clarify me at the earliest..???
iam really not able to run my application and just confused with this stuff...!!!
expecting early replies....!!!
Khad M.
22 years ago
Hi Friends,
Hope all are fine.
Here is my question follows.
I have swing applet java program and a corresponding html file.

Iam able to run the program by using the following command.
"appletviewer javafilename.html"

But the same program when iam trying to run by browsing html file in IE brower the applet is not getting loaded....In the status bar it is showing that
"java.lang.classnotfound"
Iam really wondering how to run the swing applet from browser....!!!


Can any one help me out...!!!
waiting for ur reply
Khad M
22 years ago
I have created a JTable with 3 coulumns and 4 rows. I have also added a button which when clicked removes the selected row.
Now the problem is, if i select the last row and press the button the row gets deleted. But after this if i select any other row it throws an ArrayIndexOutOfBoundsException.
The following is the stact trace i got for the exception
Exception occurred during event dispatching:
java.lang.ArrayIndexOutOfBoundsException: 4 >= 4
at java.util.Vector.elementAt(Vector.java:417)
at javax.swing.table.DefaultTableModel.setValueAt(DefaultTableModel.java
:674)
at javax.swing.JTable.setValueAt(JTable.java:1734)
at javax.swing.JTable.editingStopped(JTable.java:2989)
at javax.swing.AbstractCellEditor.fireEditingStopped(AbstractCellEditor.
java:112)
at javax.swing.AbstractCellEditor.stopCellEditing(AbstractCellEditor.jav
a:68)
at javax.swing.JTable.editCellAt(JTable.java:2359)
at javax.swing.plaf.basic.BasicTableUI$MouseInputHandler.mousePressed(Ba
sicTableUI.java:464)
at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:22
1)
at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:22
0)
at java.awt.Component.processMouseEvent(Component.java:3714)
at java.awt.Component.processEvent(Component.java:3546)
at java.awt.Container.processEvent(Container.java:1164)
at java.awt.Component.dispatchEventImpl(Component.java:2595)
at java.awt.Container.dispatchEventImpl(Container.java:1213)
at java.awt.Component.dispatchEvent(Component.java:2499)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2451
)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2210)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2125)
at java.awt.Container.dispatchEventImpl(Container.java:1200)
at java.awt.Component.dispatchEvent(Component.java:2499)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:319)
at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:10
3)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:84)
The following is the code i have used

import javax.swing.*;
import javax.swing.event.*;
import javax.swing.table.*;
import javax.swing.border.*;
import java.util.*;
import java.awt.*;
import java.awt.event.*;
public class MultiLineCellExample extends JApplet {
static int columnCount=4;
/* static int rowCount=3;*/
public void init() {
main();
}
public void start() {
}
void main() {
try
{

DefaultTableModel dm = new DefaultTableModel() {
public Class getColumnClass(int columnIndex) {
return String.class;
}
};
dm.setDataVector(new Object[][]{
{"a","a","a"},
{"b","b","b"},
{"c","c","c"},
{"d","d","d"},
{"A\nA","B\nB","C\nC"}
},
new Object[]{"1","2","3"});

JTable table = new JTable( dm );
MultiLineCellEditor editor = new MultiLineCellEditor(table);
table.setDefaultEditor(String.class,editor);

TablePopupListener pop = new TablePopupListener(table);
table.addMouseListener(pop);

table.setAutoCreateColumnsFromModel(false) ;

JScrollPane scroll = new JScrollPane( table );

scroll.setBorder(new javax.swing.border.TitledBorder("Table"));


JPanel des = new JPanel() ;
des.setLayout(new BorderLayout());

JPanel buttonPanel = new JPanel();

buttonPanel.setLayout(new GridLayout(7, 1));
buttonPanel.setBorder(new javax.swing.border.TitledBorder("Buttons"));
buttonPanel.setBackground(Color.gray);
/*buttonPanel.add(createButton(roct));
buttonPanel.add(createButton(acoct));
buttonPanel.add(createButton(coroct));*/

AddRowAction act = new AddRowAction(table);
InsertRowAction irt = new InsertRowAction(table);
InsertColAction ict = new InsertColAction(table);
AddColAction acoct = new AddColAction(table);
RemoveColAction coroct = new RemoveColAction(table);
RemoveRowAction roct = new RemoveRowAction(table);
//((DefaultTableModel)table.getModel()).addTableModelListener(roct);

buttonPanel.add(new JButton(act));
buttonPanel.add(new JButton(acoct));
buttonPanel.add(new JButton(ict));
buttonPanel.add(new JButton(irt));
buttonPanel.add(new JButton(coroct));
buttonPanel.add(new JButton(roct));

des.add(buttonPanel, BorderLayout.EAST);
des.add(scroll, BorderLayout.CENTER);



setContentPane(des);
}
catch (Exception e)
{
System.out.println("ArrayIndexOutOfBoundsException in main");
}
}
}

The code used for removing the row is here

/* Remove rows */
class RemoveRowAction extends AbstractAction implements ActionListener, TableModelListener{
private JTable tab;
RemoveRowAction(JTable tabtest) {
this.tab = tabtest;
putValue(Action.NAME, "Remove Selected Row");
}
public void actionPerformed(ActionEvent e) {
int row = tab.getSelectedRow() ;
int rowCount = tab.getRowCount();
//System.out.println("row = "+row);
if(row >=0 && row < rowCount)
{
((DefaultTableModel)tab.getModel()).removeRow(row);
tab.validate();

}
System.out.println("row = "+row);
System.out.println("rowCount = "+rowCount);
}

Can any one help me how to handle this exception
[ November 01, 2002: Message edited by: khad M ]
22 years ago
hI fRIENDS,
WANT UR HELP......!!!
hERE IS THE FOLLOWING ERROR IAM GETTING WHEN IAM USING <JSP:FORWARD> TAG...
"already committed response "

WHAT COULD BE THE PROBLEM FOR THIS AND ALSO POSSIBLE SOLUTION???
WAITING FOR REPLY.
THANKS
BYE
kHAD M.
22 years ago
JSP