JSP and compiling
How do I get weblogic server not to compile the jsp at all and just use the class file that I generated from the JSP?
There is a bug that was fixed in 6.1 SP3 related to the jsp dependency checker
that was causing jsps to be recompiled when not necessary (i.e. when you'd already
shipped a valid class file).
The trouble with setting a working directory as described below is it tends to
break badly when you want to release the same app across different OS - we develop
on NT but run on Solaris, and D:\ means nothing there!
So your best bet for jsp joy is to have your buildsystem precompile all the jsps,
and upgrade to SP3 if you're still on 6.1
simon.
Ann Cao <[email protected]> wrote:
>Issue 068247 is not really a bug. It's more a documentation issue. The
>WebLogic
>on-line doc has fixed it by adding the following at
>http://e-docs.bea.com/wls/docs70/adminguide/web_server.html:
>
>"By default JSPs are compiled into the servers' temporary directory the
>location
>for which is (for a server: "myserver" and for a webapp: "mywebapp"):
><domain_dir>\myserver\.wlnotdelete\appname_mywebapp_4344862
>
>The server deletes the temp directory (and thus the default working directory
>for the jsps) each time the server is restarted. If the JSPs are configured
>to
>be precompiled they will be precompiled each time the server restarts.
>
>To avoid this there are following options:
>
>
>Precompile the generated classes into your WEB-INF/classes directory
>(or a jar
>file in WEB-INF/lib).
>
>Set a workingDir for the jsp-descriptor in your weblogic.xml
><jsp-descriptor>
>
><jsp-param> <param-name>workingDir</param-name>
><param-value>d:\jsp_store</param-value> </jsp-param>
>
></jsp-descriptor>
>
>After this is done the precomiled classes will not be deleted each time
>the
>server restarts and they will not be recompiled."
>
>
>
>
>
>Peter Kim wrote:
>
>> Hi,
>>
>> In the Release Notes for Weblogic 7.x, under Known Issues, it says:
>> "The JSPs included with WebLogic Server 7.0 are not being pre-compiled
>> before they are accessed for the first time. If you are deploying
>> precompiled JSPs, WebLogic Server may recompile them to the /wlnotdelete/
>> directory. " (068247)
>>
>> So apparently it is a known issue that sometimes precompiled pages
>may not
>> be recognized
>> properly and Weblogic will recompile them.
>>
>> Could you give more information on the status of this bug?
>>
>> My server on Windows is an admin server. Everything else looks good.
>> I still have problems with recompilation.
>>
>> Thank you very much,
>> Peter Kim
>>
>> "Ann Cao" <[email protected]> wrote in message
>> news:[email protected]...
>> > It shouldn't matter where you compile it. But the classpath you used
>to
>> compile
>> > JSP and the classpath you used to run the application should contain
>same
>> > WebLogic classes and in the same order (weblogic.jar, service pack,
>> patches,
>> > etc.). Also, is the server you are running on Windows an Admin server
>or a
>> > managed server? There was an issue that managed server always compiles
>> JSP.
>> >
>> > Peter Kim wrote:
>> >
>> > > Hello,
>> > >
>> > > Does it matter if there's a difference between the operating system
>on
>> > > the machine that did the original compilation and the machine that
>> > > is running the application?
>> > >
>> > > I'm currently trying to figure out a problem where the precompiled
>> > > jsp pages are being picked up properly in UNIX but not on
>> > > Windows (in Windows, the jsp pages are being recompiled at run-time).
>> > >
>> > > Thanks!
>> > > Peter
>> > >
>> > > "Ann Cao" <[email protected]> wrote in message
>> > > news:[email protected]...
>> > > > Please compile JSPs into WEB-INF/classes/jsp_servlet directory.
>When
>> you
>> > > compile JSPs, please make sure that the server
>> > > > build version (WebLogic version, service pack level, and patches)
> is
>> the
>> > > same as the server on which you deploy your
>> > > > webapp.
>> > > >
>> > > > Chris Pesarchick wrote:
>> > > >
>> > > > > How do I get weblogic server not to compile the jsp at all
>and just
>> use
>> > > the class file that I generated from the JSP?
>> > > >
>> > > > --
>> > > > Regards,
>> > > > Ann
>> > > > Developer Relations Engineer
>> > > > BEA Support
>> > > >
>> > > >
>> >
>> > --
>> > Regards,
>> > Ann
>> > Developer Relations Engineer
>> > BEA Support
>> >
>> >
>
>--
>Regards,
>Ann
>Developer Relations Engineer
>BEA Support
>
>
Similar Messages
-
How to pre-compile jsp and deploy to tomcat
Hi All,
I wuld like to know how to pre-compile JSPs and deploy to tomcat. I am using ANT tool to build and deploy the war file.
Thanks in Advance.
Regards,
--Nagesh.for Tomcat 5.0 (You'll need to edit to fit your needs)
<path id="jsp.classpath">
<!-- point classpath to directory containing jasper-compiler.jar and
jasper-runtime.jar -->
<fileset dir="C:\tomcat\common\lib">
<include name="**/*.jar"/>
</fileset>
<fileset dir="C:/tomcat/common/endorsed">
<include name="**/*.jar"/>
</fileset>
</path>
<target name="jsp" >
<!--
The Ant JSPC task doesn't work with Tomcat 5.0
so in the meantime we need to define our own task.
-->
<taskdef name="jspc50" classname="org.apache.jasper.JspC">
<classpath>
<path refid="jsp.classpath"/>
</classpath>
</taskdef>
<jspc50 outputDir="${build.classes}"
package="jsp"
uriroot="${project.dir}/web/webApp"
webXmlFragment="c:/web.xml"
verbose="9"
validateXml="false">
</jspc50>
<javac srcdir="${build.classes}/jsp"
destdir="${build.classes}"
debug="true"
optimize="false"
includes="**/*.java"
source="1.4">
<classpath>
<path refid="classpath"/>
<path refid="jsp.classpath"/>
</classpath>
</javac>
</target> More information can be found here :
http://www.onjava.com/pub/a/onjava/excerpt/AntTDG_chap8/index1.html?page=last -
Aggressive JSP and TAG file Compilation?
I get JSP and TAG file compile errors only when I touch and save the file. Isn't there a way to get these to build automatically by the NitroX builder? I'm constantly getting Jasper compile errors at runtime and having problems when I rename/refactor code that is referenced by .tag files.
Thanks,
MikeHi,
Does this happen to all of your JSP files?
Please check these settings and update the status:
* Is your project associated with source control or present on local drive?
* Window > Preferences > Workbench (General > workspace) - Build automatically
* Project > Properties > Builders
- Java Builder
- NitroX AppXRay Builder
Did the behavior change due to any of the recent modification/upgrade?
What version of Eclipse & NitroX are you using?
* Help > About NitroX > Click on Eclipse icon - Version & build id
* Help > About NitroX > Click on NitroX icon - Version & build id
Thanks,
M7 Support -
Deploying a WAR file containing .jsp and servlets (also uses JNI)
Deploying a WAR file containing .jsp and servlets (also uses JNI) on Windows 2000
We had problems making it initially work on Sun ONE Web Server 6.0 Service Pack 1 because of lack of good iPlanet Web
Server documentation on deploying such files.
This is how we went about it:
1) Make one of the servlet and JSP (must call another Java Class) web application (.war) examples work with iPlanet Web
Server.
C:\iPlanet\Servers\plugins\servlets\examples\web-apps\HelloWorld\HelloWorld.war
and
C:\iPlanet\Servers\plugins\servlets\examples\web-apps\jakarta-examples\jarkarta-examples.war
a) Go to your Web Server Administration to deploy the application using GUI Web Application Deploy.
(We usually use command line, we experienced some issues with the GUI version, but maybe it is fixed in the new Web Server
service packs)
From browser, open http://yourserver:8888/
Click on Select a Server:Manage
Click on Virtual Server Class
Click on https-yourserver
Click on the Web Applications Tab
Then, click on Deploy Web Application
Enter the following -
WAR File On: Local
WAR File Path: C:\iPlanet\Servers\plugins\servlets\examples\web-apps\jakarta-examples\jarkarta-examples.war
Application URI: /jakarta
Installation Directory: c:\iPlanet\examples\jakarta-examples
By clicking on OK it deployed the application.
I can verify that it is deployed by selecting "Edit Web Applications" and I see the following entry:
Edit /jakarta c:/iPlanet/examples/jakarta-examples
Also, c:/iPlanet/examples/jakarta-examples should have the similar following directory structure ..
- [images]
- [jsp]
- index.html
- [servlets]
- [META-INF]
- [WEB-INF]
- [classes]
- [tlds]
- web.xml
- index.html
I restarted the server and accessed it using the following URL from my IE browser:
http://yourserver/jakarta/index.html
Then I clicked on the JSP Examples and tried some JSP examples.
b) Alternatively, you can also deploy the same example from the command-line.
Make sure C:\iPlanet\Servers\bin\https\httpadmin\bin\ is in your path
wdeploy deploy -u /jakarta
-i yourserver
-v https-yourserver
-d c:\iplanet\examples\jakarta-examples
C:\iPlanet\Servers\plugins\servlets\examples\web-apps\jakarta-examples\jarkarta-examples.war
Restart the web server (I don't think you have to restart, but .. might as well).
2)Deploy your web-application
My Foo.war has the following structure.
You can use jar tf Foo.war to look at the file contents from command line (assuming you have JDK installed and the bin is
in your PATH)
Foo.war
- [META-INF]
- [WEB-INF]
- web.xml
- [classes]
- Bar.class
- MoServlet.class
- [lib]
- ThirdParty.jar
- [natlib]
- extlib.dll
- foo.jsp
Here is our application scenario:
foo.jsp uses a class call Bar (it is not in any package). The Bar java class uses classes from ThirdParty.jar. The
ThirdParty.jar in turn uses JNI to load library extlib.dll. foo.jsp also calls /servlet/Mo as well.
Now to deploy it, do the following:
(a) Make sure that within foo.jsp, you import the Bar class ( I don't know why you have to do it, but if you don't you get
JSP compile error).
<%@page language="java" import="Bar" contentType="text/html"%>
(b) Check web.xml (for Servlets)
Within web.xml, make sure you have the following mappings:
<servlet>
<servlet-name> MoLink </servlet-name>
<servlet-class> MoServlet </servlet-class>
</servlet>
<servlet-mapping>
<servlet-name> MoLink </servlet-name>
<url-pattern> /servlet/Mo </url-pattern>
</servlet-mapping>
(c) Deploy the application
Using command line:
wdeploy deploy -u /foo
-i yourserver
-v https-yourserver
-d c:\iplanet\examples\foo-dir
Foo.war
(d) Change web-apps.xml file (for picking up ThirdParty.jar)
It is located in
C:\iPlanet\Servers\https-yourserver\config
You should see something similar to following after successful deployment.
<web-app uri="/foo" dir="C:\iPlanet\examples\foo-dir" enable="true"/>
Change it to look like following to pick up the ThirdParty.jar
<web-app uri="/foo" dir="C:\iPlanet\examples\foo-dir" enable="true">
<class-loader reload-interval="300"
classpath="C:/iPlanet/examples/foo-dir/WEB-INF/lib/ThirdParty.jar"
delegate="false"/>
</web-app>
(e) Change jvm12.conf file (for JNI)
It is located in
C:\iPlanet\Servers\https-yourserver\config
Add or uncomment the following lines:
#optional - just helps with instrumenting the jsp and servlet code
jvm.include.CLASSPATH=1
jvm.enableDebug=1
nes.jsp.enabledebug=1
jvm.trace=7
jvm.verboseMode=1
#required for JNI
java.compiler=NONE
jvm.classpath=.;C:\JDK1.3.1\lib\tools.jar;C:/iPlanet/Servers/plugins/servlets/examples/legacy/beans.10/SDKBeans10.jar;
jvm.option=-Xrs
jvm.option=-Xnoagent
# not sure if this is needed for iPlanet web server
jvm.option=-Djava.library.path=C:/iPlanet/examples/foo-dir/natlib/ -Djava.compiler=NONE
(f) Change magnus.conf file (for JNI)
We HAD to change this file in order for ThirdParty.jar file to pick up the native C++ code using JNI. Apparently, the
iPlanet Web Server doesn't pick the Environment Variable Path. Because when we had the directory containing the DLL just
in Path, it didn't work.
Change Extrapath directive:
ExtraPath C:/iPlanet/Servers/bin/https/bin;${NSES_JRE_RUNTIME_LIBPATH}
to
ExtraPath c:/iPlanet/examples/foo-dir/natlib;C:/iPlanet/Servers/bin/https/bin;${NSES_JRE_RUNTIME_LIBPATH}
(g) Apply changes from the Web Server Administration Console and Restart the web server.
You should be able to see the behaviour that you want from your application.
http://yourserver/foo/foo.jsp
Hope this was helpful!!!
SonuDeploying a WAR file containing .jsp and servlets (also uses JNI) on Windows 2000
We had problems making it initially work on Sun ONE Web Server 6.0 Service Pack 1 because of lack of good iPlanet Web
Server documentation on deploying such files.
This is how we went about it:
1) Make one of the servlet and JSP (must call another Java Class) web application (.war) examples work with iPlanet Web
Server.
C:\iPlanet\Servers\plugins\servlets\examples\web-apps\HelloWorld\HelloWorld.war
and
C:\iPlanet\Servers\plugins\servlets\examples\web-apps\jakarta-examples\jarkarta-examples.war
a) Go to your Web Server Administration to deploy the application using GUI Web Application Deploy.
(We usually use command line, we experienced some issues with the GUI version, but maybe it is fixed in the new Web Server
service packs)
From browser, open http://yourserver:8888/
Click on Select a Server:Manage
Click on Virtual Server Class
Click on https-yourserver
Click on the Web Applications Tab
Then, click on Deploy Web Application
Enter the following -
WAR File On: Local
WAR File Path: C:\iPlanet\Servers\plugins\servlets\examples\web-apps\jakarta-examples\jarkarta-examples.war
Application URI: /jakarta
Installation Directory: c:\iPlanet\examples\jakarta-examples
By clicking on OK it deployed the application.
I can verify that it is deployed by selecting "Edit Web Applications" and I see the following entry:
Edit /jakarta c:/iPlanet/examples/jakarta-examples
Also, c:/iPlanet/examples/jakarta-examples should have the similar following directory structure ..
- [images]
- [jsp]
- index.html
- [servlets]
- [META-INF]
- [WEB-INF]
- [classes]
- [tlds]
- web.xml
- index.html
I restarted the server and accessed it using the following URL from my IE browser:
http://yourserver/jakarta/index.html
Then I clicked on the JSP Examples and tried some JSP examples.
b) Alternatively, you can also deploy the same example from the command-line.
Make sure C:\iPlanet\Servers\bin\https\httpadmin\bin\ is in your path
wdeploy deploy -u /jakarta
-i yourserver
-v https-yourserver
-d c:\iplanet\examples\jakarta-examples
C:\iPlanet\Servers\plugins\servlets\examples\web-apps\jakarta-examples\jarkarta-examples.war
Restart the web server (I don't think you have to restart, but .. might as well).
2)Deploy your web-application
My Foo.war has the following structure.
You can use jar tf Foo.war to look at the file contents from command line (assuming you have JDK installed and the bin is
in your PATH)
Foo.war
- [META-INF]
- [WEB-INF]
- web.xml
- [classes]
- Bar.class
- MoServlet.class
- [lib]
- ThirdParty.jar
- [natlib]
- extlib.dll
- foo.jsp
Here is our application scenario:
foo.jsp uses a class call Bar (it is not in any package). The Bar java class uses classes from ThirdParty.jar. The
ThirdParty.jar in turn uses JNI to load library extlib.dll. foo.jsp also calls /servlet/Mo as well.
Now to deploy it, do the following:
(a) Make sure that within foo.jsp, you import the Bar class ( I don't know why you have to do it, but if you don't you get
JSP compile error).
<%@page language="java" import="Bar" contentType="text/html"%>
(b) Check web.xml (for Servlets)
Within web.xml, make sure you have the following mappings:
<servlet>
<servlet-name> MoLink </servlet-name>
<servlet-class> MoServlet </servlet-class>
</servlet>
<servlet-mapping>
<servlet-name> MoLink </servlet-name>
<url-pattern> /servlet/Mo </url-pattern>
</servlet-mapping>
(c) Deploy the application
Using command line:
wdeploy deploy -u /foo
-i yourserver
-v https-yourserver
-d c:\iplanet\examples\foo-dir
Foo.war
(d) Change web-apps.xml file (for picking up ThirdParty.jar)
It is located in
C:\iPlanet\Servers\https-yourserver\config
You should see something similar to following after successful deployment.
<web-app uri="/foo" dir="C:\iPlanet\examples\foo-dir" enable="true"/>
Change it to look like following to pick up the ThirdParty.jar
<web-app uri="/foo" dir="C:\iPlanet\examples\foo-dir" enable="true">
<class-loader reload-interval="300"
classpath="C:/iPlanet/examples/foo-dir/WEB-INF/lib/ThirdParty.jar"
delegate="false"/>
</web-app>
(e) Change jvm12.conf file (for JNI)
It is located in
C:\iPlanet\Servers\https-yourserver\config
Add or uncomment the following lines:
#optional - just helps with instrumenting the jsp and servlet code
jvm.include.CLASSPATH=1
jvm.enableDebug=1
nes.jsp.enabledebug=1
jvm.trace=7
jvm.verboseMode=1
#required for JNI
java.compiler=NONE
jvm.classpath=.;C:\JDK1.3.1\lib\tools.jar;C:/iPlanet/Servers/plugins/servlets/examples/legacy/beans.10/SDKBeans10.jar;
jvm.option=-Xrs
jvm.option=-Xnoagent
# not sure if this is needed for iPlanet web server
jvm.option=-Djava.library.path=C:/iPlanet/examples/foo-dir/natlib/ -Djava.compiler=NONE
(f) Change magnus.conf file (for JNI)
We HAD to change this file in order for ThirdParty.jar file to pick up the native C++ code using JNI. Apparently, the
iPlanet Web Server doesn't pick the Environment Variable Path. Because when we had the directory containing the DLL just
in Path, it didn't work.
Change Extrapath directive:
ExtraPath C:/iPlanet/Servers/bin/https/bin;${NSES_JRE_RUNTIME_LIBPATH}
to
ExtraPath c:/iPlanet/examples/foo-dir/natlib;C:/iPlanet/Servers/bin/https/bin;${NSES_JRE_RUNTIME_LIBPATH}
(g) Apply changes from the Web Server Administration Console and Restart the web server.
You should be able to see the behaviour that you want from your application.
http://yourserver/foo/foo.jsp
Hope this was helpful!!!
Sonu -
Folks,
My apologies if this is off-topic for this forum, but I've been having this problem using Tomcat and JSP. I'm fairly new to Java.
Basically, I'm writing a webapp that uses servlets and JSP together. The servlet and backend classes all compile fine. Now, basic frontend page is called Console.jsp, and one of the commands that it runs is <%@ page import="DJUser">
Here's the problem: Console.jsp is in $CATALINA_HOME/webapp/
DJUser (and the rest of the classes I'm using) are in $CATALINA_HOME/webapp/WEB-INF/classes
When I attempt to run Console.jsp I get this error:
exception
org.apache.jasper.JasperException: Unable to compile class for JSP
Generated servlet error:
The import DJUser cannot be resolved
An error occurred at line: 9 in the jsp file: /Console.jsp
Generated servlet error:
DJUser cannot be resolved to a type
An error occurred at line: 11 in the jsp file: /Console.jsp
Generated servlet error:
user cannot be resolved
An error occurred at line: 11 in the jsp file: /Console.jsp
Generated servlet error:
DJUser cannot be resolved to a type
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:409)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
The ROOT CAUSE is listed as:
java.lang.ClassNotFoundException: org.apache.jsp.Console_jsp
java.net.URLClassLoader$1.run(URLClassLoader.java:200)
java.security.AccessController.doPrivileged(Native Method)
java.net.URLClassLoader.findClass(URLClassLoader.java:188)
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:133)
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:65)
org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:596)
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:137)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:305)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
I'm running Tomcat 5.5.12 on Mac OS X 10.4. Could this be a permissions issue somehow? For right now (testing purposes only) I have tomcat running under my (non root) account.
I've been scouring the web for a while, and I can't really find anything on this. I'd appreciate any help you could give me.
Thanks!
DylanPut the DJUser java file in a package (say com.myClasses) and recompile. Then put the DJUser class file under the WEB-INF/classes directory in the proper package structure (WEB-INF/classes/com/myClasses/DJUser). Stop and restart the server to pick up the new classes. Make sure to change the jsp import statement ( <%@ page import="com.myClasses.DJUser">)
-
I have tried a lot searching for such issue, but cd not find any solution which
cd help me.
We have a jsp which compiles well in one enviroment, but does not compile in another.
The enviroment in which it compiles is as follows:
OS: Solaris 2.6, Patch level 32
wls version: 6.1 with no service pak
The enviroment in which it does not compile is as follows:
OS: Solaris 8, Patch level 19
wls version: 6.1 with no service pak
In the second enviroment, it gives the folowing error, when invoked...
//error start....
/requisition/reqteamwiz.jsp(532): scriptlet close brace '}' unbalanced at line
532 which breaks scope '_base_service_scope_'
probably occurred due to an error in /requisition/reqteamwiz.jsp line 532:
<strong><font face="Verdana" size="1"><input type="button" style="font-family:
Verdana; font-size: 8pt" name="B1" value=" Submit " onClick="FrontPage_Form1_Validator(document.FrontPage_Form1,
'<%= i%>')"></td></font></strong>
//error end
The line seems OK, and this works fine in the first enviroment.
Cd anyone pls give any suggestions or references as to any known issues with the
second enviroment.
Thanks a lot...
[email protected] (David M. Karr) wrote:
>>>>>> "vinay" == vinay s <[email protected]> writes:
>
> vinay> I have tried a lot searching for such issue, but cd not find
>any solution which
> vinay> cd help me.
> vinay> We have a jsp which compiles well in one enviroment, but does
>not compile in another.
> vinay> The enviroment in which it compiles is as follows:
> vinay> OS: Solaris 2.6, Patch level 32
> vinay> wls version: 6.1 with no service pak
>
> vinay> The enviroment in which it does not compile is as follows:
> vinay> OS: Solaris 8, Patch level 19
> vinay> wls version: 6.1 with no service pak
>
> vinay> In the second enviroment, it gives the folowing error, when
>invoked...
> vinay> //error start....
> vinay> /requisition/reqteamwiz.jsp(532): scriptlet close brace '}'
>unbalanced at line
> vinay> 532 which breaks scope '_base_service_scope_'
> vinay> probably occurred due to an error in /requisition/reqteamwiz.jsp
>line 532:
> vinay> <strong><font face="Verdana" size="1"><input type="button"
>style="font-family:
> vinay> Verdana; font-size: 8pt" name="B1" value=" Submit " onClick="FrontPage_Form1_Validator(document.FrontPage_Form1,
> vinay> '<%= i%>')"></td></font></strong>
> vinay> //error end
>
> vinay> The line seems OK, and this works fine in the first enviroment.
> vinay> Cd anyone pls give any suggestions or references as to any
>known issues with the
> vinay> second enviroment.
> vinay> Thanks a lot...
>
>If you use an expression scriptlet for an attribute value, it has to
>be the
>entire attribute value, not just a portion of it.
>
>--
>===================================================================
>David M. Karr ; Java/J2EE/XML/Unix/C++
>[email protected] ; SCJP; SCWCD
>
>
I am using the scriplet for entire value, seems the post got jumbled up.
FrontPage_Form1_Validator is a javascript function which takes 2 parameters, one
of which is provided by the expression scriplet.
<strong><font face="Verdana" size="1"><input type="button" style="font-family:
Verdana; font-size: 8pt" name="B1" value=" Submit " onClick="FrontPage_Form1_Validator(document.FrontPage_Form1,
'<%= i%>')"></td></font></strong>
-
Can I use AWT elements in a JSP, and so could I generate events with them?
This is because I�m doing a simple JSP that showing a button, my JSP is:
<html>
<%@ page import="java.awt.*" %>
<%! Button b = new Button("Hola!!!"); %>
<% add(b); %>
</html>
But when I tried to see the button in the browser, my JSP generates the following:
Compilation of '/RAID5/weblogic/myserver/classfiles/jsp_servlet/_gep/_alterno/_23_mayo/__mr4.java' failed:
/RAID5/weblogic/myserver/classfiles/jsp_servlet/_gep/_alterno/_23_mayo/__mr4.java:79: cannot resolve symbol
probably occurred due to an error in /gep/alterno/23_mayo/mr4.jsp line 7:
<% add(b); %>
Could somebody help me please?.....
Can I use AWT elements in a JSP, and so could I generate events with them?
Thanks!!!There are 2 ways to run a web page dynamically:
1) Reload the page via use of javascript or some other scripting language.
2) Use an applet to regularly check a URL for the data
Remember, as Paul pointed out, JSP's only generate HTML output. AWT components need to run inside a JVM not a just the browser.
I could recommend an applet but you may have problems with IE6 not supporting java. Otherwise there shouldn't be too much of a prob.
If you prefer to use an AWT/Swing setup (for example an application) rather than a JSP setup, Webstart is good for delivering online applications which operate standalone or remotely.
When you consider that the Java-Plugin and the Webstart puligin are about the same size it's just a matter of weighing up who your target clients are and whats easiest.
Cheers,
Anthony -
Hi! I am new to JSP and I need help on how to utilize java bean on JSP. I have gone through this forum, I found similar question but did not find any answer that could solve my question. Tons of thanks to anyone who could help me out!
I have a java bean class called Bean1, which I put under /ROOT/WEB-INF/classes/, and a JSP file that utilizes class Bean1, saved under /ROOT/, which should be a correct way indicated by several posts I found in this forum. But when I try to compile the JSP file over TOMCAT4.1 over http://localhost:8080/beanexample1.jsp, it throws me a lot of error messages (see below). I've been struggling for so long. Any help is greatly apprecitated! Thanks!
Bo
The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 0 in the jsp file: /beanexample1.jsp
Generated servlet error:
[javac] Compiling 1 source file
C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\beanexample1_jsp.java:41: cannot resolve symbol
symbol : class Bean1
location: class org.apache.jsp.beanexample1_jsp
Bean1 bean1 = null;
^
An error occurred at line: 0 in the jsp file: /beanexample1.jsp
Generated servlet error:
C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\beanexample1_jsp.java:43: cannot resolve symbol
symbol : class Bean1
location: class org.apache.jsp.beanexample1_jsp
bean1 = (Bean1) pageContext.getAttribute("bean1", PageContext.PAGE_SCOPE);
^
An error occurred at line: 0 in the jsp file: /beanexample1.jsp
Generated servlet error:
C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\beanexample1_jsp.java:46: cannot resolve symbol
symbol : class Bean1
location: class org.apache.jsp.beanexample1_jsp
bean1 = (Bean1) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "Bean1");
^
An error occurred at line: 13 in the jsp file: /beanexample1.jsp
Generated servlet error:
C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\beanexample1_jsp.java:66: cannot resolve symbol
symbol : class Bean1
location: class org.apache.jsp.beanexample1_jsp
out.print(JspRuntimeLibrary.toString((((Bean1)pageContext.findAttribute("bean1")).getName())));
^
An error occurred at line: 16 in the jsp file: /beanexample1.jsp
Generated servlet error:
C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\beanexample1_jsp.java:69: cannot resolve symbol
symbol : class Bean1
location: class org.apache.jsp.beanexample1_jsp
out.print(JspRuntimeLibrary.toString((((Bean1)pageContext.findAttribute("bean1")).getSeventhPrimeNumber())));
^
An error occurred at line: 19 in the jsp file: /beanexample1.jsp
Generated servlet error:
C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\beanexample1_jsp.java:72: cannot resolve symbol
symbol : class Bean1
location: class org.apache.jsp.beanexample1_jsp
out.print(JspRuntimeLibrary.toString((((Bean1)pageContext.findAttribute("bean1")).getCurrentTime())));
^
An error occurred at line: 27 in the jsp file: /beanexample1.jsp
Generated servlet error:
C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\beanexample1_jsp.java:79: cannot resolve symbol
symbol : class Bean1
location: class org.apache.jsp.beanexample1_jsp
out.print(JspRuntimeLibrary.toString((((Bean1)pageContext.findAttribute("bean1")).getColor())));
^
7 errors
at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:130)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:293)
at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:340)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:352)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:474)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:184)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java: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.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:386)
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:484)you need to put your bean in a package. do this by
making a sub directory under the classes directory,
let's say you call it "mybeans".
so copy Bean1.java to
/ROOT/WEB-INF/classes/Bean1.java
add the line "package mybeans;"
to the top of the Bean1.java file,
and then compile it there.
the standard way to use the bean in your jsp file is like this:
<jsp:useBean id="thisbean" scope="page" class="mybeans.Bean1" />
this <jsp:usebean> tag instantiates the bean for you.
then refer to it by its id:
thisbean.myMethod();
thisbean.setProperty();
I have a java bean class called Bean1, which I put
under /ROOT/WEB-INF/classes/, and a JSP file that
utilizes class Bean1, saved under /ROOT/, which should
be a correct way indicated by several posts I found in
this forum. But when I try to compile the JSP file
over TOMCAT4.1 over
http://localhost:8080/beanexample1.jsp, it throws me a
lot of error messages (see below). I've been
struggling for so long. Any help is greatly
apprecitated! Thanks!
Bo
The server encountered an internal error () that
prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile
class for JSP
An error occurred at line: 0 in the jsp file:
/beanexample1.jsp
Generated servlet error:
[javac] Compiling 1 source file
C:\Program Files\Apache Group\Tomcat
4.1\work\Standalone\localhost\_\beanexample1_jsp.java:4
: cannot resolve symbol
symbol : class Bean1
location: class org.apache.jsp.beanexample1_jsp
Bean1 bean1 = null;
^
An error occurred at line: 0 in the jsp file:
/beanexample1.jsp
Generated servlet error:
C:\Program Files\Apache Group\Tomcat
4.1\work\Standalone\localhost\_\beanexample1_jsp.java:4
: cannot resolve symbol
symbol : class Bean1
location: class org.apache.jsp.beanexample1_jsp
bean1 = (Bean1)
(Bean1) pageContext.getAttribute("bean1",
PageContext.PAGE_SCOPE);
^
An error occurred at line: 0 in the jsp file:
/beanexample1.jsp
Generated servlet error:
C:\Program Files\Apache Group\Tomcat
4.1\work\Standalone\localhost\_\beanexample1_jsp.java:4
: cannot resolve symbol
symbol : class Bean1
location: class org.apache.jsp.beanexample1_jsp
bean1 = (Bean1)
1 = (Bean1)
java.beans.Beans.instantiate(this.getClass().getClassLo
der(), "Bean1");
^
An error occurred at line: 13 in the jsp file:
/beanexample1.jsp
Generated servlet error:
C:\Program Files\Apache Group\Tomcat
4.1\work\Standalone\localhost\_\beanexample1_jsp.java:6
: cannot resolve symbol
symbol : class Bean1
location: class org.apache.jsp.beanexample1_jsp
out.print(JspRuntimeLibrary.toString((((Bean1)pageCont
xt.findAttribute("bean1")).getName())));
^
An error occurred at line: 16 in the jsp file:
/beanexample1.jsp
Generated servlet error:
C:\Program Files\Apache Group\Tomcat
4.1\work\Standalone\localhost\_\beanexample1_jsp.java:6
: cannot resolve symbol
symbol : class Bean1
location: class org.apache.jsp.beanexample1_jsp
out.print(JspRuntimeLibrary.toString((((Bean1)pageCont
xt.findAttribute("bean1")).getSeventhPrimeNumber())));
^
An error occurred at line: 19 in the jsp file:
/beanexample1.jsp
Generated servlet error:
C:\Program Files\Apache Group\Tomcat
4.1\work\Standalone\localhost\_\beanexample1_jsp.java:7
: cannot resolve symbol
symbol : class Bean1
location: class org.apache.jsp.beanexample1_jsp
out.print(JspRuntimeLibrary.toString((((Bean1)pageCont
xt.findAttribute("bean1")).getCurrentTime())));
^
An error occurred at line: 27 in the jsp file:
/beanexample1.jsp
Generated servlet error:
C:\Program Files\Apache Group\Tomcat
4.1\work\Standalone\localhost\_\beanexample1_jsp.java:7
: cannot resolve symbol
symbol : class Bean1
location: class org.apache.jsp.beanexample1_jsp
out.print(JspRuntimeLibrary.toString((((Bean1)pageCont
xt.findAttribute("bean1")).getColor())));
^
7 errors
at
org.apache.jasper.compiler.DefaultErrorHandler.javacEr
or(DefaultErrorHandler.java:130)
at
org.apache.jasper.compiler.ErrorDispatcher.javacError(
rrorDispatcher.java:293)
at
org.apache.jasper.compiler.Compiler.generateClass(Comp
ler.java:340)
at
org.apache.jasper.compiler.Compiler.compile(Compiler.j
va:352)
at
org.apache.jasper.JspCompilationContext.compile(JspCom
ilationContext.java:474)
at
org.apache.jasper.servlet.JspServletWrapper.service(Js
ServletWrapper.java:184)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(Js
Servlet.java:295)
at
org.apache.jasper.servlet.JspServlet.service(JspServle
.java:241)
at
javax.servlet.http.HttpServlet.service(HttpServlet.jav
:853)
at
org.apache.catalina.core.ApplicationFilterChain.intern
lDoFilter(ApplicationFilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilt
r(ApplicationFilterChain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(S
andardWrapperValve.java:260)
at
org.apache.catalina.core.StandardPipeline$StandardPipe
ineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(Stand
rdPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(Containe
Base.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(S
andardContextValve.java:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipe
ineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(Stand
rdPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(Containe
Base.java:995)
at
org.apache.catalina.core.StandardContext.invoke(Standa
dContext.java:2415)
at
org.apache.catalina.core.StandardHostValve.invoke(Stan
ardHostValve.java:180)
at
org.apache.catalina.core.StandardPipeline$StandardPipe
ineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke
ErrorDispatcherValve.java:170)
at
org.apache.catalina.core.StandardPipeline$StandardPipe
ineValveContext.invokeNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(Err
rReportValve.java:172)
at
org.apache.catalina.core.StandardPipeline$StandardPipe
ineValveContext.invokeNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(Stand
rdPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(Containe
Base.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(St
ndardEngineValve.java:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipe
ineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(Stand
rdPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(Containe
Base.java:995)
at
org.apache.coyote.tomcat4.CoyoteAdapter.service(Coyote
dapter.java:223)
at
org.apache.coyote.http11.Http11Processor.process(Http1
Processor.java:432)
at
org.apache.coyote.http11.Http11Protocol$Http11Connecti
nHandler.processConnection(Http11Protocol.java:386)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolT
pEndpoint.java:534)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunna
le.run(ThreadPool.java:530)
at java.lang.Thread.run(Thread.java:484) -
Getting error in JSP at compile time:
Hello,
I am getting this error in JSP at compile time, have no idea whatd going wrong here..!! Everything in the code looks good.
Please help..!! The error is:
Error 500: Unable to compile class for JSP /opt/WebSphere/AppServer/temp/jasi80corpgeNode/HRAppServer/Billinginterface/BillingInterfaceWEB.war/_select_5F_course.java:188: Type expected. } catch (Throwable t) { ^ 1 errorEverything looks good, but then you can never spot your own mistakes :-)
There are a couple of things.
1 - curly brackets in scriptlets. Make sure they are all opened and closed correctly.
2 - Custom tags (JSTL and the like) need to be closed. If it is a simple tag, have you forgotten the slash before the closing angle bracket? ie is it <c:out value="hello"> when it should be <c:out value="hello"/>
Take a look at the generated java code at /opt/WebSphere/AppServer/temp/jasi80corpgeNode/HRAppServer/Billinginterface/BillingInterfaceWEB.war/_select_5F_course.java, line 188
See if you can make any sense out of the java file generated from the jsp
If you want any more specific help than this, please post some jsp code :-)
If you don't want to do that, I would recommend commenting all the code out with <%-- --%>
get it to compile, and then uncomment a bit at a time
Good luck,
evnafets -
JSP and Servlets? What's the difference?
I've got this book, and it's mixing servlet with jsp and then jsp with servlet. Can we just use one and still make a web application? What is the difference between the both? Can anyone give me a basic idea behind these 2 J2ee technologies.
hi,
Both use server-side Java to dynamically generate web pages. The source code to a JSP looks like HTML, with Java embedded inside
(a) normal HTML tags, (b) JSP tags like <jsp:include>, (c) custom tags, (d) scriptlets (Java code surrounded with <% and %>).
The source code to a servlet looks like Java, with HTML embedded in out.print(...) statements. Both use the Servlet API to communicate with the web server and the client. In fact, a JSP gets compiled into a servlet, so they're almost identical in terms of expressive power. The choice is, whether you're more comfortable coding your pages in Java or in JSP-style HTML; and since you can call a JSP from a Servlet and vice versa, you don't have to make an either-or decision.
Karthick PalaniChamy -
Revision: 11488
Author: [email protected]
Date: 2009-11-05 17:10:10 -0800 (Thu, 05 Nov 2009)
Log Message:
Resubmitting binary distribution of xercesPatch.jar from the third party module in the SDK and compiled it with Sun JDK 1.4.2_12.
QE notes: N/A
Doc notes: N/A
Bugs:
SDK-16818 - Must open-source the code for xercesPatch.jar.
Reviewer: Discussed with Gordon
Tests run: Checkintests
Is noteworthy for integration: No
Ticket Links:
http://bugs.adobe.com/jira/browse/SDK-16818
Modified Paths:
flex/sdk/trunk/lib/xercesPatch.jar
flex/sdk/trunk/modules/thirdparty/xerces-patch/build.xmlDid you try this:
http://forum.java.sun.com/thread.jsp?thread=434718&forum=60&message=1964421 -
Hi all,
I have a problem with my jsp, when i try to load my jsp i 've got an error 500 like this :
Error: 500
Location: /kimdog/jsp/liste_diff.jsp
Erreur Interne de Servlet:
org.apache.jasper.compiler.ParseException: C:\jakarta-tomcat\kimdog\jsp\liste_diff.jsp(73,59) Lattribut {0} n'a pas de valeur
at org.apache.jasper.compiler.JspReader.parseAttributeValue(JspReader.java:519)
at org.apache.jasper.compiler.JspReader.parseTagAttributes(JspReader.java:635)
at org.apache.jasper.compiler.Parser$Directive.accept(Parser.java:192)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1077)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1042)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1038)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:209)
at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:612)
at org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:542)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:258)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:268)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
at org.apache.tomcat.core.Handler.service(Handler.java:287)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:812)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:166)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
at java.lang.Thread.run(Thread.java:484)
I work with tomcat 3-2-1, jdk 1.3 and IIS
What's wrong with this ? Have you an idea ?
thanks in advanceLooks like the JSP compiler is failing when trying to figure-out (parse) one of your jsp tags. Try checking
line 73 column 59 in liste_diff.jsp, and see what might be wrong.
Good Luck. -
Help with jsp and javaBean in eclipse/Tomcat
Hi,
I am new to JSP and JavaBean. I am going through tutorial for a jsp page that uses a javaBean. I am using eclipse to create jsp page and the java bean.
My eclipse project "Date" has five package as under:-
1. Deployment Descriptor
2. Java Resources: src
3. build
4. WebContent
I have my data.jsp page in WebContent/WEB-INF/ folder. When I just run date.jsp in a browser as: http://localhost:8080/Date/date.jsp, it gets launched into the browser correctly. But when I add a JavaBean "TimeFormatterBean.java" in the Java Resources:src folder and use it in date.jsp page, I get errors as under:-
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 5 in the jsp file: /date.jsp
TimeFormatterBean cannot be resolved to a type
2: pageEncoding="ISO-8859-1"%>
3: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
4:
5: <jsp:useBean id="formatter" class="TimeFormatterBean"/>
6:
7: <html>
8: <head>
The data.jsp page is as under:-
<jsp:useBean id="formatter" class="TimeFormatterBean"/>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<h1> Date JSP </h1>
<p> The current time is:
<%= new java.util.Date() %>
<jsp:getProperty name="formatter" property="name"/>
</p>
</body>
</html>I can see "TimeFormatterBean.class" in build/classes folder.
If anyone could please help me out with this, it would be very helpful
Thanks a lot!You probably should place TimeFormatterBean inside a package, or maybe you could try importing it , even if it�s in the default package, with something like this <%@ page import="TimeFormatterBean" %> at the top
-
Class javax.servlet.jsp.PageContext compilation error
During Rebuild/compilation of the JSP files inside JDeveloper, I am encountering the compilation error "Error(548,78): method handlepageException (java.lang.Throwable) not found in class javax.servlet.jsp.PageContext. When I developed the same application under IBM WSAD, I included the library com.ibm.servlet.jar and will take care of it. Which Oracle Jdeveloper lib I need to include? Since it is a servlet library error, I tried to include the Oracle "Servlet APIC Classes" but it didn't fix the problem. Thanks in advance!
hmmm... i had a look and it seems that what you are trying to "import" is actually in a package... instead of import try:
package javax.servlet.jsp;you may need to go download this "package" and complile it in the directory you are working in.
my advice: try the above statement (which does compile for me), if it doesn't work, you will need to find the source code for this package and compile it just like you do any other source code.
hope this helps. -
JSP auto compile is not working
Hi All,
I am using Sun One Web server 6.1 SP5. Every time I make changes in JSP and push to the server, I need to delete the class cache and restart the server, in order to see new changes in JSP.
Plsss helppppp
ThanksCompare the timestamps of the compiled Java classes for your .jsp files and that of the .jsp file itself.
The compiled .java and .class file for a .jsp can be found in the ClassCache directory of your server instance.
for e.g.
% cd https-foobar
% ls -al ../docs/foo.jsp ClassCache/https-foobar/default-webapp/_jsps/_foo_jsp.java ClassCache/https-foobar/default-webapp/_jsps/_foo_jsp.class
Apr 25 21:01 ../docs/foo.jsp
Apr 25 21:02 ClassCache/https-foobar/default-webapp/_jsps/_foo_jsp.class
Apr 25 21:02 ClassCache/https-foobar/default-webapp/_jsps/_foo_jsp.java
The JSP engine compares the timestamps of the .jsp file and the .class file to determine if the JSP needs to be recompiled.
I installed 6.1 sp5 and did not have any problems getting a JSP to automatically be compiled after I updated it.
Other things you can check:
- If your ClassCache is on a NFS drive
- if you have reload-interval configured under the <jsp-config> element in your application's WEB-INF/sun-web.xml or in <server-instance>/config/default-web.xml
Maybe you are looking for
-
How can I connect an external hard drive to my ipad
How can I add additional data storage to my ipad 2?
-
Calling Stored Procedure for Multiple records
Hi, I have an use case where I have more than 2000 item and for every item I need to fetch around 70 more values as out parameters. Also i need to show all thoes values on UI. So calling SP in loop is a problem as I can see the rendering the values a
-
Corruption in output : Fraps - H264
Hello, I usually use VirtualDub to encode my Fraps footage to H264 using x264. I'm trying to see if I can do the same thing using Adobe PE. Source footage: AVI Fraps Codec 1280x768 25 fps Output settings chosen in Adobe PE: Microsoft AVI x264 (using
-
EntryProcessor invokeAll returning empty ConverterMap{}
Hi All, I am trying to write a custom entryprocessor and whatever I return from the invokeAll method in the entryprocessor, I am always getting a empty ConverterMap{}. The code for the entryprocessor is as below: public class CustomEP implements Port
-
How to preserve titles and arrangement of pix in albums
Recently I created an iPhoto book; no problem. Then, without problems, I sent to iDVD: a slide show version of the book and also the photos in the album I'd used to create the book (using the "share" menu to send photos (that creates another slide sh