How to config the CLASSPATH for Tomcat 4.0???
I use a JavaBean in a JSP file. And I use this JavaBean to connect to Oracle. Database username and password is stored in a file named "db.properties". When I browse this JSP page, It report : Cant not find db.properties file!!!
So I want know is where can I put this "db.properties"??Do I need config CLASSPATH or other para??
need your help!!
Thanks in advance!!!
did you try to put it into the /lib/ directory of your webapplication ?
I would solve this differently, I would create a servlet that takes initial parameters and puts them into the servlet context. then I would use that to put these information into the servletcontext.
Then you would not have to load a properties file everytime u access the jsp pages that does the database related procedure.
Maybe there is some place for system properties files, but this place I have not seen or how to work with it.
I place my configuration files all under web-inf/config/ and then I mapp paths to it and read as the web application starts.
hope it helps.
-reynir
Similar Messages
-
I am using the OS: Win2000 Server.I need to connect to some remote DataBase,but I
don't know how to config the driver in the CLASSPATH environment variable, my Problem is: when I import the oracle.jdbc.driver.OracleDriver ,and run the program, it warns to me that it cannot find the class,and i know i didnot config the CLASSPATH in environment variables, so I want someone to tell me how to config it ,and where should the file "class12.zip" be placed !
Thank you! maybe the problem is a piece of cake for you ,but now i do not know how to deal with it!Hi ,
try this,
http://myjdbc.tripod.com/basic/jdbcurl.html
Regards
Elango. -
How to set the classpath for external .jar files after importing?
Hi techs,
How to set the classpath in WSAD5.1.2 after importing the .jar file to the WEB-INF/lib folder.
urgentI got it.
after importing the jar file to the perspective,we need to right click on project name, go to proprties,
goto java build path,
there we need to include the external jar files. -
How to set the CLASSPATH for an Sql Server 2005 database... help me please
Hello! Guys I want to access a Sql Server 2005 database from Java.I've downloaded the JDBC 2.0 driver from Microsoft.I've copied the sqljdbc4.jar file to C:\Java\jdk1.6.0_14\db\lib.And I've added this to the classpath C:\Java\jdk1.6.0_14\db\lib\sqljdbc4.jar.The classpath variable is defined as a user variable.Well the point is that I get that nasty exception:Exception in thread "main" java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver.So if you know how to help me,please do so.Thank you :)
Hi Timo,
My jdev version is 10.1.3.3.0, this is for R12. By PR i mean to say process request and PFR process form request in the controller.
In the Process request of the controller, i am finding the checkbox bean and assigning the firepartialaction for it.
Later in the process form request for the fired event, i am trying to handle the rendered property of the messagetextinput. Is this a right approach?
my code below
public void processRequest(OAPageContext oapagecontext, OAWebBean oawebbean)
super.processRequest(oapagecontext, oawebbean);
OAApplicationModule oaapplicationmodule = oapagecontext.getApplicationModule(oawebbean);
OAMessageCheckBoxBean oamessagecheckboxbean = (OAMessageCheckBoxBean)oawebbean.findChildRecursive("X_FLAG");
if(oamessagecheckboxbean != null)
oapagecontext.writeDiagnostics(this, "Message check box Bean found:", 1);
FirePartialAction firepartialaction = new FirePartialAction("change");
oamessagecheckboxbean.setAttributeValue(PRIMARY_CLIENT_ACTION_ATTR, firepartialaction);
oamessagecheckboxbean.setFireActionForSubmit("change", null, null, true);
oapagecontext.writeDiagnostics(this, "setting fire event", 1);
public void processFormRequest(OAPageContext oapagecontext, OAWebBean oawebbean)
super.processFormRequest(oapagecontext, oawebbean);
oapagecontext.writeDiagnostics(this, "Inside Process Form Request", 1);
if("change".equals(oapagecontext.getParameter(OAWebBeanConstants.EVENT_PARAM)))
OAMessageTextInputBean bean = (OAMessageTextInputBean)oawebbean.findChildRecursive("X_NUMBER");
if(bean!=null){
bean.setRendered(Boolean.TRUE);}
Thanks,
Malar -
How to set the classpath for servlet and jsp???
i add C:\tomcat-5.0\common\lib\servlet-api+jsp-api to the class path from DOS prompt, as show below:
set CLASSPATH=%classpath%;C:\tomcat-5.0\common\lib\servlet-api.jar;C:\tomcat-5.0\common\lib\jsp-api.jar
then, i compile the servlet:
javac FirstServlet.java
no error
and i copy the .class file into C:\tomcat-5.0\webapps\servlets-examples\WEB-INF\classes
i set the JAVA_HOME enviroment variable as below:
set JAVA_HOME=C:\Program Files\Java\jdk1.5.0_08
i start the tomcat version 5.0 and run web browser and type http://localhost:8080/servlets-examples/servlet/FirstServlet
i get the error message:
HTTP Status 404 - /servlets-examples/servlet/FirstServlet
type Status report
message /servlets-examples/servlet/FirstServlet
description The requested resource (/servlets-examples/servlet/FirstServlet) is not available.
Apache Tomcat/5.0.30
Can anybody tell me how to solve the problem. Thanks a lot.You will have to create the servlet mapping in the Web.xml file
<servlet>
<servlet-name>FirstServlet</servlet-name>
<servlet-class>FirstServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>FirstServlet</servlet-name>
<url-pattern>/servlet/FirstServlet</url-pattern>
</servlet-mapping> -
Set up the classpath for tomcat 5.0 to compile servlet
I am totally confused how do you set up the class path, i use this command:
c:\set CLASSPATH=.;C:\tomcat5.0\common\lib\servlet-api.jar;%CLASSPATH%
and I compile my file which i put in j2sdk1.4.2_10\bin
here is the command line:
c:\j2sdk1.4.2_10\bin\servletexercise1.java
and it gives me the error message to say that it can't find the servelt, javax.servlet.
Please help! thanks in advance!I am totally confused how do you set up the class
path, i use this command:
c:\set
CLASSPATH=.;C:\tomcat5.0\common\lib\servlet-api.jar;%C
LASSPATH%I don't have a CLASSPATH environment variable on any machine that I work with.
and I compile my file which i put in j2sdk1.4.2_10\binThat's a pretty stoopid place to put a Java source file. You shouldn't be putting any files in that directory.
The right thing to do is to add the Java /bin directory to your PATH environment variable. When you do, make sure there are no spaces in the path name. (e.g., don't install Java to the "Program Files" directory) OR replace it with its 8-char DOS equivalent (e.g., c:\Progra~1).
here is the command line:
c:\j2sdk1.4.2_10\bin\servletexercise1.javaSorry, I don't see where you execute javac.exe.
and it gives me the error message to say that it
can't find the servelt, javax.servlet.
Please help! thanks in advance!What is this telling you? That the javac.exe totally ignores the CLASSPATH that you set? (Hint: Right answer.)
The correct way to do it is to use the -classpath option on javac.exe.
% -
How to change the classpath in rmiregistry
I am storing remote object stubs in an RMI registry as part of my application. When I try to bind my objects to the rmiregistry started by the kxs process on port 1099, I get class def not found errors because that rmiregistry does not have my classes in the classpath. My classes are in the iAS classpath because I added them through the registry.
When I start my own rmiregistry on a different port and set the classpath environment variable to include my classes, then I have no problems.
Does anyone know how to change the classpath for the rmiregistry started by the kxs process?
I am running iAS sp3 on Windows 2000 adn Solaris
Thanks,
MarkHi,
I would like to help, but could you kindly clarify what rmiregistry
means ?
Regards
Raj
Mark Priest wrote:
I am storing remote object stubs in an RMI registry as part of my
application. When I try to bind my objects to the rmiregistry started
by the kxs process on port 1099, I get class def not found errors
because that rmiregistry does not have my classes in the classpath.
My classes are in the iAS classpath because I added them through the
registry.
When I start my own rmiregistry on a different port and set the
classpath environment variable to include my classes, then I have no
problems.
Does anyone know how to change the classpath for the rmiregistry
started by the kxs process?
I am running iAS sp3 on Windows 2000 adn Solaris
Thanks,
Mark
Try our New Web Based Forum at http://softwareforum.sun.com
Includes Access to our Product Knowledge Base! -
Hi Experts,
I am learning GP(Guided processor)according the document
http://help.sap.com/saphelp_nw70/helpdata/en/44/0d5b8f250d5cfae10000000a155369/frameset.htmneed.
I meet two question when I learn the GP.
The first:
This document don't tell me how to config the member framework of the company. After I design the GP, I have to config the user and role in the runtime for executing. I hope I can use the WDA(webdynpro for java or webdynpro for java) to implement to config the user for executing in the runtime. Thus, the customer don't config the user when runing the GP. But I don't know how to do this.
I need a document guide step by step to tell me how to do this.
The second:
If I use the workflow in the GP, I have to install and config the NWDI(Netweaver Development Infrastructure). Now I have installed the NWDI, but I don't know config it so that I can download it to my machine for develop the workfolw in the GP.
Do you give me some hints? Thanks a lot.
Thank a lot.
Best regards,
taoHi, Mithu,
Thanks a lot for your help in advance.
I have carefully read the document: https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/6b66d7ea-0c01-0010-14af-b3ee523210b5.
Now, I think I have to set the processor of every actions in every process if I use the GP for processing the workflow.
I am better to hope that I can set the processor to the role for every actions in every process in the runtime through get the organizational structure in the WDA(webdynpro for java or webdynpro for java). Thus, the customer don't set the processor to the role for every action in every process when runing in the GP. I don't know how to do this.
Whether the function is not supported in the GP? If so, I have to config two organizational structure: in the R/3 and in the Portal. I don't think our customer don't receipt this solution.
Do you give me some hints? Thanks a lot. My email: [email protected]
Thanks again.
Thanks & Regards,
Tao -
How to config the oracle database connection pool in IAS
Hi,
Does anyone who hows to config the oracle database connection pool in IAS?
Thanks so much!!!
[email protected]
JackyJacky,
You need do the following for oracle type4 driver:
1) register the driver:
$IAS_HOME/bin/jdbcsetup
Driver Identifier: Oracle_Type4_816 (whatever name you like)
Driver Classname: oracle.jdbc.driver.OracleDriver
Driver Classpath: .../classes12.zip (install this this zip file somewhere
and add this zip into the Classpath later).
2) DataSource Setup:
start iAS Administration Tool (iASAT)
Choose Database, unfold iAS1 (your app server instance),
choose External JDBC Datasource -> add: DataSource Registration
JNDI Name: yourPoolName
Driver Type: Oracle_Type4_816 (select what you just register)
DataSource Url: jdbc:oracle:thin:@hostName:portName:dbName
Username: your_user_name
Password: your_passwd
(Datasource Pool: using defaults for now): you can also customrize the
parameters for the pool.
3. Add classes12.zip into CLASSPATH.
In your application, you can use JNDI lookup to get the DataSource from
which you get the connection from the pool.
Hope this helps.
Good luck.
Xuran
"Jacky Yan" <[email protected]> wrote in message
news:9m0tmp$[email protected]..
Hi,
Does anyone who hows to config the oracle database connection pool in IAS?
Thanks so much!!!
[email protected]
Jacky -
How to set the classpath in windows operating system
hi,
how to set the classpath in window operating system
i want this help for setting the classpath for the tomcat
please help me
thank you
darshan soniOpen autoexec.bat in texteditor. This is an example from my autoexec, win me. Running resin
SET CLASSPATH=c:\jdk1.3.1_01\bin\;c:\andreas\resin\bin\jsdk23.jar;c:\Jimi\JimiProClasses.zip;
SET PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;c:\jdk1.3.1_01\bin\;c:\andreas\resin\bin\jsdk23.jar;c:\Jimi\JimiProClasses.zip;C:\Program\MtsAndreas -
How to set the CLASSPATH in Unix Server
Hi, everyone~
Do anyone noe how to set the CLASSPATH in the hp-ux server? I tried the setenv CLASSPATH, but not working.. I think should use export. But my jsp pages still cannot working, dunnoe y?
I wonder is the hp-ux support jsp and servlet or not?
In order to let the jsp and servlet to run properly in the unix server, what kinds of steps should taken ?
Hope somemore who experience with this situation b4 can give me some guidance.. Thanks~~
regards,
tzeyikTomcat ignores any and all CLASSPATH environment variables. Even if you could figure out how to set it, Tomcat wouldn't use it.
Better to learn how Tomcat's CLASSPATH works and how to deploy Web apps properly. - MOD -
How to config the web.xml file, when I use Richfaces + RI 1.2?
Hi there:
I want to use Richfaces + RI 1.2 to build a project. I don`t know how to config the web.xml file.
By the way, my web server is Tomcat 6.0, my JDK's version is 6u6. I don`t want to use the facelets.
thanks.
lxmjust add this before *</web-app>*
<context-param>
<param-name>org.richfaces.SKIN</param-name>
<param-value>blueSky</param-value>
</context-param>
<filter>
<display-name>RichFaces Filter</display-name>
<filter-name>richfaces</filter-name>
<filter-class>org.ajax4jsf.Filter</filter-class>
</filter>
<filter-mapping>
<filter-name>richfaces</filter-name>
<servlet-name>Faces Servlet</servlet-name>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
</filter-mapping> -
How to set the classpath and path from the jsp to call java class function
Hi Exprets,
I have a requirement to call a java class function which returns a hashmap object from the jsp. The java class in present in one jar file and that jar file is location somewhere in unix path. So the requirement is to set the classpath for that jar file and then create the object of the java class and then call the function.
If any one know how to achieve it, please reply as soon as possible.
thanks in advance,
swapna soni.It is never advisable to store large data sets in the session. But it will depend on a lot of factors:
1. How costly is the query retrieving the data from the database?
If it's a complex query with lots of joins and stuff, then it will be better to store it in the session as processing the query each time will take a lot of time and will decrease performance. On the other hand if the query is simple then it's advisable not to store it in the session, and fetch it each time.
2. Are there chances for the data to become stale within a session?
In this case storing the data is session will mean holding the stale data till the user session lasts which is not right.
3. How many data sets does the session already holds?
If there are large no. of data sets already present in the session, then it's strictly not advisable to store the data in the session.
4. Does the server employ some kind of caching mechanism?
Using session cache can definitely improve performance.
You will have to figure out, what is the best way analyzing all the factors and which would be best in the situation. As per my knowledge, session is the only place where session specific data can be stored.
Also, another thing, if the data set retrieved is some kind of data to be displayed in reports, then it would be better to use a pagination query, which will retrieve only the specific no. of rows at a time. A navigation provided in the UI will retrieve the next/previous data set to display.
Thanks,
Shakti -
How to config the Default Values in IT 2006
Dear Gurus,
My Client requirement is if i create Absence quota they want default quotas values
eg PL= 40
CL=7
SL=5
Then how to config the Default Values in IT 2006
Other wise where i have to assign in Quotas limit
Please advised
Regards
MHPOConfigure ur Absence Quotas with Selection group and assign the value of that selection group in Quomo
and run RPTQTA00
Time Data Personnel Time Management IMG Managing Time Accounts Using Attendance/AbsenceRecording and Administration Define Absence Quota Types. Time Quota Types Quotas
PersonnelIMG Managing Time Time Data Recording and Administration Time Management Calculating Absence Entitlements Accounts Using Attendance/Absence Quotas Permit Quota Generation Without TimeAutomatic Accrual of Absence Quotas Evaluation.
Time Time Evaluation Personnel Time Management IMG Set Personnel Subarea Groupings for Time Recording.Evaluation Settings
PersIMG Time Data Recording and Administration onnel Time Management Calculating AbsenceManaging Time Accounts Using Attendance/Absence Quotas Set Base Entitlements Rules for Generating Absence Quotas Entitlements Base Entitlement for Absence Quota Generation.
Personnel TimeIMG Managing Time Accounts Time Data Recording and Administration Management Rules for Calculating Absence Entitlements Using Attendance/Absence Quotas Determine Validity and Deduction Periods.Generating Absence Quotas
IMG Managing Time Data Recording and Administration Personnel Time Management Calculating Absence EntitlementsTime Accounts Using Attendance/Absence Quotas Define Set Base Entitlements Rules for Generating Absence Quotas Generation Rules for Quota Selection.
Define Public Holiday Work Schedules Personnel Time Management IMG Classes
Personnel Work Schedules Personnel Time Management IMG Group Personnel Subareas for the Work ScheduleSubarea Groupings
IMG Group Personnel Subarea Groupings Work Schedules Personnel Time Management Personnel Subareas for theDaily Work Schedule
Daily Work Schedules Work Schedules Personnel Time Management IMG Define Daily Work Schedules
Work Personnel Time Management IMG Define Period Work Schedules. Period Work Schedules Schedules
IMG Define Day Day Types Work Schedules Personnel Time Management Types.
Day Types Work Schedules Personnel Time Management IMG Define Day Types.
Day Work Schedules Personnel Time Management IMG Define Special Days.Types
Work Personnel Time Management IMG Define Employee Subgroup Work Schedule Rules and Work Schedules Schedules Groupings
Work Work Schedules Personnel Time Management IMG Define Groupings for the Public HolidaySchedule Rules and Work Schedules Calendar.
Work Work Schedules Personnel Time Management IMG Set Work Schedule Rules and WorkSchedule Rules and Work Schedules Schedules.
Work Work Schedules Personnel Time Management IMG Generate Work Schedules ManuallySchedule Rules and Work Schedules
IMG Set Planned Working Time Work Schedules Personnel Time Management Default Value for the Work Schedule.
Personnel Time Management IMG Set Default Value for Time Management Planned Working Time Work Schedules Status.
Time Data Recording and Personnel Time Management IMG Define Personnel Subareas for Substitution Substitutions Administration Types.
Time Data Recording and Personnel Time Management IMG Set Defaults for Substitution Types. Substitutions Administration
IMG Absences Time Data Recording and Administration Personnel Time Management Group Personnel Subareas for Attendances and Absence Catalog Absences.
Time Data Recording and Personnel Time Management IMG Define Absence Types. Absence Catalog Absences Administration
IMG Absences Time Data Recording and Administration Personnel Time Management Define Counting Classes for the Period Work Absence Counting Absence Catalog Schedule.
Time Data Recording and Personnel Time Management IMG Rules for Absence Counting Absence Catalog Absences Administration Group Employee Subgroups for Time Quotas.Absence Counting (New)
IMG Absences Time Data Recording and Administration Personnel Time Management Group Rules for Absence Counting (New) Absence Counting Absence Catalog Personnel Subareas for Time Quotas
Time Personnel Time Management IMG Absence Absence Catalog Absences Data Recording and Administration Define Rules for Rounding Counted Rules for Absence Counting (New) Counting Absences
Time Data Recording and Personnel Time Management IMG Rules for Absence Counting Absence Catalog Absences Administration Define Counting RulesAbsence Counting (New)
Personnel TimeIMG Absence Catalog Absences Time Data Recording and Administration Management Define Counting Rules Rules for Absence Counting (New) Absence Counting Deduction rules for Absence quotas
Time Personnel Time Management IMG Absence Absence Catalog Absences Data Recording and Administration Assign Counting Rules to Absence Types.Counting
Personnel TimeIMG Attendances/Actual Working Time Data Recording and Administration Management Define Attendance Types.Times
Time Personnel Time Management IMG Attendances/Actual Working Times Data Recording and Administration Assign Counting Rules for Attendance counting (New) Attendance counting Rules to Attendance Types.
Time Data Personnel Time Management IMG Managing Time Accounts Using Attendance/AbsenceRecording and Administration Define Absence Quota Types. Time Quota Types Quotas
PersonnelIMG Managing Time Time Data Recording and Administration Time Management Calculating Absence Entitlements Accounts Using Attendance/Absence Quotas Permit Quota Generation Without TimeAutomatic Accrual of Absence Quotas Evaluation.
Time Time Evaluation Personnel Time Management IMG Set Personnel Subarea Groupings for Time Recording.Evaluation Settings
Time Data Recording and Administration Personnel Time Management IMG Managing Calculating AbsenceTime Accounts Using Attendance/Absence Quotas Set Base Entitlements Rules for Generating Absence Quotas Entitlements Base Entitlement for Absence Quota Generation.
Personnel TimeIMG Managing Time Accounts Time Data Recording and Administration Management Rules for Calculating Absence Entitlements Using Attendance/Absence Quotas Determine Validity and Deduction Periods.Generating Absence Quotas
IMG Managing Time Data Recording and Administration Personnel Time Management Calculating Absence EntitlementsTime Accounts Using Attendance/Absence Quotas Define Set Base Entitlements Rules for Generating Absence Quotas Generation Rules for Quota Selection. -
How to set the classpath in CVM?
Hi everybody,
experimenting with the J2ME Personal Profile Runtime Environment on a Linux PC I wonder how to set the classpath. The command line options only allow me to set the bootclasspath.
My original problems deals with determining the codebase for a class that is contained in a jar.
1) If I put this jar into the bootclasspath, that class is found and can be loaded, but the codebase (retrieved using class.getProtectionDomain().getCodeSource) is NULL.
2) If I put it into the classpath by using the command line option -Djava.class.path=... the class cannot be found by the ClassLoader.
3) If I put the jar into both, the classpath and the bootclasspath, the latter one is applied and result 1) shows up.
Any idea how to work around this?@see http://forum.java.sun.com/thread.jsp?forum=8&thread=410868
Maybe you are looking for
-
I have written code to zip files onto multiple floppies. While unzipping these files the user gets the following exception. java.util.zip.ZipException: invalid stored block lengths. The user of this code got a new laptop and was trying to unzip files
-
Any ideas are appreciated. Photoshop and Bridge are set to English, but every time I open camera raw it is set to Spanish and I can't figure out where to change the language. Mac OS 10.4.1 Thanks
-
Landing page with edge animated..
hi..any bady help .. how to create awesome landing page in adobe edge animate cc... and awesome circule count town timmer please help guys...
-
Is symbian or windows mobile better to access mac shares via vpn?
I am considering a smart phone purchase in the next few months, and I would like to be able to browse my server via vpn from the phone the same way I can with my Palm LifeDrive. I think Symbian or Windows Mobile are my best OS choices for a phone, an
-
RWBLD60 caused a stack fault in module RWLIB60.DLL at 0167:00a40983.
Oracle Reports Services Release Notes Release 1.0.2 for Windows or UNIX October 2000 Part No. A86271-01 The following error is generated when trying to get a comma delimited text output report in windows 98. RWBLD60 caused a stack fault in module RWL