• 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

why java script is not used in struts framework

 
Ranch Hand
Posts: 689
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hey ,
I think struts framework is following some different concept for validating the user input leading to less performance of the webapplication

here the validations are done using taglibs in servlet not in the jsp file
so definitely it reduces the performance..
the user input is validated at server side
why why why
 
Ranch Hand
Posts: 456
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
if you say that validation in struts has to be done server-side, you are not so correct. if not wrong ;-)

reading this article article should give you an overview.

btw: i disagree that client-side validation is better then server-side. with csv you depend on propriatary browser technology and are locking out any non-standard media (palm, screen-reader, etc). and yes, some users still deactivate javascript.

regards,
jan
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
saikrishna,

It's pretty clear that you've made very little effort to research this topic before posting this comment. Try Googling "Struts Client-Side Validation", read some of the hits you get, and then if you still have questions or comments, let us know.
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
still not clear could anybody ellaborate on it
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The assumptions you make about Struts Validation in your first post are incorrect. I was hoping that by doing some research you would discover this for yourself.

here the validations are done using taglibs in servlet not in the jsp file


Everything about this statement is inaccurate. Struts does not generally use "taglibs" to validate, nor does it do validation in "the servlet".
Struts Validation does use client-side (JavaScript) validation if you set it up properly.

It's important to understand, though, that even if you do set up client-side validation, Struts still performs server-side validation. Depending on client-side validation alone is not reliable, as the user can turn off JavaScript from the browser.

My advice is to spend some time researching Struts Validation beginning with this link and then decide if its right for your project or not.
 
saikrishna cinux
Ranch Hand
Posts: 689
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
but there the validation rules are executed in a servlet that means the control goes to servlet when the form is submitted.
 
Jan Groth
Ranch Hand
Posts: 456
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes.

but if you read the previous posts this makes sense.

if you feel that your point is unanswered, you should take the time and discribe your open issue with different words (and more then one sentence).

bye,
jan
 
Ranch Hand
Posts: 948
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
saikrishna: You do understand that Struts supports client-side validation that is implemented using JavaScript, correct? Does that not meet your needs?

- Brent
 
Bartender
Posts: 1845
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The #1 rule when writing web application is never trust the client.
Always validate the input you are receiving at the server end.
Javascript can be spoofed, disabled or even completely bypassed (hey all I need to do is type a url into my browser)

Your application should ALWAYS validate on the server side.
You application MAY also do validation on the client in javascript. This may improve the user experience, by saving some round trips to the server.
However you STILL do server side validation, even if you have validated in javascript.

In my experience the validation of parameters is never the bottleneck, unless you have some awful validation code running.

Cheers,
evnafets
 
saikrishna cinux
Ranch Hand
Posts: 689
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Stefan Evans:
The #1 rule when writing web application is never trust the client.
Always validate the input you are receiving at the server end.
Javascript can be spoofed, disabled or even completely bypassed (hey all I need to do is type a url into my browser)

Your application should ALWAYS validate on the server side.
You application MAY also do validation on the client in javascript. This may improve the user experience, by saving some round trips to the server.
However you STILL do server side validation, even if you have validated in javascript.

In my experience the validation of parameters is never the bottleneck, unless you have some awful validation code running.

Cheers,
evnafets




ok you may be correct, but before struts frame work the developers use to develop jsp pages using java script for the client side validation .

 
Jan Groth
Ranch Hand
Posts: 456
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i think your really really need to work on part A of your "life formula".

(1) you are wrong with your statement
(2) you are completely ignoring the fact that people putting effort into answering your 400+ questions. you're just dropping a line here and there, without any context to the (good) points people make. did you actually read all those answers to your question?

have a nice day,
jan
 
saikrishna cinux
Ranch Hand
Posts: 689
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi jan,
yes you may be right.
but i am different kind.
i am really really really thankful to all the ranchers who are helping me here.
internally i feel thankful,but externally i dont show up
Yes,i drop the statements with out any context,there is a reason for this
actually i dont want to explain you...
but you are misunderstanding me ..
ok here is my answer ...
The reason why doing like this is i will get some more solutions from others so that i can understand clearly

i am sorry for that ..
i am typical javarancher

thak's once again
bye
 
An elephant? An actual elephant. Into the apartment. How is the floor still here. Hold this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic