Win a copy of Microservices Testing (Live Project) this week in the Spring forum!

Shahir Deo

Ranch Hand
+ Follow
since Mar 19, 2013
Shahir likes ...
Hibernate Oracle Java
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Shahir Deo

As i am using Struts 1.3 , I could not find much details.

It would be good if some one explains how it is Done.
8 years ago
Hi Guys,

I am writing a front end page using JSP with Struts framework.

One of the text field requires to be entered should not be more than 100.

Limit Value : 100 -->Allow
Limit Value : 111 -->Not Allowed
Limit Value : 56 -->Allow

8 years ago
Anyhow I got what i needed.

1. It will restrict two digits after period.
2. It will allow only one period.

Thanks for Help, Enjoy.

Your current regex currently allows zero or one period, so this part is fine.

No It is not doing that. I changed REGEX to limit two decimals after a Period /^\d*(.\d{0,1})?$/ , But it is allowing to enter two Period.


Bear Bibeault wrote:Can there be no decimal point?

Good point

4.There can be no decimal point too. Ex: 2

J. Kevin Robbins wrote:Thanks, Henry.

Shahir does that help?

Are you aware of this site? It's great for testing this sort of thing.

I still recommend you look into using jQuery and the validation plugin, if that's an option for you. It makes client-side validation of form fields very simple.

@Kevin/Henry Wong

Hmm. actually i am not good at REGEX, it would be nioce if you and Henry cn provide it for me.

My Requrements:

1.User can enter any number of digits after decimal point. ex: 1.233333333333
2.There should be only one decimal. ex: 1.2
3.Decimal should not come as a first digit. ex: .36

Hope this information is sufficient.


J. Kevin Robbins wrote:I assume you are looking for a regex that will do this. What have you tried?

yes , regex would help.

I tried this, but no solution

function c1()
return false;

function check(txt)
return txt.match(/^\d*(.\d{0,2})?$/);
Hi, Guys

I am writing a Page where i required to give one text field , which should have only one decimal point. and that should not come in first.

Ex: 1.23 is correct
.23 is wrong
15.3.7 is wrong

Please help me to write a Javascript validations on keypress.


Jaikiran Pai wrote:What class and what method is that? Is that an auto generated method? Also, please post the entire exception stacktrace.

It is a AddForm class. The Method is not there in AddForm Java class.

StackTrace :

8 years ago
Hi Guys,

Well this may seems another java.lang.NoSuchMethodError problem, but i have gone through some of the solution but it didnot help.

I made some change (Added two private variables) to Form class , Now when i generate an EAR , the size of the class file is less (Compared to previous) , However it should have increased.

At some point i am getting java.lang.NoSuchMethodError in this class , So i opened .class file & searched missing method and did not got . so i checked in the previous .class file , and i got that method.

CAN anybody let me know why some methods get disappear at Runtime ? All the required JAR are present at build path?

IBM Websphere 6.1
8 years ago
Hi, Guys

Whenver i am trying to run the server/starting application i am getting below errror.

Please Help.

javax.transaction.TransactionRolledbackException: CORBA TRANSACTION_ROLLEDBACK 0x0 No; nested exception is:
org.omg.CORBA.TRANSACTION_ROLLEDBACK: javax.transaction.TransactionRolledbackException: ; nested exception is: Transaction marked rollbackonly vmcid: 0x0 minor code: 0 completed: No

Server : IBM Websphere 6.1
IAD : RAD 7.5
8 years ago

Paul Clapham wrote:That sounds like a bug in the process which creates those documents. In which case you should notify the people producing them -- you have a pretty good description of the circumstances under which the bug occurred, I would say.

That is one scenario, but can we igmore or trim it at our end?

William Brogden wrote:My question would be where are these zero bytes coming from. Who or what is writing this XML in the first place?


We are receiving these XML from another interface conneted to our application, we cannot change anything from taht side, but whenever we have accented char in XML CDATA , we found junk or Null bytes at trailing section, so i need to ignore this or trim it to the end of ">".
I found that is Null byte.

Hex value : 00

How to trim ? because it is trailing section??
This document was successfully checked as well-formed XML!

When i check this XML in Edit Plus i found two Square Box. What does this represents.?