PDA

View Full Version : commons validator module on Weblogic 8.1?


pjydc
Sep 7th, 2005, 05:35 PM
I use the spring module (commons validator) for validation. I use
Spring 1.2.3. My application works fine on Tomcat 5.5.7.
However, after I deployed it on Weblogic 8.1.2, I keep getting
a javascript error message (Syntax error) and the client side validation
is not functioning! The server-side validation still works.

Did a lot of research, not progress. I am getting stuck here.
Anybod has similar experience?

Any help/info is greatly appreciated.

Regards,
Pete

When I saved the page on the hard drive, I found the validator.jsp
file has html code in the beginning and end of the file. In the middle of it is
Javascript code. How the hell could this happen?


The following is the source I got from the browser.

<form method="post" action="index.html"
onsubmit="return validateEmailPage(this)">

<span class="main">Your E-mail Address:</span>


<input type="text" name="address" id="address" value="test@test.edu"/>

<input type="submit" value=" Go "/>

</form>

<script type="text/javascript">

var bCancel = false;

function validateEmailPage(form) {
if (bCancel)
return true;
else
return validateRequired(form) && validateEmail(form);
}

function required () {
this.aa = new Array("address", "E-mail Address is required.", new Function ("varName", " return this[varName];"));
}

function email () {
this.aa = new Array("address", "E-mail Address is an invalid e-mail address.", new Function ("varName", " return this[varName];"));
}

</script>


<script type="text/javascript"
src="/nmaienewssignup/includes/validator.jsp"></script>