Win a copy of Java Database Connections & Transactions (e-book only) this week in the JDBC forum!

Balaji Vankadaru

Ranch Hand
+ Follow
since May 31, 2013
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
2
Received in last 30 days
0
Total given
2
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Balaji Vankadaru

jar related to your database which is being used is not being added.


do add the related driver class jar which is being used.
4 years ago
Well you can use JaxB to parse your xml into java objects.

this is one of the easy way you can do else you can your sax or dom to parse your xml file.
5 years ago
Varargs serves the Purpose when you have a Method which need to take many arguments of a certain data type.

Varargs need to be implemented as an end argument of the method.

It does not throw Array Index of Bound Exception.

Array Index out of bound is thrown when say you have declared array of size 4 and try to add 5 or 7 or any element which is greater than the size of declared once.

getters and setters are the way to encapsulate your code from direct access of your class from outside. Set leverages you to access trough assign values . Get serves to fetch the value.
5 years ago
res.setContentType( "application/msword" );

try to set the above content type
5 years ago
Use case for Interface and Abstract Classes

If your design or your project Implementation is assumed to stay unchanged for certain period of time them Interface would be a wise option.

As Interface is a way of Implementing Multiple Inheritance in Java.

Lets say if your project Implementations get changed very frequently implementing abstract class is a better approach.

In Project level Usage

Dao's are the best candidates for Implementing Interfaces.

Abstract class would serve the purpose when you want to declare Custom Exception for your entire Application.

Abstract class would be a good choice when you have a Parent and child relationship and you want to enforce that your subclass provides implementation to the methods of your parent class.

5 years ago
Its a plain jsp page and how can you expect a servlet output from a jsp page. ???

5 years ago
The new operator instantiates a class by allocating memory for a new object and returning a reference to that memory.

The new operator also invokes the object constructor.

i found two faults in your declaration.

1. Name of your class and the one in tld varies change it.

2. In your jsp uri need to have the location of your custom tld .

then you can access it using your perix say m:your tag name
5 years ago
JSP
wrap in the sense create a java annotation you mean by?
5 years ago
Its not possible to Implement your own session object. Its maintained and created by the container which hosts the application.
5 years ago
place your code which need to be prevented from access buy second person in a synchronization block . It ensures that no two threads can access the same code at once.
5 years ago
JSP


You need to define the complete class name along with the package.


The Execution of filters happen as per their declaration in web.xml file

and the order of filter mapping in a proper way to have fruit full execution
5 years ago

http://www.tutorialspoint.com/jdbc/jdbc-create-tables.htm

Check this out.

You need to have your relevant database jar in your class path.

and also you need to pass your relevant database url along with its user id and password.
5 years ago
One of the use case can be for Encryption and Decryption of data in binary format
5 years ago
Request Object

Each time a client requests a page the JSP engine creates a new object to represent that request.

The request object provides methods to get HTTP header information including form data, cookies, HTTP methods.

Page Object

This object is an actual reference to the instance of the page. It can be thought of as an object that represents the entire JSP page.

The page object is really a direct synonym for the this object.


5 years ago