This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Svelte and Sapper in Action and have Mark Volkmann on-line!
See this thread for details.
Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!

Subir Mukherjee

Greenhorn
+ Follow
since Jul 20, 2001
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 Subir Mukherjee

Thanks Ritchie. It would certainly reduce time and work if the entire application could run off a single box. I was aware of the backward compatibility of newer releases of the JDK but was not entirely confident as to how deprecated method calls would be handled by the newer JDK. That was my original concern.

Thank uou
Subir
10 years ago
Thank you All. I guess this leaves with me with only 1 choice - to separate out the applications into legacy part on 1 machine and have an internal redirect to a machine with newer SDK in order to meet my 3rd party's requirement.

Thank you
Subm
10 years ago
Hi:

Thanks.

This is a web based application that I have. The web objects are deployed as JAR files onto the App server. The 3rd party's web object is also a JAR File. So in the servers's environment variables, if I have both the paths - "C:\Program Files\java\jdk1.3.1_03\bin" and "C:\Program Files\java\1.6.0_16\bin" separated by ";" will the older and newer JARs pick up the relevant SDK that applies to each automatically?

Thank you
Subm
10 years ago
Hi:

I am working on a production environment that is almost legacy in nature - working off JDK 1.3.x. This legacy application talks to an outside 3rd party application.
Recently, there have been some upgrades at the 3rd party site and they now require us to talk to ther application using their latest API which is SDK 1.6.x based.
At my end, I have issues in upgrading SDK on the machine with legacy application for fear of breaking existing code (example: some method calls that currently work may be deprecated in the new SDK). Since this is a LIVE site - I cannot afford any downtime!

My question is whether I could have 2 versions of Java co-exist on the same machine. Is something likely to break at the JVM level, on the 1.3.x version if I install the latest SDK? Ideally, I would like the older JDK 1.3.x to continue to service my legacy application. While the newer SDK 1.6.x could service the new objects that I can use to communicate with the 3rd party.

FYI, I am in a Windows environment (Server 2003). Application server is Sybase EAServer Version 4.2

Look forward to your response.

Thanks for your time.
Subm
10 years ago
Thank you All. Issue resolved - had to explicitly include under the classpath the location of where my java package was - the code compiled after that.

Yes Amit - my bad - the issue should have been under Java General and not JSPs.

Thank you
Subir
11 years ago
I am trying to compile the following java classes which are arranged in a package structure.
1. Servlet class "BeerSelect002Servlet.java" is inside package
2. The above servlet class calls a plain Java File "BeerExpert.java" that resides inside subdirectory "model"

I am trying to pre-compile the servlet class along with the supporting java file and then place the compiled class files on App server.



The above servlet class calls the Java File below that is inside subdirectory "model"


Now at command line, I am at C:\Program Files\.............\html\classes\com\MVCBasedForms>javac Version002\BeerSelect002Servlet.java
I am unable to compile and keep getting the following error

BeerSelect002Servlet.java:7: package com.MVCBasedForms.Version002.model does not exist
import com.MVCBasedForms.Version002.model.*;
^
BeerSelect002Servlet.java:26: cannot resolve symbol
symbol : class BeerExpert
location: class com.MVCBasedForms.Version002.BeerSelect002Servlet
BeerExpert be = new BeerExpert();
^
BeerSelect002Servlet.java:26: cannot resolve symbol
symbol : class BeerExpert
location: class com.MVCBasedForms.Version002.BeerSelect002Servlet
BeerExpert be = new BeerExpert();

I have tried variations of C:\Program Files\.............\html\classes\com\MVCBasedForms\Version002> javac BeerSelect002Servlet.java
But the compiler gives the same error. Eventhough I have placed the 2 Java Files to match the respective package statements, the compiler still does not recognize the com.MVCBasedForms.Version002.model package.

Thanks for your time and help.

Regards
Subir
11 years ago

Subir Mukherjee wrote:Hi:

I have created the following database access bean:

/* Start of Database access Java Bean */

/* End of Database access Java Bean */

I have been able to compile the above java bean without problem. And now I would like to reference this bean inside of a JSP page so that I do not have to write the JDBC connection code into every JSP page that I create (my aim is to have a clean JSP page devoid of much java scripting logic.)

I tried to create the following JSP page to refernce the above bean but am not able to retrieve an data - get a 500 internal server error.
/* Start of JSP page that calls above Java Bean */

/* End of JSP page that calls above Java Bean */

Appreciate any help to resolve this issue please.

Thank you
Subir



11 years ago
JSP
Hi:

I have created the following database access bean:

/* Start of Database access Java Bean */
package javaBeanJSPSample;
import java.io.*;
import java.sql.*;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.Statement;
import java.sql.ResultSet;

public class test
{
//Statement statement = connection.createStatement();
Statement statement = null;
private Connection connection=null;
private ResultSet rs = null;
String connectionURL = "jdbc:oracle:thin:@myDBURL:myDBName";

public test()
{
try {
//Load the database driver
Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();;
//Get a Connection to the database
connection = DriverManager.getConnection(connectionURL, "UserId", "Password");
}
catch(Exception e){
System.out.println("Exception is ;" + e);
}

}
public ResultSet retrieveData(){
String sql = "SELECT * FROM Students WHERE stampdate = sysdate";
try{
statement = connection.createStatement();
rs = statement.executeQuery(sql);
}
catch(Exception e){
System.out.println("Exception is ;" + e);
}
//trying to return the result set object
return rs;
}
public void closeDBConnection(){
// close DB connection after retrieval is completed.
try{
rs.close();
statement.close();
connection.close();
}
catch(Exception e){
System.out.println("Exception is ;" + e);
}
}
}
/* End of Database access Java Bean */

I have been able to compile the above java bean without problem. And now I would like to reference this bean inside of a JSP page so that I do not have to write the JDBC connection code into every JSP page that I create (my aim is to have a clean JSP page devoid of much java scripting logic.)

I tried to create the following JSP page to refernce the above bean but am not able to retrieve an data - get a 500 internal server error.
/* Start of JSP page that calls above Java Bean */
<html>
<body>
<h1>Get Value from bean</h1>
<jsp:useBean id="emp" class="javaBeanJSPSample.test"/>
<% while (rs.next()) { %> <% } %>
<%=rs.getString(1)%> <%=rs.getString(2)%>

<% emp.closeDBConnection(); %>
</body>
</html>

/* End of JSP page that calls above Java Bean */

Appreciate any help to resolve this issue please.

Thank you
Subir



11 years ago
JSP
Hi,
You probably have to place the compiled .java file for the servlet, directly under web-apps/classes, for you to use the url:
http://localhost:8080/servlet/YourServletName.
Ref: Application deployed on a Tomcat 4.0.1 server
Thanks / Subir
My present architecture is that of ASP pages residing on IIS web servers talking to a Jaguar 3.5 app server, using IIOP protocol. The database is Oracle 8i but for development work, options to connect to Informix and SQLServers exist.
There is now a requirement of being able to connect to the database server from JSP page also, with the following change contemplated:
i) Scrapping the Jaguar Application server and to replace it with a simple name server. (I have a separate tool to process the business logic by executing a customized .exe file which can connect to the database server, as in a client/server relationship.)
Therefore, looking for a means to connect the JSP page running on UNIX or Solaris platform ( could be running on Apache or Tomcat servers )
&&
existing ASP page running on IIS web server,
so that they may independently talk to my new name server. Then the name server in turn would connect to above mentioned customized .exe application.
Friends, will appreciate if I cud have some help on this!
19 years ago