Jsp compilation options
My question is pretty simple, how do I turn of jsp pre-compilation in JDev?
thanks,
Some notes on compiling JSPs with OJSPC and Ant:
OJSPC : File not found
success
Jan Vervecken
Similar Messages
-
HELP!: JSP compile options ignored
Can anyone tell me why my JSP compile settings in weblogic.properties
get ignored?
I've got the following settings in the weblogic.properties:
===============================================
<SNIP>
weblogic.httpd.register.*.jsp=\
weblogic.servlet.JSPServlet
weblogic.httpd.initArgs.*.jsp=\
keepgenerated=true,\
pageCheckSeconds=1,\
compileCommand=/usr/java1.2/bin/javac,\
workingDir=/export/home/weblogic/webapps/fooapp/WEB-INF,\
verbose=false
weblogic.httpd.defaultWebApp=/export/home/weblogic/webapps/fooapp
<SNIP>
===============================================
When I run weblogic, and request a JSP I see the following on the console:
===============================================
<SNIP>
Wed Nov 15 12:29:55 MST 2000:<I> <WebAppServletContext-General> *.jsp: init
Wed Nov 15 12:29:55 MST 2000:<I> <WebAppServletContext-General> *.jsp:
param verbose initialized to: true
Wed Nov 15 12:29:55 MST 2000:<I> <WebAppServletContext-General> *.jsp:
param packagePrefix initialized to: jsp_servlet
Wed Nov 15 12:29:55 MST 2000:<I> <WebAppServletContext-General> *.jsp:
param compileCommand initialized to: javac
Wed Nov 15 12:29:55 MST 2000:<I> <WebAppServletContext-General> *.jsp:
param srcCompiler initialized to weblogic.jspc
Wed Nov 15 12:29:55 MST 2000:<I> <WebAppServletContext-General> *.jsp:
param superclass initialized to null
Wed Nov 15 12:29:55 MST 2000:<I> <WebAppServletContext-General> *.jsp:
param workingDir initialized to:
/export/home/weblogic/webapps/fooapp/_tmp_war
Wed Nov 15 12:29:55 MST 2000:<I> <WebAppServletContext-General> *.jsp:
param pageCheckSeconds initialized to: 1
Wed Nov 15 12:29:55 MST 2000:<I> <WebAppServletContext-General> *.jsp:
initialization complete
Wed Nov 15 12:29:55 MST 2000:<I> <WebAppServletContext-General> *.jsp:
pageCheckSeconds over-ruled in JSPServlet to : 1
<SNIP>
===============================================
Notice that none of my settings made it in!
Any help appreciated.
James
James
I'm not sure why the properties don't get set from your weblogic.properties
file definitions, but try adding <context-param> definitions for the
weblogic properties in question to your web.xml file. Below is a code
snippet of an example of some properties that we added to our web.xml file.
The <context-param> definitions should be added in front of your <servlet>
definitions. See the BEA online documentation for Developing a Web
Application at
http://www.weblogic.com/docs51/classdocs/webappguide.html#createdd for a
description of the context parameter property names..
<context-param>
<param-name>weblogic.jsp.compileCommand</param-name>
<param-value>/jdk1.2.2/bin/javac.exe</param-value>
</context-param>
<context-param>
<param-name>weblogic.jsp.precompile</param-name>
<param-value>false</param-value>
</context-param>
<!-- compileCommand initArg to JSPServlet -->
<context-param>
<param-name>weblogic.jsp.compileCommand</param-name>
<param-value>javac</param-value>
</context-param>
<!-- verbose initArg to JSPServlet -->
<context-param>
<param-name>weblogic.jsp.verbose</param-name>
<param-value>true</param-value>
</context-param>
<!-- packagePrefix initArg to JSPServlet -->
<context-param>
<param-name>weblogic.jsp.packagePrefix</param-name>
<param-value>jsp_servlet</param-value>
</context-param>
<!-- keepgenerated initArg to JSPServlet -->
<context-param>
<param-name>weblogic.jsp.keepgenerated</param-name>
<param-value>true</param-value>
</context-param>
<!-- pageCheckSeconds initArg to JSPServlet -->
<context-param>
<param-name>weblogic.jsp.pageCheckSeconds</param-name>
<param-value>1</param-value>
</context-param>
John J. Feigal Voice (651)766-8787 (main)
Sr. Technical Consultant (651)766-7249 (direct)
Ensodex, Inc. Fax (651)766-8792
4105 N. Lexington Ave., Suite 150 email [email protected]
Arden Hills, MN 55126 WebSite http://www.ensodex.com
"James House" <[email protected]> wrote in message
news:[email protected]...
> Can anyone tell me why my JSP compile settings in weblogic.properties
> get ignored?
> I've got the following settings in the weblogic.properties:
>
> ===============================================
> <SNIP>
> weblogic.httpd.register.*.jsp=\
> weblogic.servlet.JSPServlet
> weblogic.httpd.initArgs.*.jsp=\
> keepgenerated=true,\
> pageCheckSeconds=1,\
> compileCommand=/usr/java1.2/bin/javac,\
> workingDir=/export/home/weblogic/webapps/fooapp/WEB-INF,\
> verbose=false
> weblogic.httpd.defaultWebApp=/export/home/weblogic/webapps/fooapp
> <SNIP>
> ===============================================
>
> When I run weblogic, and request a JSP I see the following on the console:
>
> ===============================================
> <SNIP>
> Wed Nov 15 12:29:55 MST 2000:<I> <WebAppServletContext-General> *.jsp:
init
> Wed Nov 15 12:29:55 MST 2000:<I> <WebAppServletContext-General> *.jsp:
> param verbose initialized to: true
> Wed Nov 15 12:29:55 MST 2000:<I> <WebAppServletContext-General> *.jsp:
> param packagePrefix initialized to: jsp_servlet
> Wed Nov 15 12:29:55 MST 2000:<I> <WebAppServletContext-General> *.jsp:
> param compileCommand initialized to: javac
> Wed Nov 15 12:29:55 MST 2000:<I> <WebAppServletContext-General> *.jsp:
> param srcCompiler initialized to weblogic.jspc
> Wed Nov 15 12:29:55 MST 2000:<I> <WebAppServletContext-General> *.jsp:
> param superclass initialized to null
> Wed Nov 15 12:29:55 MST 2000:<I> <WebAppServletContext-General> *.jsp:
> param workingDir initialized to:
> /export/home/weblogic/webapps/fooapp/_tmp_war
> Wed Nov 15 12:29:55 MST 2000:<I> <WebAppServletContext-General> *.jsp:
> param pageCheckSeconds initialized to: 1
> Wed Nov 15 12:29:55 MST 2000:<I> <WebAppServletContext-General> *.jsp:
> initialization complete
> Wed Nov 15 12:29:55 MST 2000:<I> <WebAppServletContext-General> *.jsp:
> ######
> ########
> ############
> ##############
> pageCheckSeconds over-ruled in JSPServlet to : 1
> ##############
> ############
> ########
> ######
> <SNIP>
> ===============================================
>
> Notice that none of my settings made it in!
> Any help appreciated.
>
> James
>
-
All,
I am working with R12-iStore. As per metalink link note: 458338.1, I have enabled automatic JSP compilation. Bounced all services.
After logging into iStore then when I click on Profile link, blank page displayed.
ibeCAcpProfMenuHome.jsp -> This is the JSP file which is used for Profile page. This page exists in $OA_HTML & class file in $COMMON_TOP/_pages directory.
The above profile jsp page contains the following JSPs. These files are there in $OA_HTML directory but the classe files are not there in $COMMON_TOP/_pages directory.
1) ibeCZzpHeader.jsp
2) jtfincl.jsp
My question is , do I need to compile them to fix this issue even though auto JSP compilation option is enabled ?
is this auto compilation doesn't compile the pages while loading or accessing ??
Thanks,Hi Hussein,
I have checked the log file. It looks like , the bounce was proper.
Also, I have raised SR with ORacle Support.. lets hope we get some good solution.
================================================================================
04/03/09-16:10:34 :: adapcctl.sh version 120.6.12000000.4
04/03/09-16:10:34 :: adapcctl.sh: stopping OPMN managed OHS instance
opmnctl: stopping opmn managed processes...
04/03/09-16:10:36 :: adapcctl.sh: exiting with status 0
================================================================================
04/03/09-16:10:48 :: adapcctl.sh version 120.6.12000000.4
04/03/09-16:10:48 :: adapcctl.sh: starting OPMN if it is not running
opmnctl: opmn is already running.
04/03/09-16:10:48 :: adapcctl.sh: starting OPMN managed OHS instance
opmnctl: starting opmn managed processes...
04/03/09-16:10:51 :: adapcctl.sh: exiting with status 0
================================================================================ -
Java compiler options with JSP
Is there any way to specify compiler options to use with the JSP compiler through weblogic.properties? I'd like to get the JSPs compiled with the -g option. Thanks.
Mike
How about add
J=-g
to "weblogic.httpd.initArgs.*.jsp"?
Jong
"Michael Gilbode" <[email protected]> wrote:
>
>Is there any way to specify compiler options to use with the JSP compiler through weblogic.properties? I'd like to get the JSPs compiled with the -g option. Thanks.
>
>Mike
-
Re: [iPlanet-JATO] sp3 jsp compiler problem
Weiguo,
First, Matt is correct, the regular expression tool is perfect for general text
substitution situations, and as a completely independent tool its use is not
restricted to migration situations (or file types for that matter).
Second, I sympathize with the unfortunate trouble you are experiencing due to
Jasper's (perhaps more strict) compilation, but in what way did the iMT
automated translation contribute to these inconsistencies that you cited?
1. Changed the case of the tag attribute to be the same as what's
defined in tld.
example: changed OnClick to onClick
The iMT does not generate any OnClick or onClick clauses per se. In a
translation situation, the only way "OnClick" would have been introduced was if
it had been part of the pre-existing project's "extraHTML" (which was written
by the original customer and just passed through unchanged by the iMT) or if it
was added manually by the post-migration developer.
2. Removed attributes which are not defined in tld.
example: escape attribute only defined in three tags
but in some pages, it's used although it's not defined as an
attribute
of certain tags. The jasper compiler doesn't like it.Can you give soem examples? Is there a definite pattern? Again, this might be
similar to the OnClick situation described above?
3. In an end tag, there can't be any space.
example: </content > doesn't work. </content> works.
Again, the content tag would never have been generated by the iMT. There was no
equivalent in the NetDynamics world, so any content tags in your code must have
been introduced by your developers manually. Its a shame that jasper is so
particular, but the iMT could not help you out here even if we wanted to. The
constants that are used by the iMT are defined in
com.iplanet.moko.jsp.convert.JspConversionConstants. From what I can see, the
only situation of a closing tag with any space in it is
public static final String CLOSE_EMPTY_ELEMENT = " />";
But that should not cause the type of problem you are referring to.
Mike
----- Original Message -----
From: Matthew Stevens
Sent: Thursday, September 06, 2001 10:16 AM
Subject: RE: [iPlanet-JATO] sp3 jsp compiler problem
Weiguo,
Others will chime in for sure...I would highly recommend the Regex Tool from
the iMT 1.1.1 for tackling this type of problem. Mike, Todd and myself have
posted to the group (even recently) on directions and advantages of creating
your own RULES (rules file) in XML for arbitary batch processing of source.
matt
-----Original Message-----
From: weiguo.wang@b...
[mailto:<a href="/group/SunONE-JATO/post?protectID=125056020108194190033029175101192165174144234026000079108238073194105057099246073154180137239239223019162">weiguo.wang@b...</a>]
Sent: Thursday, September 06, 2001 12:25 PM
Subject: [iPlanet-JATO] sp3 jsp compiler problem
Matt/Mike/Todd,
We are trying to migrate to sp3 right now, but have had a lot of
issues with the new jasper compiler.
The following workaround has been employed to solve the issues:
1. Changed the case of the tag attribute to be the same as what's
defined in tld.
example: changed OnClick to onClick
2. Removed attributes which are not defined in tld.
example: escape attribute only defined in three tags
but in some pages, it's used although it's not defined as an
attribute
of certain tags. The jasper compiler doesn't like it.
3. In an end tag, there can't be any space.
example: </content > doesn't work. </content> works.
As I see it, we have two options to go about solving this problem:
1. Write a script which will iterate through all the jsp files and
call jspc on them. Fix the errors manually when jspc fails. Jspc will
flag the line number where an error occurs.
2. Write a utility which scans the jsp files and fix the errors when
they are encountered. We should define what's an error and how to
correct it. It's best if we combine this with solution 1 since we
might miss an error condition.
Actually, there might be another option, which is seeking help from
you guys since you have better understanding of JATO and iAS. Can you
do anything to help us?
We would be happy to hear your thoughts.
At last, I would like to suggest modifying the moko tool so that
these rules are enforced and the generated JSPs work with the new
compiler. This is for the benefit of any new migration projects.
Thanks a lot.
Weiguo
[email protected]
Choose from 1000s of job listings!
[email protected]
[Non-text portions of this message have been removed]Thanks a lot Matt and Mike for your prompt replies.
I agree completely that iMT doesn't introduce the inconsistencies.
About the three cases I mentioned, the third one happens only in
manually created JSPs. So it has nothing to do with iMT. The first
two are mainly due to the existing HTML code, as you rightly pointed
out.
The reason I made the suggestion is since we know that case 1 and 2
won't pass the japser compiler in sp3, we have to do something about
it. The best place to do this, in my mind, is iMT. Of course, there
might be some twists that make it impossible or difficult to do this
kind of case manipulation or attribute discard.
Weiguo
--- In iPlanet-JATO@y..., "Mike Frisino" <Michael.Frisino@S...> wrote:
Weiguo,
First, Matt is correct, the regular expression tool is perfect for general text substitution situations, and as a completely independent
tool its use is not restricted to migration situations (or file types
for that matter).
>
Second, I sympathize with the unfortunate trouble you are experiencing due to Jasper's (perhaps more strict) compilation, but
in what way did the iMT automated translation contribute to these
inconsistencies that you cited?
>
1. Changed the case of the tag attribute to be the same as what's
defined in tld.
example: changed OnClick to onClick
The iMT does not generate any OnClick or onClick clauses per se. In a translation situation, the only way "OnClick" would have been
introduced was if it had been part of the pre-existing
project's "extraHTML" (which was written by the original customer and
just passed through unchanged by the iMT) or if it was added manually
by the post-migration developer.
>
2. Removed attributes which are not defined in tld.
example: escape attribute only defined in three tags
but in some pages, it's used although it's not defined as an
attribute
of certain tags. The jasper compiler doesn't like it.Can you give soem examples? Is there a definite pattern? Again, this might be similar to the OnClick situation described above?
>
>
3. In an end tag, there can't be any space.
example: </content > doesn't work. </content> works.
Again, the content tag would never have been generated by the iMT. There was no equivalent in the NetDynamics world, so any content tags
in your code must have been introduced by your developers manually.
Its a shame that jasper is so particular, but the iMT could not help
you out here even if we wanted to. The constants that are used by the
iMT are defined in
com.iplanet.moko.jsp.convert.JspConversionConstants. From what I can
see, the only situation of a closing tag with any space in it is
public static final String CLOSE_EMPTY_ELEMENT = " />";
But that should not cause the type of problem you are referring to.
Mike
----- Original Message -----
From: Matthew Stevens
Sent: Thursday, September 06, 2001 10:16 AM
Subject: RE: [iPlanet-JATO] sp3 jsp compiler problem
Weiguo,
Others will chime in for sure...I would highly recommend the Regex Tool from
the iMT 1.1.1 for tackling this type of problem. Mike, Todd and myself have
posted to the group (even recently) on directions and advantages of creating
your own RULES (rules file) in XML for arbitary batch processing of source.
>
matt
-----Original Message-----
From: weiguo.wang@b...
[mailto:<a href="/group/SunONE-JATO/post?protectID=125056020108194190033029175101192165174048139046">weiguo.wang@b...</a>]
Sent: Thursday, September 06, 2001 12:25 PM
Subject: [iPlanet-JATO] sp3 jsp compiler problem
Matt/Mike/Todd,
We are trying to migrate to sp3 right now, but have had a lot of
issues with the new jasper compiler.
The following workaround has been employed to solve the issues:
1. Changed the case of the tag attribute to be the same as
what's
defined in tld.
example: changed OnClick to onClick
2. Removed attributes which are not defined in tld.
example: escape attribute only defined in three tags
but in some pages, it's used although it's not defined as an
attribute
of certain tags. The jasper compiler doesn't like it.
3. In an end tag, there can't be any space.
example: </content > doesn't work. </content> works.
As I see it, we have two options to go about solving this problem:
>>
1. Write a script which will iterate through all the jsp files and
call jspc on them. Fix the errors manually when jspc fails. Jspc will
flag the line number where an error occurs.
2. Write a utility which scans the jsp files and fix the errors when
they are encountered. We should define what's an error and how to
correct it. It's best if we combine this with solution 1 since we
might miss an error condition.
Actually, there might be another option, which is seeking help from
you guys since you have better understanding of JATO and iAS. Can you
do anything to help us?
We would be happy to hear your thoughts.
At last, I would like to suggest modifying the moko tool so that
these rules are enforced and the generated JSPs work with the new
compiler. This is for the benefit of any new migration projects.
Thanks a lot.
Weiguo
[email protected]
Choose from 1000s of job listings!
[email protected]
Service.
>
>
>
[Non-text portions of this message have been removed] -
EAR and long CLASSPATH at JSP compilation time
Hi all,
we have an EAR-packaged application with over 260 jars (mainly
EJB) that is deployed to a managed server WL6.1SP3(AIX). Then
we hit a JSP page of this app. and Weblogic generates the
adecuate .java file that is passed as an argument to a forked
process for the javac compiler with a CLASSPATH that is more
than 22KB!! of length because of the EAR classloader schema
(it must include all the jars of the EJB level).
The problem is that the EAR deployment in WL6.1 generates a fixed and very long
path for every jar that it is composed of:
$WL_HOME/./config/DOMAIN/applications/.wl_notdelete_EARNAME
/wlap#####/ejbjarname.jar
and the invoke of the compiler fails with argument too long.
We can control the EJB jar name, EARNAME, WL_HOME
and DOMAIN to shorten the CLASSPATH, but that is not enough
giving that the fixed part of the PATH is very long, for example:
with DOMAIN=DOM1, WL_HOME=W, ejbjar name=EJB1, EARNAME=EAR1
you get:
/w/./config/DOM1/applications/.wl_notdelete_EAR1/wlap#####/EJB1.jar: that is
68 chars * 260 jars = more than 17KB only with the
EJB part of the CLASSPATH (plus the standard SYSTEM CLASSPATH
and WARS CLASSPATH.)
As workarounds we can:
1.- Use an "pseudo exploded" EAR with EJBREMOTE and EJBHOME in clientclasses path
with every jar and war by their own. Not very
clean and we've lost the benefits of EAR deployment.
2.- Consolidate a bunch of EJB in every jar. More administrative
tasks (common xml descriptors:ejb-jar.xml,...) and less isolation
between developer teams.
3.- Consolidate at functionality level (source) a bunch of EJB
in a few one. :(
4.- Precompile every JSP outside of WEBLOGIC and generate
the corresponding class and entries at web.xml and weblogic.xml
5.- ...?
or maybe:
6.- configure this very long directory of deployment
to a shorter deployer choosen and use relative paths.
Is this possible? :)
PacoG.
You may try to use JSP compiler class. Please specify 'compilerclass'
option in weblogic.xml. This option specifies name of a Java compiler
that is executed in WebLogic Servers's virtual machine. (Used in place of
an executable compiler such as javac or sj.)
Please see
http://e-docs.bea.com/wls/docs61/webapp/weblogic_xml.html#jsp-descriptor.
Paco Garcia wrote:
> oops!
>
> >$WL_HOME/./config/DOMAIN/applications/.wl_notdelete_EARNAME
> >/wlap#####/ejbjarname.jar
>
> >with DOMAIN=DOM1, WL_HOME=W, ejbjar name=EJB1, EARNAME=EAR1
> >you get:
> >/w/./config/DOM1/applications/.wl_notdelete_EAR1/wlap#####/EJB1.jar:
>
> please read SERVERNAME instead of EARNAME
>
> PacoG.
Regards,
Ann
Developer Relations Engineer
BEA Support
-
Jsp compile exception in WL 8.1
Hi all
i was trying to deploy the external war(jstl.war from www.manning.com) file in
my weblogic server .
I just copied the *.war file into C:\TestDrive\MyDomain\mydomain\application
directory and restarted the weblogic server.
i got following error.
Compilation of 'C:\TestDrive\MyDomain\mydomain\.\myserver\.wlnotdelete\extract\myserver__appsdir_jstlbook_war_jstlbook\jsp_servlet\__index.java'
failed:
C:\TestDrive\MyDomain\mydomain\.\myserver\.wlnotdelete\extract\myserver__appsdir_jstlbook_war_jstlbook\jsp_servlet\__index.java:142:
'try' without 'catch' or 'finally'
probably occurred due to an error in /index.jsp line 3:
<c:import url="header.jsp"/>
C:\TestDrive\MyDomain\mydomain\.\myserver\.wlnotdelete\extract\myserver__appsdir_jstlbook_war_jstlbook\jsp_servlet\__index.java:132:
'try' without 'catch' or 'finally'
(No more information available, probably caused by another error)
C:\TestDrive\MyDomain\mydomain\.\myserver\.wlnotdelete\extract\myserver__appsdir_jstlbook_war_jstlbook\jsp_servlet\__index.java:178:
'}' expected
(No more information available, probably caused by another error)
Full compiler error(s):
C:\TestDrive\MyDomain\mydomain\.\myserver\.wlnotdelete\extract\myserver__appsdir_jstlbook_war_jstlbook\jsp_servlet\__index.java:142:
'try' without 'catch' or 'finally'
try { // TryCatchFinally begin //[ /index.jsp; Line: 3]
^
C:\TestDrive\MyDomain\mydomain\.\myserver\.wlnotdelete\extract\myserver__appsdir_jstlbook_war_jstlbook\jsp_servlet\__index.java:132:
'try' without 'catch' or 'finally'
try { // error page try block
^
C:\TestDrive\MyDomain\mydomain\.\myserver\.wlnotdelete\extract\myserver__appsdir_jstlbook_war_jstlbook\jsp_servlet\__index.java:178:
'}' expected
^
3 errors
Thu Sep 25 15:59:58 GMT+05:30 2003
Same file when i deployed in Tomcat4.1 was working fine i.e. copying the *.war
into <tomcathome>/webapps directory. I got index page without touching the code!
Is there any extra settings has to be done for running jsp's from war files in
WL?
THanks in advance
Manjunath
manjunath wrote:
> further to my previous mail here's the log
>
> weblogic.servlet.jsp.CompilationException: Compilation of C:\TestDrive\MyDomain\mydomain\.\myserver\.wlnotdelete\extract\myserver__appsdir_jstlbook_war_jstlbook\jsp_servlet\__index.java
> failed.
> at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java:446)
> at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:220)
> at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:172)
> at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:504)
> at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:349)
> at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:431)
> at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
> at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6310)
> at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
> at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
> at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3622)
> at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2569)
> at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
> Caused by: java.io.IOException: Compiler failed executable.exec
> at weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(CompilerInvoker.java:470)
> at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:329)
> at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:337)
> at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:322)
> at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java:419)
> ... 13 more
>
> Here's my weblogic.xml file
>
> <!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web Application 8.1//EN"
> "http://www.bea.com/servers/wls810/dtd/weblogic810-web-jar.dtd">
> <weblogic-web-app>
> <jsp-descriptor>
> <jsp-param>
> <param-name>
> compileFlags
> </param-name>
> <param-value>
> -g
> </param-value>
> </jsp-param>
>
>
> <jsp-param>
> <param-name>
> keepgenerated
> </param-name>
> <param-value>
> true
> </param-value>
> </jsp-param>
>
>
> </jsp-descriptor>
> </weblogic-web-app>
>
> In this URL http://e-docs.bea.com/wls/docs81/jsp/reference.html#57794 there's
> option to use -webapp for jsp compiler. How to implement same in weblogic.xml
> <jsp-descriptor> file?
>
> Thanks
>
> "Manjunath B" <[email protected]> wrote:
>
>>Hi all
>>
>>i was trying to deploy the external war(jstl.war from www.manning.com)
>>file in
>>my weblogic server .
>>
>>I just copied the *.war file into C:\TestDrive\MyDomain\mydomain\application
>>directory and restarted the weblogic server.
>>
>>i got following error.
>>
>>**********************************************************
>>Compilation of 'C:\TestDrive\MyDomain\mydomain\.\myserver\.wlnotdelete\extract\myserver__appsdir_jstlbook_war_jstlbook\jsp_servlet\__index.java'
>>failed:
>>--------------------------------------------------------------------------------
>>C:\TestDrive\MyDomain\mydomain\.\myserver\.wlnotdelete\extract\myserver__appsdir_jstlbook_war_jstlbook\jsp_servlet\__index.java:142:
>>'try' without 'catch' or 'finally'
>>probably occurred due to an error in /index.jsp line 3:
>><c:import url="header.jsp"/>
>>
>>C:\TestDrive\MyDomain\mydomain\.\myserver\.wlnotdelete\extract\myserver__appsdir_jstlbook_war_jstlbook\jsp_servlet\__index.java:132:
>>'try' without 'catch' or 'finally'
>>(No more information available, probably caused by another error)
>>
>>C:\TestDrive\MyDomain\mydomain\.\myserver\.wlnotdelete\extract\myserver__appsdir_jstlbook_war_jstlbook\jsp_servlet\__index.java:178:
>>'}' expected
>>(No more information available, probably caused by another error)
>>
>>
>>--------------------------------------------------------------------------------
>>Full compiler error(s):
>>C:\TestDrive\MyDomain\mydomain\.\myserver\.wlnotdelete\extract\myserver__appsdir_jstlbook_war_jstlbook\jsp_servlet\__index.java:142:
>>'try' without 'catch' or 'finally'
>> try { // TryCatchFinally begin //[ /index.jsp; Line: 3]
>> ^
>>C:\TestDrive\MyDomain\mydomain\.\myserver\.wlnotdelete\extract\myserver__appsdir_jstlbook_war_jstlbook\jsp_servlet\__index.java:132:
>>'try' without 'catch' or 'finally'
>> try { // error page try block
>> ^
>>C:\TestDrive\MyDomain\mydomain\.\myserver\.wlnotdelete\extract\myserver__appsdir_jstlbook_war_jstlbook\jsp_servlet\__index.java:178:
>>'}' expected
>> }
>> ^
>>3 errors
>>
>>
>>--------------------------------------------------------------------------------
>>Thu Sep 25 15:59:58 GMT+05:30 2003
>>*******************************************************************
>>
>>
>>Same file when i deployed in Tomcat4.1 was working fine i.e. copying
>>the *.war
>>into <tomcathome>/webapps directory. I got index page without touching
>>the code!
>>
>>Is there any extra settings has to be done for running jsp's from war
>>files in
>>WL?
>>
>>THanks in advance
>>
>>Manjunath
>>
>
>
Please contact customer support [email protected] and request a patch for
CR112789. AT_END tags do not work correctly in 81sp1
-
Originally I post it to weblogic.developer.interst. But I guess this may be a better space to post the JSP related question. Sorry for the double post
Hi, there,
I tried to use the weblogic.jspc to compile my JSP files for debug purpose. However, it doesn't give me detailed information.
For example, for JSP file test.jsp:
<%
out.println(5) // miss ; at the end
%>
If I use browser to access it, it will give the error information, like:
Compilation of ../public_html/jsp_servlet/_test.java' failed:
/weblogic/appserver/public_html/jsp_servlet/_test.java:74: Invalid type expression.
probably occurred due to an error in /test.jsp line 2:
out.println("4")
/weblogic/appserver/public_html/jsp_servlet/_test.java:76: Invalid declaration.
(No more information available, probably caused by another error)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`
But if I use weblogic.jspc to compile it, it only tells you:
Exec failed .. exiting
That message is not helpful at all. I tried to use verbose option, it gave me more garbage information, like:
[jspc] parsing /usr/export/docroot/test.jsp:
[jspc] parsed test.jsp in 603 ms.
[jspc] generated java file /usr/export/docroot/test.java, invoking java compiler:
Exec failed .. exiting
Then what's the use of that JSP compiler? Is there anyway to get the same error inforamtion on the web page?
Thanks
This was fixed around service pack 6 in WL 5.1.
mike
Rob Woollen <[email protected]> wrote:
>It looks like it cannot find javac (or whatever java compiler you
>specified) in the path.
>
>-- Rob
>
>Lan wrote:
>>
>> Originally I post it to weblogic.developer.interst. But I guess this may be a better space to post the JSP related question. Sorry for the double post
>>
>> Hi, there,
>>
>> I tried to use the weblogic.jspc to compile my JSP files for debug purpose. However, it doesn't give me detailed information.
>>
>> For example, for JSP file test.jsp:
>> <%
>> out.println(5) // miss ; at the end
>> %>
>>
>> If I use browser to access it, it will give the error information, like:
>> Compilation of ../public_html/jsp_servlet/_test.java' failed:
>>
>> --------------------------------------------------------------------------------
>>
>> /weblogic/appserver/public_html/jsp_servlet/_test.java:74: Invalid type expression.
>> probably occurred due to an error in /test.jsp line 2:
>> out.println("4")
>>
>> /weblogic/appserver/public_html/jsp_servlet/_test.java:76: Invalid declaration.
>> (No more information available, probably caused by another error)
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`
>>
>> But if I use weblogic.jspc to compile it, it only tells you:
>>
>> Exec failed .. exiting
>>
>> That message is not helpful at all. I tried to use verbose option, it gave me more garbage information, like:
>>
>> [jspc] parsing /usr/export/docroot/test.jsp:
>> [jspc] parsed test.jsp in 603 ms.
>> [jspc] generated java file /usr/export/docroot/test.java, invoking java compiler:
>> Exec failed .. exiting
>>
>> Then what's the use of that JSP compiler? Is there anyway to get the same error inforamtion on the web page?
>>
>> Thanks
-
Deployment Error -- JSP Compilation Error: java.lang.OutOfMemoryError -- nu
When I deploy WAR files with the precompile jsp option, I receive the following error:
Deployment Error -- JSP Compilation Error: java.lang.OutOfMemoryError -- null
Is there a way for me to precompile my jsp's without using this process? Once this blows up, the admin server gets hosed. This is very frustrating. Any suggestions would be appreciated.
Regards,
JoshuaYou need little more memory :-), use java param -mx512M.
You can adjust it in OC Server properties
AS > OC4J_home(demo) > Server Properties
section Multiple VM Configuration, Command Line Options
Java Options: -mx512M
Zajo -
Weblogic 9 and JSP compiler errors
Hello everyone,
I am having problems with my Jsps in my EAR file deployed on WL 9.0.
I have a Jsp called upms.jsp that contains the following code snippets:
After my import statements, I have some code that creates a resource bundle that accesses a properties file:
<%!
ResourceBundle bundle = null;
public void jspInit() {
bundle = ResourceBundle.getBundle("conf.properties");
%>
I get an error from the above code:
upms.jsp:3:11: 'try' statement has neither 'catch' nor 'finally' clause
import="java.util.ResourceBundle"
^----------------------^
I am totally clueless as to what that error means.
Next I declare a bean I use in the jsp:
<jsp:useBean
id="userPrefsManagerBean"
class="controllers.beans.UserPreferencesManagerBean"
scope="session">
</jsp:useBean>
<jsp:setProperty name="userPrefsManagerBean" property="*" />
I get these errors from the above portion:
upms.jsp:27:3: The qualifier of this name is a package, which cannot contain fields.
<jsp:setProperty name="userPrefsManagerBean" property="*" />
^-------------^
upms.jsp:27:3: The qualifier of this name is a package, which cannot contain fields.
<jsp:setProperty name="userPrefsManagerBean" property="*" />
^-------------^
upms.jsp:27:3: Expression expected (found '.' instead)
<jsp:setProperty name="userPrefsManagerBean" property="*" />
^-------------^
upms.jsp:27:3: Syntax error: expected ) (found 'class' instead)
<jsp:setProperty name="userPrefsManagerBean" property="*" />
^-------------^
upms.jsp:27:3: Syntax error: expected <identifier> (found ')' instead)
<jsp:setProperty name="userPrefsManagerBean" property="*" />
^-------------^
Has anyone encountered these before?
This jsp worked perfectly well when I deployed my EAR file on JBoss...no such luck using Weblogic.
Is there something I am missing here? I appreciate any help.
Cheers, :-)
M.Mildred,
Two suggestions:
1) use option weblogic.jspc's "-keepgenerated", you can keep the generated
servlet's source code.
Please paste it here.
2) Can you create a simple reproducer(e.g. a war), and put it here, so that
we can debug it and give more clues.
To reproduce your issue, I write a simple a simple
UserPreferencesManagerBean classs below :
package controllers.beans;
public class UserPreferencesManagerBean {
private int p1;
public void setP1(int p)
p1 = p;
public int getP1()
return p1;
But it works(oh, I run it under 910MP1).
We cannot tell too much without your further information
Thanks
Leon
<Mildred A> wrote in message news:[email protected]...
I am still fighting with this issue.. Dang!
I don't know what to change in my JSP because the WL JSP compiler errors are
so out there..
Here is the first portion of the JSP file:
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
session="true"
pageEncoding="ISO-8859-1"
import="java.util.ArrayList"
import="java.util.HashSet"
import="java.util.Date"
import="java.util.Collections"
import="java.util.ResourceBundle"
%>
<%!
ResourceBundle bundle = null;
public void jspInit() {
bundle = ResourceBundle.getBundle("conf.properties");
%>
<jsp:useBean
id="userPrefsManagerBean"
class="controllers.beans.UserPreferencesManagerBean"
scope="session">
</jsp:useBean>
<jsp:setProperty name="userPrefsManagerBean" property="*" />
Below is the error I get from this section alone (after precompiling):
upms.jsp:3:11: 'try' statement has neither 'catch' nor 'finally' clause
import="java.util.ArrayList"
^-----------------^
upms.jsp:27:3: The qualifier of this name is a package, which cannot contain
fields.
<jsp:setProperty name="userPrefsManagerBean" property="*" />
^-------------^
upms.jsp:27:3: The qualifier of this name is a package, which cannot contain
fields.
<jsp:setProperty name="userPrefsManagerBean" property="*" />
^-------------^
upms.jsp:27:3: Expression expected (found '.' instead)
<jsp:setProperty name="userPrefsManagerBean" property="*" />
^-------------^
upms.jsp:27:3: Syntax error: expected ) (found 'class' instead)
<jsp:setProperty name="userPrefsManagerBean" property="*" />
^-------------^
upms.jsp:27:3: Syntax error: expected <identifier> (found ')' instead)
<jsp:setProperty name="userPrefsManagerBean" property="*" />
^-------------^
upms.jsp:27:3: Expression expected (found 'catch' instead)
<jsp:setProperty name="userPrefsManagerBean" property="*" />
^-------------^
upms.jsp:27:3: Illegal use of an expression as a statement.
<jsp:setProperty name="userPrefsManagerBean" property="*" />
^-------------^
upms.jsp:27:3: No variable or field with this name could be found at this
location.
<jsp:setProperty name="userPrefsManagerBean" property="*" />
^-------------^
upms.jsp:27:3: No variable or field with this name could be found at this
location.
<jsp:setProperty name="userPrefsManagerBean" property="*" />
^-------------^
upms.jsp:27:3: Syntax error: expected ) (found '__ee' instead)
<jsp:setProperty name="userPrefsManagerBean" property="*" />
^-------------^
upms.jsp:27:3: Illegal use of an expression as a statement.
<jsp:setProperty name="userPrefsManagerBean" property="*" />
^-------------^
upms.jsp:27:3: Syntax error: expected ; (found ')' instead)
<jsp:setProperty name="userPrefsManagerBean" property="*" />
^-------------^
upms.jsp:27:3: No variable or field with this name could be found at this
location.
<jsp:setProperty name="userPrefsManagerBean" property="*" />
^-------------^
upms.jsp:27:3: No variable or field with this name could be found at this
location.
<jsp:setProperty name="userPrefsManagerBean" property="*" />
^-------------^
upms.jsp:27:3: Syntax error: expected } (found 'EOF' instead)
<jsp:setProperty name="userPrefsManagerBean" property="*" />
^-------------^
Can anyone see what I am doing wrong here? ?:| ?:|
Cheers,
M -
Want to know abt jsp-precompile option
Hi,
if i passed jsp-precompile=true then what will happen?
what situation we have to send that parameter...
what is the exact functionality of jsp-precompile option....
In our application we are having 200 jsp files.
in our application, once the user logs then 7 frames are loaded and a jsp page is called for each frame...
sometime i am getting jasper exception in some frame.... so should i pass this parameter to all jsp's..
Reply please
Thanks
SaravananI don't think precompile is an option that you pass to a JSP. It's a container option, and how it's supported depends on the container AFAIk. I don't think it's in the JSP spec, but I could be wrong.
Basically what it does it turns the .jsp files into .java files (and possibly .java into .class files too) at the point where the app is deployed or started or something. This is in contrast to doing the compilation page by page when a given .jsp is requested.
What you gain is smoother first-time loading of the pages at the cost of one-time startup delay. -
Compile option is missing in the Packaging wizard
I need to compile my local app jsp files but the problem is i could not able to find the compile option in the Packaging wizard. Can anyone advice how to compile ? The compile option is missing in the packing wizard. I was using it before without any issues but recently i upgraded my machine and need to compile once again.
I am using oracle 10g lite and my machine is 64 bit.Ubuntu 11.xx displays window menus in the control bar at the top of the screen with the switch to the Unity window manager.
* http://en.wikipedia.org/wiki/Ubuntu_Unity
Click on Bookmarks/Show All Bookmarks then move your mouse to the left upper corner toward Firefox Web Browser.
You'll get pop up menu (Organize, Views and Import and Backup).
*[[/questions/822193]] -
Hi,
Could someone please help on the above mentioned?
I'm using JDeveloper 3.2.3 for my program development under Chinese windows platform. I have created a simple JSP page, which contains few static Chinese words and I have included the line
<%@ page contentType="text/html;charset=UTF-8"%>
at the top of the page. When I tried to compile it using encoding "UTF8" (under compiler option), the compiler gave me this error:
C:\Program Files\Oracle\JDeveloper 3.2.3\myhtml\Chinese_html\ChineseList.jsp
Error: (0) sun.io.MalformedInputException.
Btw, when I have removed the line <%@ page contentType="text/html;charset=UTF-8"%> from the page and compile, I've got this error:
C:\Program Files\Oracle\JDeveloper 3.2.3\myhtml\Chinese_html\ChineseList.jsp
Warning: (0) ISO-8859-1 character set may not match project compiler setting.
C:\Program Files\Oracle\JDeveloper 3.2.3\myhtml\Chinese_html\ChineseList.java
Error: (0) malformed input character in C:\Program Files\Oracle\JDeveloper 3.2.3\myhtml\Chinese_html\ChineseList.java.
I do appreciate your help on this. Thank you.Here's some info one of the JSP Developers sent me:
1. HELP.....!!!!! Chinese jsp compilation problem.....
The customer is trying to parse a document generated by
Windows's notepad. When saved in UTF-8, the byte
order mark is saved too. We have a know bug that
JSP parser doesn't recognize Byte Order Mark. The
bug is : 1915285.
2. CHINESE CHARACTER ON JSP
. SQLPLUS depends on NLS_LANG setting. If you
check the windows registry, the default of NLS_LANG
depends on the OS. The user environment is Traditional
Chinese, so does NLS_LANG. If we set NLS_LANG
to .UTF8, SQLPLUS dumps the data in UTF8, however,
the command prompt will have problem displaying them.
. For JSP, as mentioned in a previous mail:
<%@ page contentType="text/html;charset=UTF-8" %> for all languages
<%@ page contentType="text/html;charset=GB2312" %> for simplified Chinese
<%@ page contentType="text/html;charset=Big5" %> for traditional Chinese
. When you enter Chinese characters on a browser,
the data is automatically converted to page encoding
(UTF-8 in your case) before sent back to the server.
But your receiving servlet/JSP needs to have request
encoding set correctly.
I'm not sure about the JDeveloper environment,
but here is a simple JSP you may try to verify your
OC4J environment:
a. To set up the schema:
connect scott/tiger
create table tab01(col varchar2(100));
b. Edit the connect string in nls.jsp
c. Run the nls.jsp in oc4j instance.
<!-- nls.jsp -->
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ page import="oracle.jdbc.*,java.sql.*,java.io.*"%>
<HTML>
<HEAD>
<TITLE>Hello</TITLE></HEAD>
<BODY>
<%
request.setCharacterEncoding("UTF-8");
String sampledata="\u7D20";
String paramValue = request.getParameter("myparam");
String connStr = "jdbc:oracle:thin:@dlsun478:5521:j2ee01";
String user = "scott";
String passwd = "tiger";
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
Connection conn = DriverManager.getConnection(connStr, user, passwd);
if (paramValue == null || paramValue.length() == 0) { %>
<FORM METHOD="GET">
Please input your name: <INPUT TYPE="TEXT" NAME="myparam"
value="<%=sampledata%>" size=20>
<BR>
<INPUT TYPE="SUBMIT" value="Insert Data">
</FORM>
<%
selectData(conn, out);
else
%>
<H1> Insert Data: <%= paramValue %> </H1>
<br/>
<%
insertData(conn, paramValue);
%>
<a href="nls.jsp">back</a>
<%
%>
</BODY>
</HTML>
<%!
public void insertData(Connection aConn, String myval)
try {
PreparedStatement stmt = aConn.prepareStatement("insert into tab01
values(?)");
stmt.setString(1, myval);
stmt.executeUpdate();
aConn.close();
catch (SQLException e) {
e.printStackTrace();
public void selectData (Connection aConn, JspWriter out)
try {
Statement stmt = aConn.createStatement( );
ResultSet r = stmt.executeQuery("SELECT col FROM tab01");
out.println("<H1>List of Data:</H1>");
while (r.next()) {
out.println(r.getString(1)+"<br/>");
aConn.close();
catch (SQLException e) {
e.printStackTrace();
catch (IOException e) {
e.printStackTrace();
%> -
How do I turn off JSP Compilation in jdeveloper 11g ?
I have set the params in weblogic.xml but jdeveloper seems to ignore it.
<jsp-descriptor>
<precompile>false</precompile>
<precompile-continue>true</precompile-continue>
</jsp-descriptor>
Also there was an option in 10g under Run Configurations to say "Run Project Despite Compiler Errors" how do I set this in 11g?
thanks in advance
ArunCan't seem to find the JSP option.
Project Properties --> Compiler has 3 options "Options" "SQLJ" and "XML"
I checked the technologies and Scope, Servlets and JSP is slelected and i can see the runtime libraries in the libraries section.
thanks
Arun -
How to improve ojspc jsp compile performance?
Does anyone have any advice on how to improve the performance of the JSP pre-compilation utility (ojspc)?
We are using Oracle 10g OC4J containers.
Our situation is that we're attempting to add support for Oracle AS (we're currently on Weblogic), so I'm just getting started learning about it. In our development process we aim for sub-5 minutes clean builds, including recompilation of JSP files. Currently our 838 JSP pages take about 27 minutes to translate and compile using ojspc and jikes, but only a few minutes with Weblogic 8.1's jsp compiler.
Here are my initial experiences with ojspc:
* ojspc by default always translates JSPs, regardless of whether they've changed (that is, regardless of whether the .java and .class are up-to-date)? Is this really true? Is there an option to ensure it performs up-to-date checks?
* Also, it only supports batch compilation when your JSPs are packaged in a WAR? And even when doing this it extracts the entire WAR (which is 20Mb in our case) before starting. I couldn't find an option to make it recursively descend a JSP directory hierarchy and compile each JSP. In development we don't package as a WAR.
Here is what we've done to begin to speed things up:
* We wrote a wrapper to descend our exploded JSP tree to decide which JSPs need recompiled based on timestamp of generated .java and .class files, then invoke the ojspc compiler with the names of all those JSPs.
* We use ojspc with -noCompile to translate to .java only
* We then use Jikes to compile all the .java files
But at this point, its still a 27 minute process for 838 JPs. Previous experiences with other JSP compilers (HP Bluestone, previous-generation Weblogic) is that they are often slow because they re-parse each TLD file for every defined taglib in every JSP page. Does anyone know if this is true of ojspc?
Unfortunately we use a technique whereby every taglib is defined in every JSP page by a static include page to ensure consistency of prefix. So there are over a dozen taglib directives in each page, possibly resulting in over 1000 TLD parses.
Has anyone shared this experience or have any advice on speeding things up?
Thanks in advance,
TimHi,
We need more details. If you'll reply with the create table command and the query, we can give a better answer.
I would look for the following:
- Make sure you're doing a full scan of the table.
- Consider running the query in parallel (/*+ full (tab) parallel (tab 8) */) using a hint.
Since you are grouping the results, consider sorting in memory:
alter session set sort_area_size=XXX. Value depends on the table size and your hardware.
Let us know how it goes, and additional hardware details.
Idan.
Maybe you are looking for
-
hi friends I have a report and i need to create a ODS on the report.please help me out in finding the characteristics,keyfigures,time char in the report The fields in the report are Consolidated 4,923,365 MRO (incl Litemor) 4,678,160 USABB 245,205 AC
-
Deploy SOAP Web Service (generated with JDev) in JBOSS
Hi all, I generated a very simple SOAP-Service with the JDeveloper 10.1.3 Release. The service runs very well in the oc4j. But If I try to deploy it with JBOSS 4.0.3 I get manny errors starting with the following: 16:13:39,421 INFO [TomcatDeployer] d
-
DVD's to IPAD2 via MAC 10.4.11?
I am wanting to rip and copy DVD's to my new IPAD2 from my MAC PC software version 10.4.11. Can anyone recommend easy to use software to achieve this?
-
Hi, i'm using Crystal Reports for VS version 13.0.13.1597 with Visual Studio 2013 Unfortunately I get a COMExeption when trying to Print some reports after previously displaying a preview using the CrystalDecisions.Windows.Forms.CrystalReportViewer C
-
In the new iTunes 11, in the store, if I click on an album I see the "Name", "Artist", "Time", "Popularity" and "Price" columns. But no the "Composer" column, a useful information especially for classical music. There is a way to see the Composer col