Urgent help needed in jtable

PLEASE could someone help me look at this and see why the color of my data in a jtable cell is niot turning red when I press enter
THX
package mintest;
import java.util.*;
import java.awt.*;
import java.awt.event.*;
import java.text.*;
import javax.swing.*;
import javax.swing.text.*;
import javax.swing.table.*;
import com.borland.jbcl.layout.*;
import java.awt.color.*;
import javax.swing.event.*;
import java.awt.Image;
import javax.swing.ImageIcon;
import javax.swing.AbstractButton;
import javax.swing.JButton;
import java.awt.datatransfer.*;
import javax.swing.BorderFactory;
import javax.swing.border.Border;
import javax.swing.border.TitledBorder;
import javax.swing.border.EtchedBorder;
import java.io.*;
import java.awt.print.*;
import javax.print.*;
import javax.print.attribute.*;
import javax.print.attribute.standard.*;
import javax.swing.BorderFactory;
import javax.swing.JLabel;
import javax.swing.JTable;
import javax.swing.border.Border;
import javax.swing.table.TableCellRenderer;
import java.awt.Color;
import java.awt.Component;
import javax.swing.table.DefaultTableCellRenderer;
public class VeckoSchema extends JPanel
private boolean DEBUG = false;
JTabbedPane tabbedPane;
Color rgdcolor2= new Color (0,153,255); //Definiera f?rgen f?r schema-,projekt- och l?nehuvudflikarna
Color rgdcolor1= new Color (0,102,255);
Color rgdcolor3= new Color (51,204,255); //Definiera f?rgen f?r schema-,projekt- och l?nehuvudflikarna
Color rgdcolor= new Color (0,0,153);
Color rgdcolor4= new Color (153,153,153);
JList list;
DefaultListModel listModel = new DefaultListModel();
ImageIcon icon= new ImageIcon ("D:\\Dokument\\Skolarbete\\Examens projekt\\JAVA\\minTest\\Bakgrundsbild2.jpg");
ImageIcon icon1= new ImageIcon ("D:\\Dokument\\Skolarbete\\Examens projekt\\JAVA\\minTest\\Save16.gif");
ImageIcon icon2= new ImageIcon ("D:\\Dokument\\Skolarbete\\Examens projekt\\JAVA\\minTest\\printer2.gif");
JButton spara;
JButton Ok_knapp = new JButton();
JPanel panel7;
TitledBorder title;
Border blackline;
JTable table = new JTable(new MyTableModel());
int x;int y;
Object data1;
//ColorRenderer renderer;
Color mincellColor= Color.red;
TableCellRenderer Renderer;
public VeckoSchema() {
try {
jbInit();
catch(Exception e) {
e.printStackTrace();
private void jbInit() throws Exception
this.setBackground(rgdcolor2);
this.setLayout(null);
//Skapa tabellen
//JTable table = new JTable(new MyTableModel());
table.setPreferredScrollableViewportSize(new Dimension(500, 70));
JScrollPane scrollPane = new JScrollPane(table);
scrollPane.setBounds(30, 40, 1000, 600);//(avst?nd fr?n v?nster sidan 49, avst?nd fr?n norr 39, bredd 144, h?jd 38));
this.add(scrollPane);
//TableCellRenderer weirdRenderer = new WeirdRenderer();
table.setCellSelectionEnabled(true);
table.requestFocus(true);
table.getInputMap().put(KeyStroke.getKeyStroke(
KeyEvent.VK_ENTER, 0),
"check");
table.getActionMap().put("check", new AbstractAction() {
public void actionPerformed(ActionEvent e) {
try {
System.out.println("BINGO");
x= table.getSelectedColumn() ;
y= table.getSelectedRow() ;
//System.out.println("markerad kolumn ?r" + table.getSelectedColumn()) ;
//System.out.println("markerad Rad ?r" + table.getSelectedRow()) ;
// table.setColumnSelectionAllowed(true);
data1 = table.getModel().getValueAt(
table.getSelectedRow(),
table.getColumnModel().getColumn(
table.getSelectedColumn()).getModelIndex());
System.out.println("markerad text inneh?ller" + data1);
x= table.getSelectedColumn() ;
y= table.getSelectedRow() ;
/* table.setDefaultRenderer(Object.class, new DefaultTableCellRenderer() {
public Component getTableCellRendererComponent(JTable table, Object value,
boolean isSelected, boolean hasFocus, int row, int column)
System.out.println("hejsan hoppsan markerad text inneh?ller" + data1);
Component cell =super.getTableCellRendererComponent(table, value, isSelected,hasFocus, row, column);
if (row == y && column == x ) {
System.out.println("rad"+y);
System.out.println("column"+x);*/
//cell.setFont(new java.awt.Font("Dialog", 0, 20));
/* cell.setForeground(Color.red);
else
cell.setForeground(null);
return cell;
// ColorRenderer centerRenderer = new ColorRenderer();
// Use renderer on a specific column
/* TableColumn column = table.getColumnModel().getColumn(
table.getColumnModel().getColumn(
table.getSelectedColumn()).getModelIndex()
column.setCellRenderer( centerRenderer );
table.setDefaultRenderer(String.class, centerRenderer);*/
class table extends JTable {
ColorRenderer multiRenderer=new ColorRenderer();
table(MyTableModel tm)
super(tm);
public TableCellRenderer getCellRenderer(int row,int col) {
if (row == y && col == x) return multiRenderer;
else return super.getCellRenderer(row,col);
catch(Exception x) {
x.printStackTrace();
class MyTableModel extends AbstractTableModel {
String[] columnNames = {"",
"M?NDAG",
"TISDAG",
"ONSDAG",
"TORSDAG",
"FREDAG",
"L?RDAG",
"S?NDAG"};
Object[][] data = {
{"Anna Svensson","", "","Eji Eze", "","","",""},
{"","", "","", "Christopher ?kesson","Eji Eze","",""},
{"","", "","", "","Sara Eggert","",""},
{"Eji Eze","", "","", "","","",""},
{"Stefan Wielsel","", "","", "","","",""},
{"","", "","", "","","Anna Persson","Markus Nilsson"},
{"","Markus Nilsson", "Malin Mejby","", "","","",""},
{"","Stefan Wiesel", "","", "","","",""},
{"","Anna Svensson", "","", "","","",""},
public int getColumnCount() {
return columnNames.length;
public int getRowCount() {
return data.length;
public String getColumnName(int col) {
return columnNames[col];
public Object getValueAt(int row, int col) {
return data[row][col];
/* Denna metod g?r det m?jligt att ?ndrar i tabellen*/
public boolean isCellEditable(int row, int col) {
if (col < 8) {
return false;
} else {
return true;
/*Denna metod g?r s? ?ndringarna som g?rs i en viss cell inte f?rsvinnar d? man l?mnar cellen*/
Object[][] value = {              {"Chiji Eze"},
int row= 3;
int col = 4;
public void setValueAt(Object value, int row, int col) {
/* if (DEBUG) {
System.out.println("Setting value at " + row + "," + col
+ " to " + value
+ " (an instance of "
+ value.getClass() + ")");
data[row][col] = value;
fireTableCellUpdated(row, col);
/* if (DEBUG) {
System.out.println("New value of data:");
printDebugData();
/* private void printDebugData() {
int numRows = getRowCount();
int numCols = getColumnCount();
for (int i=0; i < numRows; i++) {
System.out.print(" row " + i + ":");
for (int j=0; j < numCols; j++) {
System.out.print(" " + data[i][j]);
System.out.println();
System.out.println("--------------------------");*/
/*class MyCellColor extends DefaultTableCellRenderer
public MyCellColor()
public Component getTableCellRendererComponent(JTable table, Object value,
boolean isSelected, boolean hasFocus, int row, int column)
JLabel result = null;
if(isSelected && value != null)
result = new JLabel(value.toString());
result.setOpaque(true);
result.setForeground(Color.blue);
System.out.println("Result "+result.getText());
System.out.println("Color is "+result.getForeground());
return result;
/* public TableCellRenderer getCellRenderer (int row, int column)
//seulement pour la premiere colonne
if (column == 0)
return Renderer;
// sinon le Renderer par d?faut
return super.getCellRenderer (row, column);
class ColorRenderer extends JTextArea implements TableCellRenderer{ //DefaultTableCellRenderer
Color testfarg;
public ColorRenderer( ){
testfarg= Color.red;
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
System.out.println("hejsan hoppsan markerad text inneh?ller" + data1);
//Component cell =super.getTableCellRendererComponent(table, value, isSelected,hasFocus, row, column);
if(row==y && column == x)
setForeground(testfarg);
else
setBackground(null);
return this;

You really need to study this tutorial:
http://java.sun.com/docs/books/tutorial/uiswing/components/table.html
After you have read it, take a look at this example, and tweak it to suit your needs:
import javax.swing.table.*;
import javax.swing.*;
public class Test {
  public static void main(String[] args) {
    JFrame frame = new JFrame();
    frame.getContentPane().add(new JScrollPane(new JTable(new MyTableModel())));
    frame.pack();
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.setVisible(true);
class MyTableModel extends AbstractTableModel {
  private String columnNames[] = new String[] {
      "Name", "Checked"
  private Class columnClasses[] = new Class[] {
      String.class, Boolean.class
  private Object data[][] = new Object[][] {
      { "One", Boolean.TRUE },
      { "Two", Boolean.FALSE },
      { "Three", Boolean.FALSE },
      { "Four", Boolean.TRUE },
  public int getColumnCount() {
    return columnNames.length;
  public int getRowCount() {
    return data.length;
  public Object getValueAt(int rowIndex, int columnIndex) {
    return data[rowIndex][columnIndex];
  public Class getColumnClass(int columnIndex) {
    return columnClasses[columnIndex];
  public String getColumnName(int columnIndex) {
    return columnNames[columnIndex];
  public boolean isCellEditable(int rowIndex, int columnIndex) {
    if (columnIndex == 1)
      return true;
    else
      return false;
  public void setValueAt(Object aValue, int rowIndex, int columnIndex) {
    data[rowIndex][columnIndex] = aValue;
}

Similar Messages

  • URGENT HELP NEEDED FOR JTABLE PROBLEM!!!!!!!!!!!!!!!!!

    firstly i made a jtable to adds and deletes rows and passes the the data to the table model from some textfields. then i wanted to add a tablemoselistener method in order to change the value in the columns 1,2,3,4 and set the result of them in the column 5. when i added that portion of code the buttons that added and deleted rows had problems to function correctly..they dont work at all..can somebody have a look in my code and see wot is wrong..thanx in advance..
    below follows the code..sorry for the mesh of the code..you can use and run the code and notice the problem when you press the add button..also if you want delete the TableChanged method to see that the add button works perfect.
    * Created on 03-Aug-2005
    * TODO To change the template for this generated file go to
    * Window - Preferences - Java - Code Style - Code Templates
    * @author Administrator
    * TODO To change the template for this generated type comment go to
    * Window - Preferences - Java - Code Style - Code Templates
    import java.awt.*;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.util.Vector;
    import javax.swing.*;
    import javax.swing.table.*;
    import javax.swing.event.TableModelEvent;
    import javax.swing.event.TableModelListener;
    import java.io.*;
    public class NodesTable extends JFrame implements TableModelListener, ActionListener {
    JTable jt;
    DefaultTableColumnModel dtcm;
    TableColumn column[] = new TableColumn[100];
    DefaultTableModel dtm;
    JLabel Name,m1,w1,m2,w2;
    JTextField NameTF,m1TF,w1TF,m2TF,w2TF;
    String c [] ={ "Name", "Assessment1", "Weight1" , "Assessment2","Weight2 ","TotalMark"};
    float x=0,y=0,tMark=0,z = 0;
    float j=0;
    int i;
         JButton DelButton;
         JButton AddButton;
         JScrollPane scrollPane;
         JPanel mainPanel,buttonPanel;
         JFrame frame;
         Object[][] data =
              {"tami", new Float(1), new Float(1.11), new Float(1.11),new Float(1),new Float(1)},
              {"tami", new Float(1), new Float(2.22), new Float(2.22),new Float(1),new Float(1)},
              {"petros", new Float(1), new Float(3.33), new Float(3.33),new Float(1),new Float(1)},
              {"petros", new Float(1), new Float(4.44), new Float(4.44),new Float(1),new Float(1)}
    public NodesTable() {
    super("Student Marking Spreadsheet");
    this.AddNodesintoTable();
    setSize(400,250);
    setVisible(true);
    public void AddNodesintoTable(){
    // Create a vector object and load them with the data
    // to be placed on each row of the table
    dtm = new DefaultTableModel(data,c);
    dtm.addTableModelListener( this );
    jt = new JTable(dtm){
         // Returning the Class of each column will allow different
              // renderers to be used based on Class
              public Class getColumnClass(int column)
                   return getValueAt(0, column).getClass();
              // The Cost is not editable
              public boolean isCellEditable(int row, int column)
                   int modelColumn = convertColumnIndexToModel( column );
                   return (modelColumn == 5) ? false : true;
    //****************************User Input**************************
    //Add another node
    //Creating and setting the properties
    //of the panel's component (panels and textfields)
    Name = new JLabel("Name");
    Name.setForeground(Color.black);
    m1 = new JLabel("Mark1");
    m1.setForeground(Color.black);
    w1 = new JLabel("Weigth1");
    w1.setForeground(Color.black);
    m2= new JLabel("Mark2");
    m2.setForeground(Color.black);
    w2 = new JLabel("Weight2");
    w2.setForeground(Color.black);
    NameTF = new JTextField(5);
    NameTF.setText("Node");
    m1TF = new JTextField(5);
    w1TF = new JTextField(5);
    m2TF=new JTextField(5);
    w2TF=new JTextField(5);
    //creating the buttons
    JPanel buttonPanel = new JPanel();
    AddButton=new JButton("Add Row");
    DelButton=new JButton("Delete") ;
    buttonPanel.add(AddButton);
    buttonPanel.add(DelButton);
    //adding the components to the panel
    JPanel inputpanel = new JPanel();
    inputpanel.add(Name);
    inputpanel.add(NameTF);
    inputpanel.add(m1);
    inputpanel.add(m1TF);
    inputpanel.add(w1);
    inputpanel.add(w1TF);
    inputpanel.add(m2);
    inputpanel.add(m2TF);
    inputpanel.add(w2TF);
    inputpanel.add(w2);
    inputpanel.add(AddButton);
    inputpanel.add(DelButton);
    //creating the panel and setting its properties
    JPanel tablepanel = new JPanel();
    tablepanel.add(new JScrollPane(jt, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED
    , JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS));
    getContentPane().add(tablepanel, BorderLayout.CENTER);
    getContentPane().add(inputpanel, BorderLayout.SOUTH);
    //Method to add row for each new entry
    public void addRow()
    Vector r=new Vector();
    r=createBlankElement();
    dtm.addRow(r);
    jt.addNotify();
    public Vector createBlankElement()
    Vector t = new Vector();
    t.addElement((String) " ");
    t.addElement((String) " ");
    t.addElement((String) " ");
    t.addElement((String) " ");
    t.addElement((String) " ");
    return t;
    // Method to delete a row from the spreadsheet
    void deleteRow(int index)
    if(index!=-1) //At least one Row in Table
    dtm.removeRow(index);
    jt.addNotify();
    // Method that adds and deletes rows
    // from the table by pressing the
    //corresponding buttons
    public void actionPerformed(ActionEvent ae){
         Float z=new Float (m2TF.getText());
    String Name= NameTF.getText();
    Float x= new Float(m1TF.getText());
    Float y= new Float(w1TF.getText());
    Float j=new Float (w2TF.getText());
    JFileChooser jfc2 = new JFileChooser();
    String newdata[]= {Name,String.valueOf(x),String.valueOf(y),
    String.valueOf(z),String.valueOf(j)};
    Object source = ae.getSource();
    if(ae.getSource() == (JButton)AddButton)
    addRow();
    if (ae.getSource() ==(JButton) DelButton)
    deleteRow(jt.getSelectedRow());
    //method to calculate the total mark in the TotalMark column
    //that updates the values in every other column
    //It takes the values from the column 1,2,3,4
    //and changes the value in the column 5
    public void tableChanged(TableModelEvent e) {
         System.out.println(e.getSource());
         if (e.getType() == TableModelEvent.UPDATE)
              int row = e.getFirstRow();
              int column = e.getColumn();
              if (column == 1 || column == 2 ||column == 3 ||column == 4)
                   TableModel model = jt.getModel();
              float     q= ((Float)model.getValueAt(row,1)).floatValue();
              float     w= ((Float)model.getValueAt(row,2)).floatValue();
              float     t= ((Float)model.getValueAt(row,3)).floatValue();
              float     r= ((Float)model.getValueAt(row,4)).floatValue();
                   Float tMark = new Float((q*w+t*r)/(w+r) );
                   model.setValueAt(tMark, row, 5);
    // Which cells are editable.
    // It is only necessary to implement this method
    // if the table is editable
    public boolean isCellEditable(int row, int col)
    { return true; //All cells are editable
    public static void main(String[] args) {
         NodesTable t=new NodesTable();
    }

    There are too many mistakes in your program. It looks like you are new to java.
    Your add and delete row buttons are not working because you haven't registered your action listener with these buttons.
    I have modifide your code and now it works fine. Just put some validation code for the textboxes becuase it throws exception when user presses add button without entering anything.
    Here is the updated code: Do the diff and u will know my changes
    * Created on 03-Aug-2005
    * TODO To change the template for this generated file go to
    * Window - Preferences - Java - Code Style - Code Templates
    * @author Administrator
    * TODO To change the template for this generated type comment go to Window -
    * Preferences - Java - Code Style - Code Templates
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    import javax.swing.JTextField;
    import javax.swing.event.TableModelEvent;
    import javax.swing.event.TableModelListener;
    import javax.swing.table.DefaultTableColumnModel;
    import javax.swing.table.DefaultTableModel;
    import javax.swing.table.TableColumn;
    import javax.swing.table.TableModel;
    public class NodesTable extends JFrame implements TableModelListener,
              ActionListener {
         JTable jt;
         DefaultTableColumnModel dtcm;
         TableColumn column[] = new TableColumn[100];
         DefaultTableModel dtm;
         JLabel Name, m1, w1, m2, w2;
         JTextField NameTF, m1TF, w1TF, m2TF, w2TF;
         String c[] = { "Name", "Assessment1", "Weight1", "Assessment2", "Weight2 ",
                   "TotalMark" };
         float x = 0, y = 0, tMark = 0, z = 0;
         float j = 0;
         int i;
         JButton DelButton;
         JButton AddButton;
         JScrollPane scrollPane;
         JPanel mainPanel, buttonPanel;
         JFrame frame;
         public NodesTable() {
              super("Student Marking Spreadsheet");
              this.AddNodesintoTable();
              setSize(400, 250);
              setVisible(true);
         public void AddNodesintoTable() {
              // Create a vector object and load them with the data
              // to be placed on each row of the table
              dtm = new DefaultTableModel(c,0);
              dtm.addTableModelListener(this);
              jt = new JTable(dtm) {
                   // The Cost is not editable
                   public boolean isCellEditable(int row, int column) {
                        int modelColumn = convertColumnIndexToModel(column);
                        return (modelColumn == 5) ? false : true;
              //****************************User Input**************************
              //Add another node
              //Creating and setting the properties
              //of the panel's component (panels and textfields)
              Name = new JLabel("Name");
              Name.setForeground(Color.black);
              m1 = new JLabel("Mark1");
              m1.setForeground(Color.black);
              w1 = new JLabel("Weigth1");
              w1.setForeground(Color.black);
              m2 = new JLabel("Mark2");
              m2.setForeground(Color.black);
              w2 = new JLabel("Weight2");
              w2.setForeground(Color.black);
              NameTF = new JTextField(5);
              NameTF.setText("Node");
              m1TF = new JTextField(5);
              w1TF = new JTextField(5);
              m2TF = new JTextField(5);
              w2TF = new JTextField(5);
              //creating the buttons
              JPanel buttonPanel = new JPanel();
              AddButton = new JButton("Add Row");
              AddButton.addActionListener(this);
              DelButton = new JButton("Delete");
              DelButton.addActionListener(this);
              buttonPanel.add(AddButton);
              buttonPanel.add(DelButton);
              //adding the components to the panel
              JPanel inputpanel = new JPanel();
              inputpanel.add(Name);
              inputpanel.add(NameTF);
              inputpanel.add(m1);
              inputpanel.add(m1TF);
              inputpanel.add(w1);
              inputpanel.add(w1TF);
              inputpanel.add(m2);
              inputpanel.add(m2TF);
              inputpanel.add(w2TF);
              inputpanel.add(w2);
              inputpanel.add(AddButton);
              inputpanel.add(DelButton);
              //creating the panel and setting its properties
              JPanel tablepanel = new JPanel();
              tablepanel.add(new JScrollPane(jt,
                        JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
                        JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS));
              getContentPane().add(tablepanel, BorderLayout.CENTER);
              getContentPane().add(inputpanel, BorderLayout.SOUTH);
         //Method to add row for each new entry
         public void addRow() {
              Float z = new Float(m2TF.getText());
              String Name = NameTF.getText();
              Float x = new Float(m1TF.getText());
              Float y = new Float(w1TF.getText());
              Float j = new Float(w2TF.getText());
              String newdata[] = { Name, String.valueOf(x), String.valueOf(y),
                        String.valueOf(z), String.valueOf(j) };
              dtm.addRow(newdata);
         // Method to delete a row from the spreadsheet
         void deleteRow(int index) {
              if (index != -1) //At least one Row in Table
                   dtm.removeRow(index);
                   jt.addNotify();
         // Method that adds and deletes rows
         // from the table by pressing the
         //corresponding buttons
         public void actionPerformed(ActionEvent ae) {
              Object source = ae.getSource();
              if (ae.getSource() == (JButton) AddButton) {
                   addRow();
              if (ae.getSource() == (JButton) DelButton) {
                   deleteRow(jt.getSelectedRow());
         //method to calculate the total mark in the TotalMark column
         //that updates the values in every other column
         //It takes the values from the column 1,2,3,4
         //and changes the value in the column 5
         public void tableChanged(TableModelEvent e) {
              System.out.println(e.getSource());
              //if (e.getType() == TableModelEvent.UPDATE) {
                   int row = e.getFirstRow();
                   int column = e.getColumn();
                   if (column == 1 || column == 2 || column == 3 || column == 4) {
                        TableModel model = jt.getModel();
                        float q = (new Float(model.getValueAt(row, 1).toString())).floatValue();
                        float w = (new Float(model.getValueAt(row, 2).toString())).floatValue();
                        float t = (new Float(model.getValueAt(row, 3).toString())).floatValue();
                        float r = (new Float(model.getValueAt(row, 4).toString())).floatValue();
                        Float tMark = new Float((q * w + t * r) / (w + r));
                        model.setValueAt(tMark, row, 5);
         // Which cells are editable.
         // It is only necessary to implement this method
         // if the table is editable
         public boolean isCellEditable(int row, int col) {
              return true; //All cells are editable
         public static void main(String[] args) {
              NodesTable t = new NodesTable();
    }

  • URGENT HELP NEEDED ... Tomcat Realm and JRE1.4 plug-in problem

    I have tried the Security Realm of Tomcat. Since I do not have
    an LDAP server, I decided to use the Tomcat-users.xml file in
    Tomcat\conf directory.
    I added the following lines of code in the web.xml file.
    <security-constraint>
    <web-resource-collection>
    <web-resource-name>Entire Application</web-resource-name>
    <url-pattern>/*</url-pattern>
    </web-resource-collection>
    <auth-constraint>
    <!-- NOTE: This role is not present in the default users file -->
    <role-name>webviewer</role-name>
    </auth-constraint>
    </security-constraint>
    <login-config>
    <auth-method>BASIC</auth-method>
    <realm-name>Tomcat Manager Application</realm-name>
    </login-config>
    The <role-name> "webviewer" is added into "Tomcat-Users.xml" as the following:
    <tomcat-users>
    <user name="test" password="password" roles="webviewer" />
    </tomcat-users>
    So, now when we type the url: http://localhost:8080/adbpdbre/default.htm, TOMCAT shows a dialog box asking for UserName: and Password:Now, only when we give the username and password, it shows the page. This is exactly what we want.
    But the problem now is, this default.htm page, has 5 links to 5 applets. The first time that I click on one of these links, the JRE plug of 1.4 shows a dialog again asking for the username and password. Till I dont provide the username and password the system doesnt go ahead and applet doesnt load. I do not want the JRE to ask me for the username/passwords again..How to avoid this ?
    Can you give me some more information on this. Ultimately in the production usage, we will be using LDAP and not Tomcat's memory realm.
    URGENT HELP NEEDED ... I need to get back to my client on this.
    Help would be v. much appreciated.

    In the config file, you 're essentially saying that you want Tomcat to prompt for usr/passw on every request (url-pattern = /*) made by a 'webviewer', and that's exactly what Tomcat is doing.
    Consider using specific url-patterns & roles for resources to be protected. If for now, all you need is to protect the first page, use a more specific url-pattern.
    Just an advice : if you'll be using LDAP in production, do not waste time with Tomcat's Security Realm and the BASIC authentication type, since the two have not much in common. Start reading doc on LDAP, and code a prototype, or even better, a vertical slice of the app (i.e a proof of concept).

  • URGENT HELP NEEDED - iPhone 3Gs no longer detected or charged by MacBook

    My iPhone 3Gs (3.1) has been running fine, until several hours ago today, when I plugged it to my MacBook, the iPhone is no longer detected - it doesn't show up in iTunes, nor it is charged. I tried opening iPhoto, and it wasn't there too. Not with Image Capture too. I tried charging it using the out-of-box wall charger using the same out-of-box USB cable I use for MacBook, and it can be charged without any problem. Then I put it into Recovery mode, and there iTunes can see it. I don't want to restore it before I figure out exactly what went wrong, as I don't want the restore process somehow gets stuck in the middle that the connection is lost again.
    I've tried reinstalled iTunes, including completely removal of Apple Mobile Device Support, as instructed by Apple. But still no luck.
    I've tried switching to another USB port of my MacBook. No luck.
    My iTunes is the latest 9.0.1, and my Mac OSX is 10.6.1. My iPhone is on 3.1, upgraded from 3.0.
    I've read from web that it seems I'm not the only one out there having this problem. But none of them seem having any real working solution.
    Urgent help needed & appreciated. Millions of thanks in advance.
    Gary

    1. I used both cables - theirs & mine ... and on several macs
    2. yes, same cable for wall & mac
    3. as said, i did completely remove & install itunes (incl. apple mobile device support), as instructed on the apple webpage
    anyway, did a restore just now. it seems okay now. but the problem is i have no idea what cause this, and i can't replicate the problem. so i don't know when it will happen again ... maybe a bug with os 3.1 ... others on web said os 3.1 is quite buggy ...

  • Urgent help needed, can I restore N900 Backup file...

    i owned a N900 (now sold out)
    before selling i took backup of contacts from backup restore option in application section
    now i bought a N8 but i m not able to restore my contacts
    1. is there any way to restore them in N8?
    2. if not, can i convert them in TEXT or any readable format
    urgent help needed
    thanks in advance

    The backup procedures built into the phone are only designed for restoring to the same phone (ie: in case or data corruption, software update or repair etc.), they can't usually be used to restore to a phone with a different operating system.
    You should have backed up with Ovi Suite before selling the N900, that would have been able to restore to the N8.

  • Urgent help needed; Database shutdown issues.

    Urgent help needed; Database shutdown issues.
    Hi all,
    I am trying to shutdown my SAP database and am facing the issues below, can someone please suggest how I can go about resolving this issue and restart the database?
    SQL> shutdown immediate
    ORA-24324: service handle not initialized
    ORA-24323: value not allowed
    ORA-01089: immediate shutdown in progress - no operations are permitted
    SQL> shutdown abort
    ORA-01031: insufficient privileges
    Thanks and regards,
    Iqbal

    Hi,
    check SAP Note 700548 - FAQ: Oracle authorizations
    also check Note 834917 - Oracle Database 10g: New database role SAPCONN
    regards,
    kaushal

  • Urgent help needed - new to Macs, accidently cut and paste over top of photo folder and now no sign of folder or file, no auto back-up in place, how can I restore photos pls

    Urgent help needed - new to Macs, accidently cut and paste over top of photo folder and now no sign of folder or file, no auto back-up in place, how can I restore photos pls

    Thanks for prompt reply, yes we have tried that but have now closed down the browser we where the photos were.
    We haven't sent up time machine, do you know whether there is any roll-back function on a Mac?
    Thanks

  • Urgent help needed with un-removable junk mail that froze Mail!!

    Urgent help needed with un-removable junk mail that froze Mail?
    I had 7 junk mails come in this morning, 5 went straight to junk and 2 more I junked.
    When I clicked on the Junk folder to empty it, it froze Mail and I can't click on anything, I had to force quit Mail and re-open it. When it re-opens the Junk folder is selected and it is froze, I can't do anything.
    I repaired permissions, it did nothing.
    I re-booted my computer, on opening Mail the In folder was selected, when I selected Junk, again, it locks up Mail and I can't select them to delete them?
    Anyone know how I can delete these Junk mails from my Junk folder without having to open Mail to do it as it would appear this will be the only solution to the problem.

    Hi Nigel
    If you hold the Shift key when opening the mail app, it will start up without any folders selected & no emails showing. Hopefully this will enable you to start Mail ok.
    Then from the Mail menus - choose Mailbox-Erase Junk Mail . The problem mail should now be in the trash. If there's nothing you want to retain from the Trash, you should now choose Mailbox- Erase Deleted Messages....
    If you need to double-check the Trash for anything you might want to retain, then view the Trash folder first, before using Erase Junk Mail & move anything you wish to keep to another folder.
    The shift key starts Mail in a sort of Safe mode.

  • IPhone 3G 8GB Crashes when syncing with iTunes. URGENT HELP NEEDED.

    I have latest iTunes and OS on my iPhone 3G...
    Every time i plug my iPhone in it begins to sync and then iTunes will freeze and not respond..
    I have tried re installing iTunes.. I can't reset my iPhone as i can't create a backup..
    URGENT HELP NEEDED PLEASE!

    I don't have an iphone, but if it's anything like my click-wheel ipod, a reset doesn't delete anything.
    It just resets the ipod's operating system, kind of like a PC restart. Did you try this Sleep/Wake button thing mentioned here?
    http://support.apple.com/kb/HT1737
    Maybe it's a podcast of voice memo causing the problem like it did for this person
    http://discussions.apple.com/message.jspa?messageID=10907809#10907809
    That's all I got. You might have better luck on an iPhone forum. Everyone there would probably have one. Like I said, I don't.

  • IPhone 4 reset itself, photos lost -URGENT HELP NEEDED

    Hi there,
    Urgent help needed!!
    Tonight I was taking extremely important photos throughout an event on my iPhone 4, however, my iPhone 4 ran out of battery once I was near a charger I plugged it in and for some reason my iPhone had reset itself. Back up icloud options were from yesterday, but the photos that I was taking at the event are needed urgently. Is there any way possible I can recover the photos that were taken?
    Thanks in advance!!!!

    Slymm71 wrote:
    just had similar problem got email from find my phone saying initiating full phone wipe this cannot be stopped ***? i own the phone from new and registerred in m name but wiped whilst i was using it !!!
    See your other post... 
    https://discussions.apple.com/message/18876037#18876037

  • Computer restarts when ipod is connected urgent help needed

    alright this is weird, I've had my ipod for ages and suddenly I go to plug it in and the computer slows down really really really slow and eventually just turns it self off, restarts and then sits in a black screen. if I leave the ipod plugged into the computer and restart it again it just goes straight back to the black screen, but both my ipod and computer work fine when there not connected. i have the latest version of itunes which seemed to help the first time i tried it actually started to update the ipod but then guess what the computer has another heart attack. urgent help needed please!!!

    if I leave the ipod plugged into the computer and restart it again it just goes straight back to the black screen
    Given this, I'd put it down to a flaky power supply in the computer. Might want to try using another computer or replacing the PSU.

  • User Exit for Material Group...Urgent help needed

    Does anybody have an idea of which user exit can be used to capture the changes made to material group in MM02(Material)..... Urgent help needed...

    See  the below user exit and this will trigger under MM01,MM02 and MM17 Transaction
    Enhancement name : MGA00001
    Function module :EXIT_SAPLMGMU_001
    Include : ZXMG0U02
    Reward Points if it is helpful.
    Thanks
    Seshu

  • Data uload to ODS ending up with an error. URGENT HELP NEEDED!!!!!!

    Hi
    My Sceniro is Full load from ODS1 to 5 other ODS. Iam uploading the data to other 5 ODS by selecting 1 ODS at a time.
    Problem i am facing is upload is ending up with error mesg. Error Mesg are
    <b>Error 8 when starting the extraction program - R3019
    Error in Source System - RSM340
    Req xxx in ODS2 must have QM ststus green before it is activated - RSM1110</b>
    I have seen the the OSS notes for given error no, but they are not applicable to me. what could be the other possible solution.
    In detail tab of the monitor i see red light at Extraction step and Subseq. processing.
    Its quite urgent bcoz this error is occuring in Production system.
    Plzzzz urgent help needed.
    Thanks
    Rohini
    Message was edited by: Rohini Garg

    rohini,
    go to RSA1->Modeling->Source Systems and right-click on your BW system, and click on 'Replicate Datasources'.
    also, go to the ODS that's causing the problem (via RSA1->InfoProvider and go to your ODS), right click and click on 'Generate Export Datasource'.
    one more thing, make sure that all your record/s in the source ODS is active. if you're not sure manage its contents and click on 'Activate'. if there are any entries in the the next screen that comes up, you need to activate it first, then try everything again.
    let me know what happens. also try to look for error messages in ST22 and SM21 that may be related to this and post whatever possible error you see there here.
    ryan.

  • Problem uninstalling MaxMSPRuntime on mac - urgent help needed

    Hello there,
    I've been using Cycle 74's MaxMSP Runtime version 5.1 for a while but recently had to witch to an earlier version to make some hardware function along side the Max runtime environment. The problem is that where i would usually just drag and drop Max 5.1 into the trash to uninstall it, for some reason, after i have done this and try to install the older version of Max, OSX wont let me install Max 4.0.8 as it says an updated version is currently installed. I have scoured my hard drive for the remanence of Max 5.1. and deleted everything i've found. Is there a way of overriding macosx and getting it to replace Max5.1 with an older version?
    Urgent help needed as i am playing a show this weekend and currently am not able to get my equipment to function.
    A shiny nickel for the one who saves my ***.
    Thanks
    Henry

    Hi- Try this...
    If you can, reinstall or use time machine to recover your recently deleted MaxMSP Runtime 5.1.
    Then, download AppZapper. It is a utility that helps you cleanly delete programs off your mac. It is free for the first 5 uses.
    http://appzapper.com/
    Then, install AppZapper, and then go ahead and drag the MaxMSP Runtime 5.1 into it, and it should hopefully get rid of the pesky program

  • Recovering windows XP -Urgent help needed

    I am new to Toshiba. I hav a 60 GB hard disk with no partition and windows XP home installed. I want to partition the hard disk now. Now after formatting the hard disk do i lose Windows XP HE completely or is there chance to recover it and reinstall it. Urgent help needed.

    Hi
    You can reinstall your notebook using Recovery CD. It is easiest and fastest way to reinstall OS, all necessary drivers and tools. Put Recovery CD into DVD-ROM, start notebook and press down C button. At the beginning there is choice between two kinds of installation (Standard mode and expert mode).
    If you choose the first one whole HDD will be formatted and used for OS installation. With second one (expert mode) it is possible to install OS on first partition. It is also possible to define how big the partition should be.
    Try it. It is very simple to do it.
    Good luck

Maybe you are looking for

  • To write russian characters in a flash movie

    Hello I have a text file where I store my menu values. It works fine, but when I program the menu in russian (cirylic alphabet) where letters are stored like this жст (every &#number is a character, I assume) my flash movie doesn't show me the russia

  • Black MacBook and 23" Apple Studio Display

    Hi all, Wondering if there's any way to get my black MacBook to work with a 23" Apple Studio Display. The display is a previous version (clear plastic casing). Any help greatly appreciated!

  • BEx WAD - How to pass filter values to another Web template

    Hi, I have a scenario here... Web Template 1: - Filter options, Filter on Characteristics - Button, this button calls Template 2 sending the parameters selected vía URL to filter the report. Web Template 2: - Tables and graphs Values selected in the

  • Photoshop CS 2 Update For Intel Core Duo?

    Does anyone know if there will be an update to Photoshop CS2 to optimize the performance on an Intel Core Duo? The performance of Photoshop CS2 on my Mac Book definitely seems slower than on my older G4 Powerbook.

  • Preferences form doesn't run on the web

    Using form qms0006f 'User preferences' on the web gives FRM-40735 - On ERROR trigger veroorzaakte onverwerkte exception ORA-06508. Using the same form client server against the same database works fine. Is this a known problem? null