A very strange error in a JSP FILE
Hi...
I have written the following code..
<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<%@page language="java" import="java.lang.*" %>
<html>
<head>
<title>Second Page</title>
</head>
<body>
<%!
class myclass
public Integer myfunc(String Accept_String,Integer no)
int start=0;
int end=0;
String Arr=new String("dummy");
int main_index=0;
int sub_index=0;
Integer[][] i=new Integer[20][];
for(int k=0;k<19;k++)
i[k]=new Integer[2];
int toggle=1;
do
if(toggle==1)
{end=Accept_String.indexOf(" ",start);
toggle=0;}
else
{end=Accept_String.indexOf(",",start);
toggle=1;}
if(end!=-1)
Arr=Accept_String.substring(start,end);
else
Arr=Accept_String.substring(start,Accept_String.length());
start=end+1;
i[main_index][sub_index]=Integer.parseInt(Arr);
sub_index=sub_index+1;
if(sub_index==2)
sub_index=0;
main_index=main_index+1;
}while(start!=0);
return i[0][0];
%>
<FORM NAME="FORM2" method="post" >
<jsp:useBean id="id1" class="pack.dummy" />
<% id1.setString(request.getParameter("Hidden_Text"));
String r=new String("");
Integer n=new Integer(0);
Integer sep= new Integer(0);
//for(int j=0;j<9;j++)
//sep[j]=new Integer[2];
r =id1.getTemp();
out.print(r);
n=id1.getNumber();
out.println(n);
myclass m=new myclass();
sep=m.myfunc(r,n);
out.println(sep);
%>
</FORM>
</body>
</html>
And it gives me the following report
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: /second.jsp:81
78: out.println(n);
79:
80: myclass m=new myclass();
81: sep=m.myfunc(r,n);
82: out.println(sep);
83: %>
84:
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:504)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
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
java.lang.NumberFormatException: For input string: ""
java.lang.NumberFormatException.forInputString(Unknown Source)
java.lang.Integer.parseInt(Unknown Source)
java.lang.Integer.parseInt(Unknown Source)
org.apache.jsp.second_jsp$myclass.myfunc(second_jsp.java:49)
org.apache.jsp.second_jsp._jspService(second_jsp.java:134)
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:332)
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)
Actually there is a problem somewhere in this file itself..
Can anybody help me out?
Wow, this is absolutely incredible... you try to parse an empty String to an int and it throws an exception... I'd never have thought.
Similar Messages
-
Very strange error: unable to activate any messgae mapping in IR
very strange error,
i m unable to activating any message mapping in IR,
while activating the error thrown was:
/usr/sap/XID/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Mapdddd0cb0100311dca6090012799eddc6/source/com/sap/xi/tf/_MM_sdptestFileToFile_.java (No such file or directory (errno:2))
My observation:
On looking at the error, i found that the folder Mapdddd0cb0100311dca6090012799eddc6 is not created at the proper place.....
Which i assume is created dynamically created on activating a message mapping,
Now, i saw that the directory in which these Map* folders were created, already contained 32765 folders....... since this machine is UNIX, the max no. of directories that can be inside a directory cannot be more than 32768(not confirm).....
hence the folder Map* cant be created at the proper place...and hence message mapping cant be activated.........
ever encountered this problem....................
pls helpsolved by self,
solution: delete temporary folders created during any activation of message-mapping in IR, in the classpath_resolver folder of XID HOME directory......
solution is specific to file system/OS.... -
Very strange error in text properties - AI CS6
Hello Everyone,
This morning I found very very STRANGE error in Adobe CS6 about text properties. Here you go.
In the picture one text 'ei and mosterd' was bold.
But after copy to new string the bold characters are changed to 'ig and mosterdz'.
This is very strange error I have seen ever.
Do you guys have any reason why CS6 act like this?
also do you have any option to fix this issue?
For your information:
I just done copy past. Nothing else.
All the properties are same for both.
No difference except the text string size
I tried the same file in different machines for check. But I still see the same error in all the machines.
System properties:
Mac os x: 10.8.5
Processor 2,8 Ghz Intel Core i5
Memory: 8 GB
Software: Adobe CS6
Regards,
FroQWow, this is absolutely incredible... you try to parse an empty String to an int and it throws an exception... I'd never have thought.
-
Very strange error : IDOC to jdbc scenario
Hi
I am getting a very strange error when I see the log for the idoc to jdbc scenario that I am building.
The mapping test shows the header record and line item record properly in the mapping result.
insert, access nodes, fields with access nodes are all formed correctly.
However the communication channel log shows below error.
Could not execute statement for table/stored proc. "tblTestItem" (structure "Item") due to com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near ')'.
JDBC Message processing failed, due to Error processing request in sax parser: Error when executing statement for table/stored proc. 'tblTestItem' (structure 'Item'): com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near ')'.
The message status was set to WAIT.
The query that I see in the log is :INSERT INTO tblTestItem () VALUES ()
However mapping tool shows that all nodes are correctly formed.
Please assist.Hi
I am still getting this issue even after the below steps so kind of stuck - actually very much stuck.
1. Restart of the dev environment
2. Tried with a new extension of the idoc
In the communication channel log for the JDBC receiver channel I still see
INSERT INTO tblItem () VALUES ()
The payload that I see in the message content tab is as follows
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:MT_XXX_XXXX xmlns:ns0="http://capita.com/pi/XXXX">
- <Statement>
- <dbTableName action="INSERT">
<table>tblItem</table>
</dbTableName>
- <access>
<InvoiceNo>0000000009293467</InvoiceNo>
</access>
</Statement>
</ns0:MT_XXX_XXXX>
How do I debug the jdbc adapter to see how it converts the above xml output from the mapping step (note that this output is from an actual run and not test tool) to a sql query.
Very strange that the column names are present in the target payload but it is not reflecting in the query.
I have other tables being populated with the same jdbc receiver communication channel which makes this more and more confusing.
PLEASE ADVICE. -
Internal Server Error while running JSP file (Oracle AS - HP Unix)
Hello Friends,
I have created a JSP file in which I am trying to connect the database using oracle.jdbc.pool directory. But it shows an error message as:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
the path for pool package is:
/appltest/apps/prodora/iAS/oem_webstage/oracle/jdbc/pool
the location of JSP file is:
/appltest/apps/prodcomn/portal/TEST_test/test
What I think is I have to play with the CLASSPATh entries, but dont know how. Please help me in solving this issue...
For your reference the JSP code is:
<%@ page import="java.sql.*, javax.sql.*, oracle.jdbc.pool.*" %>
<jsp:useBean id="ods" class="oracle.jdbc.pool.OracleConnectionCacheImpl" scope="session" />
<%
try
ods.setURL("jdbc:oracle:thin:@test:1546:test");
ods.setUser("kpm_hr");
ods.setPassword("kpm_hr");
Connection conn = ods.getConnection();
Statement stmt = conn.createStatement();
Resultset rset = stmt.executeQuery("select first_name,last_name from kpm_hr.kpm_hr_emp_mst where empcode='P0580'");
rset.next();
out.println(rset.getString(1)+" "+rset.getString(2);
catch(SQLException e)
out.println(e);
Thanks in adavnce,
Ankur
Regards,
Ankur BhatiaJust to verify, which relevant log files have you found?
catch(SQLException e) {
out.println(e);
} Have you search the console log file?
A quick observation reveals that your jsp is just a standalone java program executed inside jsp. Suppose you just run it as a standalone program. Any error then?
Another way going forward is to install oc4j standalone of the same version. It is very easy to install: just download the oc4j-extended.zip and unzip it and run "java -jar oc4j.jar". Put you jsp inside j2ee/home/default-web-app and run. You should see relevant log messages in j2ee/home/log/server.log and j2ee/home/application-deployments/yourApp/application.log.
You should have Jdeveloper of some appropriate version installed. If you have not, install one. It might be not a little bit high learning curve at first, but the rewards are quick and amazing, especially since jdev 10.1.3. (I am speaking from my experience.) Try it with Jdeveloper. -
Object Expected error in Struts JSP file
Hi,
I have a very simple JSP file as shown below.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<html>
<head>
<title>pqGlobalStoreProfile.jsp</title>
</head>
<body onLoad="getSessionData();disableFieldsLocale();">
<html:form action="/pqGlobalStoreProfile.do">
<table cellpadding=5 cellspacing=0>
<tr><td colspan=2><h3><b>Pq Global Store/Modify Profile</b></h3></td></tr>
<tr><td>Profile Key *</td><td><html:text property="profileKey"/></td></tr>
</table>
</html:form>
</body>
</html>
It is throwing an "Object Expected' error at Line 9 Char 1.
I am not sure about what is causing this error.
Thanks.it's a Javascript error, cuz it's calling these 2 methods when the page loads...
onLoad="getSessionData();disableFieldsLocale();"
Where are these methods defined? Cuz I don't see any inline Javascript, nor a linked script.
I hope you don't think that those onload functions are going to call Java code defined in the JSP page or something, cuz... well, they aren't. -
Automatic created Java file error when compile JSP file
I got the following error message when i try to load the JSP file given below (FlightSearch.jsp). Given also below the JAVA files (flightsearch$jsp.java) created by the compiler.
Thanks for your help
Susan
Error message
org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.
C:\jakarta-tomcat\work\client\localhost\client\client\flightsearch$jsp.java:320: 'catch' without 'try'.
} catch (Throwable t) {
^
C:\jakarta-tomcat\work\client\localhost\client\client\flightsearch$jsp.java:328: 'try' without 'catch' or 'finally'.
^
C:\jakarta-tomcat\work\client\localhost\client\client\flightsearch$jsp.java:328: '}' expected.
^
3 errors, 1 warning
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:285)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:548)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:176)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:188)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
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:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
at java.lang.Thread.run(Thread.java:536)
FlightSearch.jsp
<%@page import="java.util.*" errorPage="ErrorHandler.jsp"%>
<%@page import="com.client.entity.Flight"%>
<%@page import="com.client.wsclient.FlightServiceClient"%>
<H3>Available Flight List</H3>
<br>We have found the following Available flight(s) : </br>
<table border="0" cellpadding="0" cellspacing="0" width="100">
<tr>
<td width="10%" bgcolor="#808080"><b><font color="#FFFFFF">Flight Company</font></b></td>
<td width="10%" bgcolor="#808080"><b><font color="#FFFFFF">Flight Number</font></b></td>
<td width="10%" bgcolor="#808080"><b><font color="#FFFFFF">Depart From<font></b></td>
<td width="10%" bgcolor="#808080"><b><font color="#FFFFFF">Arrive</font></b></td>
<td width="10%" bgcolor="#808080"><b><font color="#FFFFFF">Departure Date</font></b></td>
<td width="10%" bgcolor="#808080"><b><font color="#FFFFFF">Departure Time</font></b></td>
<td width="10%" bgcolor="#808080"><b><font color="#FFFFFF">Arrival Date</font></b></td>
<td width="10%" bgcolor="#808080"><b><font color="#FFFFFF">Arrival Time</font></b></td>
<td width="10%" bgcolor="#808080"><b><font color="#FFFFFF">Adult Fare</font></b></td>
<td width="10%" bgcolor="#808080"><b><font color="#FFFFFF">Child Fare</font></b></td>
</tr>
<%
//Get the search information
String des = request.getParameter("DFrom");
String arr = request.getParameter("DTo");
String fy = request.getParameter(FYear.value);
String fm = request.getParameter(FMonth.value);
String fd = request.getParameter(FDay.value);
String f1 = fy + "-" + fm;
String FDat = f1 + "-" + fd;
String ty = request.getParameter(TYear.value);
String tm = request.getParameter(TMonth.value);
String td = request.getParameter(TDay.value);
String t1 = ty + "-" + tm;
String TDat = t1 + "-" + td;
String type;
if( request.getParameter(type[0].checked))
type = "Return";
else
{ type = "OneWay";
String clas;
if(request.getParameter(clas[0].checked))
{clas = "ECO";
else
{clas = "BUSS";}
String adult = request.getParameter(Adult.value);
String child = request.getParameter(Child.value);
//Get the server Flight Search Service URL
// ServerFlightSearchBO SFSBO = new ServerFlightSearchBO();
// ServerFlightSearch FlightSearch = SFSBO.getFlightSearchURL();
// FlightSearchServiceClient FSearchServiceClient = new FlightSearchServiceClient
String ServerFlightServiceURL = "http://localhost:7080/AServer/services/FlightService";
//Find available Flight
FlightServiceClient client = new FlightServiceClient(ServerFlightServiceURL);
ArrayList list = client.getFlight(des, arr, FDat, TDat, type, clas, adult, child);
Iterator it = list.iterator();
while (it.hasNext()){
Flight flt = (Flight)it.next();
%>
<tr>
<td width= "10%"><%=flt.getFlightComp()%></td>
<td width= "10%"><%=flt.getFlightNum()%></td>
<td width= "10%"><%=flt.getDestination()%></td>
<td width= "10%"><%=flt.getArrive()%></td>
<td width= "10%"><%=flt.getFrDate()%></td>
<td width= "10%"><%=flt.getFlightDptTm()%></td>
<td width= "10%"><%=flt.getToDate()%></td>
<td width= "10%"><%=flt.getFlightArrTm()%></td>
<%
int adt, chld;
int far_A, tot_A, far_C, tot_C;
adt = Integer.parseInt(adult);
far_A = flt.getAdultFr();
tot_A = adt * far_A;
chld = Integer.parseInt(child);
far_C = flt.getChildFr();
tot_C = chld * far_C;
%>
<td width= "10%"><%=tot_A%></td>
<td width= "10%"><%=tot_C%></td>
</tr>
<%
if(type = "Return")
FlightServiceClient client = new FlightServiceClient(ServerFlightServiceURL);
ArrayList list = client.getFlight(arr, des, FDat, TDat, type, clas, adult, child);
Iterator it = list.iterator();
while (it.hasNext()){
Flight flt = (Flight)it.next();
%>
<tr>
<td width= "10%"><%=flt.getFlightComp()%></td>
<td width= "10%"><%=flt.getFlightNum()%></td>
<td width= "10%"><%=flt.getFlightDpt()%></td>
<td width= "10%"><%=flt.getFlightArr()%></td>
<td width= "10%"><%=flt.getFlightDptDt()%></td>
<td width= "10%"><%=flt.getFlightDptTm()%></td>
<td width= "10%"><%=flt.getFlightArrDt()%></td>
<td width= "10%"><%=flt.getFlightArrTm()%></td>
<%
int adlt, chd;
int fare_A, totA, fare_C, totC;
adlt = Integer.parseInt(adult);
fare_A = flt.getAdultFr();
totA = adlt * fare_A;
chd = Integer.parseInt(child);
fare_C = flt.getChildFr();
totC = chd * fare_C;
%>
<td width= "10%"><%=totA%></td>
<td width= "10%"><%=totC%></td>
</tr>
<%
%>
</table>
flightsearch$jsp.java
package org.apache.jsp;
import java.util.*;
import com.client.entity.Flight;
import com.client.wsclient.FlightServiceClient;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;
public class flightsearch$jsp extends HttpJspBase {
static {
public flightsearch$jsp( ) {
private static boolean jspxinited = false;
public final void jspxinit() throws org.apache.jasper.runtime.JspException {
public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws java.io.IOException, ServletException {
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) {
synchronized (this) {
if (_jspx_inited == false) {
jspxinit();
jspxinited = true;
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType("text/html;ISO-8859-1");
pageContext = _jspxFactory.getPageContext(this, request, response,
"ErrorHandler.jsp", true, 8192, true);
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
// HTML // begin [file="/client/flightsearch.jsp";from=(0,59);to=(1,0)]
out.write("\r\n");
// end
// HTML // begin [file="/client/flightsearch.jsp";from=(1,43);to=(2,0)]
out.write("\r\n");
// end
// HTML // begin [file="/client/flightsearch.jsp";from=(2,58);to=(19,0)]
out.write("\r\n\r\n<H3>Available Flight List</H3>\r\n<br>We have found the following Available flight(s) : </br>\r\n<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100\">\r\n <tr>\r\n <td width=\"10%\" bgcolor=\"#808080\"><b><font color=\"#FFFFFF\">Flight Company</font></b></td>\r\n <td width=\"10%\" bgcolor=\"#808080\"><b><font color=\"#FFFFFF\">Flight Number</font></b></td>\r\n <td width=\"10%\" bgcolor=\"#808080\"><b><font color=\"#FFFFFF\">Depart From<font></b></td>\r\n <td width=\"10%\" bgcolor=\"#808080\"><b><font color=\"#FFFFFF\">Arrive</font></b></td>\r\n <td width=\"10%\" bgcolor=\"#808080\"><b><font color=\"#FFFFFF\">Departure Date</font></b></td>\r\n <td width=\"10%\" bgcolor=\"#808080\"><b><font color=\"#FFFFFF\">Departure Time</font></b></td>\r\n <td width=\"10%\" bgcolor=\"#808080\"><b><font color=\"#FFFFFF\">Arrival Date</font></b></td>\r\n <td width=\"10%\" bgcolor=\"#808080\"><b><font color=\"#FFFFFF\">Arrival Time</font></b></td>\r\n <td width=\"10%\" bgcolor=\"#808080\"><b><font color=\"#FFFFFF\">Adult Fare</font></b></td>\r\n <td width=\"10%\" bgcolor=\"#808080\"><b><font color=\"#FFFFFF\">Child Fare</font></b></td>\r\n </tr>\r\n");
// end
// begin [file="/client/flightsearch.jsp";from=(19,2);to=(66,0)]
//Get the search information
String des = request.getParameter("DFrom");
String arr = request.getParameter("DTo");
String fy = request.getParameter(FYear.value);
String fm = request.getParameter(FMonth.value);
String fd = request.getParameter(FDay.value);
String f1 = fy + "-" + fm;
String FDat = f1 + "-" + fd;
String ty = request.getParameter(TYear.value);
String tm = request.getParameter(TMonth.value);
String td = request.getParameter(TDay.value);
String t1 = ty + "-" + tm;
String TDat = t1 + "-" + td;
String type;
if( request.getParameter(type[0].checked))
type = "Return";
else
{ type = "OneWay";
String clas;
if(request.getParameter(clas[0].checked))
{clas = "ECO";
else
{clas = "BUSS";}
String adult = request.getParameter(Adult.value);
String child = request.getParameter(Child.value);
//Get the server Flight Search Service URL
// ServerFlightSearchBO SFSBO = new ServerFlightSearchBO();
// ServerFlightSearch FlightSearch = SFSBO.getFlightSearchURL();
// FlightSearchServiceClient FSearchServiceClient = new FlightSearchServiceClient
String ServerFlightServiceURL = "http://localhost:7080/AServer/services/FlightService";
//Find available Flight
FlightServiceClient client = new FlightServiceClient(ServerFlightServiceURL);
ArrayList list = client.getFlight(des, arr, FDat, TDat, type, clas, adult, child);
Iterator it = list.iterator();
while (it.hasNext()){
Flight flt = (Flight)it.next();
// end
// HTML // begin [file="/client/flightsearch.jsp";from=(66,2);to=(68,18)]
out.write("\r\n<tr>\r\n <td width= \"10%\">");
// end
// begin [file="/client/flightsearch.jsp";from=(68,21);to=(68,40)]
out.print(flt.getFlightComp());
// end
// HTML // begin [file="/client/flightsearch.jsp";from=(68,42);to=(69,18)]
out.write("</td>\r\n <td width= \"10%\">");
// end
// begin [file="/client/flightsearch.jsp";from=(69,21);to=(69,39)]
out.print(flt.getFlightNum());
// end
// HTML // begin [file="/client/flightsearch.jsp";from=(69,41);to=(70,18)]
out.write("</td>\r\n <td width= \"10%\">");
// end
// begin [file="/client/flightsearch.jsp";from=(70,21);to=(70,41)]
out.print(flt.getDestination());
// end
// HTML // begin [file="/client/flightsearch.jsp";from=(70,43);to=(71,18)]
out.write("</td>\r\n <td width= \"10%\">");
// end
// begin [file="/client/flightsearch.jsp";from=(71,21);to=(71,36)]
out.print(flt.getArrive());
// end
// HTML // begin [file="/client/flightsearch.jsp";from=(71,38);to=(72,18)]
out.write("</td>\r\n <td width= \"10%\">");
// end
// begin [file="/client/flightsearch.jsp";from=(72,21);to=(72,36)]
out.print(flt.getFrDate());
// end
// HTML // begin [file="/client/flightsearch.jsp";from=(72,38);to=(73,18)]
out.write("</td>\r\n <td width= \"10%\">");
// end
// begin [file="/client/flightsearch.jsp";from=(73,21);to=(73,41)]
out.print(flt.getFlightDptTm());
// end
// HTML // begin [file="/client/flightsearch.jsp";from=(73,43);to=(74,18)]
out.write("</td>\r\n <td width= \"10%\">");
// end
// begin [file="/client/flightsearch.jsp";from=(74,21);to=(74,36)]
out.print(flt.getToDate());
// end
// HTML // begin [file="/client/flightsearch.jsp";from=(74,38);to=(75,18)]
out.write("</td>\r\n <td width= \"10%\">");
// end
// begin [file="/client/flightsearch.jsp";from=(75,21);to=(75,41)]
out.print(flt.getFlightArrTm());
// end
// HTML // begin [file="/client/flightsearch.jsp";from=(75,43);to=(76,1)]
out.write("</td>\r\n ");
// end
// begin [file="/client/flightsearch.jsp";from=(76,3);to=(87,1)]
int adt, chld;
int far_A, tot_A, far_C, tot_C;
adt = Integer.parseInt(adult);
far_A = flt.getAdultFr();
tot_A = adt * far_A;
chld = Integer.parseInt(child);
far_C = flt.getChildFr();
tot_C = chld * far_C;
// end
// HTML // begin [file="/client/flightsearch.jsp";from=(87,3);to=(88,18)]
out.write("\r\n <td width= \"10%\">");
// end
// begin [file="/client/flightsearch.jsp";from=(88,21);to=(88,26)]
out.print(tot_A);
// end
// HTML // begin [file="/client/flightsearch.jsp";from=(88,28);to=(89,18)]
out.write("</td>\r\n <td width= \"10%\">");
// end
// begin [file="/client/flightsearch.jsp";from=(89,21);to=(89,26)]
out.print(tot_C);
// end
// HTML // begin [file="/client/flightsearch.jsp";from=(89,28);to=(91,0)]
out.write("</td>\r\n</tr>\r\n");
// end
// begin [file="/client/flightsearch.jsp";from=(91,2);to=(100,0)]
if(type = "Return")
FlightServiceClient client = new FlightServiceClient(ServerFlightServiceURL);
ArrayList list = client.getFlight(arr, des, FDat, TDat, type, clas, adult, child);
Iterator it = list.iterator();
while (it.hasNext()){
Flight flt = (Flight)it.next();
// end
// HTML // begin [file="/client/flightsearch.jsp";from=(100,2);to=(102,18)]
out.write("\r\n<tr>\r\n <td width= \"10%\">");
// end
// begin [file="/client/flightsearch.jsp";from=(102,21);to=(102,40)]
out.print(flt.getFlightComp());
// end
// HTML // begin [file="/client/flightsearch.jsp";from=(102,42);to=(103,18)]
out.write("</td>\r\n <td width= \"10%\">");
// end
// begin [file="/client/flightsearch.jsp";from=(103,21);to=(103,39)]
out.print(flt.getFlightNum());
// end
// HTML // begin [file="/client/flightsearch.jsp";from=(103,41);to=(104,18)]
out.write("</td>\r\n <td width= \"10%\">");
// end
// begin [file="/client/flightsearch.jsp";from=(104,21);to=(104,39)]
out.print(flt.getFlightDpt());
// end
// HTML // begin [file="/client/flightsearch.jsp";from=(104,41);to=(105,18)]
out.write("</td>\r\n <td width= \"10%\">");
// end
// begin [file="/client/flightsearch.jsp";from=(105,21);to=(105,39)]
out.print(flt.getFlightArr());
// end
// HTML // begin [file="/client/flightsearch.jsp";from=(105,41);to=(106,18)]
out.write("</td>\r\n <td width= \"10%\">");
// end
// begin [file="/client/flightsearch.jsp";from=(106,21);to=(106,41)]
out.print(flt.getFlightDptDt());
// end
// HTML // begin [file="/client/flightsearch.jsp";from=(106,43);to=(107,18)]
out.write("</td>\r\n <td width= \"10%\">");
// end
// begin [file="/client/flightsearch.jsp";from=(107,21);to=(107,41)]
out.print(flt.getFlightDptTm());
// end
// HTML // begin [file="/client/flightsearch.jsp";from=(107,43);to=(108,18)]
out.write("</td>\r\n <td width= \"10%\">");
// end
// begin [file="/client/flightsearch.jsp";from=(108,21);to=(108,41)]
out.print(flt.getFlightArrDt());
// end
// HTML // begin [file="/client/flightsearch.jsp";from=(108,43);to=(109,18)]
out.write("</td>\r\n <td width= \"10%\">");
// end
// begin [file="/client/flightsearch.jsp";from=(109,21);to=(109,41)]
out.print(flt.getFlightArrTm());
// end
// HTML // begin [file="/client/flightsearch.jsp";from=(109,43);to=(110,1)]
out.write("</td>\r\n ");
// end
// begin [file="/client/flightsearch.jsp";from=(110,3);to=(120,1)]
int adlt, chd;
int fare_A, totA, fare_C, totC;
adlt = Integer.parseInt(adult);
fare_A = flt.getAdultFr();
totA = adlt * fare_A;
chd = Integer.parseInt(child);
fare_C = flt.getChildFr();
totC = chd * fare_C;
// end
// HTML // begin [file="/client/flightsearch.jsp";from=(120,3);to=(121,18)]
out.write("\r\n <td width= \"10%\">");
// end
// begin [file="/client/flightsearch.jsp";from=(121,21);to=(121,25)]
out.print(totA);
// end
// HTML // begin [file="/client/flightsearch.jsp";from=(121,27);to=(122,18)]
out.write("</td>\r\n <td width= \"10%\">");
// end
// begin [file="/client/flightsearch.jsp";from=(122,21);to=(122,25)]
out.print(totC);
// end
// HTML // begin [file="/client/flightsearch.jsp";from=(122,27);to=(124,0)]
out.write("</td>\r\n</tr>\r\n");
// end
// begin [file="/client/flightsearch.jsp";from=(124,2);to=(126,0)]
// end
// HTML // begin [file="/client/flightsearch.jsp";from=(126,2);to=(127,8)]
out.write("\r\n</table>");
// end
} catch (Throwable t) {
if (out != null && out.getBufferSize() != 0)
out.clearBuffer();
if (pageContext != null) pageContext.handlePageException(t);
} finally {
if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);i am very glad and appreciate for your help, but i would like to know how to get the value of a radio button.
like in another JSP file i have :
<input type="radio" name="type" value="Return" checked>
Return
<input type="radio" name="type" value="OneWay">
One Way
and when i try to get the value which is checked, i put
String type = request.getParameter(type.checked);
but this doesn't work,
i would be very appreciate for your help. Thank you -
Exception-Error when excecuting JSP-File in Crystal reports for Eclipse
Hi,
I have created a jsp-File from an rpt-File in Crystal report for Eclipse. When I start the jsp-File on Apache Tomact 5.5 then only errors occurs.
Coud anyone help me?
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: Unable to compile class for JSP:
An error occurred at line: 6 in the generated java file
Only a type can be imported. com.crystaldecisions.report.web.viewer.CrystalReportViewer resolves to a package
An error occurred at line: 7 in the generated java file
Only a type can be imported. com.crystaldecisions.reports.sdk.ReportClientDocument resolves to a package
An error occurred at line: 8 in the generated java file
Only a type can be imported. com.crystaldecisions.sdk.occa.report.application.OpenReportOptions resolves to a package
An error occurred at line: 9 in the generated java file
Only a type can be imported. com.crystaldecisions.sdk.occa.report.lib.ReportSDKExceptionBase resolves to a package
An error occurred at line: 10 in the generated java file
Only a type can be imported. com.crystaldecisions.sdk.occa.report.reportsource.IReportSource resolves to a package
An error occurred at line: 13 in the jsp file: /Bericht1-viewer.jsp
ReportClientDocument cannot be resolved to a type
10: try catch (ReportSDKExceptionBase e)
60:
An error occurred at line: 58 in the jsp file: /Bericht1-viewer.jsp
e cannot be resolved
55:
56:
57: } catch (ReportSDKExceptionBase e)
60:
61: %>
Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:93)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:435)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:298)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:265)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:302)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.26 logs.
Apache Tomcat/5.5.26
Bericht1.jsp:
<%@page import="com.crystaldecisions.report.web.viewer.CrystalReportViewer,
com.crystaldecisions.reports.sdk.ReportClientDocument,
com.crystaldecisions.sdk.occa.report.application.OpenReportOptions,
com.crystaldecisions.sdk.occa.report.lib.ReportSDKExceptionBase,
com.crystaldecisions.sdk.occa.report.reportsource.IReportSource"%><%
// This sample code calls methods from the JRCHelperSample class, which
// contains examples of how to use the BusinessObjects APIs. You are free to
// modify and distribute the source code contained in the JRCHelperSample class.
try {
String reportName = "Bericht1.rpt";
ReportClientDocument clientDoc = (ReportClientDocument) session.getAttribute(reportName);
if (clientDoc == null) {
// Report can be opened from the relative location specified in the CRConfig.xml, or the report location
// tag can be removed to open the reports as Java resources or using an absolute path
// (absolute path not recommended for Web applications).
clientDoc = new ReportClientDocument();
// Open report
clientDoc.open(reportName, OpenReportOptions._openAsReadOnly);
// Store the report document in session
session.setAttribute(reportName, clientDoc);
// ****** BEGIN CONNECT CRYSTALREPORTPAGEVIEWER SNIPPET ****************
// Create the CrystalReportViewer object
CrystalReportViewer crystalReportPageViewer = new CrystalReportViewer();
// set the reportsource property of the viewer
IReportSource reportSource = clientDoc.getReportSource();
crystalReportPageViewer.setReportSource(reportSource);
// set viewer attributes
crystalReportPageViewer.setOwnPage(true);
crystalReportPageViewer.setOwnForm(true);
// Apply the viewer preference attributes
// Process the report
crystalReportPageViewer.processHttpRequest(request, response, application, null);
// ****** END CONNECT CRYSTALREPORTPAGEVIEWER SNIPPET ****************
} catch (ReportSDKExceptionBase e) {
out.println(e);
%>
Thanks
ArnoldAccording to the release notes, for the JRCHelperSample to compile, you must set the target runtime for the project.
To do this, either create a project from scratch that uses the Tomcat 5.5 target runtime, or go to the properties menu and ensure that the target runtime is set to the application server you will be using. -
Error with HeaderiView.jsp file
Hi there,
I took the masthead par file from the portal and I did some changes in the HeaderiView.jsp. When I try the iview in the preview I see the next error:
Portal Runtime Error
An exception occurred while processing a request for :
iView : pcd:portal_content/pruebasjanet/ZiwImage/zprueba54
Component Name : prueba1701.default
Error occurs during the rendering of jsp component.
Exception id: 10:14_06/09/07_0075_33099350
See the details for the exception ID in the log file
I already added the com.sap.portal.navigation.mastheadapi.jar in \PORTAL-INF\lib
and com.sap.portal.navigation.masthead_core.jar \PORTAL-INF\private\lib.
Any help would be greatly appreciated!
JeanetteHi Malini,
Yes, I did some changes in Jsp file. I'm trying to make a copy of the Help Link. I copied all the components in the portalapp.xml (only changes, for example, <property name="ShowHelpLink" value="true"> <property name="ShowSiteLink" value="true">)
Would you please help me checking the code?
Thanks.
Jeanette
With the jsp file I have problems:
<%@ page import = "java.util.ResourceBundle" %>
<%@ page import = "com.sapportals.htmlb.*" %>
<%@ page import = "com.sapportals.portal.prt.session.IUserContext" %>
<%@ page import = "com.sapportals.portal.prt.component.*" %>
<%@ page import = "com.sapportals.portal.prt.service.laf.*" %>
<%@ page import = "com.sap.security.api.UMFactory" %>
<%@ page import = "com.sapportals.portal.prt.service.license.ILicenseService"%>
<%@ page import = "com.sapportals.portal.navigation.*" %>
<%@ page import = "com.sapportals.portal.prt.runtime.PortalRuntime" %>
<%@ page import = "com.sapportals.portal.prt.util.StringUtils" %>
<%@ taglib uri="prt:taglib:tlhtmlb" prefix="hbj" %>
<%!
final String PERSONALIZE_PAGE_EVENT_URN = "urn:com.sapportals:navigation";
final String PERSONALIZE_PAGE_EVENT_NAME = "PersonalizePage";
final String PERSONALIZE_PAGE_EVENT_PARAMS = "";
final String PERSONALIZE_PORTAL_EVENT_URN = "urn:com.sapportals:navigation";
final String PERSONALIZE_PORTAL_EVENT_NAME = "PersonalizePortal";
final String PERSONALIZE_PORTAL_EVENT_PARAMS = "";
final String LOGOFF_CONFIRM_MSG_COMPONENT = "logoffConfirmMsg";
final String LOGON_REDIRECT_COMPONENT = "logInComponent";
final String LOGOFF_REDIRECT_COMPONENT = "LogOutComponent";
final String LOGOFF_CONFIRM_MSG_ARGS_IE = "dialogHeight: 170px; dialogWidth: 350px; edge: Raised; center: Yes; help: No; resizable: No; status: No";
final String LOGOFF_CONFIRM_MSG_ARGS_NS = "Height=170,Width=350";
final String LOGOFF_CONFIRM_WINDOW_NAME = "LOG_OFF_WINDOW";
final String HELP_URL = "HelpUrl";
final String SITE_URL = "SiteUrl";
final String HELP_WINDOW_NAME = "HELP_WINODW";
final String SITE_WINDOW_NAME = "SITE_WINODW";
final String SHOW_PERSONALIZE_LINK = "ShowPersonalizeLink";
final String SHOW_HELP_LINK = "ShowHelpLink";
final String SHOW_SITE_LINK = "ShowSiteLink";
final String SHOW_NEW_WINDOW_LINK = "ShowNewWindowLink";
final String SHOW_LOG_OFF_LOG_ON_LINK = "ShowLogInLogOffLink";
//String constants for NLS
final String WELCOME_CLAUSE = "WELCOME_CLAUSE";
final String HELP_TEXT = "HELP_TEXT";
final String SITE_TEXT = "SITE_TEXT";
final String LOG_OFF_TEXT = "LOG_OFF_TEXT";
final String LOG_ON_TEXT = "LOG_ON_TEXT";
final String PERSONALIZE_TEXT = "PERSONALIZE_TEXT";
final String PERSONALIZE_PORTAL_TEXT = "PERSONALIZE_PORTAL_TEXT";
final String NEW_WINDOW_TEXT = "NEW_WINDOW_TEXT";
final String HELP_TOOLTIP = "HELP_TOOLTIP";
final String SITE_TOOLTIP = "SITE_TOOLTIP";
final String LOG_OFF_TOOLTIP = "LOG_OFF_TOOLTIP";
final String LOG_ON_TOOLTIP = "LOG_ON_TOOLTIP";
final String PERSONALIZE_TOOLTIP = "PERSONALIZE_TEXT";
final String PERSONALIZE_PORATL_TOOLTIP = "PERSONALIZE_PORATL_TOOLTIP";
final String NEW_WINDOW_TOOLTIP = "NEW_WINDOW_TOOLTIP";
final String BEGINNING_OF_PAGE = "BEGINNING_OF_PAGE";
final String MASTHEAD_ENTER_TOOLTIP = "MASTHEAD_ENTER_TOOLTIP";
final String MASTHEAD_EXIT_TOOLTIP = "MASTHEAD_EXIT_TOOLTIP";
final String UNLOAD_MSG = "UNLOAD_MSG";
private String GetWelcomeMsg(IPortalComponentRequest request, String welcomeClause)
IUserContext userContext = request.getUser();
if (userContext != null)
String firstName = userContext.getFirstName();
String lastName = userContext.getLastName();
String salutation = userContext.getSalutation();
if ((firstName != null) && (lastName != null))
if(salutation != null)
return java.text.MessageFormat.format(welcomeClause, new Object[] {firstName, lastName, salutation}).toString();
else
return java.text.MessageFormat.format(welcomeClause, new Object[] {firstName, lastName, " "}).toString();
else
return java.text.MessageFormat.format(welcomeClause, new Object[] {userContext.getDisplayName()," ", " "}).toString();
return "";
private String GetLicenseText(IPortalComponentRequest request){
ILicenseService license = (ILicenseService)request.getService(ILicenseService.KEY);
if (license.sapInternalUsageOnly())
return "<FONT color=orangeRed size=4><STRONG> Licensed For SAP Internal Usage</STRONG></FONT>";
else
return " ";
private boolean getParameter(IPortalComponentRequest request, String param)
String value = (String)request.getNode().getValue(param);
return new Boolean(value).booleanValue();
private String getHelpUrl(IPortalComponentRequest request)
String value = (String)request.getNode().getValue(HELP_URL);
return value;
private String getSiteUrl(IPortalComponentRequest request)
String value = (String)request.getNode().getValue(SITE_URL);
return value;
private String GetLogoffConfirmMsgURL(IPortalComponentRequest request)
String componentName = request.getComponentContext().getComponentName();
componentName = componentName.substring(0, componentName.lastIndexOf(".") + 1);
IPortalComponentURI msgURI = request.createPortalComponentURI();
msgURI.setContextName(componentName + LOGOFF_CONFIRM_MSG_COMPONENT);
return msgURI.toString();
// Attaching the "UnsavedData=true" flag to the Confirm logoff message
private String GetLogoffConfirmUnsavedMsgURL(IPortalComponentRequest request)
String basicUrl = GetLogoffConfirmMsgURL(request);
String separator = (basicUrl.indexOf("?") >=0) ? "&" : "?";
return basicUrl + separator + "UnsavedData=true";
private String GetLogoffURL(IPortalComponentRequest request)
/*IPortalComponentURI logoffURI = request.createPortalComponentURI();
return logoffURI.toString();*/
String componentName = request.getComponentContext().getComponentName();
componentName = componentName.substring(0, componentName.lastIndexOf(".") + 1);
IPortalComponentURI msgURI = request.createPortalComponentURI();
msgURI.setContextName(componentName + LOGOFF_REDIRECT_COMPONENT);
return msgURI.toString();
private boolean isAccessabilityOn(IPortalComponentRequest request)
//End: Temporary, till there's a way to set the accessibility for a user
IUserContext user = request.getUser();
//if((user.getAccessibilityLevel() != IUserContext.DEFAULT_ACCESSIBILITY_LEVEL) ||(isAccessibility == true) ) // 508 is on
if (user.getAccessibilityLevel() != IUserContext.DEFAULT_ACCESSIBILITY_LEVEL) // 508 is on
return true;
return false;
private String GetLoginURL(IPortalComponentRequest request)
INavigationGenerator navigationService = (INavigationGenerator)PortalRuntime.getRuntimeResources().getService(INavigationService.KEY);
StringBuffer URL = new StringBuffer(200).append(navigationService.getPortalURL(request , null));
return URL.append("/login").toString();
private String GetPortalUrl(IPortalComponentRequest request)
INavigationGenerator navigationService = (INavigationGenerator)PortalRuntime.getRuntimeResources().getService(INavigationService.KEY);
return navigationService.getPortalURL(request , null);
private String getNLSString(IPortalComponentRequest request, String resource_key)
try
ResourceBundle bundle = request.getResourceBundle();
if(bundle != null)
return bundle.getString(resource_key);
return resource_key;
catch(MissingResourceException e)
return resource_key;
private String GetThemeURLPath(IPortalComponentRequest request)
ILAFService iLAFService = (ILAFService)request.getService(ILAFService.KEY);
String currentTheme = iLAFService.getCurrentTheme(request).getThemeName();
String url = iLAFService.getRelativeThemeRootURLPath(request, ILAFService.PORTAL_THEME) + "/" + currentTheme + "/prtl";
return url;
//Get the external logoff URL
private String getExternalLogOffUrl()
return UMFactory.getProperties().get("ume.logoff.redirect.url");
//Get the external logoff Mode (silent / not silent)
private boolean getExternalLogOffMode()
return UMFactory.getProperties().getBoolean("ume.logoff.redirect.silent" , false);
private boolean isAnonymous(IPortalComponentRequest request)
NavigationEventsHelperService helperService = (NavigationEventsHelperService)
PortalRuntime.getRuntimeResources().getService(NavigationEventsHelperService.KEY);
return helperService.isAnonymousUser(request);
%>
<%
boolean isPreview = false;
// initializaing the labels with the localized labels
String welcomeClauseStr = getNLSString(componentRequest, WELCOME_CLAUSE);
String helpTextStr = getNLSString(componentRequest, HELP_TEXT);
String siteTextStr = getNLSString(componentRequest, SITE_TEXT);
String logOffTextStr = getNLSString(componentRequest, LOG_OFF_TEXT);
String logInTextStr = getNLSString(componentRequest, LOG_ON_TEXT);
String personalizeTextStr = getNLSString(componentRequest, PERSONALIZE_TEXT);
String newWindowTextStr = getNLSString(componentRequest, NEW_WINDOW_TEXT);
String helpTooltipStr = getNLSString(componentRequest, HELP_TOOLTIP);
String siteTooltipStr = getNLSString(componentRequest, SITE_TOOLTIP);
String logOffTooltipStr = getNLSString(componentRequest, LOG_OFF_TOOLTIP);
String logInTooltipStr = getNLSString(componentRequest, LOG_ON_TOOLTIP);
String personalizeTooltipStr = getNLSString(componentRequest, PERSONALIZE_TOOLTIP);
String personalizePortalTooltipStr = getNLSString(componentRequest, PERSONALIZE_PORATL_TOOLTIP);
String beginningOfPageStr = getNLSString(componentRequest, BEGINNING_OF_PAGE);
String newWindowStr = getNLSString(componentRequest, NEW_WINDOW_TOOLTIP);
String mastheadEnterTable = getNLSString(componentRequest, MASTHEAD_ENTER_TOOLTIP);
String mastheadExitTable = getNLSString(componentRequest, MASTHEAD_EXIT_TOOLTIP);
String unLoadMsg = getNLSString(componentRequest, UNLOAD_MSG);
boolean showPersonalizeLink = getParameter(componentRequest, SHOW_PERSONALIZE_LINK);
boolean showHelpLink = getParameter(componentRequest, SHOW_HELP_LINK);
boolean showSiteLink = getParameter(componentRequest, SHOW_SITE_LINK);
boolean showNewWindowLink = getParameter(componentRequest, SHOW_NEW_WINDOW_LINK);
boolean ShowLogInLogOffLink = getParameter(componentRequest, SHOW_LOG_OFF_LOG_ON_LINK);
String mode = (String)componentRequest.getNode().getValue("mode");
if ((mode != null) && (mode.equals("preview")))
isPreview = true;
String themeRootURLPath = GetThemeURLPath(componentRequest);
boolean isAnonymous = isAnonymous(componentRequest);
boolean isAccessabilityOn = isAccessabilityOn(componentRequest);
if (isAccessabilityOn)
helpTooltipStr = helpTextStr", "helpTooltipStr;
siteTooltipStr = siteTextStr", "siteTooltipStr;
logOffTooltipStr = logOffTextStr", "logOffTooltipStr;
logInTooltipStr = logInTextStr", "logInTooltipStr;
newWindowStr = newWindowTextStr", "newWindowStr;
personalizePortalTooltipStr = personalizeTextStr", "personalizePortalTooltipStr;
%>
<script>
function openLogoffMsg()
<%if (!isPreview){%>
if (EPCM.getUAType() == EPCM.MSIE)
releaseProducerSessions();
if(EPCM.getGlobalDirty())
// unsaved data on the page, display modified dialog
var val = window.showModalDialog('<%=GetLogoffConfirmUnsavedMsgURL(componentRequest)%>', '', '<%=LOGOFF_CONFIRM_MSG_ARGS_IE%>');
if (val == 'logoff')
disableWorkProtectCheck = true;
logoff();
else //no unsaved data
// data saved, nothing get lost on the page, display normal dialog
var val = window.showModalDialog('<%=GetLogoffConfirmMsgURL(componentRequest)%>', '', '<%=LOGOFF_CONFIRM_MSG_ARGS_IE%>');
if (val == 'logoff')
logoff();
else
if(EPCM.getGlobalDirty())
window.open('<%=GetLogoffConfirmUnsavedMsgURL(componentRequest)%>', '<%=LOGOFF_CONFIRM_WINDOW_NAME%>', '<%=LOGOFF_CONFIRM_MSG_ARGS_NS%>');
else
window.open('<%=GetLogoffConfirmMsgURL(componentRequest)%>', '<%=LOGOFF_CONFIRM_WINDOW_NAME%>', '<%=LOGOFF_CONFIRM_MSG_ARGS_NS%>');
<%}%>
var isLogoffFinalAllowed = true;
var logoffStartTime = (new Date).getTime();
function logoff()
EPCM.raiseEvent("urn:com.sapportals.portal:user", "logoff", "");
logoffStartTime = (new Date).getTime();
window.setTimeout("logoffDelay()", "50");
function logoffDelay()
var isLogoffDelayElapsed = ((new Date).getTime() - logoffStartTime) > (60*1000);
if(isLogoffFinalAllowed || isLogoffDelayElapsed) {
logoffFinalCall();
} else {
window.setTimeout("logoffDelay()","50");
function logoffFinalCall()
logoffThirdParty();
document.forms["logoffForm"].submit();
function logIn()
location.replace("<%=GetLoginURL(componentRequest)%>");
function runPersonalizePage()
EPCM.raiseEvent("<%=PERSONALIZE_PAGE_EVENT_URN%>", "<%=PERSONALIZE_PAGE_EVENT_NAME%>", "<%=PERSONALIZE_PAGE_EVENT_PARAMS%>");
function runPersonalizePortal()
<%if (!isPreview){%>
EPCM.raiseEvent("<%=PERSONALIZE_PORTAL_EVENT_URN%>", "<%=PERSONALIZE_PORTAL_EVENT_NAME%>", "<%=PERSONALIZE_PORTAL_EVENT_PARAMS%>");
<%}%>
function onPersonalizePortalDisable()
var linkElem = document.getElementById("personalizePortal");
var linkSepElem = document.getElementById("personalizePortalSep");
var linkLogoffSepElem = document.getElementById("logoffsep1");
if(linkElem != null)
linkElem.style.display = "none";
if(linkSepElem != null)
linkSepElem.style.display = "none";
if(linkLogoffSepElem != null)
linkLogoffSepElem.style.display = "none";
EPCM.subscribeEvent("urn:com.sapportals:navigation", "PersonalizePortalDisable", onPersonalizePortalDisable);
function openNewPortalWindow()
<%if (!isPreview){%>
var navTarget = EPCM.getSAPTop().gHistoryFrameworkObj.GetActiveTrackingEntryValue().URL;
var context = EPCM.getSAPTop().gHistoryFrameworkObj.GetActiveTrackingEntryValue().context;
if (context != null && context.length > 0)
EPCM.doNavigate(navTarget, 2, null, null, null, null, context);
else
EPCM.doNavigate(navTarget, 2);
<%}%>
function openHelp()
<%if (!isPreview){%>
window.open('<%=getHelpUrl(componentRequest)%>', '<%=HELP_WINDOW_NAME%>');
<%}%>
function openSite()
<%if (!isPreview){%>
window.open('<%=getSiteUrl(componentRequest)%>', '<%=SITE_WINDOW_NAME%>');
<%}%>
function setFocusOnHeader() {
var melcomeMessage = document.getElementById("welcome_message");
var headerNotch = document.getElementById("header_notch");
if(EPCM.getUAType()==EPCM.MOZILLA) {
// No focus
} else {
if(melcomeMessage!=null && melcomeMessage.currentStyle.display!="none") {
melcomeMessage.focus();
} else if(headerNotch!=null && headerNotch.currentStyle.display!="none") {
headerNotch.focus();
function logoffThirdParty()
<% if(getExternalLogOffUrl()!= null){ %>
var logOffUrl = '<%=getExternalLogOffUrl()%>';
var silent = <%=getExternalLogOffMode()%>;
if(silent)
var newIFrame = document.getElementById("externalLogOffIframe");
if(newIFrame == null)
newIFrame = document.createElement("IFRAME");
newIFrame.style.visibility = "hidden";
newIFrame.width=0;
newIFrame.height=0;
newIFrame.id = "externalLogOffIframe";
newIFrame.src = logOffUrl;
document.body.appendChild(newIFrame);
else
newIFrame.src = "javascript:void(0)";
newIFrame.src = logOffUrl;
<% } %>
</script>
<hbj:content id="PageContext">
<hbj:page title="Header Area">
<hbj:form id="HeaderForm" >
<!--<a href="#" tabindex=0 title= "<%=beginningOfPageStr%>" accesskey="m">
<img src="<%=themeRootURLPath%>/../common/1x1.gif" border="0" style="display:none">
</a>-->
<% if (isAccessabilityOn)
{%>
<TABLE width="100%" border="0" id="myTable" ti="0" tabindex="0" title="<%=mastheadEnterTable%>" onkeydown="nav_skip('myTable',event)" ct="PortalMasthead" cellspacing="0" cellpadding="0" ><% if (isPreview) {%>ondragover="window.event.cancelBubble = true;" ondragleave="window.event.cancelBubble = true;"<%}%>>
<%} else
{%>
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0" class="prtlHdrWhl" id="myTable" ti="0" tabindex="0" onkeydown="nav_skip('myTable',event)" ><% if (isPreview) {%>ondragover="window.event.cancelBubble = true;" ondragleave="window.event.cancelBubble = true;"<%}%>>
<%}%>
<tbody>
<TR>
<TD width="1%" nowrap class="prtlHeaderNotch" id="header_notch"> </TD>
<TD width="5%" nowrap class="prtlHdrWelcome" id="welcome_message" ti="0" tabIndex="0"><%=StringUtils.escapeToHTML(GetWelcomeMsg(componentRequest, welcomeClauseStr))%></TD>
<TD width="3%" nowrap class="prtlHdrWelcome" id="welcome_message" ti="1" tabIndex="1">
<SCRIPT LANGUAGE="JavaScript">
var months=new Array(13);
months[1]="January";
months[2]="February";
months[3]="March";
months[4]="April";
months[5]="May";
months[6]="June";
months[7]="July";
months[8]="August";
months[9]="September";
months[10]="October";
months[11]="November";
months[12]="December";
var time=new Date();
var lmonth=months[time.getMonth() + 1];
var date=time.getDate();
var year=time.getYear();
if ((navigator.appName == "Microsoft Internet Explorer") && (year < 2000))
year="19" + year;
if (navigator.appName == "Netscape")
year=1900 + year;
document.write("<center>" + lmonth + " ");
document.write(date + ", " + year + "</center>");
</SCRIPT>
</TD>
<% if (showSiteLink || showHelpLink || showPersonalizeLink || showNewWindowLink || ShowLogInLogOffLink)
{%>
<TD width="79%" class="prtlHeaderFunctionsTable">
<TABLE border="0" cellspacing="0" cellpadding="0"
class="prtlHeaderFunctionsContainer" height="100%">
<TR>
<TD nowrap >
<!--<hbj:link id="SiteLink" tooltip="<%=siteTooltipStr%>" linkDesign="FUNCTION" reference="javascript:openSite();"><hbj:textView nested="true" text="<%=siteTextStr%>"/></hbj:link> -->
<hbj:link id="SiteLink" tooltip="<%=siteTooltipStr%>"
linkDesign="FUNCTION" reference="#">
<% if (!isPreview) { SiteLink.setOnClientClick("javascript:openSite();");} %>
<hbj:textView nested="true" text="<%=siteTextStr%>"/>
</hbj:link>
</TD>
<TD nowrap>
<%}%>
<%
if (showHelpLink)
{ %>
<TD nowrap >
<!--<hbj:link id="HelpLink" tooltip="<%=helpTooltipStr%>" linkDesign="FUNCTION" reference="javascript:openHelp();"><hbj:textView nested="true" text="<%=helpTextStr%>"/></hbj:link> -->
<hbj:link id="HelpLink" tooltip="<%=helpTooltipStr%>"
linkDesign="FUNCTION" reference="#">
<% if (!isPreview) { HelpLink.setOnClientClick("javascript:openHelp();");} %>
<hbj:textView nested="true" text="<%=helpTextStr%>"/>
</hbj:link>
</TD>
<TD nowrap>
<%}%>
<%
if (!isAnonymous)
if (showPersonalizeLink)
if (showHelpLink)
{ %>
<TD nowrap id="personalizePortalSep" class="prtlHdrSep"></TD>
<%} %>
<TD nowrap id="personalizePortal">
<hbj:link id="PersonalizeLink"
tooltip="<%=personalizePortalTooltipStr%>"
linkDesign="FUNCTION"
reference="#">
<% if (!isPreview) {PersonalizeLink.setOnClientClick("javascript:runPersonalizePortal();");}%>
<hbj:textView nested="true" text="<%=personalizeTextStr%>"/>
</hbj:link>
</TD>
<TD nowrap></TD>
<%}
if (showNewWindowLink)
if (showHelpLink || showPersonalizeLink)
{ %>
<TD nowrap id="newWindowSep" class="prtlHdrSep"> </TD>
<%}
else
{%>
<TD nowrap> </TD>
<%}%>
<TD nowrap id="newWindow">
<hbj:link id="newWindowLink" tooltip="<%=newWindowStr%>"
linkDesign="FUNCTION"
reference="#">
<% if (!isPreview) {newWindowLink.setOnClientClick("javascript:openNewPortalWindow();");}%>
<hbj:textView nested="true" text="<%=newWindowTextStr%>"/>
</hbj:link>
</TD>
<%}%>
<%}%>
<TD>
<%if (ShowLogInLogOffLink)
{%>
<TABLE cellspacing="0" cellpadding="0" border="0" class="prtlHeaderFunctionsContainer" height="100%">
<TR><%
if (showHelpLink || showPersonalizeLink || showNewWindowLink)
{%>
<%
if(!showHelpLink && !showNewWindowLink)
{%>
<TD nowrap id="logoffsep1" class="prtlHdrSep"> </TD>
<%
}else
{%>
<TD nowrap id="logoffsep2" class="prtlHdrSep"> </TD>
<%}%>
<TD nowrap>
<%
}else
{%>
<TD nowrap > </TD>
<%
if (isAnonymous)
{%>
<TD nowrap>
<!<hbj:link id="LoginLink" tooltip="<%=logInTooltipStr%>" linkDesign="FUNCTION" reference="javascript:logIn();"><hbj:textView nested="true" text="<%=logInTextStr%>"/></hbj:link>>
<hbj:link id="LoginLink"
tooltip="<%=logInTooltipStr%>"
linkDesign="FUNCTION"
reference="#">
<% LoginLink.setOnClientClick("javascript:logIn();"); %>
<hbj:textView nested="true" text="<%=logInTextStr%>"/> </hbj:link>
</TD>
<%}
else
{%>
<TD nowrap>
<!<hbj:link id="LogoffLink" tooltip="<%=logOffTooltipStr%>" linkDesign="FUNCTION" reference="javascript:openLogoffMsg();"><hbj:textView nested="true" text="<%=logOffTextStr%>"/></hbj:link>>
<hbj:link id="LogoffLink"
tooltip="<%=logOffTooltipStr%>"
linkDesign="FUNCTION"
reference="#">
<%if (!isPreview) { LogoffLink.setOnClientClick("javascript:openLogoffMsg();");} %>
<hbj:textView nested="true" text="<%=logOffTextStr%>"/> </hbj:link>
</TD>
<%}%>
</TR>
</TABLE>
<%} %>
</TD>
</TR>
</TABLE>
</TD>
<%}%>
<TD width="12%" nowrap class="prtlHdrLogoContainer">
<% if (isAccessabilityOn)
{%>
<%}%>
</TD>
</TR>
</tbody>
</TABLE>
</hbj:form>
</hbj:page>
</hbj:content>
<form name="logoffForm" style="display:none;position:absolute;top:-5000;left:-5000" action="<%=GetLogoffURL(componentRequest)%>" method="POST">
<input type="hidden" name="logout_submit" value="true">
</form>
<script>
<% if (!isPreview) {%>
if (disablePersonalize) {
EPCM.raiseEvent("urn:com.sapportals:navigation", "PersonalizePortalDisable", "");
<%}%>
setFocusOnHeader();
EPCM.subscribeEvent("urn:com.sapportals.portal:browser","load",setFocusOnHeader);
</script> -
Rep-1247 error when starting jsp file on linux
I have a rather frustrating problem on our production servers...
We are trying to start jsp files on a linux report server (10Gr2).
The command is displayed below
[2007/10/8 10:57:59:853] Info 50132 (EngineImpl:setCommandLine): Get command line: baseUrl=http://xxxxx:7777/reports/rwservlet/getfile/ userid=reporting@SHARED_BE USER_AGENT=Java/1.5.0_07 SERVER_NAME=xxxxxxxxx jobname="/opt/ogreports/catalog/SMC/BE-Shared/xxxx.jsp" destpath="/var/data/og/dashboard/van/sgs/001/reports/xx" getFilestr=/no> imagekey=reports9i par_end_date="01-10-2007" desname=xxxxxxxxxxx.pdf REMOTE_ADDR=127.0.0.1 SERVER_PROTOCOL=HTTP/1.1 authid=RWUser par_start_date="01-09-2007" destype=rcpfile REMOTE_HOST=127.0.0.1 SERVER_PORT=7777 CONTENT_TYPE=application/x-www-form-urlencoded report="/opt/ogreports/catalog/SMC/BE-Shared/xxx.jsp" expiredays=0 baseimageurl=http://xxxxx:7777/reports/rwservlet/getfile/HW/YX+JkD0HSAcVLzaSGilrWNAn36ufghgStsvQqfNFC7w== schedule="00:00 Oct 08, 2007" scphost="lion" desformat=pdf SCRIPT_NAME=/rwservlet par_id_project="1750"
The after paramform does some major data manipulations, writing to temporary tables (on commit preserve rows), that are used in queries from the reports.
This seems to go allright. The setup of all queries, program units etc passes as well. But when the report has to start formatting, I get a "1247 Program Unit not compiled" error message. This is an excerpt from the engine trace
[2007/10/8 11:40:40:243] Debug 50103 (EngineImpl:getCacheData): Start
[2007/10/8 11:40:40:243] Debug 50103 (EngineImpl:getCacheData): m_jobId = 9182
[2007/10/8 11:40:40:244] Debug 50103 (EngineImpl:getCacheData): Quit
[2007/10/8 11:40:40:534] Error 50103 (C Engine): 10:40:40 ERR REP-1247: Report contains uncompiled PL/SQL.
[2007/10/8 11:40:40:535] Error 50103 (rwfdt:rwfdtprint): 10:40:40 ERR Error occurred sending Job output to cache
[2007/10/8 11:40:40:536] Error 50103 (rwfdt:rwfdtfl_FreeDistList): running
[2007/10/8 11:40:40:536] Error 50103 (rwfdt:rwfdtfl_FreeDistList): quit
[2007/10/8 11:40:40:580] Debug 50103 (EngineImpl:run): CRunReport returns: 1247
[2007/10/8 11:40:40:608] Debug 50103 (EngineImpl:run): Quit
[2007/10/8 11:40:40:699] Exception 1247 (): Report contains uncompiled PL/SQL.
oracle.reports.RWException: IDL:oracle/reports/RWException:1.0
at oracle.reports.engine.EngineImpl.run(EngineImpl.java:447)
at oracle.reports.engine._EngineClassImplBase._invoke(_EngineClassImplBase.java:90)
at com.sun.corba.se.internal.corba.ServerDelegate.dispatch(ServerDelegate.java:353)
at com.sun.corba.se.internal.iiop.ORB.process(ORB.java:280)
at com.sun.corba.se.internal.iiop.RequestProcessor.process(RequestProcessor.java:81)
at com.sun.corba.se.internal.orbutil.ThreadPool$PooledThread.run(ThreadPool.java:106)
I know that 1247 normally covers up another error, but I don't seem to get it....
Funny thing is, when copying the jsp's to another reports server, they do run (on the same DB).
Message was edited by:
user599601I have a rather frustrating problem on our production servers...
We are trying to start jsp files on a linux report server (10Gr2).
The command is displayed below
[2007/10/8 10:57:59:853] Info 50132 (EngineImpl:setCommandLine): Get command line: baseUrl=http://xxxxx:7777/reports/rwservlet/getfile/ userid=reporting@SHARED_BE USER_AGENT=Java/1.5.0_07 SERVER_NAME=xxxxxxxxx jobname="/opt/ogreports/catalog/SMC/BE-Shared/xxxx.jsp" destpath="/var/data/og/dashboard/van/sgs/001/reports/xx" getFilestr=/no> imagekey=reports9i par_end_date="01-10-2007" desname=xxxxxxxxxxx.pdf REMOTE_ADDR=127.0.0.1 SERVER_PROTOCOL=HTTP/1.1 authid=RWUser par_start_date="01-09-2007" destype=rcpfile REMOTE_HOST=127.0.0.1 SERVER_PORT=7777 CONTENT_TYPE=application/x-www-form-urlencoded report="/opt/ogreports/catalog/SMC/BE-Shared/xxx.jsp" expiredays=0 baseimageurl=http://xxxxx:7777/reports/rwservlet/getfile/HW/YX+JkD0HSAcVLzaSGilrWNAn36ufghgStsvQqfNFC7w== schedule="00:00 Oct 08, 2007" scphost="lion" desformat=pdf SCRIPT_NAME=/rwservlet par_id_project="1750"
The after paramform does some major data manipulations, writing to temporary tables (on commit preserve rows), that are used in queries from the reports.
This seems to go allright. The setup of all queries, program units etc passes as well. But when the report has to start formatting, I get a "1247 Program Unit not compiled" error message. This is an excerpt from the engine trace
[2007/10/8 11:40:40:243] Debug 50103 (EngineImpl:getCacheData): Start
[2007/10/8 11:40:40:243] Debug 50103 (EngineImpl:getCacheData): m_jobId = 9182
[2007/10/8 11:40:40:244] Debug 50103 (EngineImpl:getCacheData): Quit
[2007/10/8 11:40:40:534] Error 50103 (C Engine): 10:40:40 ERR REP-1247: Report contains uncompiled PL/SQL.
[2007/10/8 11:40:40:535] Error 50103 (rwfdt:rwfdtprint): 10:40:40 ERR Error occurred sending Job output to cache
[2007/10/8 11:40:40:536] Error 50103 (rwfdt:rwfdtfl_FreeDistList): running
[2007/10/8 11:40:40:536] Error 50103 (rwfdt:rwfdtfl_FreeDistList): quit
[2007/10/8 11:40:40:580] Debug 50103 (EngineImpl:run): CRunReport returns: 1247
[2007/10/8 11:40:40:608] Debug 50103 (EngineImpl:run): Quit
[2007/10/8 11:40:40:699] Exception 1247 (): Report contains uncompiled PL/SQL.
oracle.reports.RWException: IDL:oracle/reports/RWException:1.0
at oracle.reports.engine.EngineImpl.run(EngineImpl.java:447)
at oracle.reports.engine._EngineClassImplBase._invoke(_EngineClassImplBase.java:90)
at com.sun.corba.se.internal.corba.ServerDelegate.dispatch(ServerDelegate.java:353)
at com.sun.corba.se.internal.iiop.ORB.process(ORB.java:280)
at com.sun.corba.se.internal.iiop.RequestProcessor.process(RequestProcessor.java:81)
at com.sun.corba.se.internal.orbutil.ThreadPool$PooledThread.run(ThreadPool.java:106)
I know that 1247 normally covers up another error, but I don't seem to get it....
Funny thing is, when copying the jsp's to another reports server, they do run (on the same DB).
Message was edited by:
user599601 -
Getting error when placing jsp file in tomcat root folder
hello experts,
i have developed an application on netbeans 6.1 for mail.
It is working perfect when i run it from netbeans, but when we copy those jsp files to ROOT folder of tomcat5.5 server, it is showing me following error.
rg.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 14 in the jsp file: /Mailer1.jsp
Session cannot be resolved to a type
11: <%!
12: String nam = null, email = null, suggestion = null;
13: RequestDispatcher disp = null;
14: public static Session sess = null;
15:
16: %>
17: <%
An error occurred at line: 38 in the jsp file: /Mailer1.jsp
sess cannot be resolved
35:
36: //SecurityManager security = System.getSecurityManager();
37:
38: sess= Session.getInstance(props,new javax.mail.Authenticator() //if u uses getDefaultInstance it will raise Security Exception
39: {
40: protected PasswordAuthentication getPasswordAuthentication()
41: {
An error occurred at line: 38 in the jsp file: /Mailer1.jsp
Session cannot be resolved
35:
36: //SecurityManager security = System.getSecurityManager();
37:
38: sess= Session.getInstance(props,new javax.mail.Authenticator() //if u uses getDefaultInstance it will raise Security Exception
39: {
40: protected PasswordAuthentication getPasswordAuthentication()
41: {
An error occurred at line: 38 in the jsp file: /Mailer1.jsp
javax.mail.Authenticator cannot be resolved to a type
35:
36: //SecurityManager security = System.getSecurityManager();
37:
38: sess= Session.getInstance(props,new javax.mail.Authenticator() //if u uses getDefaultInstance it will raise Security Exception
39: {
40: protected PasswordAuthentication getPasswordAuthentication()
41: {
An error occurred at line: 45 in the jsp file: /Mailer1.jsp
sess cannot be resolved
42: return new PasswordAuthentication("[email protected]","ratatouille");
43: }
44: });
45: sess.setDebug(true);
46:
47:
48: //sess = Session.getDefaultInstance(props);
An error occurred at line: 50 in the jsp file: /Mailer1.jsp
Transport cannot be resolved to a type
47:
48: //sess = Session.getDefaultInstance(props);
49: //sess.setDebug(true);
50: Transport trans = sess.getTransport();
51: Message msg = new MimeMessage(sess);
52: msg.setRecipient(Message.RecipientType.TO, new InternetAddress("[email protected]"));
53: msg.setFrom(new InternetAddress(this.email));
An error occurred at line: 50 in the jsp file: /Mailer1.jsp
sess cannot be resolved
47:
48: //sess = Session.getDefaultInstance(props);
49: //sess.setDebug(true);
50: Transport trans = sess.getTransport();
51: Message msg = new MimeMessage(sess);
52: msg.setRecipient(Message.RecipientType.TO, new InternetAddress("[email protected]"));
53: msg.setFrom(new InternetAddress(this.email));
An error occurred at line: 51 in the jsp file: /Mailer1.jsp
Message cannot be resolved to a type
48: //sess = Session.getDefaultInstance(props);
49: //sess.setDebug(true);
50: Transport trans = sess.getTransport();
51: Message msg = new MimeMessage(sess);
52: msg.setRecipient(Message.RecipientType.TO, new InternetAddress("[email protected]"));
53: msg.setFrom(new InternetAddress(this.email));
54: msg.setSubject(this.nam);
An error occurred at line: 51 in the jsp file: /Mailer1.jsp
MimeMessage cannot be resolved to a type
48: //sess = Session.getDefaultInstance(props);
49: //sess.setDebug(true);
50: Transport trans = sess.getTransport();
51: Message msg = new MimeMessage(sess);
52: msg.setRecipient(Message.RecipientType.TO, new InternetAddress("[email protected]"));
53: msg.setFrom(new InternetAddress(this.email));
54: msg.setSubject(this.nam);
An error occurred at line: 51 in the jsp file: /Mailer1.jsp
sess cannot be resolved
48: //sess = Session.getDefaultInstance(props);
49: //sess.setDebug(true);
50: Transport trans = sess.getTransport();
51: Message msg = new MimeMessage(sess);
52: msg.setRecipient(Message.RecipientType.TO, new InternetAddress("[email protected]"));
53: msg.setFrom(new InternetAddress(this.email));
54: msg.setSubject(this.nam);
An error occurred at line: 52 in the jsp file: /Mailer1.jsp
Message.RecipientType.TO cannot be resolved to a type
49: //sess.setDebug(true);
50: Transport trans = sess.getTransport();
51: Message msg = new MimeMessage(sess);
52: msg.setRecipient(Message.RecipientType.TO, new InternetAddress("[email protected]"));
53: msg.setFrom(new InternetAddress(this.email));
54: msg.setSubject(this.nam);
55: msg.setContent(suggestion, "text/plain");
An error occurred at line: 52 in the jsp file: /Mailer1.jsp
InternetAddress cannot be resolved to a type
49: //sess.setDebug(true);
50: Transport trans = sess.getTransport();
51: Message msg = new MimeMessage(sess);
52: msg.setRecipient(Message.RecipientType.TO, new InternetAddress("[email protected]"));
53: msg.setFrom(new InternetAddress(this.email));
54: msg.setSubject(this.nam);
55: msg.setContent(suggestion, "text/plain");
An error occurred at line: 53 in the jsp file: /Mailer1.jsp
InternetAddress cannot be resolved to a type
50: Transport trans = sess.getTransport();
51: Message msg = new MimeMessage(sess);
52: msg.setRecipient(Message.RecipientType.TO, new InternetAddress("[email protected]"));
53: msg.setFrom(new InternetAddress(this.email));
54: msg.setSubject(this.nam);
55: msg.setContent(suggestion, "text/plain");
56: trans.connect();
Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:93)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:435)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:298)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:265)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:302)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
i m unable to find out the solution,
please help me to resolve it.
thnaks.Hi shams.hq,
I don't understand how you bother to copy an application in your server directories. It's really piece of cake to deploy with Tomcat.
All you have to do :
- with Netbeans, you build the project : a WAR file will be created in the dist directory of your project;
- launch the server, if it's not running;
- with your web browser, connect to the Tomcat Manager;
- from there, you may upload and deploy the WAR file of your project.
Et voilà ! Tomcat will unzip the WAR and install your classes and libraries at the right place. -
hi there,
I have a problem when a I execute JSP files. This is the message that I encounter everytime I executing JSP files:
" Java System Application Server Execution Note: make sure that the j2ee module or application has been deployed before using execution."
It seems that Application Server can not be started and I don't khow what I must do.
Best Regards.
Zolfagharhi friend
u just restart the application or deploy again on server.
i hope u won't get any error.
[email protected] -
hi Friends,
using tomcat and i m trying to run jsp file and getting the error
javax.servlet.ServletException: com/sun/tools/javac/Main (Unsupported major.minor version 48.0)
What does this mean and wht needs to be done
Thnxhi ,
i solved my issue
in WSAD Preferences , i changed JVM settings to show JRE option as Websphere v5.1 JRE
now i am able to run jsp files w/o any probelm -
Error when precompile jsp files
I tried to precompile my jsp files by adding precompile functionality in my xml
file and I received this error during startup. Can anyone help?
java.lang.NullPointerException
at weblogic.servlet.jsp.Jsp2Java.makeReader(Jsp2Java.java:232)
at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:112)
at weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:253
at weblogic.servlet.jsp.Precompiler.compileOne(Precompiler.java:124)
at weblogic.servlet.jsp.Precompiler.compile(Precompiler.java:44)
at weblogic.servlet.internal.WebAppServletContext.precompileJSPs(WebAppS
ervletContext.java:2003)
at weblogic.servlet.internal.dd.DescriptorLoader.initFromWebApp(Descript
orLoader.java:742)
at weblogic.servlet.internal.dd.DescriptorLoader.createServletContext(De
scriptorLoader.java:359)
at weblogic.servlet.internal.HttpServer.loadWARContext(HttpServer.java:4
67)
at weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:404)
at weblogic.j2ee.WebAppComponent.deploy(WebAppComponent.java:74)
at weblogic.j2ee.Application.addComponent(Application.java:133)
at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:115)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
oymentTarget.java:327)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
oymentTarget.java:143)
at weblogic.management.mbeans.custom.WebServer.addWebDeployment(WebServe
r.java:76)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
eanImpl.java:562)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
.java:548)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:285)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:439)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:180)
at $Proxy29.addWebDeployment(Unknown Source)
at weblogic.management.configuration.WebServerMBean_CachingStub.addWebDe
ployment(WebServerMBean_CachingStub.java:1012)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
oymentTarget.java:313)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
oymentTarget.java:143)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
eanImpl.java:562)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
.java:548)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:285)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
at weblogic.management.internal.ConfigurationMBeanImpl.updateConfigMBean
s(ConfigurationMBeanImpl.java:409)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:287)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
at weblogic.management.internal.DynamicMBeanImpl.addDeployment(DynamicMB
eanImpl.java:866)
at weblogic.management.internal.DynamicMBeanImpl.addDeployment(DynamicMB
eanImpl.java:853)
at weblogic.management.internal.DynamicMBeanImpl.add(DynamicMBeanImpl.ja
va:838)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
eanImpl.java:566)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
.java:548)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:285)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:439)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:180)
at $Proxy14.addTarget(Unknown Source)
at weblogic.management.mbeans.custom.ApplicationManager.autoDeploy(Appli
cationManager.java:486)
at weblogic.management.mbeans.custom.ApplicationManager.addApplication(A
pplicationManager.java:557)
at weblogic.management.mbeans.custom.ApplicationManager.addApplication(A
pplicationManager.java:504)
at weblogic.management.mbeans.custom.ApplicationManager.poll(Application
Manager.java:428)
at weblogic.management.mbeans.custom.ApplicationManager.poll(Application
Manager.java:380)
at weblogic.management.mbeans.custom.ApplicationManager.update(Applicati
onManager.java:152)
at weblogic.management.mbeans.custom.ApplicationManager.startAdminManage
r(ApplicationManager.java:205)
at weblogic.management.mbeans.custom.ApplicationManager.start(Applicatio
nManager.java:120)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
eanImpl.java:562)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
.java:548)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:285)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:439)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:180)
at $Proxy3.start(Unknown Source)
at weblogic.management.Admin.startApplicationManager(Admin.java:1037)
at weblogic.management.Admin.finish(Admin.java:493)
at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:429)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:170)
at weblogic.Server.main(Server.java:35)is your webapp deployed as .war or as exploded format?
If it's war, there's a patch available that you can get it by contacting support
Kumar
buatapa wrote:
I tried to precompile my jsp files by adding precompile functionality in my xml
file and I received this error during startup. Can anyone help?
java.lang.NullPointerException
at weblogic.servlet.jsp.Jsp2Java.makeReader(Jsp2Java.java:232)
at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:112)
at weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:253
at weblogic.servlet.jsp.Precompiler.compileOne(Precompiler.java:124)
at weblogic.servlet.jsp.Precompiler.compile(Precompiler.java:44)
at weblogic.servlet.internal.WebAppServletContext.precompileJSPs(WebAppS
ervletContext.java:2003)
at weblogic.servlet.internal.dd.DescriptorLoader.initFromWebApp(Descript
orLoader.java:742)
at weblogic.servlet.internal.dd.DescriptorLoader.createServletContext(De
scriptorLoader.java:359)
at weblogic.servlet.internal.HttpServer.loadWARContext(HttpServer.java:4
67)
at weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:404)
at weblogic.j2ee.WebAppComponent.deploy(WebAppComponent.java:74)
at weblogic.j2ee.Application.addComponent(Application.java:133)
at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:115)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
oymentTarget.java:327)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
oymentTarget.java:143)
at weblogic.management.mbeans.custom.WebServer.addWebDeployment(WebServe
r.java:76)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
eanImpl.java:562)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
java:548)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:285)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:439)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:180)
at $Proxy29.addWebDeployment(Unknown Source)
at weblogic.management.configuration.WebServerMBean_CachingStub.addWebDe
ployment(WebServerMBean_CachingStub.java:1012)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
oymentTarget.java:313)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
oymentTarget.java:143)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
eanImpl.java:562)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
java:548)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:285)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
at weblogic.management.internal.ConfigurationMBeanImpl.updateConfigMBean
s(ConfigurationMBeanImpl.java:409)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:287)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
at weblogic.management.internal.DynamicMBeanImpl.addDeployment(DynamicMB
eanImpl.java:866)
at weblogic.management.internal.DynamicMBeanImpl.addDeployment(DynamicMB
eanImpl.java:853)
at weblogic.management.internal.DynamicMBeanImpl.add(DynamicMBeanImpl.ja
va:838)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
eanImpl.java:566)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
java:548)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:285)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:439)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:180)
at $Proxy14.addTarget(Unknown Source)
at weblogic.management.mbeans.custom.ApplicationManager.autoDeploy(Appli
cationManager.java:486)
at weblogic.management.mbeans.custom.ApplicationManager.addApplication(A
pplicationManager.java:557)
at weblogic.management.mbeans.custom.ApplicationManager.addApplication(A
pplicationManager.java:504)
at weblogic.management.mbeans.custom.ApplicationManager.poll(Application
Manager.java:428)
at weblogic.management.mbeans.custom.ApplicationManager.poll(Application
Manager.java:380)
at weblogic.management.mbeans.custom.ApplicationManager.update(Applicati
onManager.java:152)
at weblogic.management.mbeans.custom.ApplicationManager.startAdminManage
r(ApplicationManager.java:205)
at weblogic.management.mbeans.custom.ApplicationManager.start(Applicatio
nManager.java:120)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
eanImpl.java:562)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
java:548)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:285)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:439)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:180)
at $Proxy3.start(Unknown Source)
at weblogic.management.Admin.startApplicationManager(Admin.java:1037)
at weblogic.management.Admin.finish(Admin.java:493)
at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:429)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:170)
at weblogic.Server.main(Server.java:35) -
hi, i`m developing a web app for my boss. i usually only programm de web frontend part of the software so i'm not that used to java lang speifics. here is my prob:
i have a class which shoul save and retrieve the String "rolle"
package at.mobilkom.ears;
public class Sessionhandler
private String rolle;
public void setRolle(String r) {
rolle=r;
public String getRolle() {
return rolle;
} i call this methods just as normal in a jsp file:
Sessionhandler.setRolle(rolle); and session.putValue("ROLLE", Sessionhandler.getRolle());i did all the import stuff so that's not the mistake. i'm developing with bea weblogic and i get the error message:
"Error: Method cannot be accessed from a static context"
so what should i do to make it work?? thxhi, i`m developing a web app for my boss. i usually
only programm de web frontend part of the software so
i'm not that used to java lang speifics. here is my
prob:
i have a class which shoul save and retrieve the
String "rolle"
package at.mobilkom.ears;
public class Sessionhandler
private String rolle;
public void setRolle(String r) {
rolle=r;
public String getRolle() {
return rolle;
} i call this methods just as normal in a jsp file:
Sessionhandler.setRolle(rolle); and session.putValue("ROLLE",
Sessionhandler.getRolle());i did all the import stuff so that's not the mistake.
i'm developing with bea weblogic and i get the error
message:
"Error: Method cannot be accessed from a static
context"
so what should i do to make it work?? thxYou have to create an instance before you call the methods which aren't static. Please spend some time reading the fundamentals.
The following code will work.
Sessionhandler sessionhandler=new Sessionhandler();
sessionhandler.setRolle(rolle);
session.putValue("ROLLE",sessionhandler.getRolle());
Maybe you are looking for
-
Configuring PHP on Windows 2012 r2 server - PHP won't work
Hi I was asked to migrate all apps from a win 2003 server to a win 2012 r2. From a clean install I made sure that all windows updates are done, made sure windows authentication is enabled then went through the web platform installer adding php 5.6.
-
How do I delete music downloaded through iCloud on my iPhone?
I am over capacity on my iPhone because i thought that iCloud allowed me to stream my iTunes music...I didnt know it was being downloaded on my phone! (dumb i know). So I plug it in to sync with my mac thinking that I can just take away the songs the
-
Returns, Credit Memo, Credit Memo Request
Hi All, Can anybody clear my doubts for the below mentioned and i would require the process flow please with Transactions and Order Type, Billing Type etc. Booking goods returned Credit note with stock receipt Credit note without stock receipt Va
-
How to import the existing project in the CVS to the weblogic workshop??
Hi, I have a project in the CVS and I want to work with that project in the weblogic8.1 workshop. Can anyone help me in importing the existing CVS project/application into the weblogic workshop so that I can check-in, check-out and debug the applicat
-
Change Account Workflow in CUP - Doesn't pick up existing values for an Acc
Hi, When using the change account option available in the CUP(5.3 SP 7), I expected the system to populate the user details as they exist in the provisioning system once I enter the account details that need a change. We have the 'Search' and 'User D