Error using JSP page in a screenflow in Oracle BPM Studio 10.3.0.0
I am trying to use a jsp page in a screenflow and i am getting the following error:
**"The task could not be successfully executed. Reason: 'fuego.web.execution.exception.InternalForwardException: UnExpected error during internal forward process.'."**
My jsp is very simple and the code is as follows:
===================================================================
<%@ page session="true"%>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ taglib uri="http://fuego.com/jsp/ftl" prefix="f" %>
<html>
<head>
<link href="<f:webResources relativePath='css/default.css'/>" rel="stylesheet" type="text/css">
<title></title>
</head>
<body>
<form name="form" method="post" action="<f:postResults/>">
<table>
<tr>
<td>Person Name</td>
<td><input type="text" id="personName" <f:field att="personObject.personName"/> /></td>
</tr>
<tr>
<td>Person Age</td>
<td><input type="text" id="personAge" <f:field att="personObject.personAge"/> /></td>
</tr>
<tr>
<input type="submit" name="Ok" value="Ok">
</tr>
</table>
</form>
</body>
</html>
=====================================================================
Also I have created a "person" BPM Object under Catalogue and created instance variable with the name as "personObject". I cannot understand why i am getting the above error. Please Help.
When I go to the Log Viewer it gives the following error details:
UnExpected error during internal forward process.
Caused by: Could not find FuegoObject:personObject in request.
fuego.web.execution.exception.InternalForwardException: UnExpected error during internal forward process.
at fuego.web.execution.servlet.ServletExternalContext.redirectView(ServletExternalContext.java:131)
at fuegoblock.net.web.NewJspController.forward(NewJspController.java:98)
at fuegoblock.net.web.NewJspController.service(NewJspController.java:50)
at fuego.web.execution.servlet.ServletRedirector$ControllerRedirector.forward(ServletRedirector.java:197)
at fuego.web.execution.servlet.ServletRedirector.redirect(ServletRedirector.java:58)
at fuego.web.papi.TaskExecutor.processRedirect(TaskExecutor.java:224)
at fuego.web.papi.TaskExecutor.execute(TaskExecutor.java:104)
at fuego.workspace.servlet.ExecutorServlet.doAction(ExecutorServlet.java:117)
at fuego.workspace.servlet.BaseServlet.doPost(BaseServlet.java:229)
at fuego.workspace.servlet.BaseServlet.doGet(BaseServlet.java:220)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at fuego.workspace.servlet.AuthenticatedServlet.service(AuthenticatedServlet.java:83)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Unknown Source)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:245)
at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:50)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:156)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:152)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
at org.apache.catalina.core.ApplicationDispatcher.access$000(ApplicationDispatcher.java:66)
at org.apache.catalina.core.ApplicationDispatcher$PrivilegedForward.run(ApplicationDispatcher.java:81)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:293)
at fuego.web.execution.servlet.ServletExternalContext.forwardInternal(ServletExternalContext.java:197)
at fuego.web.execution.servlet.ServletExternalContext.processAction(ServletExternalContext.java:110)
at fuego.workspace.execution.WorkspaceInteractiveExecution.dispatchComponentExecution(WorkspaceInteractiveExecution.java:98)
at fuego.web.execution.InteractiveExecution.invokePrepare(InteractiveExecution.java:351)
at fuego.web.execution.InteractiveExecution.process(InteractiveExecution.java:192)
at fuego.web.execution.impl.WebInteractiveExecution.process(WebInteractiveExecution.java:54)
at fuego.web.execution.InteractiveExecution.process(InteractiveExecution.java:223)
at fuego.web.papi.TaskExecutor.runInstanceTask(TaskExecutor.java:490)
at fuego.web.papi.TaskExecutor.execute(TaskExecutor.java:98)
at fuego.workspace.servlet.ExecutorServlet.doAction(ExecutorServlet.java:117)
at fuego.workspace.servlet.BaseServlet.doPost(BaseServlet.java:229)
at fuego.workspace.servlet.BaseServlet.doGet(BaseServlet.java:220)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at fuego.workspace.servlet.AuthenticatedServlet.service(AuthenticatedServlet.java:83)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Unknown Source)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:245)
at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:50)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:156)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:152)
at fuego.web.filter.SingleThreadPerSessionFilter.doFilter(SingleThreadPerSessionFilter.java:64)
at fuego.web.filter.BaseFilter.doFilter(BaseFilter.java:63)
at sun.reflect.GeneratedMethodAccessor213.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Unknown Source)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:217)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:197)
at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:50)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:156)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:152)
at fuego.web.filter.CharsetFilter.doFilter(CharsetFilter.java:48)
at fuego.web.filter.BaseFilter.doFilter(BaseFilter.java:63)
at sun.reflect.GeneratedMethodAccessor213.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Unknown Source)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:217)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:197)
at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:50)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:156)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:152)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Unknown Source)
Caused by: javax.servlet.ServletException: Could not find FuegoObject:personObject in request.
at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:858)
at org.apache.jasper.runtime.PageContextImpl.access$1100(PageContextImpl.java:65)
at org.apache.jasper.runtime.PageContextImpl$12.run(PageContextImpl.java:778)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:776)
at org.apache.jsp.webRoot.customJSP.showperson_jsp._jspService(showperson_jsp.java:113)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Unknown Source)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:245)
at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:50)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:156)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:152)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
at org.apache.catalina.core.ApplicationDispatcher.access$000(ApplicationDispatcher.java:66)
at org.apache.catalina.core.ApplicationDispatcher$PrivilegedForward.run(ApplicationDispatcher.java:81)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:293)
at fuego.web.execution.servlet.ServletExternalContext.redirectView(ServletExternalContext.java:128)
Similar Messages
-
[b]Error during JSP page processing[/b]
hi , i'm mech.
i have some probs with jsp. i am trying to connect jsp page with database and printing the data on the browser page. i have created DSN mm using microsoft odbc for oracle and oracle9i's driver oracle in orahome90 but it is giving yet . i have this coding and error.
------------------------jsp code--------------------------
package pagecompile.jsp;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.io.PrintWriter;
import java.io.IOException;
import java.io.FileInputStream;
import java.io.ObjectInputStream;
import java.util.Vector;
import com.sun.server.http.pagecompile.jsp.runtime.*;
import java.beans.*;
import com.sun.server.http.pagecompile.jsp.JspException;
import java.sql.*;
public class _Connect extends HttpJspBase {
static char[][] jspxhtml_data = null;
public _Connect( ) {
private static boolean jspxinited = false;
public final void jspxinit() throws JspException {
ObjectInputStream oin = null;
int numStrings = 0;
try {
FileInputStream fin = new FileInputStream("E:\\JavaWebServer2.0\\tmpdir\\default\\pagecompile\\jsp\\pagecompile.jspConnect.dat");
oin = new ObjectInputStream(fin);
jspxhtml_data = (char[][]) oin.readObject();
} catch (Exception ex) {
throw new JspException("Unable to open data file");
} finally {
if (oin != null)
try { oin.close(); } catch (IOException ignore) { }
public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException {
boolean jspxcleared_due_to_forward = false;
JspFactory _jspxFactory = null;
PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
String _value = null;
try {
if (_jspx_inited == false) {
jspxinit();
jspxinited = true;
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType("text/html");
pageContext = _jspxFactory.getPageContext(this, request, response,
"", true, 8192, true);
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
out.print(_jspx_html_data[0]);
out.print(_jspx_html_data[1]);
// begin [file="E:\\JavaWebServer2.0\\public_html\\Connect.jsp";from=(14,2);to=(28,2)]
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection myconn=DriverManager.getConnection("Jdbc:Odbc:mm","madhulika","madhulika");
Statement stmt = myconn.createStatement();
ResultSet myResultSet = stmt.executeQuery("Select * from peopletable");
if(myResultSet != null)
while(myResultSet.next())
int eid=myResultSet.getInt("id");
String fname=myResultSet.getString("firstname");
String lname=myResultSet.getString("lastname");
String mail=myResultSet.getString("email");
// end
out.print(_jspx_html_data[2]);
// begin [file="E:\\JavaWebServer2.0\\public_html\\Connect.jsp";from=(30,10);to=(30,13)]
out.print(eid);
// end
out.print(_jspx_html_data[3]);
// begin [file="E:\\JavaWebServer2.0\\public_html\\Connect.jsp";from=(31,10);to=(31,15)]
out.print(fname);
// end
out.print(_jspx_html_data[4]);
// begin [file="E:\\JavaWebServer2.0\\public_html\\Connect.jsp";from=(32,10);to=(32,15)]
out.print(lname);
// end
out.print(_jspx_html_data[5]);
// begin [file="E:\\JavaWebServer2.0\\public_html\\Connect.jsp";from=(33,10);to=(33,14)]
out.print(mail);
// end
out.print(_jspx_html_data[6]);
// begin [file="E:\\JavaWebServer2.0\\public_html\\Connect.jsp";from=(37,5);to=(43,0)]
stmt.close();
myconn.close();
// end
out.print(_jspx_html_data[7]);
} catch (Throwable t) {
if (out.getBufferSize() != 0)
out.clear();
throw new JspException("Unknown exception: ", t);
} finally {
if (!_jspx_cleared_due_to_forward)
out.flush();
_jspxFactory.releasePageContext(pageContext);
-------------------error in browser----------------------
Error during JSP page processing
java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
at java.lang.Throwable.(Compiled Code)
at java.lang.Exception.(Compiled Code)
at java.sql.SQLException.(SQLException.java:43)
at sun.jdbc.odbc.JdbcOdbc.createSQLException(Compiled Code)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:3814)
at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(JdbcOdbc.java:1029)
at sun.jdbc.odbc.JdbcOdbcConnection.initialize(JdbcOdbcConnection.java:145)
at sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:165)
at java.sql.DriverManager.getConnection(Compiled Code)
at java.sql.DriverManager.getConnection(DriverManager.java:126)
at pagecompile.jsp._Connect._jspService(Compiled Code)
at com.sun.server.http.pagecompile.jsp.runtime.HttpJspBase.service(HttpJspBase.java:87)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at com.sun.server.http.pagecompile.jsp.runtime.JspServlet.runServlet(JspServlet.java:469)
at com.sun.server.http.pagecompile.jsp.runtime.JspServlet.processJspPage(JspServlet.java:259)
at com.sun.server.http.pagecompile.jsp.runtime.JspServlet.service(JspServlet.java:97)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at com.sun.server.ServletState.callService(ServletState.java:226)
at com.sun.server.ServletManager.callServletService(ServletManager.java:936)
at com.sun.server.ProcessingState.invokeTargetServlet(ProcessingState.java:423)
at com.sun.server.http.HttpProcessingState.execute(HttpProcessingState.java:79)
at com.sun.server.http.stages.Runner.process(Runner.java:79)
at com.sun.server.ProcessingSupport.process(Compiled Code)
at com.sun.server.Service.process(Service.java:204)
at com.sun.server.http.HttpServiceHandler.handleRequest(HttpServiceHandler.java:374)
at com.sun.server.http.HttpServiceHandler.handleRequest(Compiled Code)
at com.sun.server.HandlerThread.run(CompiledBacking up a moment, is there a particular reason that you're using the JDBC-ODBC bridge rather than using the Oracle JDBC driver?
Have you taken a look at the JSP sample code available on OTN? I would start by making sure you can run that.
Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC -
Downloading xls sheet from application server using jsp page
hi,
I am creating an excel sheet and storing it in application server which runs on HP-UNIX OS. I want to download that excel sheet using jsp page. With the following code snippet i m able to access the jsp page, but i m not able to download xls sheet. its giving "the page cannot be found "error. Is there any other way to download the excel sheet from jsp page.
<%
out.println("<a href=\"./Download.xls\">Download excel</a>");
out.println("<a href=\"./Download.jsp\">Download jsp</a>");
%>
Thx in adv.
rituhref should be ur absolure path like
http://servername:8080/files/Download.xls"
pls try these and let me know
shanu -
How can WLS use JSP pages in a Web Application (either a .war file or a war directory structure) without a java compiler?
I suspect either the JSP specification is flawed (i.e. it doesn't take account of servers using just a JRE), or BEA's implementation is broken.
Production servers do not have a JDK installed. They only have a JRE. Therfore a java compiler is not present on the machine that the Web Application is deployed onto.
On the development machine, when the server is requested to load the JSP it creates a tmpwar directory within the Web Application directory structure. This is then included in the resultant .war file thus:
D:\war>jar -tf gmi.war
META-INF/
META-INF/MANIFEST.MF
gmiService.jsp
WEB-INF/
WEB-INF/classes/
WEB-INF/classes/com/
WEB-INF/classes/com/bt/
WEB-INF/classes/com/bt/gmi/
WEB-INF/classes/com/bt/gmi/gmiService.class
WEB-INF/getList.xsl
WEB-INF/getListByConnection.xsl
WEB-INF/getListByDistrict.xsl
WEB-INF/getListByDistrictConnection.xsl
WEB-INF/lib/
WEB-INF/source/
WEB-INF/source/build.bat
WEB-INF/source/gmiService.java
WEB-INF/web.xml
WEB-INF/weblogic.xml
tmpwar/
tmpwar/jsp_servlet/
tmpwar/jsp_servlet/_gmiservice.class
tmpwar/jsp_servlet/_gmiservice.java
When deployed on the production server with the web.xml file set to use the following values (note XML stripped):
weblogic.jsp.pageCheckSeconds
-1
weblogic.jsp.precompile
false
weblogic.jsp.compileCommand
javac
weblogic.jsp.verbose
true
weblogic.jsp.packagePrefix
jsp_servlet
weblogic.jsp.keepgenerated
false
And in the weblogic.properties file:
weblogic.httpd.webApp.gmi=war/gmi
I've also tried with the .war file, but that insists on creating another tmpwar directory outside of the .war file.
Then, although I have set pageCheckSeconds to -1 (don't check and don't recompile) ter production server still attempts to recompile the JSP's:
Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: init
Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param verbose initialized to: true
Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param packagePrefix initialized to: jsp_servlet
Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param compileCommand initialized to: javac
Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param srcCompiler initialized to weblogic.jspc
Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param superclass initialized to null
Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param workingDir initialized to: /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war
Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param pageCheckSeconds initialized to: -1
Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: initialization complete
Mon Sep 25 11:40:12 BST 2000:<I> <WebAppServletContext-gmi> Generated java file: /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war/jsp_servlet/gmiService.java
Mon Sep 25 11:40:14 BST 2000:<E> <WebAppServletContext-gmi> Compilation of /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war/jsp_servlet/gmiService.java failed: Exception in thread "main" java.lang.NoClassDefFoundError: sun/tools/javac/Main
java.io.IOException: Compiler failed executable.exec([Ljava.lang.String;[javac, -classpath, /opt/Solaris_JRE_1.2.1_04/lib/rt.jar:/opt/Solaris_JRE_1.2.1_04/lib/i18n.jar:/opt/Solaris_JRE_1.2.1_04/classes:/var/wls/5.1/weblogic/lib/weblogic510sp4boot.jar:/var/wls/5.1/weblogic/classes/boot:/var/wls/5.1/weblogic/eval/cloudscape/lib/cloudscape.jar:/var/wls/5.1/weblogic/lib/wleorb.jar:/var/wls/5.1/weblogic/lib/wlepool.jar:/var/wls/5.1/weblogic/lib/weblogic510sp4.jar:/var/wls/5.1/weblogic/license:/var/wls/5.1/weblogic/classes:/var/wls/5.1/weblogic/lib/weblogicaux.jar:/opt/wls-servers/gmiServer/weblogic/gmiServer/serverclasses:/opt/wls-servers/gmiServer/weblogic/lotusxsl.jar:/opt/wls-servers/gmiServer/weblogic/xerces.jar:/opt/wls-servers/gmiServer/weblogic/logging.jar::/opt/wls-servers/gmiServer/weblogic/war/gmi/WEB-INF/classes:/opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war, -d, /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war, /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war/jsp_servlet/gmiService.java])
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at java.io.IOException.<init>(Compiled Code)
at weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(Compiled Code)
at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:200)
at weblogic.servlet.jsp.JspStub.compilePage(Compiled Code)
at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:173)
at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:187)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:118)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:142)
at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:744)
at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:692)
at weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContextManager.java:251)
at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:363)
at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:263)
at weblogic.kernel.ExecuteThread.run(Compiled Code)
The default Java compiler from sun lives in the tools.jar that comes with
the JDK. Just add that to your set of JARs which are deployed in production
and you should be fine. No need to install the full JDK - just make the
tools.jar available to WebLogic.
Regards
James
James Strachan
=============
email: [email protected]
web: http://www.metastuff.com
"Martin Webb" <[email protected]> wrote in message
news:[email protected]...
>
> How can WLS use JSP pages in a Web Application (either a .war file or a
war directory structure) without a java compiler?
>
> I suspect either the JSP specification is flawed (i.e. it doesn't take
account of servers using just a JRE), or BEA's implementation is broken.
>
> Production servers do not have a JDK installed. They only have a JRE.
Therfore a java compiler is not present on the machine that the Web
Application is deployed onto.
>
> On the development machine, when the server is requested to load the JSP
it creates a tmpwar directory within the Web Application directory
structure. This is then included in the resultant .war file thus:
>
> D:\war>jar -tf gmi.war
> META-INF/
> META-INF/MANIFEST.MF
> gmiService.jsp
> WEB-INF/
> WEB-INF/classes/
> WEB-INF/classes/com/
> WEB-INF/classes/com/bt/
> WEB-INF/classes/com/bt/gmi/
> WEB-INF/classes/com/bt/gmi/gmiService.class
> WEB-INF/getList.xsl
> WEB-INF/getListByConnection.xsl
> WEB-INF/getListByDistrict.xsl
> WEB-INF/getListByDistrictConnection.xsl
> WEB-INF/lib/
> WEB-INF/source/
> WEB-INF/source/build.bat
> WEB-INF/source/gmiService.java
> WEB-INF/web.xml
> WEB-INF/weblogic.xml
> tmpwar/
> tmpwar/jsp_servlet/
> tmpwar/jsp_servlet/_gmiservice.class
> tmpwar/jsp_servlet/_gmiservice.java
>
> When deployed on the production server with the web.xml file set to use
the following values (note XML stripped):
>
> weblogic.jsp.pageCheckSeconds
> -1
>
> weblogic.jsp.precompile
> false
>
> weblogic.jsp.compileCommand
> javac
>
> weblogic.jsp.verbose
> true
>
> weblogic.jsp.packagePrefix
> jsp_servlet
>
> weblogic.jsp.keepgenerated
> false
>
>
> And in the weblogic.properties file:
>
> weblogic.httpd.webApp.gmi=war/gmi
>
> I've also tried with the .war file, but that insists on creating another
tmpwar directory outside of the .war file.
>
>
> Then, although I have set pageCheckSeconds to -1 (don't check and don't
recompile) ter production server still attempts to recompile the JSP's:
>
>
> Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: init
> Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param
verbose initialized to: true
> Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param
packagePrefix initialized to: jsp_servlet
> Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param
compileCommand initialized to: javac
> Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param
srcCompiler initialized to weblogic.jspc
> Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param
superclass initialized to null
> Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param
workingDir initialized to:
/opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war
> Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param
pageCheckSeconds initialized to: -1
> Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp:
initialization complete
> Mon Sep 25 11:40:12 BST 2000:<I> <WebAppServletContext-gmi> Generated java
file:
/opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war/jsp_servlet/gmiService.
java
> Mon Sep 25 11:40:14 BST 2000:<E> <WebAppServletContext-gmi> Compilation of
/opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war/jsp_servlet/gmiService.
java failed: Exception in thread "main" java.lang.NoClassDefFoundError:
sun/tools/javac/Main
>
> java.io.IOException: Compiler failed
executable.exec([Ljava.lang.String;[javac, -classpath,
/opt/Solaris_JRE_1.2.1_04/lib/rt.jar:/opt/Solaris_JRE_1.2.1_04/lib/i18n.jar:
/opt/Solaris_JRE_1.2.1_04/classes:/var/wls/5.1/weblogic/lib/weblogic510sp4bo
ot.jar:/var/wls/5.1/weblogic/classes/boot:/var/wls/5.1/weblogic/eval/cloudsc
ape/lib/cloudscape.jar:/var/wls/5.1/weblogic/lib/wleorb.jar:/var/wls/5.1/web
logic/lib/wlepool.jar:/var/wls/5.1/weblogic/lib/weblogic510sp4.jar:/var/wls/
5.1/weblogic/license:/var/wls/5.1/weblogic/classes:/var/wls/5.1/weblogic/lib
/weblogicaux.jar:/opt/wls-servers/gmiServer/weblogic/gmiServer/serverclasses
:/opt/wls-servers/gmiServer/weblogic/lotusxsl.jar:/opt/wls-servers/gmiServer
/weblogic/xerces.jar:/opt/wls-servers/gmiServer/weblogic/logging.jar::/opt/w
ls-servers/gmiServer/weblogic/war/gmi/WEB-INF/classes:/opt/wls-servers/gmiSe
rver/weblogic/war/gmi/_tmp_war, -d,
/opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war,
/opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war/jsp_servlet/gmiService.
java])
> at java.lang.Throwable.fillInStackTrace(Native Method)
> at java.lang.Throwable.fillInStackTrace(Compiled Code)
> at java.lang.Throwable.<init>(Compiled Code)
> at java.lang.Exception.<init>(Compiled Code)
> at java.io.IOException.<init>(Compiled Code)
> at
weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(Compiled Code)
> at
weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:200)
> at weblogic.servlet.jsp.JspStub.compilePage(Compiled Code)
> at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:173)
> at
weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:18
7)
> at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:118)
> at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:142)
> at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:744)
> at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:692)
> at
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
Manager.java:251)
> at
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:363)
> at
weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:263)
> at weblogic.kernel.ExecuteThread.run(Compiled Code)
>
>
>
-
JSP Development in Oracle BPM Studio 10.3.1.0
Does anyone have any instructions on how to install Eclipse WTP in Oracle BPM Studio 10.3.1.0? I'd like to figure out if its easier to develop forms using JSP files instead of using the forms builder.
Is anyone else desiging forms using JSP files? How do you go about working with your jsp files?
Thanks,
GrahamI use JSPs in my projects since it gives me alot more freedom.
For example, I would like to use JSF tags, or use Javascript libraries to make AJAX calls, and always I want the JSP to have the look and feel of the brand of the company.
There are challenges in using the JSPs however. The documentation for the JSP Tag Library doesn't have good examples, so you might have to figure stuff out on your own.
I don't use WTP, although I've been meaning to install it. I've been using a text editor (notepad++) for the development of my JSPs. -
Error message when using JSP pages
Version 6.0
The error I'm getting is as follows:
trying to POST headerFragment.html, internal-redirect reports: no way to service request for headerFragment.html
All I'm trying to do is a jsp:forward on JSP page 1 to JSP page 2 which, at the top of it, has a jsp:include (the headerFragment.html page mentioned in the error).
Any thoughts on how to remedy this problem would be appreciated.
Thanks,
MarkBy default, the server will not serve static files in response to POST requests, even when using jsp:include.
This bug was addressed in 6.0 SP2, but instances created in an earlier release will continue to exhibit the problem even after upgrading. To fix the problem, locate the following line in the obj.conf configuration file:
Service method=(GET|HEAD) type=*~magnus-internal/* fn=send-fileChange the above line so it reads as follows:
Service method=(GET|HEAD|POST) type=*~magnus-internal/* fn=send-file -
if this is not the right forum, please some one show where.
I created a EJB pack and deployed at the server. Made a java program client to test it and all is Ok. But when I try to use a jsp page to use the service, I get a java.lang.ClassCastException message.
I can get the context , the reference , but when I try to
get a reference to the bean's Home interface the error happens.
This is the line with the problem:
ServiceHome1 home =(ServiceHome1) PortableRemoteObject.narrow (ref, ServiceHome1.class);
the same line runs ok at a java program at the same machine.
I use Tomcat/Jboss and the Jboss libs are in %CATALINA_HOME%/commom/libDo you import the ServiceHome1 in your jsp page?
-
Hi...I found following error during my jsp page compilation...I am using Tomcat Server 4.1.18 as a server.
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: -1 in the jsp file: null
Generated servlet error:
[javac] Since fork is true, ignoring compiler setting.
[javac] Compiling 1 source file
[javac] Since fork is true, ignoring compiler setting.
[javac] C:\Tomcat-4.1.24\work\Standalone\localhost\webdav\new\ValidateUser_jsp.java:43: cannot resolve symbol
[javac] symbol : class LoginManager
[javac] location: class org.apache.jsp.ValidateUser_jsp
[javac] LoginManager loginManager = null;
[javac] ^
[javac] C:\Tomcat-4.1.24\work\Standalone\localhost\webdav\new\ValidateUser_jsp.java:45: cannot resolve symbol
[javac] symbol : class LoginManager
[javac] location: class org.apache.jsp.ValidateUser_jsp
[javac] loginManager = (LoginManager) pageContext.getAttribute("loginManager", PageContext.APPLICATION_SCOPE);
[javac] ^
[javac] C:\Tomcat-4.1.24\work\Standalone\localhost\webdav\new\ValidateUser_jsp.java:48: cannot resolve symbol
[javac] symbol : class LoginManager
[javac] location: class org.apache.jsp.ValidateUser_jsp
[javac] loginManager = (LoginManager) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "LoginManager");
[javac] ^
[javac] C:\Tomcat-4.1.24\work\Standalone\localhost\webdav\new\ValidateUser_jsp.java:58: cannot resolve symbol
[javac] symbol : class UserCredentials
[javac] location: class org.apache.jsp.ValidateUser_jsp
[javac] UserCredentials credentials = null;
[javac] ^
[javac] C:\Tomcat-4.1.24\work\Standalone\localhost\webdav\new\ValidateUser_jsp.java:60: cannot resolve symbol
[javac] symbol : class UserCredentials
[javac] location: class org.apache.jsp.ValidateUser_jsp
[javac] credentials = (UserCredentials) pageContext.getAttribute("credentials", PageContext.SESSION_SCOPE);
[javac] ^
[javac] C:\Tomcat-4.1.24\work\Standalone\localhost\webdav\new\ValidateUser_jsp.java:63: cannot resolve symbol
[javac] symbol : class UserCredentials
[javac] location: class org.apache.jsp.ValidateUser_jsp
[javac] credentials = (UserCredentials) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "UserCredentials");
[javac] ^
[javac] 6 errors
at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:130)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:293)
at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:353)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:473)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:190)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:534)This is my jsp file..i have also kept all my class files in respective folder..still i have this error...i have kept my class files into /WEB-INF/
-classes
com
chintan
webapps folder
<%@ page language="java" %>
<%@ page import="com.chintan.webapps.LoginManager" %>
<%@ page import="com.chintan.webapps.UserCredentials" %>
<jsp:useBean id="loginManager" class="com.chintan.webapps.LoginManager" scope="application" />
<jsp:useBean id="credentials" class="com.chintan.webapps.UserCredentials" scope="session" />
<jsp:setProperty name="credentials" property="*" />
<html>
<head>
<title>
User Validation JSP Page
</title>
</head>
<body>
<%! String nextPage; %>
<%
if(loginManager.login(credentials)){
nextPage = "Mainmenu.jsp";
}else if(loginManager.isLoggedIn(credentials)){
nextPage = "Duplicate.jsp";
}else{
nextPage = "loginFailure.jsp";
out.println(nextPage);
%>
<jsp:forward page="<%= nextPage %>" />
</body>
</html> -
Error in Jsp page - undefined type
<html>
<%@ page contentType="text/html; charset=utf-8"
import="java.io.InputStream,
java.io.IOException,
javax.xml.parsers.SAXParser,
java.lang.reflect.*,
java.io.Writer.*, java.util.*,
javax.xml.parsers.SAXParserFactory"
session="false" %>
<%
* Copyright 2002,2004,2005 The Apache Software Foundation.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
%>
<%!
* Happiness tests for axis. These look at the classpath and warn if things
* are missing. Normally addng this much code in a JSP page is mad
* but here we want to validate JSP compilation too, and have a drop-in
* page for easy re-use
* @author Steve 'configuration problems' Loughran
* @author dims
* @author Brian Ewins
* test for a class existing
* @param classname
* @return class iff present
Class classExists(String classname) {
try {
return Class.forName(classname);
} catch (ClassNotFoundException e) {
return null;
* test for resource on the classpath
* @param resource
* @return true iff present
boolean resourceExists(String resource) {
boolean found;
InputStream instream=this.getClass().getResourceAsStream(resource);
found=instream!=null;
if(instream!=null) {
try {
instream.close();
} catch (IOException e) {
return found;
* probe for a class, print an error message is missing
* @param out stream to print stuff
* @param category text like "warning" or "error"
* @param classname class to look for
* @param jarFile where this class comes from
* @param errorText extra error text
* @param homePage where to d/l the library
* @return the number of missing classes
* @throws IOException
int probeClass(JspWriter out,
String category,
String classname,
String jarFile,
String description,
String errorText,
String homePage) throws IOException {
try {
Class clazz = classExists(classname);
if(clazz == null) {
String url="";
if(homePage!=null) {
url=getMessage("seeHomepage",homePage,homePage);
out.write(getMessage("couldNotFound",category,classname,jarFile,errorText,url));
return 1;
} else {
String location = getLocation(out, clazz);
if(location == null) {
out.write("<li>"+getMessage("foundClass00",description,classname)+"</li><br>");
else {
out.write("<li>"+getMessage("foundClass01",description,classname,location)+"</li><br>");
return 0;
} catch(NoClassDefFoundError ncdfe) {
String url="";
if(homePage!=null) {
url=getMessage("seeHomepage",homePage,homePage);
out.write(getMessage("couldNotFoundDep",category, classname, errorText, url));
out.write(getMessage("theRootCause",ncdfe.getMessage(), classname));
return 1;
* get the location of a class
* @param out
* @param clazz
* @return the jar file or path where a class was found
String getLocation(JspWriter out,
Class clazz) {
try {
java.net.URL url = clazz.getProtectionDomain().getCodeSource().getLocation();
String location = url.toString();
if(location.startsWith("jar")) {
url = ((java.net.JarURLConnection)url.openConnection()).getJarFileURL();
location = url.toString();
if(location.startsWith("file")) {
java.io.File file = new java.io.File(url.getFile());
return file.getAbsolutePath();
} else {
return url.toString();
} catch (Throwable t){
return getMessage("classFoundError");
* a class we need if a class is missing
* @param out stream to print stuff
* @param classname class to look for
* @param jarFile where this class comes from
* @param errorText extra error text
* @param homePage where to d/l the library
* @throws IOException when needed
* @return the number of missing libraries (0 or 1)
int needClass(JspWriter out,
String classname,
String jarFile,
String description,
String errorText,
String homePage) throws IOException {
return probeClass(out,
"<b>"+getMessage("error")+"</b>",
classname,
jarFile,
description,
errorText,
homePage);
* print warning message if a class is missing
* @param out stream to print stuff
* @param classname class to look for
* @param jarFile where this class comes from
* @param errorText extra error text
* @param homePage where to d/l the library
* @throws IOException when needed
* @return the number of missing libraries (0 or 1)
int wantClass(JspWriter out,
String classname,
String jarFile,
String description,
String errorText,
String homePage) throws IOException {
return probeClass(out,
"<b>"+getMessage("warning")+"</b>",
classname,
jarFile,
description,
errorText,
homePage);
* get servlet version string
public String getServletVersion() {
ServletContext context=getServletConfig().getServletContext();
int major = context.getMajorVersion();
int minor = context.getMinorVersion();
return Integer.toString(major) + '.' + Integer.toString(minor);
* what parser are we using.
* @return the classname of the parser
private String getParserName() {
SAXParser saxParser = getSAXParser();
if (saxParser == null) {
return getMessage("couldNotCreateParser");
// check to what is in the classname
String saxParserName = saxParser.getClass().getName();
return saxParserName;
* Create a JAXP SAXParser
* @return parser or null for trouble
private SAXParser getSAXParser() {
SAXParserFactory saxParserFactory = SAXParserFactory.newInstance();
if (saxParserFactory == null) {
return null;
SAXParser saxParser = null;
try {
saxParser = saxParserFactory.newSAXParser();
} catch (Exception e) {
return saxParser;
* get the location of the parser
* @return path or null for trouble in tracking it down
private String getParserLocation(JspWriter out) {
SAXParser saxParser = getSAXParser();
if (saxParser == null) {
return null;
String location = getLocation(out,saxParser.getClass());
return location;
* Check if class implements specified interface.
* @param Class clazz
* @param String interface name
* @return boolean
private boolean implementsInterface(Class clazz, String interfaceName) {
if (clazz == null) {
return false;
Class[] interfaces = clazz.getInterfaces();
if (interfaces.length != 0) {
for (int i = 0; i < interfaces.length; i++) {
if (interfaces.getName().equals(interfaceName)) {
return true;
return false;
%>
<%@ include file="i18nLib.jsp" %>
<%
// initialize a private HttpServletRequest
setRequest(request);
// set a resouce base
setResouceBase("i18n");
%>
<head>
<title><%= getMessage("pageTitle") %></title>
</head>
<body bgcolor='#ffffff'>
<%
out.print("<h1>"+ getMessage("pageTitle") +"</h1>");
out.print("<h2>"+ getMessage("pageRole") +"</h2><p/>");
%>
<%= getLocaleChoice() %>
<%
out.print("<h3>"+ getMessage("neededComponents") +"</h3>");
%>
<UL>
<%
int needed=0,wanted=0;
* the essentials, without these Axis is not going to work
// need to check if the available version of SAAJ API meets requirements
String className = "javax.xml.soap.SOAPPart";
String interfaceName = "org.w3c.dom.Document";
Class clazz = classExists(className);
if (clazz == null || implementsInterface(clazz, interfaceName)) {
needed = needClass(out, "javax.xml.soap.SOAPMessage",
"saaj.jar",
"SAAJ API",
getMessage("criticalErrorMessage"),
"http://ws.apache.org/axis/");
} else {
String location = getLocation(out, clazz);
out.print(getMessage("invalidSAAJ",location));
out.print(getMessage("criticalErrorMessage"));
out.print(getMessage("seeHomepage","http://ws.apache.org/axis/java/install.html",getMessage("axisInstallation")));
out.print("<br>");
needed+=needClass(out, "javax.xml.rpc.Service",
"jaxrpc.jar",
"JAX-RPC API",
getMessage("criticalErrorMessage"),
"http://ws.apache.org/axis/");
needed+=needClass(out, "org.apache.axis.transport.http.AxisServlet",
"axis.jar",
"Apache-Axis",
getMessage("criticalErrorMessage"),
"http://ws.apache.org/axis/");
needed+=needClass(out, "org.apache.commons.discovery.Resource",
"commons-discovery.jar",
"Jakarta-Commons Discovery",
getMessage("criticalErrorMessage"),
"http://jakarta.apache.org/commons/discovery/");
needed+=needClass(out, "org.apache.commons.logging.Log",
"commons-logging.jar",
"Jakarta-Commons Logging",
getMessage("criticalErrorMessage"),
"http://jakarta.apache.org/commons/logging/");
needed+=needClass(out, "org.apache.log4j.Layout",
"log4j-1.2.8.jar",
"Log4j",
getMessage("uncertainErrorMessage"),
"http://jakarta.apache.org/log4j");
//should we search for a javax.wsdl file here, to hint that it needs
//to go into an approved directory? because we dont seem to need to do that.
needed+=needClass(out, "com.ibm.wsdl.factory.WSDLFactoryImpl",
"wsdl4j.jar",
"IBM's WSDL4Java",
getMessage("criticalErrorMessage"),
null);
needed+=needClass(out, "javax.xml.parsers.SAXParserFactory",
"xerces.jar",
"JAXP implementation",
getMessage("criticalErrorMessage"),
"http://xml.apache.org/xerces-j/");
needed+=needClass(out,"javax.activation.DataHandler",
"activation.jar",
"Activation API",
getMessage("criticalErrorMessage"),
"http://java.sun.com/products/javabeans/glasgow/jaf.html");
%>
</UL>
<%
out.print("<h3>"+ getMessage("optionalComponents") +"</h3>");
%>
<UL>
<%
* now the stuff we can live without
wanted+=wantClass(out,"javax.mail.internet.MimeMessage",
"mail.jar",
"Mail API",
getMessage("attachmentsError"),
"http://java.sun.com/products/javamail/");
wanted+=wantClass(out,"org.apache.xml.security.Init",
"xmlsec.jar",
"XML Security API",
getMessage("xmlSecurityError"),
"http://xml.apache.org/security/");
wanted += wantClass(out, "javax.net.ssl.SSLSocketFactory",
"jsse.jar or java1.4+ runtime",
"Java Secure Socket Extension",
getMessage("httpsError"),
"http://java.sun.com/products/jsse/");
* resources on the classpath path
/* add more libraries here */
%>
</UL>
<%
out.write("<h3>");
//is everythng we need here
if(needed==0) {
//yes, be happy
out.write(getMessage("happyResult00"));
} else {
//no, be very unhappy
response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
out.write(getMessage("unhappyResult00",Integer.toString(needed)));
//now look at wanted stuff
if(wanted>0) {
out.write(getMessage("unhappyResult01",Integer.toString(wanted)));
} else {
out.write(getMessage("happyResult01"));
out.write("</h3>");
%>
<UL>
<%
//hint if anything is missing
if(needed>0 || wanted>0 ) {
out.write(getMessage("hintString"));
out.write(getMessage("noteString"));
%>
</UL>
<h2><%= getMessage("apsExamining") %></h2>
<UL>
<%
String servletVersion=getServletVersion();
String xmlParser=getParserName();
String xmlParserLocation = getParserLocation(out);
%>
<table border="1" cellpadding="10">
<tr><td>Servlet version</td><td><%= servletVersion %></td></tr>
<tr><td>XML Parser</td><td><%= xmlParser %></td></tr>
<tr><td>XML ParserLocation</td><td><%= xmlParserLocation %></td></tr>
</table>
</UL>
<% if(xmlParser.indexOf("crimson")>=0) { %>
<p>
<%= getMessage("recommendedParser") %>
</p>
<% } %>
<h2><%= getMessage("sysExamining") %></h2>
<UL>
<%
* Dump the system properties
java.util.Enumeration e=null;
try {
e= System.getProperties().propertyNames();
} catch (SecurityException se) {
if(e!=null) {
out.write("<pre>");
for (;e.hasMoreElements();) {
String key = (String) e.nextElement();
out.write(key + "=" + System.getProperty(key)+"\n");
out.write("</pre><p>");
} else {
out.write(getMessage("sysPropError"));
%>
</UL>
<hr>
<%= getMessage("apsPlatform") %>:
<%= getServletConfig().getServletContext().getServerInfo() %>
</body>
</html>
in the above jsp code i am getting errors such as "1.getMessage(String) is undefined for the type"
"2. setRequest(HttpServletRequest) is undefined for the type"
"3. getLocaleChoice() is undefined for the type"
whats wrong with the code??I would also like to mention that you posted the original message... then barely an hour later made a comment that it was still unanswered.
In my time zone, you posted at 3:32 AM and then commented at 4:35 AM. I don't know about many people here, but I am fast asleep during that time.
So please understand we are here to help you, not be your servants to fix your problems. -
Hi ,
We have Oc4j standalone container at work running on Sun Solaris , but at times after a deployment we get a few JSP errors as follows :
oracle.jsp.provider.JspCompileException: Errors compiling:/opt/oc4j/j2ee/home/application-deployments/a2g/a2g/persistence/_pages/_wizards/_reconwizard/_recon__pg6.java</H3><pre>Note: sun.tools.javac.Main has been deprecated.
/opt/oc4j/j2ee/home/application-deployments/a2g/a2g/persistence/_pages/_wizards/_reconwizard/_recon__pg6.java:515: Variable str may not have been initialized.
What we usually do is delete the existing folders from the container and let it re-deploy again , after which it does work fine . But recently even deletin the folders doesnt get rid of the above mentioned error .
What could the problem . Could it be the configuration for the JSP . We have parameters setup currently .
So please let me know if anyone knows a workaound this kinda problem.
Thanx.Mark,
Can you upload the jsp and the applet ? Also please contact BEA Customer
Support and request that an evaluation case be open for this issue.
Thanks
Raj Alagumalai
WebLogic Workshop Support
"Mark" <[email protected]> wrote in message
news:[email protected]..
>
I currently have an applet using the swing plugin so it's embedded between<object>
tags. When loading the JSP page in the editor the error "Attachment to arunning
virtual machine failed" appears with an OK button. When I click the OKbutton
the entire workshop closes down. Beta Version 8.1 displayed the sameerror but
didn't crash. The page defaults to open in "Design View" which is wherethe error
occurs. Any suggestions? -
Applet plugin error on JSP page
I currently have an applet using the swing plugin so it's embedded between <object>
tags. When loading the JSP page in the editor the error "Attachment to a running
virtual machine failed" appears with an OK button. When I click the OK button
the entire workshop closes down. Beta Version 8.1 displayed the same error but
didn't crash. The page defaults to open in "Design View" which is where the error
occurs. Any suggestions?Mark,
Can you upload the jsp and the applet ? Also please contact BEA Customer
Support and request that an evaluation case be open for this issue.
Thanks
Raj Alagumalai
WebLogic Workshop Support
"Mark" <[email protected]> wrote in message
news:[email protected]..
>
I currently have an applet using the swing plugin so it's embedded between<object>
tags. When loading the JSP page in the editor the error "Attachment to arunning
virtual machine failed" appears with an OK button. When I click the OKbutton
the entire workshop closes down. Beta Version 8.1 displayed the sameerror but
didn't crash. The page defaults to open in "Design View" which is wherethe error
occurs. Any suggestions? -
Cancel- and main-button dynamically generated using JSP-pages
Maybe a HOWTO for the Jdev-team.
HOWTO get rid of the delete and main-button in your jsp-pages?
Very simple!
Go to the container_bottom.jsp page in your webapp/jsp-folder and delete the code for the cancel-button => now the user can render his own buttons by using a header.html, contents.jsp and footer.html for the jsp-pages.We tried the same thing you are trying to do and got
very far, but it quickly became very complicated. We
realized it was just simpler to use the screenflow as
intended.
By this I mean, if your parent form has 4 buttons
(A,B, C and SUBMIT), you should design different
paths in your screen flow for each button. so when a
user clicks button A, the parent form submits back to
Fuego engine, engine looks at screenflow and send
them down the button A path to the Form A. When they
hit submit on Form A, screenflow goes back to parent
form.Hi, bcespinola:
Our team finally decide use jsp with YUI (Yahoo User Interface Library) to achieve this design. Wish this could help you. All popup window would be replaced by Dialog of YUI. Thanks for your help.
Vince -
1.i create a database
2.then i create a jsp page for welcome
3.then another jsp page for view result
4.then i write code for java
here is my 1st jsp page
<html>
<head>
<title>login</title>
</head>
<body bgcolor=pink>
<form action="project.jsp" method=post>
Project id
 
; <input type="text" name="proj_id"><br><br>
Project Name <input
type="text" name="proj_name"><br><br>
Client Name
<input
type="text" name="client_name"><br><br>
Project Start Date <input type="text" name="strt_date"><br><br>
Est Project End Date <input type="text" name="est_date"><br><br>
Project Manager <input type="text"
name="proj_mgr"><br><br>
Est Effort
 
; <input type="text" name="est_effort"><br><br>
<input type="submit" name="add" value="Add" onClick=add() >
<input type="button" name="modify" value="Modify">
<input type="button" name="delete" value="Delete">
<input type="button" name="assign" value="Assign">
</form>
</body>
</html>
here my java page
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.*;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.io.*;
class base
PreparedStatement pstmt=null;
Connection con = null;
Statement stmt = null;
ResultSet rset = null;
int est_effort;
String proj_id,proj_name,client_name,strt_date,est_date,proj_mgr;
/* int est_effort;
String Project_id,Project_name,client_name,start_date,estimated_date,Project_mgr; */
void add( )
try
String driverName = "com.mysql.jdbc.Driver";
Class.forName(driverName);
String serverName = "192.168.10.5";
String mydatabase = "Trainees";
String url = "jdbc:mysql://" + serverName + "/" + mydatabase; // a JDBC url
String username = "josep";
String password = "josep";
con = DriverManager.getConnection(url, username, password);
System.out.println("Connected");
catch(Exception e)
System.err.println("Exception: " + e.getMessage());
try{
System.out.println("Before Update1");
pstmt=con.prepareStatement("insert into project(proj_id,proj_name,client_name,strt_date,est_date,proj_mgr,est_effort) values ('
"+Project_id+" ',' "+Project_name+"',' "+client_name+" ',' "+start_date+" ',' "+estimated_date+" ',' "+Project_mgr+" ',' "+est_effort+"')");
pstmt=con.prepareStatement("insert into project(proj_id,proj_name,client_name,strt_date,est_date,proj_mgr,est_effort) values
System.out.println("Before Update2");
pstmt.setString(1,proj_id);
pstmt.setString (2,proj_name);
pstmt.setString (3,client_name);
pstmt.setString (4,strt_date);
pstmt.setString (5,est_date);
pstmt.setString(6,proj_mgr);
pstmt.setInt(7,est_effort);
pstmt.executeUpdate();
System.out.println("" +pstmt );
catch(Exception e)
System.err.println("Exception: " + e.getMessage());
finally
try
if(con != null)
con.close();
catch(SQLException e)
void modify()
void delete()
void assign()
public class xx extends base
public static void main(String args[]) throws IOException
base a= new base();
a.add();
here my second jsp page
<%@ page language="java"%>
<%@ page import="java.io.*" %>
<%@ page import="java.sql.*"%>
<%@page import="ss.xx"%>
//<%@ page import="ss.xx.*"%>
<html>
<head><title>Welcome</title></head>
<body bgcolor = "LightGrey">
Welcome...
<br>
<%
xx obj=new xx();
obj.add( );
%>
<%
String Project_id = request.getParameter("proj_id");
String Project_name=request.getParameter("proj_name");
String client_name=request.getParameter("client_name");
String start_date=request.getParameter("strt_date");
String estimated_date=request.getParameter("est_date");
String Project_mgr=request.getParameter("proj_mgr");
int est_effort=Integer.parseInt(request.getParameter("est_effort"));
%>
<p><font size="6">Project id : <%= Project_id%></font></p>
<p><font size="6">Project Name : <%= Project_name%></font></p>
<p><font size="6">Client Name : <%= client_name%></font></p>
<p><font size="6">Project Start Date : <%= start_date%></font></p>
<p><font size="6">Est Project End Date : <%= estimated_date%></font></p>
<p><font size="6">Project Manager : <%= Project_mgr%></font></p>
<p><font size="6">Est Effort : <%= est_effort%></font></p>
</body>
</html>
here that second jsp page error
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 12 in the jsp file: /project.jsp
Generated servlet error:
The type base cannot be resolved. It is indirectly referenced from required .class files
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:409)
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:563)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)Uh, those aren't runtime errors, but just compilation errors. Googling on the error message can give a lot of results.
Learn how to write Java properly. It would also help a lot if you put all the Java logic in Java classes instead of JSPs. -
hi everybody, I get this error when i try to display a jsp page:
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Exception in JSP: /visualizzavini.jsp:6
3: <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
4: <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
5: <%@ taglib uri="http://myfaces.apache.org/sandbox" prefix="s" %>
6: <f:loadBundle basename="it.tecnologieweb.vinispallacci.web.messages" var="msgs"/>
7: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
8: <html xmlns="http://www.w3.org/1999/xhtml">
9: <head>
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:506)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
javax.servlet.ServletException: No faces context?!
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:843)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:776)
org.apache.jsp.visualizzavini_jsp._jspService(visualizzavini_jsp.java:94)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
javax.servlet.jsp.JspException: No faces context?!
org.apache.myfaces.taglib.core.LoadBundleTag.doStartTag(LoadBundleTag.java:77)
org.apache.jsp.visualizzavini_jsp._jspx_meth_f_loadBundle_0(visualizzavini_jsp.java:111)
org.apache.jsp.visualizzavini_jsp._jspService(visualizzavini_jsp.java:72)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)i'm new of jsf i try to find out what's wrong but i can't resolve by myself, but anyway this code works correctly on another pc ( not mine that's the matter!!)
can anyone help me?thank u allThis exception roughly means that the f:loadBundle component cannot find the FacesContext.
Look in your web.xml if the FacesServlet is defined correctly and what its url-pattern is. If it is defined correctly and its url-pattern is for example *.jsf, then you'll have to invoke the visualizzavini.jsp as visualizzavini.jsf in the browser. This way the FacesServlet will be invoked and precreate the FacesContext so that the JSF components can access the FacesContext. -
Cookie handling with using JSP pages
How can I use cookies in JSP pages.. Can you send me sample codes or explanations ...
Ergin DEMIREL
Thanks in advance..http://www.google.com/
Maybe you are looking for
-
Sales tax in PO but not included at the time of GR
Hi, i have creted the PO including sales tax amount, is there any way when i post the GR against this PO the sales tax amount not calculated.
-
how do i transfer photos between my macbook and i phone 5s wireless, how do i transfer photos between my macbook and i phone 5s wireless
-
Hi, I have sent a pdf attachment through Email. I need some clarification in the following cases. How to capture the following scenarious. 1) Email ID of employee is maintained incorrectly in user master 2) for whatever reason, the mail cannot be del
-
Is there a way to stop my jpegs from changing size? I have them at 8.5 by 11 (300 dpi) before converting and now they are 35.42" by 45.83 (100 dpi) and these are not the proper size to send to commercial printer? Is there a way to keep this from happ
-
How to use same LOV at two form ?
Hello experts, how can i use same lov at 2 different forms? requirement: i fetch tw0 column in lov. example empno , department_no when i check list at empno text item and select any empno then department no automatically selected in another textbox i