• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Struts 2.3 Ajax Validation with Dojo

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am migrating my Struts 2.1 application to Struts 2.3.

I am facing problem with ajax validation. The page reloads even if the ajax validation fails.

Below is the code"

struts.xml



validation.xml



JSP

<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@taglib prefix="sx" uri="/struts-dojo-tags"%>
<html>
<head>
<sx:head parseContent="true"/>
<title>Customer Form</title>
</head>

<body>
<h2>Customer Form</h2>



Can anyone please look at the code and let me know what is wrong there with this code?


Thanks,
Himanshu
jars.png
[Thumbnail for jars.png]
Jars included
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why are you going through the trouble to update to an old version of Struts? The current version is 2.3.20 and the versions between 14 and 20 fix some very critical security issues.
You should also be aware that the Dojo plugin was deprecated in Struts 2.1. There's a noticed posted in the Ajax Tag documentation.
Was the validation working in Struts 2.0? If so, you should probably go through the release notes to see if there are any known issues with upgrading.
I see that you have two head tags. That may or may not be a problem.
 
Himanshu Mishra
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you so much Joe,

The reason I have to upgrade Struts is, I am going to deploy the application to Wildfly 8. Previously I was using Jboss 4.2. While deploying the application, I was having trouble with JarEntryRevision Problem.

I have come up with the fix for the issue.

I have overridden a method in struts_dojo.js file



Now the validations are working.

Thanks Again.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic