Error 500 when I'm running JSP with tomcat on Linux
I'm using Tomcat on linux and when I'm running any JSP file I got this Error:
Error: 500
Location: /examples/jsp/snp/snoop.jsp
Internal Servlet Error:
javax.servlet.ServletException: sun/tools/javac/Main
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:508)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
at org.apache.tomcat.core.Handler.service(Handler.java:287)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:812)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
at java.lang.Thread.run(Thread.java:484)
Root cause:
java.lang.NoClassDefFoundError: sun/tools/javac/Main
at org.apache.jasper.compiler.SunJavaCompiler.compile(SunJavaCompiler.java:136)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:612)
at org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:542)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:258)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:268)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
at org.apache.tomcat.core.Handler.service(Handler.java:287)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:812)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
at java.lang.Thread.run(Thread.java:484)
What I'm doing wrong?
thank you for help, Snir
I've got the same problem but on a Win98 platform also in Solaris OS
By copying the file JAVA_HOME/lib/tools.jar to the following path :
JAVA_HOME/jre/lib/ext/
another alternative is to set your classpath so that it point to the .jar files in your environnement variaoble
ex under Win98:
include this line in your autoexec.bat file
SET CLASSPATH=.;c:\jdk1.3\lib\tools.jar;c:\jdk1.3\lib\dt.jar
under Linux:
edit your .source that include environnment variables and add :"anOldPath:/jdk1.3/lib/tools.jar"
run the source in your terminal window then you can run ./startup under solaris or startup.sh
JAVA_HOME : c:\jdk1.3 or c:\jdk1.2.2 under win98
/home/user/auser/jdk1.2.2/ on linux
I hope that you encounter this problem.
Hichem Hassainia.
Similar Messages
-
Internal error (500) when trying to run JSF application
I am new to JSF and I keep getting "The server encountered an internal error () that prevented it from fulfilling this request" . Details from the log are below:
StandardWrapperValve[jsp]: PWC1406: Servlet.service() for servlet jsp threw exception
java.lang.RuntimeException: Cannot find FacesContext
at javax.faces.webapp.UIComponentClassicTagBase.getFacesContext(UIComponentClassicTagBase.java:1811)
at javax.faces.webapp.UIComponentClassicTagBase.setJspId(UIComponentClassicTagBase.java:1628)
at org.apache.jsp.LoginPage_jsp._jspx_meth_f_view_0(LoginPage_jsp.java from :108)
at org.apache.jsp.LoginPage_jsp._jspService(LoginPage_jsp.java from :83)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:93)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:470)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:364)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:380)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)OK..figured this out...it could not find context because of an error in web.xml (path was wrong to the jsp)....
-
Running .jsp with TOMCAT 5.5.9
I am new to Tomcat and Java, I was task to make this application run on Tomcat, it currently works fine on Webshpere.
org.apache.jasper.JasperException: /header.jsp(90,0) The value for the useBean class attribute training.rules.TrainingSession is invalid.
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:405)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:146)
org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1223)
org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1116)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2237)
org.apache.jasper.compiler.Node$IncludeDirective.accept(Node.java:597)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
org.apache.jasper.compiler.Generator.generate(Generator.java:3270)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:189)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
MY JAVA FILE:
package training.rules;
import training.Training; // Database utilities
import java.io.*; // File utilities
import java.sql.*; // More database utilities
import java.util.*; // Data structure classes
import java.util.Date;
import tools.pages.AbstractPage;
import tools.persistence.*; // Database utilities
import tools.persistence.LibraryFactory; // Database library manager
import tools.persistence.LibraryManager; // Application library manager
import tools.rules.*; // Business rules utilities
import tools.utilities.*; // Misc. utility classes
import tools.utilities.Log; // Log file for application
import tools.utilities.EmailException;
import tools.utilities.EmailLookup;
import tools.utilities.print.*; // Print utility classes
* Provides the utilities necessary to create and maintain a
Training DB user session.
* @author Mary S. Powers ([email protected])
* @version 1.000 2003.02.26 Initial
public class TrainingSession extends Session {
The list of valid agency codes.
public static MultiValue agencyCodes = null;
The code for a page not requiring a log-in at all.
public static final String AGENCY_NONE = "4";
The code for the agency of OTH.
public static final String AGENCY_OTHER = "2";
The code for the agency of PDG.
public static final String AGENCY_PDG = "1";
The code for the agency of Supervisor.
public static final String AGENCY_SUPERVISOR = "3";
List of archived Employees in the database.
public static MultiValue archivedEmployees = null;
The list of email addresses for the contacts for the application.
public static MultiValue contactEmailAddresses = null;
The list of contact names for the application.
public static MultiValue contactNames = null;
The list of valid course type IDs.
public static MultiValue courseTypeIds = null;
The list of valid course types.
public static MultiValue courseTypeNames = null;
The list of manager delegates.
public static KeyedList delegates = null;
List of Employees in the database.
public static MultiValue employees = null;
The list of options on the course evaluation form.
public static MultiValue evaluationCodes = null;
The list of IDs for the options on the course evaluation form.
public static MultiValue evaluationCodeIds = null;
The list of job title IDs.
public static MultiValue jobTitleIds = null;
The list of valid job titles.
public static MultiValue jobTitleNames = null;
The list of course location IDs.
public static MultiValue locationIds = null;
The list of valid course location names.
public static MultiValue locationNames = null;
The list of valid training proficiency codes.
public static MultiValue proficiencyCodes = null;
The list of training proficiency IDs.
public static MultiValue proficiencyIds = null;
The list of course provider IDs.
public static MultiValue providerIds = null;
The list of valid course providers ordered by provider name.
public static MultiValue providerNames = new MultiValue();
The list of valid training request status codes.
public static MultiValue requestStatusCodes = new MultiValue();
The list of keys for the training request status codes.
public static MultiValue requestStatusCodeIds = new MultiValue();
The list of abbreviations for the states.
public static MultiValue stateAbbrs = null;
The list of IDs for the state codes.
public static MultiValue stateIds = null;
The list of valid states.
public static MultiValue stateNames = null;
The list of course subject area IDs.
public static MultiValue subjectAreaIds = null;
The list of course subject areas.
public static MultiValue subjectAreaNames = null;
The list of training level codes.
public static MultiValue trainingLevelCodes = null;
The list of training level IDs.
public static MultiValue trainingLevelIds = null;
The list of valid training method codes.
public static MultiValue trainingMethodCodes = null;
The list of training method IDs.
public static MultiValue trainingMethodIds = null;
Create a connection to the specified database as the specified user
with the specified password.
* @exception IOException if JDBC cannot connect.
public TrainingSession() throws IOException {
super(SessionManager.getApplication("TrainingDB"));
init("TrainingDB");
setLockedTables(new MultiValue());
logFile = Training.getLog();
} /* end of constructor */
This method retrieves the access level given the command the
user is attempting to execute.
* @param command the command the user wishes to execute
* @return the access level
public String getAccess(String command) {
String access = "";
if (command == null)
return(access);
try {
Hashtable validityTables = SessionManager.get(getApplication()).getValidityTables();
KeyedList validAccessLevels = ((KeyedList )validityTables.get("Access"));
if (!validAccessLevels.isValid()) {
getValidAccessLevels();
validityTables = SessionManager.get(getApplication()).getValidityTables();
validAccessLevels = ((KeyedList )validityTables.get("Access"));
} // end of if
Enumeration keys = validAccessLevels.keys();
while (keys.hasMoreElements()) {
String oneKey = ((String )keys.nextElement());
if (oneKey.trim().equalsIgnoreCase(command.trim()))
return(((String )((MultiValue )validAccessLevels.get(oneKey)).elementAt(0)));
} // end of while loop
catch (Exception e) {}
return(access);
} // end of method 'getAccess'
This method returns the agency the current user is logged in
under. OTH is the default.
* @return the agency the current user is logged in under
public String getAgency() {
return(this.getAgencyCode(agencyKey));
} // end of method 'getAgency'
This method retrieves the agency, given the agency key.
* @param agencyId the agency key
* @return the name of the agency
public String getAgencyCode(String agencyId) {
String agency = "";
if (agencyId == null)
return(agency);
try {
Hashtable validityTables = SessionManager.get(getApplication()).getValidityTables();
KeyedList validAgencies = ((KeyedList )validityTables.get("Valid_Agency"));
if (!validAgencies.isValid()) {
getValidAgencies();
validityTables = SessionManager.get(getApplication()).getValidityTables();
validAgencies = ((KeyedList )validityTables.get("Valid_Agency"));
} // end of if
Enumeration keys = validAgencies.keys();
while (keys.hasMoreElements()) {
String oneKey = ((String )keys.nextElement());
if (oneKey.trim().equals(agencyId))
return(((String )((MultiValue )validAgencies.get(oneKey)).elementAt(0)));
} // end of while loop
catch (Exception e) {}
return(agency);
} // end of method 'getAgencyCode'
This method retrieves the list of valid agency codes.
* @return the list of valid agency codes
public MultiValue getAgencyCodes() {
Hashtable validityTables = SessionManager.get(getApplication()).getValidityTables();
KeyedList validAgencies = ((KeyedList )validityTables.get("Valid_Agency"));
if (!validAgencies.isValid()) {
try {
getValidAgencies();
catch (IOException e) {} // We did the best we could to repopulate the cache.
} // end of if
return(agencyCodes);
} // end of method 'getAgencyCodes'
This method retrieves the agency key, given the name of the
agency.
* @param agency the name of the agency code
* @return the agency key
public String getAgencyId(String agency) {
String agencyId = "";
if (agency == null)
return(agencyId);
try {
Hashtable validityTables = SessionManager.get(getApplication()).getValidityTables();
KeyedList validAgencies = ((KeyedList )validityTables.get("Valid_Agency"));
if (!validAgencies.isValid()) {
getValidAgencies();
validityTables = SessionManager.get(getApplication()).getValidityTables();
validAgencies = ((KeyedList )validityTables.get("Valid_Agency"));
} // end of if statement
Enumeration keys = validAgencies.keys();
while (keys.hasMoreElements()) {
String oneKey = ((String )keys.nextElement());
MultiValue agencies = ((MultiValue )validAgencies.get(oneKey));
for (int i=0; i<agencies.size(); i++) {
String oneAgency = ((String )agencies.elementAt(i));
if (agency.trim().equalsIgnoreCase(oneAgency.trim()))
return(oneKey);
} // end of for loop
} // end of while loop
catch (Exception e) {}
return(agencyId);
} // end of method 'getLocationId'
This method retrieves the list of archived employees.
* @return reference to the list of archived employees
public MultiValue getArchivedEmployees() {
return(archivedEmployees);
} // end of method 'getArchivedEmployees'
This method retrieves the list of email addresses for the contacts
for the application.
* @return the list of email addresses
public MultiValue getContactEmailAddresses() {
return(contactEmailAddresses);
} // end of method 'getContactEmailAddresses'
This method retrieves the list of contact names for the
application.
* @return the list of contact names
public MultiValue getContactNames() {
return(contactNames);
} // end of method 'getContactNames'
This method retrieves the reference to a Course object, given the
key for the course.
* @param courseId the key for the course
* @return reference to the Course object
public ICourse getCourse(String courseId) {
ICourse theCourse = null;
if (courseId == null)
return(theCourse);
try {
ICourse courseTemplate = this.getNewCourseInstance();
((Course )courseTemplate).getKey().setValue(courseId.trim());
IIterator results = this.query(courseTemplate);
theCourse = ((ICourse )results.next());
catch (Exception e) {}
return(theCourse);
} // end of method 'getCourse'
This method retrieves the reference to a CourseInstance object, given the
key for the course.
* @param courseId the key for the course instance
* @return reference to the CourseInstance object
public ICourseInstance getCourseInstance(String courseId) {
ICourseInstance theCourseInstance = null;
if (courseId == null)
return(theCourseInstance);
try {
ICourseInstance courseInstanceTemplate = this.getNewClassInstance();
((CourseInstance )courseInstanceTemplate).getKey().setValue(courseId.trim());
IIterator results = this.query(courseInstanceTemplate);
theCourseInstance = ((ICourseInstance )results.next());
catch (Exception e) {}
return(theCourseInstance);
} // end of method 'getCourseInstance'
This method retrieves the course type, given the course type key
* @param courseTypeId the course type key
* @return the name of the course type
public String getCourseType(String courseTypeId) {
String courseType = "";
if (courseTypeId == null)
return(courseType);
try {
Hashtable validityTables = SessionManager.get(getApplication()).getValidityTables();
KeyedList validCourseTypes = ((KeyedList )validityTables.get("Course_Types"));
if (!validCourseTypes.isValid()) {
getValidCourseTypes();
validityTables = SessionManager.get(getApplication()).getValidityTables();
validCourseTypes = ((KeyedList )validityTables.get("Course_Types"));
} // end of if statement
Enumeration keys = validCourseTypes.keys();
while (keys.hasMoreElements()) {
String oneKey = ((String )keys.nextElement());
if (oneKey.trim().equalsIgnoreCase(courseTypeId))
return(((String )((MultiValue )validCourseTypes.get(oneKey)).elementAt(0)));
catch (Exception e) {}
return(courseType);
} // end of method 'getCourseType'
This method retrieves the list of valid course type IDs.
* @return the list of course type IDs
public MultiValue getCourseTypeIds() {
Hashtable validityTables = SessionManager.get(getApplication()).getValidityTables();
KeyedList validCourseTypes = ((KeyedList )validityTables.get("Course_Types"));
if (!validCourseTypes.isValid()) {
try {
getValidCourseTypes();
catch (IOException e) {} // We did the best we could to repopulate the cache.
} // end of if
return(courseTypeIds);
} // end of method 'getCourseTypeIds'
This method retrieves the list of valid course types.
* @return the list of course type names
public MultiValue getCourseTypes() {
Hashtable validityTables = SessionManager.get(getApplication()).getValidityTables();
KeyedList validCourseTypes = ((KeyedList )validityTables.get("Course_Types"));
if (!validCourseTypes.isValid()) {
try {
getValidCourseTypes();
catch (IOException e) {} // We did the best we could to repopulate the cache.
} // end of if
return(courseTypeNames);
} // end of method 'getCourseTypes'
This method returns a list of IDs for the delegates (if any) of the
person logged in, if he/she is a section manager.
* @return the list of employee IDs of the delegates
public MultiValue getDelegates() {
MultiValue theDelegates = new MultiValue();
if (this.isSectionManager()) {
IEmployee employeeRecord = this.getEmployeeRecord();
String employeeId = ((String )((AbstractDataObject )((Employee )employeeRecord).getKey()).get()).trim();
KeyedList delegateTable = this.delegates;
Enumeration keys = delegateTable.keys();
while (keys.hasMoreElements()) {
String oneKey = ((String )keys.nextElement()).trim();
if (oneKey.equals(employeeId)) {
theDelegates = ((MultiValue )delegateTable.get(oneKey));
break;
} // end of if statement
} // end of while loop
} // end of outer if statement
return (theDelegates);
} // end of method 'getDelegates'
This method retrieves the name of the domain used to validate
logins.
* @return the name of the domain
public String getDomain() {
return(domain);
} // end of method 'getDomain'
This method retrieves the Employee record, given the employee ID.
* @param employeeId the employee ID
* @return the employee record;
'null', if no such employee ID
public IEmployee getEmployee(String employeeId) {
IEmployee employee = null;
for (int i=0; i<employees.size(); i++) {
IEmployee oneEmployee = ((IEmployee )employees.elementAt(i));
String oneEmployeeId = ((String )((AbstractDataObject )((Employee )oneEmployee).getKey()).get());
if (oneEmployeeId.trim().equalsIgnoreCase(employeeId.trim())) {
employee = oneEmployee;
break;
} // end of if
} // end of for loop
// If the employee is not found, then search the list of archived
// employees.
if (employee == null) {
for (int i=0; i<archivedEmployees.size(); i++) {
IEmployee oneEmployee = ((IEmployee )archivedEmployees.elementAt(i));
String oneEmployeeId = ((String )((AbstractDataObject )((Employee )oneEmployee).getKey()).get());
if (oneEmployeeId.trim().equalsIgnoreCase(employeeId.trim())) {
employee = oneEmployee;
break;
} // end of if
} // end of for loop
} // end of outer if statement
return(employee);
} // end of method 'getEmployee'
This method retrieves an employee name (last name, comma, first name),
given the employee's user ID.
* @param userId the employee's user ID
* @return the employee's name;
'null', if no such employee
public String getEmployeeName(String userId) {
String employeeName = null;
for (int i=0; i<employees.size(); i++) {
IEmployee oneEmployee = ((IEmployee )employees.elementAt(i));
String oneUserId = ((String )((AbstractDataObject )((Employee )oneEmployee).getUserName()).get());
String middleName = ((String )((AbstractDataObject )oneEmployee.getMiddleInitial()).get());
if (middleName == null)
middleName = "";
if (oneUserId.trim().equalsIgnoreCase(userId.trim())) {
employeeName = ((String )((AbstractDataObject )oneEmployee.getLastName()).get()) + ", " +
((String )((AbstractDataObject )oneEmployee.getFirstName()).get()) + " " +
middleName;
break;
} // end of if
} // end of for loop
return(employeeName);
} // end of method 'getEmployeeName'
This method retrieves the employee record of the current user.
* @return reference to the employee record;
'null', if no employee record exists for the user
public IEmployee getEmployeeRecord() {
try {
MultiValue theEmployees = getEmployees();
for (int i=0; i<theEmployees.size(); i++) {
IEmployee oneEmployee = ((IEmployee )theEmployees.elementAt(i));
String userName = ((String )((AbstractDataObject )oneEmployee.getUserName()).get());
if (userName.equalsIgnoreCase(getUserId())) {
employeeRecord = oneEmployee;
break;
} // end of if
} // end of for loop
catch (IOException e) {}
return(employeeRecord);
} // end of method 'getEmployeeRecord'
This method retrieves the list of Employees.
* @exception IOException thrown if there was an occur attempting
to retrieve the Employee list
public synchronized MultiValue getEmployees() throws IOException {
if (isNew) {
IEmployee employeeTemplate = getNewEmployeeInstance();
employeeTemplate.setEmployeeStatus("ACTIVE");
employeeTemplate.getLastName().setOrder(0);
employees = this.query(employeeTemplate).getAll();
// Now, get the listing of archived employees.
employeeTemplate.setEmployeeStatus("TERMINATED");
archivedEmployees = this.query(employeeTemplate).getAll();
isNew = false;
} // end of if
return(employees);
} // end of method 'getEmployees'
This method retrieves the evaluation option, given the evaluation option key.
* @param evaluationCodeId the evaluation option key
* @return the name of the course evaluation option
public String getEvaluationCode(String evaluationCodeId) {
String evaluationCode = "";
if (evaluationCodeId == null)
return(evaluationCode);
try {
Hashtable validityTables = SessionManager.get(getApplication()).getValidityTables();
KeyedList validEvaluationCodes = ((KeyedList )validityTables.get("Valid_Evaluation_Options"));
if (!validEvaluationCodes.isValid()) {
getValidEvaluationOptions();
validityTables = SessionManager.get(getApplication()).getValidityTables();
validEvaluationCodes = ((KeyedList )validityTables.get("Valid_Evaluation_Options"));
} // end of if statement
Enumeration keys = validEvaluationCodes.keys();
while (keys.hasMoreElements()) {
String oneKey = ((String )keys.nextElement());
if (oneKey.trim().equalsIgnoreCase(evaluationCodeId))
return(((String )((MultiValue )validEvaluationCodes.get(oneKey)).elementAt(0)));
catch (Exception e) {}
return(evaluationCode);
} // end of method 'getEvaluationCode'
This method retrieves the list of valid course evaluation option IDs.
* @return the list of course evaluation form option IDs
public MultiValue getEvaluationCodeIds() {
Hashtable validityTables = SessionManager.get(getApplication()).getValidityTables();
KeyedList validEvaluationOptions = ((KeyedList )validityTables.get("Valid_Evaluation_Options"));
if (!validEvaluationOptions.isValid()) {
try {
getValidEvaluationOptions();
catch (IOException e) {} // We did the best we could to repopulate the cache.
} // end of if
return(evaluationCodeIds);
} // end of method 'getEvaluationCodeIds'
This method retrieves the list of valid course evaluation codes.
* @return the list of course evaluation codes
public MultiValue getEvaluationCodes() {
Hashtable validityTables = SessionManager.get(getApplication()).getValidityTables();
KeyedList validEvaluationOptions = ((KeyedList )validityTables.get("Valid_Evaluation_Options"));
if (!validEvaluationOptions.isValid()) {
try {
getValidEvaluationOptions();
catch (IOException e) {} // We did the best we could to repopulate the cache.
} // end of if
return(evaluationCodes);
} // end of method 'getEvaluationCodes'
This method retrieves the highest access that the current user has.
* @return the highest access that the current user has.
public String getHighestAccess() {
String highestAccess = AGENCY_OTHER;
if (isPDG())
highestAccess = AGENCY_PDG;
else if (isSupervisor())
highestAccess = AGENCY_SUPERVISOR;
String highestAgency = "";
highestAgency = this.getAgencyCode(highestAccess);
setAgency(highestAgency);
return(highestAgency);
} // end of method 'getHighestAccess'
This method returns the section manager highest up in the chain
that the current user is a delegate for.
* @return reference to the section manager highest up in the
chain that the current user is a delegate for;
'null', if the current user is a delegate for no one
public IEmployee getHighestDelegate() {
if (highestDelegate != null)
return(highestDelegate);
String employeeId = ((String )((AbstractDataObject )((Employee )this.employeeRecord).getKey()).get());
try {
String sql = "select Manager_Emp_Id from Delegates where Delegate_Emp_Id=" +
employeeId;
MultiValue results = this.textQuery(sql);
String employeeDB = ((String )((Session )this).getApplication().getProperty("EMPLOYEE_DB")).trim();
String highestDelegateId = "";
int maxEmployeeList = -1;
for (int i=0; i<results.size(); i++) {
Vector oneRow = ((Vector )results.elementAt(i));
String oneManagerId = oneRow.elementAt(0).toString();
sql = "exec " + employeeDB + ".dbo.usp_chain_down " + oneManagerId;
MultiValue queryResults = this.textQuery(sql);
if (queryResults.size() > maxEmployeeList) {
maxEmployeeList = queryResults.size();
highestDelegateId = oneManagerId;
} // end of if statement
} // end of for loop
highestDelegate = this.getEmployee(highestDelegateId);
catch (Exception e) {}
return(highestDelegate);
} // end of method 'getHighestDelegate'
This method retrieves the job title, given the job title key
* @param jobTitleId the job title key
* @return the name of the job title
public String getJobTitle(String jobTitleId) {
String jobTitle = "";
if (jobTitleId == null)
return(jobTitle);
try {
Hashtable validityTables = SessionManager.get(getApplication()).getValidityTables();
KeyedList validJobTitles = ((KeyedList )validityTables.get("Job_Table"));
if (!validJobTitles.isValid()) {
getValidJobTitles();
validityTables = SessionManager.get(getApplication()).getValidityTables();
validJobTitles = ((KeyedList )validityTables.get("Job_Table"));
} // end of if statement
Enumeration keys = validJobTitles.keys();
while (keys.hasMoreElements()) {
String oneKey = ((String )keys.nextElement());
if (oneKey.trim().equalsIgnoreCase(jobTitleId))
return(((String )((MultiValue )validJobTitles.get(oneKey)).elementAt(0)));
catch (Exception e) {}
return(jobTitle);
} // end of method 'getJobTitle'
This method retrieves the list of job title IDs.
* @return the list of job title IDs
public MultiValue getJobTitleIds() {
Hashtable validityTables = SessionManager.get(getApplication()).getValidityTables();
KeyedLisThanks that help a bunch. I also the code was a bit much.
I am currenty getting the error:
org.apache.jasper.JasperException: Unable to compile class for JSP
Generated servlet error:
Only a type can be imported. training.Training resolves to a package
An error occurred at line: 112 in the jsp file: /header.jsp
Generated servlet error:
The method getLog() is undefined for the type Training
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:397)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
Thanks, -
Error message when attempting to run aam
I am encountering error message when attempting to run aam - Please connect to the internet, then try again when I am already connected
Please see Sign in or activation errors | CS6, CS5.5 Subscriptions, CS6 Perpetual - http://helpx.adobe.com/x-productkb/policy-pricing/activation-network-issues.html for common resolutions to these difficulties.
-
I'm getting error 205 when trying to install ID with Creative Cloud on Windows 7. Help please.
Creative Cloud Help / Error downloading Creative Cloud applications
http://helpx.adobe.com/creative-cloud/kb/error-downloading-cc-apps.html -
Im getting error 2 when tryig to download ITUNES with windows 7, you know what i can do?
Im getting error 2 when tryig to download ITUNES with windows 7, you know what i can do?
For general advice see Troubleshooting issues with iTunes for Windows updates.
The steps in the second box are a guide to removing everything related to iTunes and then rebuilding it which is often a good starting point unless the symptoms indicate a more specific approach. Review the other boxes and the list of support documents further down the page in case one of them applies.
Your library should be unaffected by these steps but there is backup and recovery advice elsewhere in the user tip.
tt2 -
i keep getting "an error occurred when installing, please run program again" for OS X mountain lion, how can i fix the problem?
The Reset feature adds a folder on your desktop named Old Firefox Data. I recommend hanging onto that for a few weeks in case you discover something essential that the Reset feature left behind.
This article has a list of what is migrated and what is not during a Reset, in case you're curious: [[Reset Firefox – easily fix most problems]]. -
I've been going through this painful process
to deploy a simple JSP application on a
Red Hat Linux 6.1 system with the latest
Tomcat release. I got the Tomcat server
running and all their sample JSP apps work.
This system also contains the database,
so I'm running it as local.
I created a simple JSP application using
just one table from the database. It
works just fine from the JDeveloper
environment. When I try to access the
main.jsp file via the URL http://odb/ojsp/main.jsp, I get this:
Error: 500
Location: /ojsp/main.jsp
Internal Servlet Error:
org.apache.jasper.JasperException: Unable to compile class for JSP/usr/local/jakarta-tomcat/work/localhost_8080/_0002fojsp_0002fmain_0002ejspmain_jsp_0.java:17: Package javax.naming not found in import.
import javax.naming.*;
^
1 error
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:247)
at org.apache.jasper.runtime.JspServlet.loadJSP(JspServlet.java:413)
at org.apache.jasper.runtime.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:149)
at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:161)
at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261)
at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:369)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:160)
at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
at java.lang.Thread.run(Thread.java:475)
I would assume it's a classpath issue, but
which one do I need to add?
nullI got the exactly same message by using JDeveloper3.1.1.2, NT, and Tomcat 3.1. I have posted the issue several time and not got any response yet.
Thanks.
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by abbaroo:
Well, I figured out that I need the JNDI
package to go along with JDK 1.2.2.
So I downloaded and installed that, and
now I get this message:
Error: 500
Location: /ojsp/ConstantJSP_html/main.jsp
Internal Servlet Error:
java.lang.IllegalStateException: Response has already been committed
at org.apache.tomcat.core.HttpServletResponseFacade.sendError(HttpServletResponseFacade.java:157)
at org.apache.jasper.runtime.JspServlet.unknownException(JspServlet.java:299)
at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:377)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:160)
at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
at java.lang.Thread.run(Thread.java:475)
<HR></BLOCKQUOTE>
null -
How to run jsp in tomcat server
hi this is satish1529,
i am new to jsp technology,i have written small jsp file and html file,i don't know where to place jsp and html files in tomcat server and where i have to do setting in the server and how to run jsp file. pls give me step by step describing how to run jsp in tomcat server.
i am showing u files
this is jsp file
<html>
<body>
<center> data recieved from client <center>
<%
String s= request.getParameter("t1");
String a= request.getParameter("t2");
%>
username :<%=s%><br>
address :<%=a%>
</body>
</html>
this is html file
<html>
<body>
<form action="http://localhost:8080/form.jsp">
enter name <input type="text" name="t1"> <br>
enter address <textarea name="t2"> </textarea> <br>
<input type="submit" vaule="login">
</form>
</body>
</html>Thanx a lot for ur promt reply.
we r succful in running simple jsp in tomcat6.0.
bt one more problem occured as following when we r trying to run jsp file in tomcat.
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: /main1.jsp(1,1) The value for the useBean class attribute webCounter is invalid.
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:148)
org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1200)
org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1155)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2386)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2392)
org.apache.jasper.compiler.Node$Root.accept(Node.java:489)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
org.apache.jasper.compiler.Generator.generate(Generator.java:3374)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:210)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:306)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.13 logs. -
How to run servlet with tomcat
I have a probrom that how can I run servlet with tomcat?
I have new a folder classes in webapps\root\WEB-INF\,and put the .class
programme in it ,but http://localhost:8080/servlet/HelloWorldExample
can't run ,it give me a error than http:404 not found.
could you tell me how i can solve the problem.
Thank u very much.Hi,
Make sure the class is in classpath or in WEB-INF/classes folder and make an entry for servlet tag in web.xml in WEB-INF folder.
Regards -
How to Run JSP in Tomcat Server 3.3.2
Hi all,
i have just installed tomcat server 3.3.2 in my system which as windows xp home edition as a operating system and no problem i can able to start the tomcat server.But the problem is that i dont no how to run jsp in tomcat i listed some of my problems below..
How to put my jsp file in the virtual directory(default and also i want to create ) then tell me how use IE to run the JSP file.
Thanks in advance..
With Regards
VijayHi all,
i have just installed tomcat server 4.1 in my
system which as windows NT 4.0 home edition as a
operating system and no problem i can able to start
the tomcat server.But the problem is that i dont no
how to run jsp in tomcat i listed some of my problems
below..
How to put my jsp file in the virtual
directory(default and also i want to create ) then
tell me how use IE to run the JSP file.
Thanks in advance..
With Regards
Baliram -
Unable to run jsp in tomcat 5.0
hi ,
iam unable to run jsps in tomcat 5.0.
i get an error saying ,unable to compile java compiler
iam able to compile servlets & execute them.
i have already set the paths for JAVA_HOME & CATALINA_HOME
please guide me accordingly
regards ,
shaileshthe same code gets executed in other system in which there is only one jdk.
the system which iam using has got many jre s due to
1) netbeans IDE
2)Weblogic server
3) jdk 1.4 was previously installed
4) jdk 1.5 was also installed
but i have set JAVA_HOME =jdk1.6
I doubt the compiler is trying to compile itself or another compiler
regards ,
shaileshkumar -
Where is the best place on the Web to learn Servlet/JSP with Tomcat for beginners?
i also just started learning servlets a few days ago.
here are some of the websites i've found
there are some tutorials as well as general tips and stuff.
http://java.sun.com/docs/books/tutorial/servlets/index.html
http://www.javaworld.com/javaworld/javatips/jw-javatip94.html
http://www.cetus-links.org/oo_javaserver_pages.html
http://www-105.ibm.com/developerworks/education.nsf/dw/java-onlinecourse-bynewest?OpenDocument&Count=500&loc=j
http://www.fawcette.com/javapro/2002_03/online/online_eprods/servlets_03_08/
http://developer.java.sun.com/developer/onlineTraining/Servlets/Fundamentals/index.html
http://developer.java.sun.com/developer/onlineTraining/JSPIntro/
http://www.novocode.com/doc/servlet-essentials/
http://hotwired.lycos.com/webmonkey/99/07/index3a.html?tw=programming
http://www.jguru.com/faq/Servlets
http://www.jguru.com/faq/JSP
i haven't looked into all of these yet, but i'm sure they will help you. -
Error while running JSP with custom tag
I am trying to run a jsp with a tag and I am getting the following error when I run the jsp:
"Unable to open taglibrary /WEB-INF/jsp/mytaglib.tld : Parse Error in the tag library descriptor: External parameter entity "%(DOCTYPE);" has characters after markup."
I have no idea what this is, can anyone help me here?
tx
-ABIts difficult to tell without looking at your TLD file i.e. mytaglib.tld
However, a guess is that you may be refering to an invalid or otherwise corrupted DTD from your TLD.
Check that out.
The official DTD for TLDs in JSP 1.1 is http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd
and the official DTD for TLDs in JSP 1.2 is http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd -
I am using Vb6(sp5), NT4, Component Works (latest), and Ni-Daq 6.9.1. The error occurs when using either a PXI-6052E or PXI-6070E. The Self Cal works fine but the external cal code generates this error during the call. The code used is taken directly from the programming example in the NI_DAQ programmers reference for the Calibrate_E_Series function.
The Error Text is:
Run-time error '10086':
The external reference is invalidJohn;
I found a Knowledge Base about that error you can refer to. The KB, originally, talks about Labview, but, as Labview makes NI-DAQ function calls in the same way any other Software language, you can apply the same concepts when using VB. The link is:
http://ae.natinst.com/operations/ae/public.nsf/fca7838c4500dc10862567a100753500/2d8abbbb8d45ff74862565f6005c8d7b?OpenDocument
and the KB number is 18TAPEY5
in case you prefer to search for it at our home page.
Hope this helps.
Filipe
Applications Engineer
National Instruments
Maybe you are looking for
-
How do I find Photos taken in a particular time zone?
Hi, I have several hundred pictures taken in and around Calgary Alberta. Lots of the pictures have the correct time but the wrong time zone (GMT instead of MST). If I batch change the time zone from GMT to the correct one the times get changed also a
-
Hard disk failure id GLH080-6A6721-MFKT1F-60F603
Hi, I am using HP 2000 notebook 2202tu. From last 2 days onwards i am getting error as "WINDOWS DETECTED A HARD DISK PROBLEM" back up your files immediately to prevent information loss and then contact the computer manufacturer to determine if you ne
-
HT1386 Why Won't my iPhone reflect updates to changes I've made to iTunes playlists on my PC?
When I first got my iPhone, I synced my music and playlists FROM the computer TO the phone. Worked fine. Now every sync makes my PC iTunes match the phone instead of the other way around. The sync only works in one direction & now has deleted some o
-
Oracle JDeveloper Application Migration Assistant (AMA)
Oracle JDeveloper Application Migration Assistant (AMA) link from http://otn.oracle.com/tech/migration/index.html returns Page Not Found
-
Placed jpgs - pdf much bigger then jpgs filesize - why !?
Hi, i can't understand what exactly indesign doing, hopefully someone got an idea.. thanks in advance.. I placed a few jpgs, which are overall about 1.4 mb. The final Pdf, which only includes these jpgs is much bigger, 3.3 mb. I tried different expor