Komal Renu

Ranch Hand
+ Follow
since Jul 21, 2011
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
5
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
(keep public parts private until JForum day)
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt
Moderation Tools

Recent posts by Komal Renu

David,

I've used the Quartz API in quite a complex project. And Quartz is fairly simple, right from setting it up to extending the API for customizations.
And it is very stable and reliable in terms of job executions. Maintains its own DB which enables easier monitoring or altering of jobs.

My say would be Quartz.
If at all you decide to use the Quartz API, we can then take forward your questions.

Thanks and Regards,
-------------------------------------------------------------------------------------
Komal Renu | krenu@infocepts.com | www.infocepts.com
-------------------------------------------------------------------------------------
4 years ago
In the run.conf file in bin folder of JBoss, search for "JAVA_OPTS".
And modify the size as required. Eg - JAVA_OPTS="-Xms512m -Xmx1024m

Thanks and Regards,
-------------------------------------------------------------------------------------
Komal Renu | krenu@infocepts.com | www.infocepts.com
-------------------------------------------------------------------------------------
6 years ago
You need to give the @Override annotation on the doGet and doPost method.

Thanks and Regards,
-------------------------------------------------------------------------------------
Komal Renu | krenu@infocepts.com | www.infocepts.com
-------------------------------------------------------------------------------------
6 years ago
Also, once you start up the server using startup.bat, and if the issue still occurs, then you might want to check if port 8080 which is used by default for tomcat, is not in use.
If it is then you can either free the port or configure your tomcat server to point to a different port.

Thanks and Regards,
-------------------------------------------------------------------------------------
Komal Renu | krenu@infocepts.com | www.infocepts.com
-------------------------------------------------------------------------------------
6 years ago
Yes a check with null isn't actually required. my bad!

Komal
Hi Naveen,

There's a very minor issue in your code. Here it is :

In your javascript function



you have defined both variables as x. whereas the second one where you collect the password should be y.

Moreover instead of using the && operator in the check, you should use ||. Because && operator will not satisfy the condition where one of the fields is null. So all in all your code should be better written as



To enhance it even further you can do separate validation for user id and password. Also note that as good coding practices, its better to give meaningful names to variables.

Hope this helps!

Thanks and Regards,
-------------------------------------------------------------------------------------
Komal Renu | krenu@infocepts.com | www.infocepts.com
-------------------------------------------------------------------------------------
Send it through url parameters or use form properties.

Using Form properties is a better solution.

Thanks and Regards,
-------------------------------------------------------------------------------------
Komal Renu | krenu@infocepts.com | www.infocepts.com
-------------------------------------------------------------------------------------

Hi Everyone,

I am using Quartz scheduler for scheduling some delete activity from the DB.
In the quartz configuration i am using Database Job Store for tracking.

Now, here's the scenario and the problem
Scenario:
1. created a servlet to schedule a delete job.
2. set the time of the job execution at a fixed time of the day
3. deployed the application in two tomcat instances (point to the same DB)
4. Invoked the servlet on both the URLs.

Problem:
1. Quartz tables are updated successfully
2. the delete operation occurs only on one id and not on both
3. but in quartz table it shows both jobs trigger count as 1.

Can anyone help me find a way to make sure that both DB deletions occur successfully.

Thanks,
Komal
Hi Zoheb,

If i understand it correctly, you need to use a common jsp for Add and Edit, but don't know how to handle it with struts, right ?

I had a similar scenario in one of the applications that i worked on. Here's what i did.

1. Have the same form for the fields on the jsp.
2. Create the jsp and give all the fields there. Also give a hidden variable which is the id column in the database for your form details.
3. When you navigate to the form for add, that hidden variable wont have a value, whereas when you navigate for Edit, the Id will be set in it. (you need to handle this in your action class)
4. Now on click of submit button, invoke a javascript where you check the value of that hidden variable. If it is empty then invoke add function in action else invoke edit.
5. In you add/edit function you just need to set the user entered values in the pojo class for db table and invoke the saveOrUpdate() method of the persistence.

Let me know if this helps.

Thanks and Regards,
-------------------------------------------------------------------------------------
Komal Renu | krenu@infocepts.com | www.infocepts.com
-------------------------------------------------------------------------------------
6 years ago
Thats great
6 years ago
May be that the properties file for those three languages are using some symbols which are creating a conflict.

Thanks,
Komal Renu
6 years ago
Hi Raja,

Ideally you should create a form, for all the fields you require. This form bean should be used in the jsp, That ways, when you navigate to the action class incase of page submit, your form bean would have the user updated values.

This is how you write the useBean tag in JSP :



Once you write the above line in you jsp, then you can directly access the form properties like :



In your action class you can get this form and then set the necessary parameters in your DTO as



This is the better way to do it.

However in your case, either you can use the DTO directly on the jsp page or through an object in your form.

Hope this helps!

Thanks and Regards,
-------------------------------------------------------------------------------------
Komal Renu | krenu@infocepts.com | www.infocepts.com
-------------------------------------------------------------------------------------
6 years ago
Thanks Bear for the information.
I had never heard of http://w3fools.com/ until today

I like the try-it-yourself editor in w3schools that helps understand the functionality better. And the website really comes in handy at times.

Thanks,
Komal

Hi Raja,

I understand you problem more clearly now.
Before i proceed with giving you an example, there are few questions i have which will help me provide better solutions.

1. Can you give me a smal code snippet from your JSP?
2. When you define the various tags in JSP are you using those property names from any bean or are they random names?
3. Is your DTO supposed to act like a form bean ? Does you application have a form bean ? (a form is nothing but a class that has the property names and their setters and getters)

Please confirm.

Thanks and Regards,
-------------------------------------------------------------------------------------
Komal Renu | krenu@infocepts.com | www.infocepts.com
-------------------------------------------------------------------------------------
6 years ago
Dont know of an appropriate book but www.w3schools.com is an amazing website to study html, css and js.

Thanks and Regards,
-------------------------------------------------------------------------------------
Komal Renu | krenu@infocepts.com | www.infocepts.com
-------------------------------------------------------------------------------------