Tomcat 5.5.x does not background compile modified JSP
Has anyone had any luck getting Tomcat 5.5.x to recompile a modified JSP?
I'm using:
Windows 2000
Tomcat 5.5.9 (was using 5.5.7, same deal)
Java 1.5
Here's my tomcat\conf\web.xml settings for the JspServlet (I tried what seems all combininations):
<servlet>
<servlet-name>jsp</servlet-name>
<servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
<init-param>
<param-name>development</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>modificationTestInterval</param-name>
<param-value>20</param-value>
</init-param>
<init-param>
<param-name>fork</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>xpoweredBy</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>compiler</param-name>
<param-value>modern</param-value>
</init-param>
<init-param>
<param-name>compilerSourceVM</param-name>
<param-value>1.5</param-value>
</init-param>
<init-param>
<param-name>compilerTargetVM</param-name>
<param-value>1.5</param-value>
</init-param>
<init-param>
<param-name>verbose</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>3</load-on-startup>
</servlet>
Thanks for your help!
modified jsp's recompile automatically for me. But a changed class such as a bean that is referenced inside the JSP will not get updated, the context first needs to be reset using the tomcat manager. Or do it the brutal way: restart tomcat itself.
Similar Messages
-
CiscoWorks Tomcat Servlet Engine service does not start
Hello!
CiscoWorks Tomcat Servlet Engine service does not start.
Events in the Windows Event Viewer:
The CiscoWorks Tomcat Servlet Engine service terminated unexpectedly. It has done this 1 time(s).
output pdshow and file stderr.log, hs_err_pid2128.log attached.
Do you have an idea how to resolve this?
Thanks!The only things which I see are wrong are the start types for the IPM NG database engine and HUM database engine services. They must be set to Manual, not Automatic. However, that would not account for the Tomcat crash. The crash points to an error in the code which processes regdaemon.xml, but I see no reason why that should be failing. As I said before, I think it would be best to open a Service Request. Remote access would be helpful to dig into this problem in more detail.
Please support CSC Helps Haiti
https://supportforums.cisco.com/docs/DOC-8895
https://supportforums.cisco.com -
ASC 2.0 ant - does not load compiler constants from config.xml files
Constants added to the mxmlc task with a config xml file do not work.
Below, the CONFIG::debug and CONFIG::release constants will compile, but the one defined in the config-common.xml file (CONFIG::pi) does not.
Portion of an ant macro:
<mxmlc
file="@{source.dir}/@{source.file}"
output="@{output.dir}/@{project.name}.@{output.extension}"
debug="@{debug}"
target-player="@{target-player}"
accessible="@{accessible}"
use-network="@{use-network}"
swf-version="@{swf.version}"
inline="@{inline}"
default-frame-rate="@{frameRate}"
>
<default-size width="@{width}" height="@{height}" />
<source-path path-element="@{source.dir}" />
<define name="CONFIG::debug" value="@{debug}"/>
<define name="CONFIG::release" value="!CONFIG::debug"/>
<load-config filename="config-common.xml" />
<load-config filename="config-as-beta.xml" />
<load-config filename="@{load-config}" />
<arguments />
</mxmlc>
contents of config-common.xml:
<flex-config>
<compiler>
<define append="true">
<name>CONFIG::pi</name>
<value>3.1415926535897932384626433832795</value>
</define>
</compiler>
</flex-config>
Compiling a ".as" file with something something like "trace(CONFIG::pi);" will result in "Error: Can not resolve config constant: 'pi'" with the ant macro.
Using the Flash Builder 4.7 compiler with "Addition compiler arguments" set to "-define+=CONFIG::debug,true -define+=CONFIG::release,false -load-config+=config-common.xml -inline" does not produce the error.I'm not sure I added the bug to the right place anymore. It's been added to bugbase.adobe.com under AIR 3.4, but I'm not sure if that covers the actionscript compiler 2 or not because I found another bug tracker at bugs.adobe.com. The actual bug is here: https://bugbase.adobe.com/index.cfm?event=bug&id=3339017
Does anyone know where to post bugs for the actionscript compiler 2.0? -
Weblogic 6.1 , does not pick up modified static page
hi,
Weblogic 6.1
Weblogic opens a HTML page in a directory (not EJB, nothing fancy), fine.
Then, if i modify the static page , Weblogic does not pick up the changed html
until it is restarted. Is it normal?
Is there any setting to force weblogic to change the latest version of the static
page?Please send an email to [email protected] to open a support case.
Matthias Ernst wrote:
> I would like to report a bug in WLS 6.1 SP3 that cost me a few hours.
>
> If you set a content type that does not start with 'text', the charset
> attribute will be simply ignored, i.e. the response writer is still in
> ISO-8859-1.
> It will, however turn up in the HTTP header.
>
> Test:
> response.setContentType("fake/html;charset=utf-8");
> response.getWriter().write((char)160);
>
> The response will contain the header above but will consist only of
> byte 160.
> If you change the above to text/html, it will suddenly be UTF-8
> encoded.
>
> The bytecode of ServletResponseImpl reveals exactly that logic above.
> Any sensible explanation ?
>
> Thank you
> Matthias
Rajesh Mirchandani
Developer Relations Engineer
BEA Support
-
Tomcat 5.0.16 does not start with https.
I've just done an update to a tomcat that was otherwise working perfectly.
The original tomcat was running https on 8443 and has done so without a problem for many weeks.
Since the update (which had nothing to do with the keystore or any config files), the tomat now refuses to even start with https enabled.
If I turn the https connector off, and run the same webapps under http, everything is fine, and the tomcat runs happily.
What could have caused it to fail ? The SSL cert is not out of date.
More over, if I clear the log files then attempt an https connector start, it recreates the catalina.out file, but without anything in it. Does this sound like a permissions issue.. ?
I'm trying to figure out whats happened to the box, rather than the tomcat I think.try hitting the server with the https:// ip address and not the www.nameofserver.
also try http://nameorip:443, http://nameorip:8443
Catalina.out will only show you server started/stopped and or any System.out.println's you have.
make sure you have something like this in your <context> tag.
<Logger className="org.apache.catalina.logger.FileLogger" prefix="newShop_log." suffix=".txt" timestamp="true" />
If you do have a logger for your context, check its file for errors.
The answer will be in your logs, you just have to find 'em. -
Tomcat 4.1.18 does not response when run on 1 or 2 days
Tomcat is not close connection after it return a result page. I look in log file. It show some error like this. What error occer on my tomcat server.
2003-04-13 13:45:44 CoyoteAdapter An exception or error occurred in the container during the request processing
java.lang.NullPointerException
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:177)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:509)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:530)
at java.lang.Thread.run(Thread.java:536)The project I'm working on first ran on tomcats under Windows, then on tomcats on Spars/Solaris and now on jboss servers with integrated tomcats, also running on Sparc/Solaris.
Using https mainly, we usually have about 400 concurrent user sessions open at a time.
On Windows, the tomcats usually crashed within three weeks of operation.
On Unix they can run for months.
So, unless you plan to use a clustered environment, I can only recommend using unix servers. Relying on a single Windows box is suicide.
There is a memory leak in the javac compiler, so if you keep compiling jsp files, your box will crash eventually.
I must say however, that I'm still suspicious. I started a jboss node 10 days ago and there are currently 544 threads running, most of them connector threads. The java runtime has allocated 720 MB memory and uses 270 MB of it.
It seems to me, that even the new Coyote Connectors use one thread per connection. Since the tomcat crew decided to build tomcat with JDK 1.4, I'm wondering, whether they will also start to use the nio capabilities soon. By using asynchronous IO mechanisms, the number of threads used could be reduced dramatically.
Currently, I do not see that connector threads get pruned at all.
All I see is that new ones get created. Yesterday, I disconnected the above mentioned jboss node from the cluster, but didn't shuit it down. Today it still has the same number of threads running, the same memory requirements.
This is not OK, of cause.
The tomcat developers themselves recommend to run tomcat behind an apache server for production environments. Personally, I admit that this could increase the overall stability but I refuse to do this nonetheless. I want to keep the non-java portion of our system as small as possible... ;) -
Tomcat 4.0.4 does not find j2ee 1.4
hi,
i'm trying to write a bean, that sends am email using the j2ee 1.4 beta.
The Server i use ist a tomcat 4.0.4.
I stored the j2ee.jar file under WEB-INF/lib/ and compiled my bean
mail.java without error. If i try to access the bean from a jsp
the server replies with this error
------------------ error -------------------------------
root cause
java.lang.NoClassDefFoundError: javax/mail/Address
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:1576)
at java.lang.Class.getConstructor0(Class.java:1748)
at java.lang.Class.newInstance0(Class.java:266)
at java.lang.Class.newInstance(Class.java:249)
at java.beans.Beans.instantiate(Beans.java:204)
at java.beans.Beans.instantiate(Beans.java:48)
at org.apache.jsp.contact$jsp._jspService(contact$jsp.java:116)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
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)
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.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.warp.WarpRequestHandler.handle(WarpRequestHandler.java:217)
at org.apache.catalina.connector.warp.WarpConnection.run(WarpConnection.java:194)
at java.lang.Thread.run(Thread.java:536)
------------------ error -------------------------------
unjaring the j2ee.jar shows, that the Adress.class is inside
the jar file. Also the tomcat server log file shows, that it found
and registered the j2ee.jar file in the lib directory.
What is wrong ??
can somebody help me ?
I found a similar topic with earlier versions of j2ee, that
suggested putting it into the general tomcat lib folder, but
since i'm not the adminstrator of this box i hardly can rely
on that. (Only if this is the only solution and it works...)
JensHi,
well solution seems to be the following (from tomcat-users@...):
j2ee.jar conflicts with some libraries from the tomcat-engine itsself.
So my j2ee.jar 1.4 beta is ignored by the tomcat engine.
I cannot place it in the general lib path, because i do not administrate the box myself.
Solution for me is now to use the separate mail API (http://java.sun.com/products/javamail/) and javabeans (http://java.sun.com/products/javabeans/glasgow/).
Hope that others find this helpfull, too.
Do i get a refund for my J2EE book in my bookshelf, that i cannot use ?
grml -
Tomcat 4.0.6 does not find bean
hi,
I have just installed jakarta-tomcat-4.0.6.
I am trying to use my beans for database connectivity. I get the following error.
Can anyone please help ??
Thanks.
Aravind.
>>>>>>>>>>>>>>>>>>>>>
type Exception report
message Internal Server Error
description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 12 in the jsp file: /loginPageAction.jspmessage Internal Server Error
description The server encountered an internal error
(Internal Server Error) that prevented it from
fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile
class for JSP
An error occurred at line: 12 in the jsp file:
/loginPageAction.jspFirst, you could check your jsp file in 12 line, if there are some other errors.
about the location of beans, the bean class should be put in "yourapplication\web-inf\classes\yourpackage\***bean.class"
try it!
good luck
Yours kent -
SQL command (with XPath) does not work properly with JSP
Hello everyone,
I try this SQL command on Oracle SQL Developer,
select filename,
extract(xml_col, '/Operation/Records/tabDetail/Vehicle_Level/text()') as Vehicle_Level,
extract(xml_col, '/Operation/Records/tabDetail/Vehicles_Closed/text()') as Vehicles_ID
from ope
where upload_datetime in
(select min(upload_datetime)
from ope
where (TO_DATE(TO_CHAR(upload_datetime, 'DD-MM-YYYY'),'DD-MM-YYYY'))
between TO_DATE('01-01-2008','DD-MM-YYYY') and TO_DATE('01-07-2008','DD-MM-YYYY')
HAVING (filename like '60-1-%')
GROUP BY filename);
It works properly, the result is :
FILENAME --------------------- VEHICLE_LEVEL --------------------- VEHICLES_ID
60-1-OPE-1.xml --------------------- 3 --------------------- 60-1-VEH-43
But when I try this command on JSP, the result is :
FILENAME --------------------- VEHICLE_LEVEL --------------------- VEHICLES_ID
60-1-OPE-1.xml --------------------- null --------------------- null
I don't want "null" value, but I don't know where is wrong. Please help me.
Thank you very much.
Orange JasminIf you know that the videos and music have been working before and that the ID3 tags are correct I suggest that you try to reinstall the phone software using Update Service.
http://www.sonymobile.com/gb/tools/update-service/
Let me know if these problems remains after reinstall.
- Community Manager Sony Xperia Support Forum
If you're new to our forums make sure that you have read our Discussion guidelines.
If you want to get in touch with the local support team for your country please visit our contact page. -
OBIEE Admin Tool does not allow to modify any object
Hi,
I have this strange problem. I have OBIEE 11.1.1.6.2 client installed on my PC. I am trying to update RPD objects in offline/Online/MUD(I tried all three) mode but the Check Out button is greyed out for me. No matter what changes I do into Tools --> Utility, it stays greyed out. I have reinstalled the Admin tool again and but problem persist. I have admin rights on PC so privileges can't be an issue. From connection pool I can view the data or update the row count but can’t add/delete/modify anything else.
Any idea what’s wrong here? Any pointer for further research.
Thanks in AdvanceLogin to Oracle Enterprise Manager Goto -> Business Intelligence -> coreapplication
Click - Capicity Managment Tab in Right side -> Performance -> Check Disable Disallow Online RPD Updates
http://docs.oracle.com/cd/E14571_01/bi.1111/e10541/querycaching.htm#BCGCACHF
If helps pls mark -
Jwsc does not compile dependencies
I have a web service that is coded to make calls on an interface who's implementation is injected with Spring. As such, there is no direct reference to the implementation class, and it does not get compiled when I compile the web service with the JWSC ant task.
What is the recommended way of building this? Should I run JWSC first, and then JAVAC to the WEB-INF/classes dir? Or is there a more elegant way?Those unicode escapes are expanded into their actual characters before compilation. \u000d is a carriage return or linefeed. I forget which. It's as if you did this: char c1 = '\udddd';//compiles
char c2 = '\u0ddd';//compiles
char c3 = '\u00dd';//compiles
char c4 = '
';//DOES NOT COMPILE... WHY?
char c5 = '\ud00d';//compiles Try this:
public class Uni {
public static void main(String[] args) throws Exception {
char A = '\u0042';
char \u0042 = 'A';
System.out.println(A);
System.out.println(B);
} -
Package javax.servlet does not exist, package javax.servlet.http does not
Dear All,
I am a newbie to JAVA.
I installed JDK1.6.0_04, then NetBeans IDE 6.0
I tried compiling an example servlet, but got this error message:
package javax.servlet does not exist, package javax.servlet.http does not exist
I tried locating these packages, but in vain. I also tried setting the CLASSPATH to many values, still it did not work.
Can anyone, please, help me with this.
Should I be able to see/locate these packages, do I have to download them?
Thank you very much.davidgoodman wrote:
Dear All,
I am a newbie to JAVA.
I installed JDK1.6.0_04, then NetBeans IDE 6.0
I tried compiling an example servlet, but got this error message:
package javax.servlet does not exist, package javax.servlet.http does not exist
What servlet/JSP engine do you plan to deploy to? Tomcat, perhaps?I think it's Tomcat (C:\Program Files\Apache Software Foundation\Apache Tomcat 6.0.14). Are there other engines that come with NetBeans IDE 6.0 (when I downloaded NetBeans, I chose ALL)
>
If so, you'll need to put the servlet JAR in your CLASSPATH. (servlet-api.jar for Tomcat 5.5 and earlier, servlet.jar for 6.0 >and later.)
I tried locating these packages, but in vain.
You won't find them until you realize that you have to deploy that servlet someplace.How to deploy?
I also tried setting the CLASSPATH to many values, still it did not work.
See above. What were you planning to set CLASSPATH to?First I set to:
C:\Program Files\Apache Software Foundation\Apache Tomcat 6.0.14\lib (because I found jar named servlet-api.jar in this folder)
Later I added this:
C:\Program Files\Java\jdk1.6.0_04\lib (out of trial-and-fail)
Finally I added some paths that lead to a library such as
C:\Program Files\glassfish-v2\lib
C:\Program Files\glassfish-v2\lib\ant\lib
Can anyone, please, help me with this.
Should I be able to see/locate these packages, do I have to download them?
You have to get a servlet/JSP engine. Step 1.Thank you for your help -
Downcasting In Object PL/SQL Does not Work in Oracle 10g 10.1.0.2
create type one_t as object (
x number, y date ) not final
create type two_t under one_t()
set serverout on
declare
super one_t;
sub two_t := two_t(1, sysdate);
begin
super := one_t(1, sysdate);
sub := new two_t(1, sysdate);
dbms_output.put_line('sub ' || sub.x || ' ' || sub.y );
select treat(super as two_t) into sub from dual;
dbms_output.put_line('super ' || super.x || ' ' || super.y );
if sub is null then
dbms_output.put_line('stupid');
end if;
if sub is of (two_t) then
dbms_output.put_line('stupid');
end if;
end;
The Other Piece Does not Even Compile
declare
super one_t;
sub two_t := two_t(1, sysdate);
begin
super := one_t(1, sysdate);
sub := treat(super as two_t);
dbms_output.put_line('sub ' || sub.x || ' ' || sub.y );
select treat(super as two_t) into sub from dual;
dbms_output.put_line('super ' || super.x || ' ' || super.y );
if sub is null then
dbms_output.put_line('stupid');
end if;
if sub is of (two_t) then
dbms_output.put_line('stupid');
end if;
end;
ORA-06502: PL/SQL: numeric or value error: cannot assign supertype instance to
subtype
ORA-06512: at line 6You need use correct type when you create object.
Don't forget object in reality is a memory pointer,
so what if you don't allocate correct memory in creation,
you can't treat object as subtype.
And meanwhile, it doesn't depend on Oracle version -
your example doesn't work in 9.2.0.1 for example.
SQL> declare
2 super one_t;
3 sub two_t := two_t(1, sysdate);
4 begin
5 super := two_t(1, sysdate);
6 sub := treat(super as two_t);
7 dbms_output.put_line('sub ' || sub.x || ' ' || sub.y );
8 select treat(super as two_t) into sub from dual;
9 dbms_output.put_line('super ' || super.x || ' ' || super.y );
10 if sub is null then
11 dbms_output.put_line('stupid');
12 end if;
13 if sub is of (two_t) then
14 dbms_output.put_line('stupid');
15 end if;
16 end;
17 /
sub 1 08.06.05
super 1 08.06.05
stupid
 
PL/SQL procedure successfully completed.Rgds. -
Downcasting in Object PL/SQL Does not Work in Oracle 10g Enterprise Edition
create type one_t as object (
x number, y date ) not final
create type two_t under one_t()
set serverout on
declare
super one_t;
sub two_t := two_t(1, sysdate);
begin
super := one_t(1, sysdate);
sub := new two_t(1, sysdate);
dbms_output.put_line('sub ' || sub.x || ' ' || sub.y );
select treat(super as two_t) into sub from dual;
dbms_output.put_line('super ' || super.x || ' ' || super.y );
if sub is null then
dbms_output.put_line('stupid');
end if;
if sub is of (two_t) then
dbms_output.put_line('stupid');
end if;
end;
The Other Piece Does not Even Compile
declare
super one_t;
sub two_t := two_t(1, sysdate);
begin
super := one_t(1, sysdate);
sub := treat(super as two_t);
dbms_output.put_line('sub ' || sub.x || ' ' || sub.y );
select treat(super as two_t) into sub from dual;
dbms_output.put_line('super ' || super.x || ' ' || super.y );
if sub is null then
dbms_output.put_line('stupid');
end if;
if sub is of (two_t) then
dbms_output.put_line('stupid');
end if;
end;
ORA-06502: PL/SQL: numeric or value error: cannot assign supertype instance to
subtype
ORA-06512: at line 6You need use correct type when you create object.
Don't forget object in reality is a memory pointer,
so what if you don't allocate correct memory in creation,
you can't treat object as subtype.
And meanwhile, it doesn't depend on Oracle version -
your example doesn't work in 9.2.0.1 for example.
SQL> declare
2 super one_t;
3 sub two_t := two_t(1, sysdate);
4 begin
5 super := two_t(1, sysdate);
6 sub := treat(super as two_t);
7 dbms_output.put_line('sub ' || sub.x || ' ' || sub.y );
8 select treat(super as two_t) into sub from dual;
9 dbms_output.put_line('super ' || super.x || ' ' || super.y );
10 if sub is null then
11 dbms_output.put_line('stupid');
12 end if;
13 if sub is of (two_t) then
14 dbms_output.put_line('stupid');
15 end if;
16 end;
17 /
sub 1 08.06.05
super 1 08.06.05
stupid
 
PL/SQL procedure successfully completed.Rgds. -
%@ include file= ... does not work properly in Portal
I am devloping a portlet based on a jsp that uses some <%@include ..> tags. I have
a problem in that variables declared and used in one jsp is not visible in a jsp
that is included later on. Also, the scope of the page import tag of the main
jsp does not cover the included jsp's.
<%@ page import="javax.servlet.* ......>
<%@ include file="variables.jsp" %> // Classes imported above are not recognised
in this jsp
<%@ include file="code.jsp" %> // Variables declared and used in variables.jsp
are not visible here
The exact same code runs very well in a Tomcat container (as pure jsp, not portlet)
Can anybody help here please?Geir -
I have the same problem. If you do solve it, please post it to this thread.
Thanks
Kunal
"Geir Willumsen" <[email protected]> wrote:
>
I am devloping a portlet based on a jsp that uses some <%@include ..>
tags. I have
a problem in that variables declared and used in one jsp is not visible
in a jsp
that is included later on. Also, the scope of the page import tag of
the main
jsp does not cover the included jsp's.
<%@ page import="javax.servlet.* ......>
<%@ include file="variables.jsp" %> // Classes imported above are not
recognised
in this jsp
<%@ include file="code.jsp" %> // Variables declared and used in variables.jsp
are not visible here
The exact same code runs very well in a Tomcat container (as pure jsp,
not portlet)
Can anybody help here please?
Maybe you are looking for
-
Excise Base amount not updated in J_1iexcdtl table -reg
Dear Gurus, We have used SAP Ecc 5.0 Patch level 21. In patch level 20, SAP admit without delivery , can do commercial billing and excise billing in foreground. After batch update SAP not support excise invoice creation in foreground. It support only
-
tried everything from restart to restore with itunes and had same results. Apple tech with chat had me go to icloud and erase ipad from icloud, still no luck, then did same, but did not apply icloud on restore and everything worked. just wanted to
-
Brand new MacBook Pro 2012 not booting install of Mountain Lion
Hi, I have a brand new 15" MacBook Pro 2012 model (2.6Ghz, 8GB Ram) - works fine on OS X Lion. As I had just bought it I decided to upgrade it to Mountain Lion straight away, and here's where the problems start. After apparent install the machine re-
-
Hi all ! I have a question: I've done several times some lists into dynpro by using "Leave to list processing" in the PBO, which works fine. I'd like to know if it is possible to make a list into a subscreen, because it triggers an error saying that
-
AppleWorks closes accidentally when document is closed
When I close 400 page document AppleWorks closes (box appears asking if I wish to reopen or report). Then when I reopen application and re-open the document, box asks if I wish to "recover changes because the document wasn't closed properly-" (even t