This week's giveaway is in the Spring forum.
We're giving away four copies of Microservices Testing (Live Project) and have Chris Love & Andres Sacco on-line!
See this thread for details.
Win a copy of Microservices Testing (Live Project) this week in the Spring forum!

Navi Lock

Ranch Hand
+ Follow
since Jul 29, 2003
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 Navi Lock

Guys, need your help in the below.

Need to Deserialize a 'Blob' from Oracle DB.
The Blob is composed of a number of primitive and customized class objects of my application.

What i could achieve, was
1) Retrieve the Blob from DB,
2) retrieve the byte stream,

3) Need to know how to reconstruts the objects back from the stream.

It blows up when i attempt the 3rd step as below

ObjectInputStream is = new ObjectInputStream(new BufferedInputStream(byteStream));
3)Object o = is.readObject();


Any code example would be great.
Thanks in advance,
-Navi
14 years ago
Yes.. that is what i want to know..
How to ignore the subsequent requests..

what are/is the way to ignore the subsequent request's??
Or rephrasing - How to kill/nullify the subsequent request, while the first request is still being processed and hasn't reached a decision point.

I would like to show the result page based only on the first request only..


Thanks,
-Navi.
14 years ago
Any other suggestions guys ??

Thanks,
-Navi
14 years ago
HI Ulf, Thanks for responding..

I still want the customer to see the result page only invoked due to the first 'submit'.
Is there a way to ignore the successive submit request's?



That is what i wanted to do.. need to know how to do the above.

Thanks again,
-Navi
14 years ago
Guya,Any thing on the above q ?..

Thanks,
-Navi
14 years ago
Howdy Folks,
need your expertise on the below..
Issue is to 'prevent multiple submits' from the same page..
Meaning a user could possibly press the same button more than one time.

Cannot use Scripting.

Have tried using isTokenValid()/resetToken()/saveToken().
The above works.. i am able to differentiate between the first and the successive http request's.

Question is .. what to do with the successive request that come in ??
And at the same time the application is waiting for the underlying processes to be completed initiated due to the first request.

I still want the customer to see the result page only invoked due to the first 'submit'.
Is there a way to ignore the successive submit request's?

Thanks in advance,
-Navi

[ November 21, 2007: Message edited by: Navi Nav ]
[ November 21, 2007: Message edited by: Navi Nav ]
14 years ago
Guys,
I am using struts in my application.
Everything was working fine.
Then all of a sudden have this exception being thrown,..have no clue..

E org.apache.commons.validator.Validator TRAS0014I: The following exception was logged java.lang.reflect.InvocationTargetException
Caused by: java.lang.NoSuchMethodError: org/apache/commons/validator/GenericValidator.isBlankOrNull(Ljava/lang/String Z
at java.lang.Throwable.<init>(Throwable.java)
at java.lang.Throwable.<init>(Throwable.java)
at java.lang.NoSuchMethodError.<init>(NoSuchMethodError.java:54)
at org.apache.struts.validator.FieldChecks.validateRequired(FieldChecks.java:129)

I have the commons.validator.jar/struts.jar etc in the lib directory.
Am using DynaValidationActionForm..

In validation.xml:-

<form name="/myFormAction">
<field property="field1" depends="required" >
<arg0 key="prompt.field1" />
</field>
<field property="field2" depends="required">
<arg0 key="prompt.field2" />
</field>

In Struts-Config.xml:-

<form-bean name="logOnForm" "org.apache.struts.validator.DynaValidatorActionForm">
<form-property name="field1" type="java.lang.String"/>
<form-property name="field2" type="java.lang.String"/>
</form-bean>

<!-- Message Resources -->
<message-resources parameter="resources.ApplicationResources"/>
<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
<set-property property="pathnames" value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
</plug-in>


In validator-rules.xml:-


<validator name="required"
classname="org.apache.struts.validator.FieldChecks"
method="validateRequired"
methodParams="java.lang.Object,
org.apache.commons.validator.ValidatorAction,
org.apache.commons.validator.Field,
org.apache.struts.action.ActionErrors,
javax.servlet.http.HttpServletRequest"
msg="errors.required">



Please let me know what i am missing here ..

Thanks in advance,
-Navi
14 years ago
Guys, thanks for the responses.
Both are correct.

Bart - I do see the updates in the bin folder.

Rob - Yes from a Threads perspective you are correct.

Thanks again,
-Navi.
14 years ago
Guys,
Need your help on the below.
Have a simple application that allows the user to register on the website.
Have a properties file that i need to store the username & password with which the user would register.

The code is as below :-
---------------------------------------
Properties properties.put(userId, userPassword);
String fileName = this.getClass().getClassLoader().getResource("resources/registeredUser.properties").getFile();

FileOutputStream op = new FileOutputStream(fileName); properties.store(op, null);
op.flush();
op.close();
---------------------------------------

I do not see the new User Id's and Passwords in the Properties file
nor do i see any exceptions.

Thanks in advance,
-Navi
14 years ago
This class has primitive and other customized objects in it.
-Navi.
14 years ago
JSP
Guys,
Need some help on the below
I have a Customised class Object ex : Myclass.
I need to pass an instance of this class from a HTML/JSP form to Server side as 'Hidden' attribute.

I have the following which blows up ..
<%
MyClass myclass = new MyClass();
%>
<TR>
<TD colspan="2"><input type="hidden" value"<%=myclass%>" name="KEY">
</TD>
</TR>

Actually this is part of a Struts application..

Have defined the attribute as follows in Strust-Config.xml
<form-property name="KEY" type="MyClass"></form-property>

I am getting the following stack trace..

[BeanUtils.populate]: org.apache.commons.beanutils.ConversionException: Cannot assign value of type 'java.lang.String' to property 'KEY' of type 'MyClass'

Thanks in advance,
-Navi
[ October 17, 2007: Message edited by: Navi Navi ]
14 years ago
JSP
Hi Merrill,

cool.. think that would work..

Let me try..

Thanks for the help...appreciate it.

-Navi
14 years ago
Hi Craig,
Could you elaborate please ..
A code snippet would be great.

Thanks,
-Navi
14 years ago
Folks, need some guidance on the below..

Have 2 action classes. Ex: Action1.java and Action2.java.

Action 2 has its form validated as 'DynaValidator' extension and has a corresponding Jsp.

Can Action1 pass on control to Action2 bypassing the Validation of Action2 ?

Want Action2 to execute different logic based on where the request comes from.

Action2 can get request from the Jsp or another Action class.
So if the request from's from Action1 execute some functions and
if the request comes from Jsp execute some other functions

Is the above possible ? an example would be great.

Thanks in advance,
-Navi
14 years ago
My apologies..
I had named the validation.xml file as 'Validation.xml'{upper case} and that was causing to miss the validation.

Thanks again for the responses
-Navi
14 years ago