• 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

Multiple submissions

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

I have an application with JSP,Oracle, HTML and Javascript.

I have a java class that process the logic.I have already created a file that process this logic when I click in the submit botton.

When the button is clicked, two hidden types send the necessary values to the java class and it process the logic successfuly.

My problem is that I need to process it for each line in a table.

In other words,how can I make these submissions dynamically?

I need something that changes the values of the hidden types and submit it, changes the values of the hidden types to other values and submit it, change again and submit.


Thanks
Daniel Amorim
 
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Changes it to what?

What starts and stops the cycle?

Why use a web page at all? This sounds more like an automated script to me.

What you want is easy to accomplish with basic Javascript, but you haven't given enough details to offer any kind of substantive response.
 
Daniel Amorim
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Bear Bibeault:
Changes it to what?

What starts and stops the cycle?
>>In fact it does not matter, it could be a button, a link or anything.

Why use a web page at all? This sounds more like an automated script to me.
>>Yes, what I need is something like an automated script.

What you want is easy to accomplish with basic Javascript, but you haven't given enough details to offer any kind of substantive response.



>>Ok.I have an application that uses LDAP (used to authenticate users) and >>what I need is to change ALL the passwords from the LDAP users.
>>I dont need to think in the details used by LDAP to make it, cause I >>already have a script that changes a single LDAP user password, and it >>works fine!
>>Did you get it now?My problem is that I have a JSP(html/javascript) that >>makes my job, but for a single case only.It takes the data from two >>hidden types(userid and login) and then sends it to a java class.
>>I need a way to make it in a finite loop, in others words I need a script >>that creates a list of userid/login and for each userid/login it submits >>to a java class.
 
Marshal
Posts: 28226
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I suppose your JSP is changing the password for a single user based on the request's parameters. Was that what you meant by a "script"? If so, I also suppose there's a lump of Java code in a JSP scriptlet that is doing that work.

So what I would do is to write a Java (not Javascript) program. Take that code that updates the password, and wrap it in a loop that goes through a list of user id/password pairs. Trying to write Javascript that submits multiple requests to this JSP seems rather convoluted to me, although I suppose that could be done too.

But I still don't understand where this list of user id/password pairs is going to come from. If you need to get it by accessing the LDAP and making a list of users that are already there, then you may find the server-side (Java) solution easier, because the LDAP is on the server and the Java program could just go through the directory changing passwords. But if you can generate that list and transport it to the client somehow, then writing the multiple-request Javascript might be easier. It also depends whether you know how to write Java.
 
Daniel Amorim
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Paul Clapham:
I suppose your JSP is changing the password for a single user based on the request's parameters. Was that what you meant by a "script"? If so, I also suppose there's a lump of Java code in a JSP scriptlet that is doing that work.

>>Exactly!

So what I would do is to write a Java (not Javascript) program. Take that code that updates the password, and wrap it in a loop that goes through a list of user id/password pairs. Trying to write Javascript that submits multiple requests to this JSP seems rather convoluted to me, although I suppose that could be done too.>>How?
>>I�d rather avoid it, cause it seems to be harder for me.

But I still don't understand where this list of user id/password pairs is going to come from. If you need to get it by accessing the LDAP and making a list of users that are already there, then you may find the server-side (Java) solution easier, because the LDAP is on the server and the Java program could just go through the directory changing passwords. But if you can generate that list and transport it to the client somehow, then writing the multiple-request Javascript might be easier. It also depends whether you know how to write Java.



>>The list comes from an external database(Oracle table).
reply
    Bookmark Topic Watch Topic
  • New Topic