Kurt Boets

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

Recent posts by Kurt Boets

I had the same problem.
The exception occurred because an old version of the SAXParserFactory was used.
To fix it, I had to remove the xalan, xerces jar file from the classpath so the default SAXParserFactory of the jdk 1.5 would be used.

Hope this will also help you.

Regards,
A little late but still.
I had the same problem, and it took me a while to find the solution.
I added the commons-validator 1.3.0 to my web-inf.
After that, everything worked correctly.
16 years ago
Hi,

I had the same problem. I removed the
<listener> <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
</listener>
out of the web.xml, and now it works fine.

Hopes this solves your problem too.
17 years ago
Hi Marius,

The following code will get the index out of a DataList (and is used to change my look and feel). Perhaps it can give you some extra info.

jsf page with the binding + rowindex
java bean (rowindex is used to calculate month)






19 years ago
JSF
That's right.
Hope it works !
19 years ago
JSF
Hi Marius,

Perhaps you can use a binding. You can use a UIData element to bind and so retrieve the index of your row.
Hope it helps.
19 years ago
JSF
Indeed, it works now.
Thx,
19 years ago
JSF
Hello,

I am trying to assure correct exception handling; depending on the exception, the user is forwared to an error page.
I did develop a Filter class, an ErrorAwareRequestWrapper class that wraps the http error codes.
When I do a deploy (on a BEA Weblogic 8.1) I receive an error.
Hereby I will show you my :
  • The Filter class.
  • The ErrorAwareRequestWrapper class
  • The web.xml file
  • The stack trace of the exception thrown by the server










  • Has anyone yet expercience with handling exceptions using error pages or
    filters ?
    All help is welcome.
    Thx,
    19 years ago
    JSF
    You can use DataList from myfaces.
    19 years ago
    JSF
    Hello,

    I would like to perform a check while iterating over an Array. If
    the value is equal to a certain number , the background must be blue, white otherwise.

    In old jsp it would be something like:
    <% for(int i=0;i<ArrayToIterate.length;i++){
    if(ArrayToIterate.value) == 2{ %>
    <td bgcolor="blue">BLaBLA</td>
    <% }else{ %>
    <td bgcolor="white">BLaBLA</td>
    }
    }
    %>

    How do you do it in JSF ?
    This is my for loop...

    <x ataList id="something"
    value="#{ArrayToIterate}"
    var="TEST">

    and here I want to perform a check ->
    <h utputText value="#{ArrayToIterate.value}" />



    Thx.
    19 years ago
    JSF
    Hello,

    I am working on a project where I must be able to handle log errors.
    Because it is legal obligation to log every change, and to make sure that this change has been logged. If a change has not been logged, it should not be possible to continue with the application.
    So is there a way to catch log errors and stop further logging.
    (until now, I have seen errors on my console, but Log4J continous to log)

    Thx in advance,
    I found the solution:
    Check it with reflexion.

    I just added this code :
    Method methode = frame.getClass().getMethod("setFocusTraversalPolicy", new Class []{FocusTraversalPolicy.class} );
    methode.invoke(frame, new Object [] {new MyFocus(getComponentOrder())});
    And it works for JDK 1.3 + 1.4

    greetings,
    19 years ago
    I know.
    But at this moment, I don't know which JDK the client uses.
    And if it is 1.3 of less, It won't compile. (throws a NoDefClassFound)
    Is there a way to catch it, so that this code is always save to use ?

    Thx,
    19 years ago
    Hello,
    I am using the FocusTraversalPolicy class. It works fine with JDK1.4.
    But with JDK1.3, I receive a NoSuchClassException.
    Is there a way to catch this error ?

    I put my code here; the problem occur on this call
    frame.setFocusTraversalPolicy(myFocus);

    CODE:

    import java.awt.Button;
    import java.awt.Component;
    import java.awt.Container;
    import java.awt.FocusTraversalPolicy;
    import java.awt.Frame;
    import java.awt.GridLayout;
    import java.awt.Label;
    import java.awt.Panel;
    import java.awt.TextField;
    import java.util.Arrays;
    import java.util.List;

    import be.smalsmvm.RneReat.commons.Version;

    /**
    *
    *
    * @author kbo
    */
    public class LoginBoxTest {
    private Button b1;
    private Button b2;
    private Button b3;
    private Label l_name;
    private Label l_firstname;
    private Label l_adres;
    private Label l_telefoonnummer;

    private TextField name;
    private TextField firstname;
    private TextField adres;
    private TextField telefoonnummer;
    private Frame frame;
    private Panel panel;
    private boolean isJDK1_4 =false;
    MyFocus myFocus;

    public LoginBoxTest(){
    frame = new Frame("login");
    l_name = new Label("Name:");
    l_firstname = new Label("Firstname:");
    l_telefoonnummer = new Label("telefoonnummer:");
    l_adres = new Label("adres:");
    panel = new Panel();
    b1 = new Button("button1");
    b2 = new Button("button2");
    b3 = new Button("button3");
    name = new TextField();
    firstname = new TextField();
    adres = new TextField();
    telefoonnummer = new TextField();

    String javaVersion=System.getProperty("java.version");
    //check if it is jdk1.4 or higher
    isJDK1_4 = Version.isJava14() || Version.isJava15();

    }

    public void LaunchApplication(){
    frame.setLayout(new GridLayout(4, 3));
    name.setColumns(15);
    firstname.setColumns(15);
    adres.setColumns(15);
    telefoonnummer.setColumns(15);

    frame.add(l_name);
    frame.add(name);
    b1.setSize(15,10);
    frame.add(b1);

    frame.add(l_firstname);
    frame.add(firstname);
    frame.add(b2);

    frame.add(l_adres);
    frame.add(adres);
    frame.add(b3);

    frame.add(l_telefoonnummer);
    frame.add(telefoonnummer);

    frame.pack();

    //Here the focus Traversel policy class is added to the frame
    if ( isJDK1_4 )
    this.initTraversal();


    frame.setSize(400, 200);
    frame.setVisible(true);

    }


    private void initTraversal(){
    try{
    myFocus = new MyFocus();
    frame.setFocusTraversalPolicy(myFocus);

    }catch(NoClassDefFoundError e){
    e.printStackTrace();
    }
    }

    public Component [] getComponentOrder(){
    Component order [] = new Component[]{name, firstname, adres, telefoonnummer,
    b1, b2, b3};

    return order;
    }



    class MyFocus extends FocusTraversalPolicy {

    private List list;

    public MyFocus(){
    list = Arrays.asList(getComponentOrder());
    }


    public Component getDefaultComponent(Container focusCycleRoot) {
    return getComponentOrder()[0];

    }

    public Component getFirstComponent(Container focusCycleRoot) {
    return getComponentOrder()[0];
    }

    public Component getLastComponent(Container focusCycleRoot) {
    return getComponentOrder()[getComponentOrder().length-1];

    }

    public Component getComponentAfter(Container focusCycleRoot, Component aComponent) {
    int index = list.indexOf(aComponent);
    return getComponentOrder()[(index + 1) % getComponentOrder().length];


    }

    public Component getComponentBefore(Container focusCycleRoot, Component aComponent) {
    int index = list.indexOf(aComponent);
    return getComponentOrder()[(index - 1 + getComponentOrder().length) % getComponentOrder().length];

    }


    }


    public static void main(String [] args){
    try{
    System.out.println("1");
    LoginBoxTest box = new LoginBoxTest();
    System.out.println("2");
    box.LaunchApplication();
    System.out.println("3");
    }catch(RuntimeException thr){
    System.out.println("in de runtm");
    System.out.println(thr.getStackTrace());
    }catch(NoClassDefFoundError thr){
    System.out.println(thr.getCause());
    }catch(Throwable thr){
    thr.printStackTrace();

    }

    }



    }
    19 years ago