This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Building Blockchain Apps and have Michael Yuan on-line!
See this thread for details.
Win a copy of Building Blockchain Apps this week in the Cloud/Virtualization forum!

Rajiv Babu

Greenhorn
+ Follow
since Nov 23, 2004
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 Rajiv Babu

There are 2 ways of doing it,

1. Validating at the client side using javascript
2. Validating at the server side.

In the former you have to pass the value to the jsp when the page is loaded. Say if qty A you have 40 pieces, pass 40 and store it in a javascript variable on load of the page and validate on submit if user has entered the right quantity.

The above method will need code change at both client side and server side if new items are added are deleted.

Best thing to do would be to validate at the server side. Call a validation class from your servlet and based on success or failure return the user to same page/next page. This is extensible also because you can fetch all items from the db and validate the corresponding quantities against the values entered by the user. So in future if new items are added/items deleted you wont have to change the code.
15 years ago
mails are sent to a mail server. And mail servers obviously can receive more than one mail to any ID at an instance. mail ID is just a valid SMTP name. If you can be more specific as to what you want to achieve, people will be able to help.

rgds,
Rajiv
15 years ago
Hi all,

Often I wonder how certain sites like gmail manage to compress what the user sees when he does a "view source". How is this achieved? Any pointers to this would be great.

Thanks,
Rajiv
15 years ago
JSP
What about wrapper classes? I can write wrappers to classes and abstract the actual implementation of the method from the user. Isnt this abstraction without using the keyword then? Even in case of patterns, factory pattern, abstract factory pattern etc, user does not know the actual implementation.
15 years ago
Hi,

Can you give us some more details as to how you are caching? How is the cache served across concurrent access. Assuming that you are using a servlet which will take care of all requests from the JSP, you can cache the data at the application level, by putting in the information as <attribute,value> in the servlet session context. You can retrieve any data by accessing the attribute in the sessionctx. Once an change happens in the data, the code should automatically modify the corresponding attribute in the servlet. You can remove it using the removeAttribute() call in javax.servlet.ServletContext. You can recreate the value using putAttribute(). That way the data in the cache is refreshed. Your JSP can then be rendered with the new data.

regards,
Rajiv
15 years ago
JSP
What is the Error? Please post your complete query. Only then people can answer.

rgds,
Rajiv
Hi,

Looks like you are trying to develop another file swapping system. . Ok here goes. You already have experience is sending strings over a socket connection. So all you have to do is define a set of commands between the server and the client. For instance once the client connects, the server can send a command "SCAN" to the client. Once the client receives this he starts a scan on a preset directory. However, you may have to preserve the last state of the directory in some place. Say a database. So now you have 2 sets to compare. How much data you compare is left to you from filenames to size to anything else. Once the client completes a scan he can update his database. To upload files to the server automatically, the server should support something like FTP. Establish a data connection and send the files. They can be put on the server. You can make this process an independent thread so users can use other features of the client say chat.

This is one simple design. You can take help from java.net packages for sending commands. Develop the UI with swings and even pass data with DataOutputStream classes. Well thats a very broad perspective. But I guess thats all is possible over the forum. Rest is left to you to explore.

rgds,
Rajiv
15 years ago
Hi,

I suspect your userTxn objects are different. Pass the object as argument to method B and use the same connection also. It should work.

regards,
Rajiv
Hi,

LDAP is a protocol to access a directory server. Directory servers are typically like a telephone directory that is highly optimized for very fast searches. So in an application with a large load, this improvement in performance helps a lot. Also, the directory server can be used to store authentication data centrally to be shared among multiple applications.

Certain appservers like SUNONE for instance provides APIs like EJBProgrammatic login class which takes app server user ID and password as one of the params. So in these cases you will have to authenticate yourself to access the EJB. Remember the EJBs always reside in their own container and not on the servlet container.

rgds,
Rajiv
15 years ago
Atleast Kannada film industry is getting extra publicity with such crazy ideas. Now I know why kannada movies are said to be bad....these movie makers n actors have crazy ideas.
15 years ago
Control both the programs from one central place and place the access to the file in a synchronized block. At any point of time either your read thread or your write thread will access this method. In case one is already using it, the other will have to wait. You can always notify the waiting thread once the active tread returns.
15 years ago