Win a copy of Murach's MySQL this week in the JDBC and Relational Databases forum!

sun moon

Greenhorn
+ Follow
since Oct 09, 2002
Merit badge: grant badges
For More
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 sun moon

r u using tomcat or anything else, if u are using tomcat then checkout the path u r mentioning, it takes by default tomcat\bin. So if ur fine is not present there it shows the error.
21 years ago
hi,
i m working on a project where i m using jmail,
code is shown below
Properties props = new Properties();
props.put("mail.smtp.host", ""); // NOTE
Session mailSession = Session.getDefaultInstance(props, null);
MimeMessage message=new MimeMessage(mailSession);
Address addFrom=new InternetAddress("pjack@yahoo.com");
Address addTo=new InternetAddress("bback@yahoo.com");
message.setFrom(addFrom);
message.addRecipient(Message.RecipientType.TO,addTo);
message.setSubject(txtSubject);
message.setText(txtDesc);
Transport.send(message);
NOTE : I dont have any mail server, i thought of keeping it as localhost or leaving it blank.
props.put("mail.smtp.host", "");
props.put("mail.smtp.host", "localhost");
but it is throughing exception saying that no mail server exist.
My question is, is it neccessary to mention the mail server, when i want to send mails to people, where in there id consist of yahoo.com, hotmail.com, aol.com.
If so with different mail ids which server name shall i put in the properties so that it works fine.

thanks in advance
21 years ago
hi,
Good question, but answers will be varying according to the individual perspective.

i think EJB is advance version of web servers. (it is called as Application Server)
What i mean to say is, EJB is a comprehensive bundle where it contains all the functionality what user wants while doing programming,
Functionality like
1. Connection pool
2. Security
3. Concurrency
4. Transaction
5. Performance
And many more things which user is not worried when he is going to develop certain application based on EJB.
Any views are appreciated
bye
thanks,
can u explain me more about the methods in the above question.
it is not clear to me
hi,

if a varaible is not declared before the static initilizer and the variable is used in the static initilizer then error is thrown, inistead of variable if i call static method then it wont give error why?
public class Test {
static{
i = i + 1; // note
}
static int i=10;
static void me(){System.out.println("k");}
public static void main(String args[]) {
Test t = new Test();
}
}
Note: if i substitute method me() in place of the varaible then it wont show error why.
thanks in advance
hi,
thanks,
that means left side it can only accept the "Class Object" no other object like show below can be accepted
interface Best{
}
class Rest implements Best{
}
class Test extends Rest{
public static void main(String args[]) {
Test r = new Test();
Best b = new Rest();
r = b; // note
}
}
note here r should be substituted by "Class Object" only
We can not use anyother object on the left side
is so
hi,
in java specification1.2 section 5.2,
one of the rules in conversion are.
- If S is an interface type:
If T is a class type, then T must be Object, or a compile-time error occurs.

i dint understand this point.
can u pls help me out using example
thanks
hi,
What is the use of connecting tomcat to apache. Tomcat runs the servlets, jsps and all webpages without using tomcat so is there any benifit of connecting apaceh to tomcat
thanks in advance
21 years ago
hi,
how to use thin driver to connect to the sqlserver.
Please help me out in this
And why thin driver is used for connecting to the database using applets
thanks in advance
hi,
i m preparing for scjp and ur topic helped me a lot by clearning doubts on join.

badri
hi,
in my application i m using custom defined tag.
How to return a object using custom defined tag, so that i can access in the jsp page that object.
thanks in advance
21 years ago
JSP
hi,
In EJB2.0 specification
chapter - 10 Entity Bean Component Contract for Container-Managed Persistence.
page no 192. second para.
In this para specification goes like this
Entity bean relationship are defined in terms of local interface of the related bean, and the view an entity bean presents to its related bean is defined by the local home and local interfaces.
Entity bean relationship are defined in terms of local interface of the related bean, and the view an entity bean presents to its related bean is defined by the local home and local Interfaces. Thus entity bean can be the target of a relationship from another entity bean only if it has a local interface.

My question is if relationship exist between only local beans then what about the Remote bean can we call local bean from remote bean.
Thanks in advance
hi,
i m using tomcat and running jsp pages through it. In jsp i m using <use:beans> tag and creating instance of a class. In this class i hard coded a file name let suppose it be "Order.xml".
The final output should be, reading from the file "Order.xml" and displaying the content of the file on the web page.
Everything is working fine,
i placed the jsp file in webapps/school/jsp/
class file in webapps/school/web-inf/classes/
Order.xml file webapps/school/xml/
when i try to execute the jsp page it is displying error message that file is not found.
For "Order.xml" it is taking from root path as d:\tomcat4\bin.
can any one tell me why "Order.xml" is taking different path and what properties should i change to reslove it.
thanks in advance
21 years ago
JSP
hi,
can u pls give me example where to use action include tag.
thanks in advance
21 years ago
JSP
hi,
Thanks a lot sandeep it worked fine.
Sandeep how can i access admin functionality in tomcat.
Regards
badri
21 years ago
JSP