kiran nori

Greenhorn
+ Follow
since May 28, 2001
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 kiran nori

Hi,
I need to migrate my deployment environment from JSP1.1 to JSP1.2. Can any one point me to the steps I need to take to ensure that the migration is smooth.
One more thing is that if some one can point me to the backward compatibility between 1.2 and 1.1 versions it would be a great help.
Rgds
Kiran Mohan Nori
20 years ago
JSP
I'm not sure about JBOSS configuration. The first time u try to access the page you get the tomcat prompt trying to authenticate you. This details wil be stored in the borwser cache. tomcat uses these from the cache to authenticate the next time a URL of the same server is accesses. That's the main reason why the second time U r directly taken to a Error 403 page without asking for authentication. the best method is to close the browser and use a new window for the URLs.
Hope I have answered a part of ur question.
Rgds
Kiran
21 years ago
javax.naming.InitialContext package has a method bind(name, object) used to add entried to a directory. here is the code that will do the needful.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
import javax.naming.*;
import javax.naming.directory.*;
public class AddEntries
{

final String INITIAL_CONTEXT_FACTORY = "com.sun.jndi.ldap.LdapCtxFactory";
Hashtable htbEnvironment = new Hashtable();
//DirContext to connect to Directory.
DirContext objDirCtx = null;
public AddEntries()
{
htbEnvironment.put( Context.INITIAL_CONTEXT_FACTORY, INITIAL_CONTEXT_FACTORY);
htbEnvironment.put( Context.PROVIDER_URL, "ldap://10.10.10.10:389");
htbEnvironment.put( Context.SECURITY_PRINCIPAL, "userid" );
htbEnvironment.put( Context.SECURITY_CREDENTIALS,"password");
objDirCtx = new InitialDirContext(htbEnvironment);
}
public void addToDirectory()
{
// This is the object to be added to the directory. This class implements DirContext.
DirectoryObject objDirObject = new DirectoryObject();
try
{
objDirCtx.bind( "cn=object1,ou=blah,o=blah1", objDirObject );
System.out.println("Directory Object added successfully");
}
catch(Exception objExcep)
{
System.out.println("Got Exception While Adding");
}
}
}
[ April 17, 2002: Message edited by: kiran nori ]
21 years ago
Hi, can any one please let me know how to upload a image on to the server and store the same in a database.
rgds
Kiran
Thanx Bear, But if I havce images in the HTML file how should I throw them ? if possible can you send in a small peice of code to do this.
21 years ago
I have a requirement to generate HTML pages on the fly. The images and the HTML pages are stored in the database. On click of a link I need to select these details from the database and write out the HTML. I don't have a disk space where I can store the files and display the same. PLease send in a mail to my ID at kirannori@yahoo.com
rgds
Kiran Mohan Nori
21 years ago
Hi All,
I have generated some image using AWT during runtime. I want to store this image so generated on to my hard drive. can any one please tell as to how I can do this. if some sample code is availble please send it to me
rgds
Kiran Mohan Nori
22 years ago
Hi All,
I would like to know how the control flows when a dispatch is called from the do post method of the servlet.
I have the following code:


The output of this code is

In ViewServlet Dispatiching to View.jsp
In after dispatch
in loop 1 at counter value 0
in loop 1 at counter value 1
in loop 1 at counter value 2
in loop 1 at counter value 3
in loop 1 at counter value 4
in loop 1 at counter value 5
in loop 1 at counter value 6
in loop 1 at counter value 7
in loop 1 at counter value 8
in loop 1 at counter value 9
in loop 1 at counter value 10
in loop 2 at counter value 0
in loop 2 at counter value 1
in loop 2 at counter value 2
in loop 2 at counter value 3
in loop 2 at counter value 4
in loop 2 at counter value 5
in loop 2 at counter value 6
in loop 2 at counter value 7
in loop 2 at counter value 8
in loop 2 at counter value 9
in loop 2 at counter value 10
In finally

and the request/response object gets dispatched to the respective JSP. can any one explain the principle behind dispatching the request.
rgds
Kiran Mohan Nori
I added the ubb code tags for easier reading.
[This message has been edited by Carl Trusiak (edited June 28, 2001).]
22 years ago
Hi All,
Can any one tell me under what circumstances a servlet exception is thrown and what are the best ways to handle it.
rgds
Kiran
22 years ago
I can't hardcode the path as my program can be deployed in any directory.
rgds
Kiran
22 years ago
hi all,
I'm using tomcat. I have a function which reads a XMl file and sets the required variables.I need to provide the file name to the file as a string. when I try to give a relative path tomcat gives me the following error
I do this :
===========
File objXML = new File("Metadata.xml");
System.out.println("\nThe absolutepath of the file is : "+objXML.getAbsolutePath());
And it returns this:
====================
The absolutepath of the file is : D:\TomCat\bin\DATMetadata.xml
but the file is existing in some other How to set a directory from where it reads the files.
rgds
Kiran Mohan Nori
22 years ago
I have a page with 2 frames. Both the frames display 2 jsp files. when I submit the jsp in frame one to the servlet , the servlet returns back the jsp in frame one. Now I need to populate the results of the submit action on JSP 1 in JSP 2. can any one tell me how to do this.
rgds
Kiran
22 years ago