Lucian Ochian

Greenhorn
+ Follow
since Nov 23, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Lucian Ochian

Be careful!
Take a look again to the link that I gave you because I added a post reply there!

Regards,
Lucian
18 years ago
Ravi, your Pseudo-code is almost perfect, but there is a little bug there.
In the step 3, you have to remove the else statement where you save the token again.
If you do that, this can happen:

1. user hits the load action and save the token
2. user hits the save action and the token is reset
3. user hits back button in the browser
4. user submits again, hits the save action, the token is not valid and it's set again(because of that else)
5. user hits back button in the browser for the second time
6. user submits again the form, hits the save action, and guess what? the token is valid and the data is submitted again.

Regards,
Lucian

PS: Anyway, your example was very helpful for me
18 years ago
Take a look here: https://coderanch.com/t/51602/Struts/Duplicate-form-submission-Synchronizer-Token

It works like a dream, thanks to Ravindra Janapareddy that explained this pattern very well and simple.

So you only thing that have to add is to save the token in the loading Action.

Lucian
18 years ago
The way that you wrote the query it seems to be an SQL query and not an HQL query.
Using session.createQuery, you need to provide to this method a HQL query, and not a SQL query.
You can use session.createSQLQuery with a SQL query, or write your query as a HQL query, something like:

select cv.field from table1 alias1 JOIN alias1.x alias2, where x is your association element in the first class.

Hope this helps!
[ November 16, 2005: Message edited by: Lucian Ochian ]
I think it's working on Eclipse 3.1 also. Try it
I solved the problem with pagent from putty.
19 years ago
Hi guys,
I'm trying to checkout from a CVS server (ext) some sources with ant (with cvs task and cvspass task) and I want to do this automatically(not to enter the password every time). I'm using Tortoise cvs client and for the ssh comunication I'm using TortoisePlink.exe.The problem is that it works but I have to input the password every time for TortoisePLink (it doesn't matter that I'm trying to use the passfile).
I tried to use instead the PLink from Putty, and I also tried without a passfile, but it seems that the only way that it works is with inputing the password for TortoisePlink every time. I tried with WinCVS also, but with that it didn't work.
If anyone has solved this problem, please help me asap!

Thanks,

Lucian


<cvspass cvsroot=":ext:user@host:/export/home/repository/das"
password="xxx" passfile="c:\.cvspass"/> <br>
<cvs cvsroot=":ext:user@host:/export/home/repository/das" command="checkout" package="java/Common" passfile="c:\.cvspass" dest="." cvsrsh="C:\Program Files\TortoiseCVS\TortoisePlink.exe" >
[ November 23, 2004: Message edited by: Lucian Ochian ]
19 years ago