Win a copy of Machine Learning with TensorFlow this week in the Artificial Intelligence and Machine Learning forum!

Lokendra Shekhawat

Ranch Hand
+ Follow
since Jun 08, 2009
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 Lokendra Shekhawat

Hi Friends....

I have questions...

Can we password protect a file / folder / drive (Pen drive or c: / d: drive of windows) using java?

I can zip and password protect a file and folder, but its actually creating the copy of original data....

can we password protect file / folder without zipping them?
can we password protect pen drive or windows drive?

Awaiting your response...

Thank you..

7 years ago
i have created a project for my MCA 6th semester.
My question is how can i package My web application and Derby database together, so when i take it with me on presentation, it will be easy for me to present it,

because when i open my project on other computer, i can easily open the web application, but to make it fully functional, i need to create the database and and tables in it for every computer.

is there any way that database can go with project, and open with it.

Please help !!

Thank you
9 years ago
I am also getting the same error. aren't there any way around it. can't we store image on the database at all???
hi friends,
I want to store images (.jpg or .png or .gif) in MS SQL Server 2005 database using JDBC-ODBC connectivity in servlet. can anybody give me step by step procedure to do it.
I don't wan't to store the reference to images, instead i want to store actual image file in a database.

Please give me step by step procedure to do it.

Thank You
i found the way around it. i removed the Apache tomcat server form netbeans server list and added it again. by doing this the tomcat-users.xml file content been deleted automatically and when i add the tomcat again i also created the user using netbeans and after that it works. before i edit that tomcat-users.xml file manually but i won't work, but by editing it with netbeans it works.
now tomcat is using 8080 port instead of 8084.

tomcat manager is working now.

I can live without admin console, i asked it because when we right click and click on view admin console it point to localhost:8080/admin page when returns 404 error. when apache tomcat remved the admin features from 6th version then why it point to that same location.

anyways my problem get solved. i don't know there is some kind of magic in this blog whenever i stuck with something and post my problem here, my problem get solved always.

Thank you very much
11 years ago
hi friends,

Today i installed netbeans 6.7 with glashfish v2.1 and Apache Tomcat 6.0.18. I created an web application using Apache Tomcat as a webserver.

I am not able to access Apache Tomcat admin console. here is the steps i used to access admin console of tomcat:

1. click on service tab of netbeans IDE 6.7.
2. expand servers and right click on Apache Tomcat 6.0.18 and click start.
3. after the server starts. right click again on apache tomcat 6.0.18 and click on view admin console.
4. it opens a web browser with "http://localhost:8084/admin" url. and giving error "HTTP Status 404 - /admin".
5. when i open it using "http://localhost:8084/" it shows home page of Apache Tomcat Server.

6. when i try to access administration links like status and tomcat Manager, it asks for password (what is the default user name and password to access it).

7. when i click cancel on it . it says:

You are not authorized to view this page. If you have not changed any configuration files, please examine the file conf/tomcat-users.xml in your installation. That file will contain the credentials to let you use this webapp.

You will need to add manager role to the config file listed above. For example:

<role rolename="manager"/>
<user username="tomcat" password="s3cret" roles="manager"/>

8. so i opened that file and tried to use the predefined users like username=tomcat password=tomcat, but it still says you are not authorized. so by following the above message I created a role manager and create a user in that account. but i am still not able to open its admin page.

Please suggest me what to do. because when i installed netbeans it asks for default user name and password for glashfish webserver, but not for Apache tomcat.

Please guide me so i can access the admin page of tomcat.

Thank you
11 years ago
Thank You for fast response.

And I am sorry for posting it here. I don't find suitable place for it. Will you guide me to it.

Thank You
11 years ago
Hi friends.

I am developing a project in netbeans 6.5 using glashfish. now my project is complete. i want to delop my website over to internet. i searched some hosting sites. i found only about tomcat web server, no glashfish web server. what should i do??

And please suggest some good hosting sites of java from india.

Thank you
11 years ago
can you give me a link which shows the example to connect SQL Server using JNDI in NetBeans 6.5 IDE.
Thank you it surely help me very much.

now i am going to use it, before i was using MS SQL server.

where the derby database file get stored, does it store with in the project folder or somewhere else.

when i deploy the war file will i have to upload database differently or it will go with war file.
Hi friends, i am working on my college project. My project is working perfectly. i used JDBC-ODBC bridge driver. but my teachers says that this driver is very useful for testing, but not for normal use, i.e., when we deploy our application to the web server over the internet, its not a good idea to use JDBC.ODBC bridge driver. Instead we should use JNDI driver.
Is this true?
I don't know much about JNDI connectivity. i am able to connect Derby database using the JNDI. but how to connect to SQL database using NetBeans IDE (i am using 6.5).
My teachers have no idea how to connect to SQL database using JNDI. whenever i ask them about it they say to connect to the SQL server we need to install a driver in NetBeans. they always say that.
Can/t we connect to SQL database using JNDI in NetBeans IDE 6.5 without installing any extra driver?

Please help me i don't know much about JNDI connectivity to SQL Database. will anyone give me some example or tutorial link.
Hi friends, i wanted to generate values in table automatically in the derby database. but the identity keyword is not working, is there any other keyword which perform the same functionality. how to generate values automatically in derby database. Please advice.
and if you wanna know what they sent in the auto generated mail. below is the first mail i got (auto generated):


This is an automated reply from Sun Microsystems.

Thank you for taking the time to write to us. Your
feedback is important and helps ensure our site and
programs meet your needs.

If you are reporting a problem, we will make every
attempt to resolve it. However, due to the volume
of mail, not all messages can receive an individual

If you need technical support for our products or
technologies, please see the resources available at:


The Sun Web Team

i Got the reply from sun its not auto generated bec i already got auto generated mail. this is the second mail i got from Sun.


Thank you for your interest in Sun Microsystems
and for taking the time to write.

I will forward your comments to the program
managers of The Sun Developer Network.
Please note that the content teams may not be able
to reply to every message, due to the volume of mail
that they receive. We do consider all feedback and
appreciate your support.


Sun Web Team
Sun Microsystems, Inc.

although there is not much. but i think by sending mail they will at-least talk about it. and may be they will take some action about it. I did it because may be it will help to the peoples in the future who are going to give Sun certification exams.
I sent the complaint to sun's inquiry suggestion section. lets wait for their reply!!!