Go Back   CodingForums.com > :: Server side development > Java and JSP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-06-2008, 12:38 PM   PM User | #1
Ferenc
New to the CF scene

 
Join Date: Aug 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Ferenc is an unknown quantity at this point
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)
Ferenc is offline   Reply With Quote
Old 08-06-2008, 12:42 PM   PM User | #2
Kor
Red Devil Mod


 
Kor's Avatar
 
Join Date: Apr 2003
Location: Bucharest, ROMANIA
Posts: 8,478
Thanks: 58
Thanked 379 Times in 375 Posts
Kor has a spectacular aura aboutKor has a spectacular aura about
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.
__________________
KOR
Offshore programming
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

Last edited by Kor; 08-06-2008 at 12:44 PM..
Kor is offline   Reply With Quote
Old 08-06-2008, 12:59 PM   PM User | #3
Ferenc
New to the CF scene

 
Join Date: Aug 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Ferenc is an unknown quantity at this point
This thread is about javascript, I want to do this in the fronted ! (firefox extension)
Ferenc is offline   Reply With Quote
Old 08-06-2008, 02:12 PM   PM User | #4
Kor
Red Devil Mod


 
Kor's Avatar
 
Join Date: Apr 2003
Location: Bucharest, ROMANIA
Posts: 8,478
Thanks: 58
Thanked 379 Times in 375 Posts
Kor has a spectacular aura aboutKor has a spectacular aura about
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
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Kor is offline   Reply With Quote
Old 08-06-2008, 02:50 PM   PM User | #5
Ferenc
New to the CF scene

 
Join Date: Aug 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Ferenc is an unknown quantity at this point
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.
Ferenc is offline   Reply With Quote
Old 08-10-2008, 05:53 PM   PM User | #6
shyam
Senior Coder

 
shyam's Avatar
 
Join Date: Jul 2005
Posts: 1,563
Thanks: 2
Thanked 163 Times in 160 Posts
shyam will become famous soon enough
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
shyam is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:25 AM.


Advertisement
Log in to turn off these ads.