Name:
Location: Hyderabad, Andhra Pradesh, India

Wednesday, December 08, 2004

java group postings

-------------------------------------------
What is the difference betweeen Factory pattern and Abstract factory pattern.
Abstract Factory is a collection of Factory Methods. The purpose of the Abstract Factory is to provide an interface for creatingfamilies of related objects without specifying concrete classes.
The Factory Method defines an interface for creating objects, but letssubclasses decide which classes to instantiate.



------------------------------------------------

Can you tell me how can session be handled after usingsession.redirect? Since one looses every thing fromthe initial request.

While using redirect() you will loose the info in the previous request Object...however you can save the info needed info in the HttpSession...or can use the forward() method of the RequestDispatcher...

----------------------------------------------
Hello World
XSL File
http://www.w3.org/1999/XSL/Transform">



Try this, the changes bolded
http://www.w3.org/1999/XSL/Transform">


--------------------------------------------

What is Raw Byte Handling.
----------------------------------------------
Dear Friends,Can any one give the link of any ebook for Core Java DesignPatterens.I want the explanation in java.I looking for a book like patternsin java.

Thinking in patterns <http://www.mindview.net/Books/TIPatterns/> and
The Design patterns Java Companion By James Cooper <http://www.patterndepot.com/put/8/JavaPatterns.htm>
are good source for Design patterns . I guess it will be helpful.
Hi,
Download Java Design Patterns By Jamers Cooper from the following link.
http://www.patterndepot.com/put/8/DesignJavaPDF.ZIP
Regards,
hiTo understand the basic concept of Design Pattern, the following link be usefulwww.javacamp.org/designpattern/about.html ----------------------------------------------
Can we compile java classes in a package recursively.using the javac command...i mean to say if we have classes in the package say 'com' and also in the package 'com.test' then can we compile classes in both the packages using a single javac command option
Yes. There is an open source tool called "ANT (Another Neat Tool) by which can compile java files across the packages.

Ant is a very widely used tool for building Java-based apps. See the link below for details.
http://ant.apache.org/index2.html
I am not sure how its done in ANT but using Makefile in unix i had to use the javac command only and there i had to 'find' each file and compile...may be my approach was wrong...can u throw some light on it and give some more info please

ant uses an xml file called build.xml
you need to write this file (there are tools that generate a skeleton for this e.g. Forte for Java / SUN ONE Studio)the commands that ant will execute are defined as part of this xml file e.g javac, jar, etc
One of the ANT tags in the build.xml file is javac and one of it attrs is src, you can give a path to src and then run ant on that xml file, that will compile the source codes in that path only.






have a look at http://www.iseran.com/Java/ant/tutorial/ant_tutorial.html <http://www.iseran.com/Java/ant/tutorial/ant_tutorial.html> for more info http://ant.apache.org/ <http://ant.apache.org/> is also very good

There is two solutions.
1) If you want to use javac then you can use -doption.like javac -d dest-path source-path/*.javabut in this case you need to find source-path everytime in loop.2) Use ANT it works for unix you need to just create abuild xml file to do your stuff.
------------------------------------------------------
Can anyone tell me how to use session in a jsp page.why it gives HTTP 500 Internal Server error while i use session.getAttribute . I am using JavaWebServer2.0 .

my understanding is, while jsp pages are translated to servlets you can simple think that you are writing a servlet.the following should be fine in your jsp page.
<%!
private MyClass myclass;
public void jspInit() {myclass = (MyClass)getServletContext().getAttribute("myattribute");if (myclass == null)System.out.println("Couldn't get attribute.");}public void jspDestroy() {myclass = null;}%> It is an server error.may you "reset" it?
if it persist, you can check the configuration and the system

----------------------------------------------
Hi,I hope you are aware that there are 3 methods of Security that you can implement viz, 1.Basic, 2.Form, 3. Certificate.
In declarative form of security, we have to provide a security realm( like windows or some database), In the case of an database we have to specify in the server specific xml file for example in Tomcat there is an file called Server.xml where in you need to provide the Database name, table name, column name, driver name, etc. and in the web.xml you need to mention " FORM ". This will automatically authenticate users and also we need to protect resources by specifying the type of request or urls that can be accessed.

0 Comments:

Post a Comment

<< Home