Jilesh Lakhani

Ranch Hand
+ Follow
since Jul 26, 2006
Jilesh likes ...
Python Java Ubuntu
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Jilesh Lakhani

Depends really on your application. However Mule ESB has fantastic inbuilt implementation and connectors to databases.
It would be good for client to directly call the MuleESB hosted URL.

Basic validation and data processing (changing the data into different structure say JSON in Mule) and if required for further validation to Servlet controller (in async or sync way)

However if your business is okie with MULE directly interacting with DB then i would suggest you can add your business validation and saving part in mule directly this is avoid any sever hopping and creating of different sessions.

on a whole ESB has loads of features which you would want to use before forwarding the request to your webserver.
8 years ago
I've not tried it but seems like level < children can do the trick for you.

9 years ago
This isn't Java Question, however since you trying this using SQL.

I assume you are using MSSQL as your DB.
The query can be something like this
SELECT count(1)
FROM <Table Name>
WHERE <your other conditions>
AND log_time >= DATEADD(hh, SYSDATE, -24 /*This is your condition to get the records in past 24 hrs you can also add the Group by clause and remove count option to see if all returns login failed..*/

10 years ago

How about the usage of Protected..
12 years ago
I would like to know if Its a good idea to declare member variables in the base abstract class and provide its basic getter and setter method implementation in the abstract class ??

I also wanted to know, when it would be an ideal situation to declare a member variable as Protected.

12 years ago
well, I've read the HTML page using JAVA.io operations and showing it on my webpage.
now this HTML page has relative paths for images and css (Since the user is uploading standalone zip file) the are not aware of the system location also that location can't be access via URL.
example index.html has <img>

so here just to re-iterate,

A stand alone version of a zip file is uploaded, and it being saved to the servers @ remote location,
I've to now show this standalone version, via an accessible URL, to do so 1st part of showing the index.html file, its absolutely working fine via Java.io operations however its relative paths which is the issue here.

Hopefully I've given enough insights, do let me know if you need further clarifications..

13 years ago
Well, naming convention is upto the developers
to keep this very simple and straight, write the name of the methods / classes readable.

you can keep static variable in caps
Classes starting with capital alphabet.

you can figure our more, once you start coding.
Best of Luck
13 years ago
create a table and inside a while loop ..
while(rs.next()) {

you can do something like this.... I may be wrong with HTML syntax but hopefully you can take it forward from here.

check with java.sql.resultset
13 years ago
Hi all,

Little background:
User Uploads a zip file to my system from a UI, which has a index.html and its assets like images and css, javascript and i have to show this index.html, on my server.

This zip file has to be decompressed and saved on a remote location in my system and index.html has all the links to the images, css and javasripts it requires.

Where I've reached:
User can successfully upload the zip file.
I am able to decompress it and save it to the remote location
I Am able to do java.io operation and show the index.html file on my server.

This index.html files has relative paths to the images and css and javascripts. how can i do this any idea?

Things to keep in mind my application uses MVC model.

Any suggestions / thoughts are welcome.
13 years ago
NOTE: its was Ajax or Session. and not ajax and session
13 years ago
yep that's true. You wanted to know the alternatives may be next alternative would be showing error on servlets or URL connection to JSP page you can do that too.
However I would still standby Ajax is best bet use it if you can in your application instead of going through the post cycle
13 years ago
Best way is to use Ajax....

however with your environment you can either use form post, appending parameters to URL or sharing session between Servlet and JSP.
user.jsp will check if there is any session with id "errorMessage" if yes then display the error message else user.jsp will just show the error message.

so your control will be like
user.jsp ----- from submit--> servlet ---- if error---> user.jsp
user.jsp ----- from submit--> servlet----if success---> success.jsp
13 years ago
Lengthy just means, it takes lot of time to implement but I agree its a best approach as it would reduce the bugs also its easy to maintain.

let me think about a example.....

Readers Note that this is a Hypothetical example.

Lets say its about a E-commerce website, where our clients are the vendors, they can show up their products so the end users can purchase it.

So there is a standard system ready for them it also implements CSS changes for every clients.
Now there are product showcase or a sidebar showing recommended products.

Here one client (out client) says that my site should show "Most Purchased Item" instead of "Recommended Products".
and well we could have small small request too.

like a client could say : I would like my customers to print the product information and other one could say i don't want them to have print option!!

now these requests can keep on pouring in as the product grows, here I am looking for an good option where we can incorporate all these customizable change request from time to time.

hopefully this example should give you a better perspective of the issue raised.

till now there are two suggestions
1) XML (Not a Neat Process but short)
2) Database (Neat and lengthy)
umm, well Firstly I am not talking about CSS changes, I am talking about features.
Database driven is one solution would be the best one but also one of the lengthy & neat process, (creating back end UI to control things).

XML is not so lengthy but not neat either.

any other suggestions??