Rajesh Agarwal

Ranch Hand
+ Follow
since Aug 01, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Rajesh Agarwal

Hi All, I am hosting a application which is runnind well on a Unix Dev region to my own local PC. Also the appserver in dev is websphere, but I am now hosting it on Weblogic. I am getting DB connection error as follows. Help is appreciated.

The system uses these 2 classes

import oracle.jdbc.pool.OracleConnectionCacheImpl;
import oracle.jdbc.pool.OracleConnectionPoolDataSource;


and sets all the database properties reading them from a property file as below.

if(datastoreProp == null)
datastoreProp = new PersistenceProperties(s, s1);
if(ocpds == null)
{
DBSCHEMA = datastoreProp.getProperty("DBSchema");
ocpds = new OracleConnectionPoolDataSource();
ocpds.(datastoreProp.getProperty("DBURL"));
ocpds.setUser(datastoreProp.getProperty("ORACLE_ID"));
ocpds.setPassword(datastoreProp.getProperty("ORACLE_PASSWORD"));
ocpds.setNetworkProtocol(datastoreProp.getProperty("Protocol"));
if(occi == null)
{
occi = new OracleConnectionCacheImpl(ocpds);
occi.setMinLimit((new Integer(datastoreProp.getProperty("MinLimit"))).intValue());
int i = occi.getMinLimit();
int j = (new Integer(datastoreProp.getProperty("MaxLimit"))).intValue();
if(i > j)
j = i;
occi.setMaxLimit(j);
occi.setCacheScheme(1);
}
}


I am not able to connect to the db using the above. My doubt is do I need to set any Datasource in weblogic. if Yes then what would be the Datasource Name, I dont see any name being used in the code.
My system currently uses an application level authentication. We need to migrate to a LDAP authentication. In the sense that, the users will be set up in the LDAP tree and the system should connect to the LDAP and authenticate the user against it.

Anyone has any idea or code on this. I would like to know how to connect to the ldap server and retrieve data with some criteria.
Hi All,

I am delploying my first JSP in weblogic, but with problems. Your advice on this would greatly help. This is what I have done so far.

1) Created a new server instance in weblogic
C:\Data\user_projects\domains\mydomain

2) Created my applications directory in this server named PMO
C:\Data\user_projects\domains\mydomain\applications\PMO

3) Created the WEB-INF directory in the PMO directory
C:\Data\user_projects\domains\mydomain\applications\PMO\WEB-INF

4) placed the web.xml file in the WEB-INF

<web-app>
<description>Web Tier DD for the DashBoard application</description>

<servlet>
<servlet-name>a</servlet-name>
<jsp-file>a.jsp</jsp-file>
</servlet>

<servlet-mapping>
<servlet-name>a</servlet-name>
<url-pattern>/PMO/a.jsp</url-pattern>
</servlet-mapping>
</web-app>

5) Wrote a jsp. (a.jsp) and the directory structure is
C:\Data\user_projects\domains\mydomain\applications\PMO\a.jsp

6) started the server and tried the url http://localhost:7001/PMO/a.jsp

7) 404 error. In the server log got the following line

####<Jul 13, 2007 3:16:28 PM IST> <Debug> <HTTP> <MAAINI428015G> <myserver> <ExecuteThread: '1' for queue: 'weblogic.socket.Muxer'> <<WLS Kernel>> <> <BEA-101147> <HttpServer(12842832,null default ctx,myserver) Found no context for "/PMO/a.jsp". This request does not match the context path for any installed Web applications, and there is no default Web application configured.>




ANY IDEA ON WHAT I AM MISSING WILL BE HIGHLY APPRECIATED. Thanks.

Rajesh
17 years ago
If the user input parameters are over the query string then you can use the method Hashtable parseQueryString(String s)
17 years ago
Thanks for that info folks.
17 years ago
I am sure you would be using a tracelog. You can insert debug statements in the beginning of service method and track from there
17 years ago
Hello everybody, I need to know how this can be implemented using Java.
Any help will be much appreciated.

I have a servlet which reads data from the DB. Assuming the fetch resulted in 100 rows, I need to display these 100 rows in the screen with each row having a small icon(image) for delete, update

Since 2 images for every row, means 100*2 = 200 images. I need to know if I can store the image in the clients cache and avoid uasge of network for image transfer. Thanks in advance.
17 years ago
127.0.0.1 is the IP address used to loopback to own machine. this means if we try to connect to 127.0.0.1 , if gets routed to own machine. In other words 127.0.0.1 is you. A ping on local host also returns 127.0.0.1 while your machine might have an IP address
17 years ago
Kishore there is no error tag in servlet or servlet-mapping tag. There is a separate tag called

<error-page> and the attributes of these are

<error-code>
<exception-type>
<location>
17 years ago
whenever the client enters the URL the request is mapped to a particular servlet. The server then laods the servlet into the memory and calls the init method. This is called only once during the first servlet call. For subsequest requests only the service is called.

But if <load-on-start-up> attribute of the <servlet> tag is set in the web.xml, then this initialization is done when the server starts up.
17 years ago
When the client calls remove() method in a session bean the call is not delegated to the ejbRemove() method of the bean. It just disassociates the EJB object with the instance.
There is a method on the ServletContext object that allows for access to another WAR's servlet context - DEPENDING ON THE VENDOR's IMPLEMENTATION. If you call the getContext(java.lang.String uripath) with another WAR's servlet context - it will give you a reference to that web apps servlet context. I beleive that is the default implementation for weblogic, but again, your mileage may vary
17 years ago
Based on the company ID you should build the company object. The company object should have a method to addEmployee() which would take an instance of a Worker object. This would ass this Worker to the existing list of employees of the company and may or maynot return a Collection of Employees in the company.
In this case you would need to have separate .war and .jar files. Deploy the .war file in the webserver in 1 machine and deploy the .jar file in the app server in another machine. While accessing the bean from the web application you might have to specify the url of the initial context factory to access to bean. Also you may have to pass the credentials of the LDAP.