Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Aug 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    get java stacktrace out of string

    I want to wrap a div around a java stacktrace output, somebody any idea how to achieve this?

    Code:
    I'm a client and I never gonna use attachments bla bla, 
    
    De 500 melding:
    biz.domain.ManagerException: Failed to save ContentElement
            at
    biz.domain.content.managers.ContentElementManager.save(ContentElementManager.java:150)
            at
    biz.domain.content.struts.admin.nodes.DossierActions.save(DossierActions.java:400)
            at sun.reflect.GeneratedMethodAccessor7306.invoke(Unknown Source)
            at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            at
    
    lot more
    
    org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
            at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
            at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:754)
            at
    org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:684)
            at
    org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:876)
            at
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
            at java.lang.Thread.run(Thread.java:595)

  • #2
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    Java and Javascript are different languages. It is weird that a Java coder, as you seem to be, has not found out that difference so far. I'll move this thread to the Java Forum.
    Last edited by Kor; 08-06-2008 at 01:44 PM.
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #3
    New to the CF scene
    Join Date
    Aug 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    This thread is about javascript, I want to do this in the fronted ! (firefox extension)

  • #4
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    Quote Originally Posted by Ferenc View Post
    This thread is about javascript, I want to do this in the fronted ! (firefox extension)
    If so, maybe you should not have used a Java example of what you need, as there is no similarity between Java and Javascript (except the brand name and some syntax pale resemblances)

    Can you tell us what in fact is your aim? In simple words, first.
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #5
    New to the CF scene
    Join Date
    Aug 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I got a piece of text wich has a Java-stacktrace
    so I need a regulair expression so I can add a <div> arround it.

  • #6
    Senior Coder shyam's Avatar
    Join Date
    Jul 2005
    Posts
    1,563
    Thanks
    2
    Thanked 163 Times in 160 Posts
    Code:
    t.replace(/((\w+\.)+\w+Exception:(.|\n)*\))/, '<div>$1</div>')
    You never have to change anything you got up in the middle of the night to write. -- Saul Bellow


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •