|
Try:
try {
FileInputStream file = new FileInputStream("Login.txt");
DataInputStream data = new DataInputStream(file);
BufferedReader LoginInputStream = new BufferedReader(new InputStreamReader(data));
UserNameString = LoginInputStream.readLine();
PassWordString = LoginInputStream.readLine();
LoginInputStream.close();
}
catch(Exception ex)
{
UserNameEntryField.setText("Error");
}
The code above was based from this snippet
Hope this helps,
--Perspx
"The Blue Screen of Death, also known as The Blue Screen of Doom, the "Blue Screen of Fun", "Phatul Exception: The WRECKening" and "Windows Vista", is a multi award-winning game first developed in 1995 by Microsoft" - Uncyclopedia
|
|
|
|
|
Hi!
Thanks but the code isn't working, even though it's perfectly valid. The error description says it all:
java.security.AccessControlException: access denied (java.io.FilePermission Login.txt read)
That is soooooooo annoying I could just scream! But I won't.
Is there any way i can get round the 'Access denied' problem?
Thanks!
MrWolfy
|
|
|
|
|
I think you may need to change the Java IO file permissions; take a look at this.
Hope this helps,
--Perspx
"The Blue Screen of Death, also known as The Blue Screen of Doom, the "Blue Screen of Fun", "Phatul Exception: The WRECKening" and "Windows Vista", is a multi award-winning game first developed in 1995 by Microsoft" - Uncyclopedia
|
|
|
|
|
Hi!
Thanks for the link Perspx, problem solved!
Thanks Again!
MrWolfy
|
|
|
|
|
|
Hi!
Wow Thanks! I Didn't know CodeProject had a Java Forum!
Thanks Again!
MrWolfy
|
|
|
|
|
In my application, I have to send mail to mail address.
But when i send, it doesn't delivered.Its staying in queue itself.(C:\Inetpub\mailroot\Queue)
My coding is
<%
dim iMsg
set iMsg = Server.CreateObject("CDO.Message")
iMsg.To = "xxxxx@yahoo.com"
iMsg.Subject = "Test Mail"
iMsg.From = "xxxxx@yahoo.com"
iMsg.TextBody = "This is a Test Mail" & " " & date() & " " & time()
iMsg.Fields("urn:schemas:httpmail:importance").Value = 2
iMsg.Fields.Update
iMsg.Send
%>
Im using Windows XP.
What can i do?pls help me.
|
|
|
|
|
Background:
These days, I want to make a setup program using Visual Studio 2005 for our customers . Our customers don't know web,and don't know deploy a website. So I need using web setup project to do it. It enable customers to automatically install and deploy the web on servers via an easy setup program. Now I have completed the setup program,but I encounter some questions.
Question:
1. When user click the setup program, framework 2.0 will firstly automatically installed,and it will check windows installer 3.1 need to installed.then the user need to windows installer 3.1. So I hope windows installer 3.1 firstly is installed,then the framework 2.0 begin. How can I
control the sequence?
2. When the same name of Virtual Directory have been existed,how can I estimate,and warn the user?
MSN:
pengyou8696@hotmail.com
E_mail:
pengyou8696@163.com
Thank you !!!
john
|
|
|
|
|
Hi All!
I'm having a problem with java if-else conditional statements, here's the code that's just not working for me:
public void actionPerformed(ActionEvent act) {
if (userName.getText() == MyString) {
try {
userUrl = new URL("http://www.mywebsite.co.uk");
getAppletContext().showDocument(userUrl,"_blank");
}
catch(Exception e) {}
}
}
Where MyString is a string variable that has been declared earlier and userName is a TextField that is also declared earlier.
The actionPerformed code is being executed when I click the button in my applet but for some reason the code inside the if statement is never executed.
Do I have to use some kind of method on the MyString variable? Like MyString.value or something? (I've tried that by the way, no such luck )
Thanks!
MrWolfy
|
|
|
|
|
Try:
if(userName.getText().equals(MyString))
I believe that using == compares the two addresses of the strings as opposed to the actual value of the strings.
Hope this helps,
--Perspx
"The Blue Screen of Death, also known as The Blue Screen of Doom, the "Blue Screen of Fun", "Phatul Exception: The WRECKening" and "Windows Vista", is a multi award-winning game first developed in 1995 by Microsoft" - Uncyclopedia
|
|
|
|
|
Right. Like C#, Java has a distinction between "value types" and "reference types". Unlike C#, the == operator is not redefined for the String type, so it's an address comparison.
|
|
|
|
|
Hi and Thanks!
Problem Solved, you guys are really helpful!
I'd never have figured that out by myself.
Thanks Again!
MrWolfy
|
|
|
|
|
Hello,
I need help with my sharepoint project...How can I customize the help menu of sharepoint?....How can I customize the errors pages and the login and logout pages of my sharepoint???....
If any person knows how to do or know any place in the web that could help me please send me a mail to fersango@gmail.com.
Thanks
|
|
|
|
|
Please any body tell me how to do the functionality as it is there
at the following link
http://www.makaan.com/property/create-ad.php?type=agent
create ad banner dynamically based on user inputs using javascript and
AJAX or are the any controls in AJAX for this functionality
|
|
|
|
|
You would need to use a server-side language like PHP to render the banner based on custom input.
And AJAX is merely a set of technologies used together to dynamically receive content from a server - there are no "controls" in AJAX.
Regards,
--Perspx
"The Blue Screen of Death, also known as The Blue Screen of Doom, the "Blue Screen of Fun", "Phatul Exception: The WRECKening" and "Windows Vista", is a multi award-winning game first developed in 1995 by Microsoft" - Uncyclopedia
|
|
|
|
|
Hi All!
In JavaScript, changing the browser location is simple:
window.location = "myurl.html"
How would I accomplish this same effect from an embedded java Applet?
Thanks!
MrWolfy
|
|
|
|
|
Use the Servlet Response sendRedirect() function, ie:
respose.sendRedirect(url);
Regards,
--Perspx
"The Blue Screen of Death, also known as The Blue Screen of Doom, the "Blue Screen of Fun", "Phatul Exception: The WRECKening" and "Windows Vista", is a multi award-winning game first developed in 1995 by Microsoft" - Uncyclopedia
|
|
|
|
|
Hi and Thanks!
Thanks for your help, however response.sendRedirect() is not working, my compiler complains and tells me that it cannot find symbol variable 'response'. Do I need to import something or use any other code in order for this to work? (I'm just learning Java)
Thanks!
MrWolfy
|
|
|
|
|
Oh sorry I didnt realise you were new to Java. Yes, response is a HTTPServletResponse. See this article - it may be of help.
Regards,
--Perspx
"The Blue Screen of Death, also known as The Blue Screen of Doom, the "Blue Screen of Fun", "Phatul Exception: The WRECKening" and "Windows Vista", is a multi award-winning game first developed in 1995 by Microsoft" - Uncyclopedia
|
|
|
|
|
This article may also be of help.
Regards,
--Perspx
"The Blue Screen of Death, also known as The Blue Screen of Doom, the "Blue Screen of Fun", "Phatul Exception: The WRECKening" and "Windows Vista", is a multi award-winning game first developed in 1995 by Microsoft" - Uncyclopedia
|
|
|
|
|
Wow Thanks!
Both articles were extremely helpful, Thanks! Problem Solved!
Thanks Again!
MrWolfy
|
|
|
|
|
No problem
--Perspx
"The Blue Screen of Death, also known as The Blue Screen of Doom, the "Blue Screen of Fun", "Phatul Exception: The WRECKening" and "Windows Vista", is a multi award-winning game first developed in 1995 by Microsoft" - Uncyclopedia
|
|
|
|
|
function reload(form)
{
var val=form.cat.options[form.cat.options.selectedIndex].value;
self.location='postquery.php?cat=' + val ;
}
am really new to this i want to know how it functions
-which form does it refer to?
-what is cat?(an object of?)
-options?
infact evrthing
thanx
|
|
|
|
|
Hi,
The porpose of this is script is to get the value of a select box and then go to a page based on this selection.
For form.cat.options[form.cat.options.selectedIndex].value :
form is a form that is called "form" and "cat" is a select box. What this line does is get the value of the selected option in this select box, which is what form.cat.options.selectedIndex is for - the []s show that form.cat.options is an array. This value is stored in a variable called "val".
What the next line does redirect the current browser window to "postquery.php" with the argument "cat" being the val variable that was assigned in the first line.
For example, if "val" was "data", then the browser window would be redirected to "postquery.php?cat=data".
Hope this helps,
--Perspx
"The Blue Screen of Death, also known as The Blue Screen of Doom, the "Blue Screen of Fun", "Phatul Exception: The WRECKening" and "Windows Vista", is a multi award-winning game first developed in 1995 by Microsoft" - Uncyclopedia
|
|
|
|
|
SOAP call to JAVA webservice from ASP using MSSOAP.SoapClient.
Could any one post the sample to access java webservice from asp
Cheers
Anoop
modified on Thursday, July 31, 2008 5:44 AM
|
|
|
|