[prev in list] [next in list] [prev in thread] [next in thread] 

List:       odtug-webdev-l
Subject:    Running JSPs in 9iAS R2 -- three different methods, three differe
From:       "Kashuba, Edward" <ekashuba () state ! pa ! us>
Date:       2002-07-22 17:53:03
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


  I've recently installed 9iAS Release 2 on a Windows 2000 Server platform.  I've \
been trying to port over a JSP application which we have running under 9iAS R1 but am \
running into problems.  I came up with three different ways of running the \
application under R2 and have run into three roadblocks.  If anyone has any ideas \
about any of these problems, I'd love to hear them.  
  I'm pretty much a newbie when it comes to this stuff, so if I'm missing something \
obvious please feel free to bring it to my attention.    
-----------------------------------
  Method #1: Import JSP application as a WAR file and run as an internal JSP
 
  I zipped up my application into a WAR file, created a page of type JSP in portal, \
and uploaded the WAR.  Everything looks like it went smoothly, but when I try to \
access the portal page I get an error.  The part of the error text which intrigued me \
most says "file type is not supported".  I've been able to create a JSP page by \
uploading a simple JSP, but not by uploading a WAR (even a simple WAR).  Has anyone \
else tried this and/or run into this problem?  Here's the text of the error:  
Error: The servlet produced the following error stack. 
oracle.webdb.utils.PortalExceptionImpl: Missing resource 
bundle=oracle.webdb.page.resource.PageBundle name=JSPDEPLOYERROR param=JSP2 
param=Deployment error in JSP page JSP2, source 
http://epitads01.pader.gov:7777/pls/portal/docs/1524.WAR cannot be deployed, 
file type is not supported. 
param=D:\Ora9iASR2Server\j2ee\OC4J_Portal\applications\portal\portal\internal_js
p param=http://epitads01.pader.gov:7777/pls/portal/docs/1524.WAR
at oracle.portal.PortalException.<init>(Unknown Source)
at oracle.portal.PortalException.<init>(Unknown Source)
at oracle.webdb.page.JspDeployment.prepare(Unknown Source)
at oracle.webdb.page.JspDeployment.runJsp(Unknown Source)
at oracle.webdb.page.DataProcessor31.generatePage(Unknown Source)
at oracle.webdb.page.DataProcessor31.process(Unknown Source)
at oracle.webdb.page.PageBuilder.process(Unknown Source)
at oracle.webdb.page.ParallelServlet.doGet(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:244)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
at 
com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:5
9)
at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:283)
at 
com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatche
r.java:523)
at 
com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequest
Dispatcher.java:269)
at 
com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.ja
va:735)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:151)
-------------------------------------------------------------------------------
Method #2: Set up a provider for the JSP application and create a portlet based on \
that provider.  
  This is the approach we used in the R1 version of the application.  I went through \
all of the steps and was able to make my portlet.  The problem I'm running into has \
to do with parameter passing.  In R1 I was able to call the portal page and pass some \
parameters into the JSP ( http://shadowfax:7778/edstest/test.jsp?ClientId=24453 \
<http://shadowfax:7778/edstest/test.jsp?ClientId=24453> ).  I could then retreive the \
values by using a simple <%= request.getParameter("parameterName") %> call.    
  Under R2 the value of the parameter is always null.  That kinda' messes up the app \
a bit.   Has anyone been able to pass parameters into a JSP application provider in \
                R2?
----------------------------------------------------------------------------------
Method #3: Run the application outside of portal, but use the portal tag libraries to \
make portal calls.  
  I've never messed with tag libraries before, but figured I'd give this a shot. I \
promptly ran into this error:  
500 Internal Server Error
OracleJSP: 
JSP Error:
--------------------------------------------------------------------------------
Request URI:/edstestdir/test.jsp
Exception:
java.lang.ExceptionInInitializerError: java.util.MissingResourceException: 
Can't find bundle for base name oracle.webdb.service.resource.PortalBundle, 
locale en_US
at 
java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:712)
---------------------------------------------------------------------------------
 
  Thanks for any help.
 
Ed Kashuba
 <mailto:ekashuba@state.pa.us> ekashuba@state.pa.us
(717)772-5896
 
Shape Your Environmental Future Now! 
http://www.dep.state.pa.us/hosting/efp2/ <http://www.dep.state.pa.us/hosting/efp2/>  
Find Out What You're Missing! Get eNOTICE! 
http://www.dep.state.pa.us/enotice/ <http://www.dep.state.pa.us/enotice/>  
Why Are These Things Things Added to My E-Mail?
http://www.ihavenoidea.com <http://www.ihavenoidea.com/> 
 


[Attachment #5 (text/html)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">

<STYLE>.spanstyle {
	FONT-WEIGHT: normal; FONT-SIZE: 10pt; VISIBILITY: visible; COLOR: black; \
FONT-FAMILY: Book Antiqua; POSITION: absolute; TOP: -50px }
</STYLE>

<SCRIPT language=JavaScript>

var nDots = 7;
var Xpos = 0;
var Ypos = 0;

var DELTAT = .01;
var SEGLEN = 10;
var SPRINGK = 10;
var MASS = 1;
var GRAVITY = 50;
var RESISTANCE = 10;
var STOPVEL = 0.1;
var STOPACC = 0.1;
var DOTSIZE = 11;
var BOUNCE = 0.75;
var isNetscape = navigator.appName=="Netscape";
var followmouse = true;
var dots = new Array();

function dot(i) {
this.X = Xpos;
this.Y = Ypos;
this.dx = 0;
this.dy = 0;
if (isNetscape) {
this.obj = eval("document.dot" + i);
} else {
this.obj = eval("dot" + i + ".style");
   }
}

function startanimate() {
setInterval("animate()", 20);
}
function setInitPositions(dots) {
var startloc = document.all.tags("LI");
var i = 0;
for (i = 0; i < startloc.length && i < (nDots - 1); i++) {
dots[i+1].X = startloc[i].offsetLeft
startloc[i].offsetParent.offsetLeft - DOTSIZE;
dots[i+1].Y = startloc[i].offsetTop +
startloc[i].offsetParent.offsetTop + 2*DOTSIZE;
}
dots[0].X = dots[1].X;
dots[0].Y = dots[1].Y - SEGLEN;
}

function MoveHandler(e) {
Xpos = e.pageX;
Ypos = e.pageY;
return true;
}

function MoveHandlerIE() {
Xpos = window.event.x + document.body.scrollLeft;
Ypos = window.event.y + document.body.scrollTop;
}
if (isNetscape) {
document.captureEvents(Event.MOUSEMOVE);
document.onMouseMove = MoveHandler;
} else {
document.onmousemove = MoveHandlerIE;
}

function vec(X, Y)
{
this.X = X;
this.Y = Y;
}

// adds force in X and Y to spring for dot[i] on dot[j]
function springForce(i, j, spring)
{
var dx = (dots[i].X - dots[j].X);
var dy = (dots[i].Y - dots[j].Y);
var len = Math.sqrt(dx*dx + dy*dy);
if (len > SEGLEN) {
var springF = SPRINGK * (len - SEGLEN);
spring.X += (dx / len) * springF;
spring.Y += (dy / len) * springF;
   }
}

function animate() {
var start = 0;
if (followmouse) {
dots[0].X = Xpos;
dots[0].Y = Ypos;
start = 1;
}
for (i = start ; i < nDots; i++ ) {
var spring = new vec(0, 0);
if (i > 0) {
springForce(i-1, i, spring);
}
if (i < (nDots - 1)) {
springForce(i+1, i, spring);
}
var resist = new vec(-dots[i].dx * RESISTANCE, -dots[i].dy * RESISTANCE);
var accel = new vec((spring.X + resist.X)/ MASS, (spring.Y + resist.Y)/ MASS + \
GRAVITY); dots[i].dx += (DELTAT * accel.X);
dots[i].dy += (DELTAT * accel.Y);
if (Math.abs(dots[i].dx) < STOPVEL &&
Math.abs(dots[i].dy) < STOPVEL &&
Math.abs(accel.X) < STOPACC &&
Math.abs(accel.Y) < STOPACC) {
dots[i].dx = 0;
dots[i].dy = 0;
}
dots[i].X += dots[i].dx;
dots[i].Y += dots[i].dy;
var height, width;
if (isNetscape) {
height = window.innerHeight + document.scrollTop;
width = window.innerWidth + document.scrollLeft;
} else {
height = document.body.clientHeight + document.body.scrollTop;
width = document.body.clientWidth + document.body.scrollLeft;
}
if (dots[i].Y >=  height - DOTSIZE - 1) {
if (dots[i].dy > 0) {
dots[i].dy = BOUNCE * -dots[i].dy;
}
dots[i].Y = height - DOTSIZE - 1;
}
if (dots[i].X >= width - DOTSIZE) {
if (dots[i].dx > 0) {
dots[i].dx = BOUNCE * -dots[i].dx;
}
dots[i].X = width - DOTSIZE - 1;
}
if (dots[i].X < 0) {
if (dots[i].dx < 0) {
dots[i].dx = BOUNCE * -dots[i].dx;
}
dots[i].X = 0;
}
dots[i].obj.left = dots[i].X;
dots[i].obj.top =  dots[i].Y;
   }
}

function init() {
var i = 0;
for (i = 0; i < nDots; i++) {
dots[i] = new dot(i);
}
if (!isNetscape) {
// I only know how to read the locations of the
// <LI> items in IE
//skip this for now
// setInitPositions(dots)
}
for (i = 0; i < nDots; i++) {
dots[i].obj.left = dots[i].X;
dots[i].obj.top = dots[i].Y;
}
if (isNetscape) {
startanimate();
} else {
// let dots sit there for a few seconds
// since they're hiding on the real bullets
setTimeout("startanimate()", 3000);
   }
}


</SCRIPT>


<STYLE>BODY {
	BACKGROUND-POSITION: left top; MARGIN-TOP: 25px; FONT-SIZE: 12pt; MARGIN-LEFT: \
110px; COLOR: #000000; BACKGROUND-REPEAT: repeat-y; FONT-FAMILY: Book Antiqua; \
BACKGROUND-COLOR: #ffffff }
</STYLE>

<META content="MSHTML 6.00.2716.2200" name=GENERATOR></HEAD>
<BODY style="BACKGROUND-COLOR: #ffffff" bgColor=#ffffff 
background=cid:046182215@22072002-06e5>
<DIV><SPAN class=046182215-22072002>&nbsp; I've recently installed 9iAS Release 
2 on a Windows 2000 Server platform.&nbsp; I've been trying to port over a JSP 
application which we have running under 9iAS R1 but am running into 
problems.&nbsp; I came up with three different ways of running the application 
under R2 and have run into three roadblocks.&nbsp; If anyone&nbsp;has any 
ideas&nbsp;about any of these problems, I'd love to hear them.</SPAN></DIV>
<DIV><SPAN class=046182215-22072002></SPAN>&nbsp;</DIV>
<DIV><SPAN class=046182215-22072002>&nbsp; I'm pretty much a newbie when it 
comes to this stuff, so if I'm missing something obvious please feel free to 
bring it to my attention.&nbsp; </SPAN></DIV>
<DIV><SPAN class=046182215-22072002></SPAN>&nbsp;</DIV>
<DIV><SPAN 
class=046182215-22072002>-----------------------------------</SPAN></DIV>
<DIV><SPAN class=046182215-22072002>&nbsp; Method #1: Import JSP application as 
a WAR file and run as an internal JSP</SPAN></DIV>
<DIV><SPAN class=046182215-22072002></SPAN>&nbsp;</DIV>
<DIV><SPAN class=046182215-22072002>&nbsp; I zipped up my application into a WAR 
file, created a page of type JSP in portal, and uploaded the WAR.&nbsp; 
Everything looks like it went smoothly, but when I try to access the portal page 
I get an error.&nbsp; The part of the error text which intrigued me most says 
"file type is not supported".&nbsp; I've been able to create a JSP page by 
uploading a simple JSP, but not by uploading a WAR (even a simple WAR).&nbsp; 
Has anyone else tried this and/or run into this problem?&nbsp; Here's the text 
of the error:</SPAN></DIV>
<DIV><SPAN class=046182215-22072002></SPAN>&nbsp;</DIV>
<DIV><SPAN class=046182215-22072002>Error: The servlet produced the following 
error stack. <BR>oracle.webdb.utils.PortalExceptionImpl: Missing resource 
<BR>bundle=oracle.webdb.page.resource.PageBundle name=JSPDEPLOYERROR param=JSP2 
<BR>param=Deployment error in JSP page JSP2, source 
<BR>http://epitads01.pader.gov:7777/pls/portal/docs/1524.WAR cannot be deployed, 
<BR>file type is not supported. 
<BR>param=D:\Ora9iASR2Server\j2ee\OC4J_Portal\applications\portal\portal\internal_js<BR>p \
 param=http://epitads01.pader.gov:7777/pls/portal/docs/1524.WAR<BR>at 
oracle.portal.PortalException.&lt;init&gt;(Unknown Source)<BR>at 
oracle.portal.PortalException.&lt;init&gt;(Unknown Source)<BR>at 
oracle.webdb.page.JspDeployment.prepare(Unknown Source)<BR>at 
oracle.webdb.page.JspDeployment.runJsp(Unknown Source)<BR>at 
oracle.webdb.page.DataProcessor31.generatePage(Unknown Source)<BR>at 
oracle.webdb.page.DataProcessor31.process(Unknown Source)<BR>at 
oracle.webdb.page.PageBuilder.process(Unknown Source)<BR>at 
oracle.webdb.page.ParallelServlet.doGet(Unknown Source)<BR>at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:244)<BR>at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:336)<BR>at 
<BR>com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:5<BR>9)<BR>at \
 oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:283)<BR>at 
<BR>com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatche<BR>r.java:523)<BR>at \
 <BR>com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequest<BR>Dispatcher.java:269)<BR>at \
 <BR>com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.ja<BR>va:735)<BR>at \
 com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:151)<BR>------- \
------------------------------------------------------------------------</SPAN></DIV> \
<DIV><SPAN class=046182215-22072002>Method #2: Set up a provider for the JSP  \
application and create a portlet based on that provider.</SPAN></DIV> <DIV><SPAN \
class=046182215-22072002></SPAN>&nbsp;</DIV> <DIV><SPAN \
class=046182215-22072002>&nbsp; This is the approach we used in the  R1 version of \
the application.&nbsp; I went through all of the steps and was  able to make my \
portlet.&nbsp; The problem I'm running into has to do with  parameter passing.&nbsp; \
In R1 I was able to call the portal page and pass some  parameters into the JSP (<A 
href="http://shadowfax:7778/edstest/test.jsp?ClientId=24453">http://shadowfax:7778/edstest/test.jsp?ClientId=24453</A>).&nbsp; \
 I could then retreive the values by using a simple &lt;%= 
request.getParameter("parameterName") %&gt; call.&nbsp; </SPAN></DIV>
<DIV><SPAN class=046182215-22072002></SPAN>&nbsp;</DIV>
<DIV><SPAN class=046182215-22072002>&nbsp; Under R2 the value of the parameter 
is always null.&nbsp; That kinda' messes up the app a bit. </SPAN><SPAN 
class=046182215-22072002>&nbsp; Has anyone been able to pass parameters into a 
JSP application provider&nbsp;in R2?</SPAN></DIV>
<DIV><SPAN 
class=046182215-22072002>----------------------------------------------------------------------------------</SPAN></DIV>
 <DIV><SPAN class=046182215-22072002>Method #3: Run the application outside of 
portal, but use the portal tag libraries to make portal calls.</SPAN></DIV>
<DIV><SPAN class=046182215-22072002></SPAN>&nbsp;</DIV>
<DIV><SPAN class=046182215-22072002>&nbsp; I've never messed with tag libraries 
before, but figured I'd give this a shot. I promptly ran into this 
error:</SPAN></DIV>
<DIV><SPAN class=046182215-22072002></SPAN>&nbsp;</DIV>
<DIV><SPAN class=046182215-22072002>500 Internal Server Error<BR>OracleJSP: 
<BR>JSP 
Error:<BR>--------------------------------------------------------------------------------<BR>Request \
 URI:/edstestdir/test.jsp<BR>Exception:<BR>java.lang.ExceptionInInitializerError: 
java.util.MissingResourceException: <BR>Can't find bundle for base name 
oracle.webdb.service.resource.PortalBundle, <BR>locale en_US<BR>at 
<BR>java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:712)<BR \
>---------------------------------------------------------------------------------</SPAN></DIV>
> 
<DIV><SPAN class=046182215-22072002></SPAN>&nbsp;</DIV>
<DIV><SPAN class=046182215-22072002>&nbsp; Thanks for any help.</SPAN></DIV>
<DIV><SPAN class=046182215-22072002></SPAN>&nbsp;</DIV>
<DIV><FONT face="Comic Sans MS" size=6>Ed Kashuba</FONT></DIV>
<DIV><A href="mailto:ekashuba@state.pa.us"><FONT face=Verdana color=#000000 
size=1>ekashuba@state.pa.us</FONT></A></DIV>
<DIV>(717)772-5896</DIV>
<DIV><FONT face="Book Antiqua"></FONT>&nbsp;</DIV>
<DIV>Shape Your Environmental Future Now! <BR><A 
href="http://www.dep.state.pa.us/hosting/efp2/">http://www.dep.state.pa.us/hosting/efp2/</A> \
 <BR>Find Out What You're Missing! Get eNOTICE! <BR><A 
href="http://www.dep.state.pa.us/enotice/">http://www.dep.state.pa.us/enotice/</A> 
</DIV>
<DIV><FONT face="Book Antiqua" color=#000000>Why Are These Things Things Added 
to My E-Mail?</FONT></DIV>
<DIV><FONT face="Book Antiqua" color=#000000><A 
href="http://www.ihavenoidea.com/">http://www.ihavenoidea.com</A></FONT></DIV>
<DIV><FONT face="Book Antiqua" color=#000000></FONT>&nbsp;</DIV>
<DIV id=dot0 
style="VISIBILITY: hidden; WIDTH: 11px; POSITION: absolute; HEIGHT: 11px"><IMG 
height=11 src="bullet.gif" width=11></DIV>
<DIV id=dot1 style="WIDTH: 11px; POSITION: absolute; HEIGHT: 11px"><IMG 
height=11 src="bullet.gif" width=11></DIV>
<DIV id=dot2 style="WIDTH: 11px; POSITION: absolute; HEIGHT: 11px"><IMG 
height=11 src="bullet.gif" width=11></DIV>
<DIV id=dot3 style="WIDTH: 11px; POSITION: absolute; HEIGHT: 11px"><IMG 
height=11 src="bullet.gif" width=11></DIV>
<DIV id=dot4 style="WIDTH: 11px; POSITION: absolute; HEIGHT: 11px"><IMG 
height=11 src="bullet.gif" width=11></DIV>
<DIV id=dot5 style="WIDTH: 11px; POSITION: absolute; HEIGHT: 11px"><IMG 
height=11 src="bullet.gif" width=11></DIV>
<DIV id=dot6 style="WIDTH: 11px; POSITION: absolute; HEIGHT: 11px"><IMG 
height=11 src="bullet.gif" width=11></DIV>
<SCRIPT language=JavaScript>
<!-- Original:  Philip Winston (pwinston@yahoo.com) -->
<!-- Web Site:  http://members.xoom.com/ebullets -->
<!-- 'Scrolling Fix' by Troels Jakobsen <tjak@get2net.dk> -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin

init();

// End -->
</SCRIPT>
</BODY></HTML>


["bullet.gif" (image/gif)]
["ReadMe.txt" (text/plain)]

The previous attachment was filtered out by the ListGuru mailing
software at fatcity.com because binary attachments are not appropriate
for mailing lists.  If you want a copy of the attachment which was
removed, contact the sender directly and ask for it to be sent to
you by private E-mail.

This warning is inserted into all messages containing binary
attachments which have been removed by ListGuru.  If you have questions
about this message, contact Postmaster@fatcity.com for clarification.

["skyrock.gif" (image/gif)]
["ReadMe.txt" (text/plain)]

The previous attachment was filtered out by the ListGuru mailing
software at fatcity.com because binary attachments are not appropriate
for mailing lists.  If you want a copy of the attachment which was
removed, contact the sender directly and ask for it to be sent to
you by private E-mail.

This warning is inserted into all messages containing binary
attachments which have been removed by ListGuru.  If you have questions
about this message, contact Postmaster@fatcity.com for clarification.

Thanks to everyone for making ODTUG 2002 a great success!  Plan now
for next year's conference: Loews Miami Beach, Florida, June 22-27, 2003.
-- 
Author: Kashuba, Edward
  INET: ekashuba@state.pa.us

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru@fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ODTUG-WEBDEV-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic