Win a copy of Terraform in Action this week in the Cloud forum!

Egil Poma

Ranch Hand
+ Follow
since Nov 23, 2002
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 Egil Poma

So it's not possible to set a pattern that simply creates a space for every thousand?
13 years ago
JSP
I want the code below to print 12 900 (with the space) provided the correct pattern off course:


I've been trying to come up with a pattern for this, but it's more difficult than I first thought. Can someone please help me out?
[ January 07, 2008: Message edited by: Egil Poma ]
13 years ago
JSP
So there are now way of preventing access to request?

My motivations of doing this is not relevant to the topic, so please don't bother to comment on that.

Thanks!
14 years ago
JSP
How can I keep .tag-files from accessing the request? I only want to allow the .tag-file access to parameters given to it as input attributes.
14 years ago
JSP
I changed the pattern mentioned in the first post to this:
"\\b(\\d{3} \\d{2} \\d{3})\\b|\\b(\\d{8})\\b|\\b(\\d{2} \\d{2} \\d{2} \\d{2})\\b"

The pipes separates each phone "format".
14 years ago
It seem this pattern does what I need
"\\b(\\d{8})\\b"
14 years ago
Lets say my input is:
String input = "12345678 blah blah";

I want to only get the phone number.

I tried to add ^ to the start and $ to the end of my pattern, but it doesn't seem to work: "^\\d{8}$"

What am I missing?
14 years ago
I need a regexp that can identify phone numbers based on how they are formated. They must be only digits, and can be formated like this:
12345678
123 45 678
12 34 56 78

I've created the following pattern that does this:


BUT: I've found one bug I don't know how to solve:
If the user enters a phone number consisting of more than 8 digits after each other, my regexp picks up only the 8 first digits. I want the regexp to identify the phone number only if it's exactly 8 digits after each other.



Any suggestions?

Thanks!
[ October 09, 2007: Message edited by: Egil Poma ]
14 years ago
I need an Eclipse code formating template that is similar to the standard IntelliJ template.

Does anyone know where I can get such a template?
How can I execute operatingsystem commands from my Java classes?

So that I on a Linux box could i.e. execute "ls -l" etc.
15 years ago
Did you ever figure out why the servlet is beeing run twice?

I have the same problem now with Tomcat 5.5.17. What happens is that ALL of the classes, including the servlets, are instantiated twice by Tomcat.

I can't figure out why.

Hope someone can help!
15 years ago
I found out why the init metod gets run twice ; I'm running tomcat and apache connected, and that causes all init methods to be run twice.

As described here:
http://mail-archives.apache.org/mod_mbox/tomcat-users/200204.mbox/%3CHFEAJGDFPPNOMHMMIKEDMENMCFAA.andy.eastham@gliant.com%3E

So I'm thinking to create a static instance of the MailPoller class in a different class, and then just check if it's null in the init method before making an instance of it.

But will making a static instance of the MailPoller be thread safe?
15 years ago
I found out why the init metod gets run twice ; I'm running tomcat and apache connected, and that causes all init methods to be run twice.

As described here:
http://mail-archives.apache.org/mod_mbox/tomcat-users/200204.mbox/%3CHFEAJGDFPPNOMHMMIKEDMENMCFAA.andy.eastham@gliant.com%3E

So I'm thinking to create a static instance of the MailPoller class in a different class, and then just check if it's null in the init method before making an instance of it.

But will making a static instance of the MailPoller be thread safe?
I put some more debug statements into the code, and the servlet init method gets run twice when the application starts up (tomcat).

How on earth can that be?