Problem in compiling JSP page in OC4J 10.1.3.0.0

Dear all,
I started the ocj4 container that came with Jdeveloper. After starting the ocj4 server, I try to test it with the Servlet and JSP example. The Servlet Example work fine but I encounter the following error when I run the JSP example.
2006-01-12 11:08:39.379 NOTIFICATION J2EE JSP0008 Unable to dispatch JSP Page :Exception:oracle.jsp.provider.JspCompileException: <H3>Errors compiling:C:\Program Files\Oracle\j2ee\home\application-deployments\default\defaultWebApp\persist
ence\_pages\_examples\_jsp\_jsp2\_el\_basic_2d_arithmetic_2e_jsp.java</H3><pre><
/pre>
I think this should be a setup problem, please kndly advise.

After reading the theads in the forum, I am able to get the jsp running by using full path to specify the java executable.
e.g. C:\Program Files\Java\jdk1.5.0_02\bin\java -jar oc4j.jar
This should be a path problem. After I set the path variable correctly
i.e. add C:\Program Files\Java\jdk1.5.0_<version>\bin to PATH environment variable. It work fine. I hope this help the newbie like me. :D
Indeed, I wonder why we need two jdk for the oc4j. Follow the instruction, I need to install a jdk. However, I find there is another jdk under $ORACLE_HOME\jdk. This is make the situation confusing and saw quite a lot of threads are related to this problem long time ago!

Similar Messages

  • Problems placing compiled jsp in the right directory

    I have problems placing compiled jsp in the right directory.
              - My document root is weblogic/myserver/public_html
              - My jsp's are placed in weblogic/myserver/public_html/ram/jsp.
              - My folder for placing compiled jsp is in weblogic/myserver/compiled_jsp.
              - When weblogic compiles my jsp it places them in
              weblogic/myserver/compiled_jsp/jsp_servlet/_ram/_jsp
              Now I want to compile ram1.jsp and place it in above directory. I tried the
              following but it does not place class correct.
              1: java weblogic.jspc -d C:\weblogic\myserver\compiled_jsp ram1.jsp
              **** Places the class in weblogic/myserver/compiled_jsp/jsp_servlet
              2: java weblogic.jspc -d
              C:\weblogic\myserver\compiled_jsp\jsp_servlet\_ram\_jsp ram1.jsp
              C:\weblogic\myserver\compiled_jsp\jsp_servlet\_ram\_jsp\jsp_servlet\_ram1.cl
              ass
              What am I doing wrong ?
              cheers Per
              

              I would try this...
              cd public_html
              java weblogic.jspc -prefix compiled_jsp ram/jsp/ram1.jsp
              I'm not sure if -prefix is the exact option - something like that - maybe package_prefix.
              As always, things work better/easier when you leave things at the default value
              (jsp_servlet).
              Mike
              "Per Lovdinger" <[email protected]> wrote:
              >I have problems placing compiled jsp in the right directory.
              >
              >- My document root is weblogic/myserver/public_html
              >- My jsp's are placed in weblogic/myserver/public_html/ram/jsp.
              >- My folder for placing compiled jsp is in weblogic/myserver/compiled_jsp.
              >
              >- When weblogic compiles my jsp it places them in
              >weblogic/myserver/compiled_jsp/jsp_servlet/_ram/_jsp
              >
              >Now I want to compile ram1.jsp and place it in above directory. I tried
              >the
              >following but it does not place class correct.
              >
              >1: java weblogic.jspc -d C:\weblogic\myserver\compiled_jsp ram1.jsp
              >**** Places the class in weblogic/myserver/compiled_jsp/jsp_servlet
              >
              >2: java weblogic.jspc -d
              >C:\weblogic\myserver\compiled_jsp\jsp_servlet\_ram\_jsp ram1.jsp
              >****
              >C:\weblogic\myserver\compiled_jsp\jsp_servlet\_ram\_jsp\jsp_servlet\_ram1.cl
              >ass
              >
              >What am I doing wrong ?
              >
              >cheers Per
              >
              >
              

  • Compilation problem in a JSP page

    Hi all,
    I'm trying to write a jsp page and some java stuff in it.
    It goes something like this -
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ page contentType="text/html;charset=windows-1255"%>
    <html>
      <head>
        <meta http-equiv="Content-Type" content="text/html; charset=windows-1255"/>
        <title>Michael</title>
      </head>
      <body>
    <%
              String strError="";
    %>
    </body>Now the problem is that I get compilation problem about the use in java -
    "String cannot be resolved to a type"
    I know for sure that in other computers it's work, the question is what I'm missing?
    I have Java VM installed and I've downloaded and installed the latest JDK, what else?
    thanks,
    Michael.

    Michael4488 wrote:
    BalusC wrote:
    Then you should be using JSTL/EL.I don't familiar with this technology, any way - Its work on one computer so in my understanding it should work on the other as well.It is not related to the actual problem. It was just a comment on your code. Using scriptlets is considered as bad practice.
    I understand that of course, but I don't use any configuration file or set any special parameters in my computer.
    What exactly does the compiler need in order to recognize the Java code in the JSP page? If i manually add the JAVA_HOME environment variable it will work?
    where should I refer it to? "..\Java\jre1.6.0_07\lib" will do?It must point to the root installation directory of the JDK (thus not the JRE!).

  • Cannot compile JSP pages in Tomcat 5.0.28

    Hi,
    I'm new to Tomcat and this has been bothering me for days now.
    I have (seemingly) correctly installed Tomcat v5.0.28 and am currently in the process of testing my environment with simple html/jsp pages.
    My server starts up fine with no error messages.
    Testing the server I can access the .html file fine, however I get a HTTP 404 error for the .jsp: The requested resource (/hello/hello.jsp) is not availableI have done the following since installation:
    1. Installed Tomcat to C:\Program Files\jakarta-tomcat-5.0.282. Set the environment variable JAVA_HOME to the value C:\Program Files\Java\jdk1.5.0 (base directory of my java installation)
    3. Even added ;C:\Program Files\Java\jdk1.5.0\bin to the environment variable Path (just in case, for javac)
    4. Enabled the invoker sevlet by uncommenting:
        <servlet>
            <servlet-name>invoker</servlet-name>
            <servlet-class>
              org.apache.catalina.servlets.InvokerServlet
            </servlet-class>
        </servlet>and
        <servlet-mapping>
            <servlet-name>invoker</servlet-name>
            <url-pattern>/servlet/*</url-pattern>
        </servlet-mapping>in conf/web.xml
    5. Added an access log valve to locahost
    6. Set ant fork compiles to seperate JVMs:
        <servlet>
            <servlet-name>jsp</servlet-name>
            <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
            <init-param>
                <param-name>fork</param-name>
                <param-value>true</param-value>
            </init-param>
            <init-param>
                <param-name>xpoweredBy</param-name>
                <param-value>false</param-value>
            </init-param>
            <load-on-startup>3</load-on-startup>
        </servlet>6. Installed the .html and .jsp pages to folder %CATALINA_HOME%/webapps/ROOT/helloNow when I bin/startup.bat Tomcat starts without anu error messges. In a browser I can now access http://localhost:8080 and http://localhost:8080/hello/hello.html but not http://localhost:8080/hello/hello.jspHere are my logfiles (in debug mode) for performing the above actions and then shutting down:
    catalina_log.txt
    2006-04-29 18:29:02 EngineConfig: EngineConfig: Processing START
    2006-04-29 18:29:24 EngineConfig: EngineConfig: Processing STOPlocalhost_log.txt
    2006-04-29 18:29:01 StandardContext[/balancer]org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]]
    2006-04-29 18:29:01 StandardContext[/jsp-examples]ContextListener: contextInitialized()
    2006-04-29 18:29:01 StandardContext[/jsp-examples]SessionListener: contextInitialized()
    2006-04-29 18:29:02 StandardContext[/servlets-examples]ContextListener: contextInitialized()
    2006-04-29 18:29:02 StandardContext[/servlets-examples]SessionListener: contextInitialized()
    2006-04-29 18:29:24 StandardContext[/servlets-examples]ContextListener: attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.lang.String;@14eaec9')
    2006-04-29 18:29:24 StandardContext[/servlets-examples]ContextListener: attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.lang.String;@b533b8')
    2006-04-29 18:29:24 StandardContext[/servlets-examples]ContextListener: attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.lang.String;@569c60')
    2006-04-29 18:29:24 StandardContext[/servlets-examples]SessionListener: contextDestroyed()
    2006-04-29 18:29:24 StandardContext[/servlets-examples]ContextListener: contextDestroyed()
    2006-04-29 18:29:24 StandardContext[/jsp-examples]ContextListener: attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.lang.String;@d67067')
    2006-04-29 18:29:24 StandardContext[/jsp-examples]ContextListener: attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.lang.String;@6db724')
    2006-04-29 18:29:24 StandardContext[/jsp-examples]ContextListener: attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.lang.String;@112da40')
    2006-04-29 18:29:24 StandardContext[/jsp-examples]SessionListener: contextDestroyed()
    2006-04-29 18:29:24 StandardContext[/jsp-examples]ContextListener: contextDestroyed()localhost_access_log.txt
    127.0.0.1 - - [29/Apr/2006:18:29:13 +0930] "GET /hello/hello.html HTTP/1.1" 304 -
    127.0.0.1 - - [29/Apr/2006:18:29:19 +0930] "GET /hello/hello.jsp HTTP/1.1" 404 1000Also, my sourced test .html and .jsp files:
    hello.html
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <!--
    Simple HTML file to test server setup and configuration.
    Taken from Core Servlets and JavaServer Pages 2nd Edition
    from Prentice Hall and Sun Microsystems Press,
    http://www.coreservlets.com/.
    (C) 2003 Marty Hall; may be freely used or adapted.
    -->
    <HTML>
    <HEAD><TITLE>HTML Test</TITLE></HEAD>
    <BODY BGCOLOR="#FDF5E6">
    <H1>HTML Test</H1>
    Hello.
    </BODY></HTML>hello.jsp
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <!--
    Simple JSP file to test server setup and configuration.
    Taken from Core Servlets and JavaServer Pages 2nd Edition
    from Prentice Hall and Sun Microsystems Press,
    http://www.coreservlets.com/.
    (C) 2003 Marty Hall; may be freely used or adapted.
    -->
    <HTML>
    <HEAD><TITLE>JSP Test</TITLE></HEAD>
    <BODY BGCOLOR="#FDF5E6">
    <H1>JSP Test</H1>
    Time: <%= new java.util.Date() %>
    </BODY></HTML>I am getting so frustrated I feel like I have tried everything...

    Thanks for your feedback, I tried all suggestions but still no luck.
    One thing I didn't mention previously was I have also tried the following (note: I have omitted the prefix "%CATALINA_HOME%/webapps"
    to all directory references below):
    1. installed my .jsp directly into /ROOT
    2. installed my .jsp into subdirectory /ROOT/hello
    3. installed my .jsp into /root_copy (identified as a running application by Tomcat manager)
    I think there must a problem in my deployment because the JSP examples (http://localhost:8080/jsp-examples/) compile fine...
    This indicates that JAVA_HOME is set correctly.
    Since my first post I tried installing tomcat from a windows installer into c:\apache\tomcat5.0.28\ and set logging to debug.
    Here's a small dump of 5 logs in localhost_log.2006-05-01.txt:
    2006-05-01 20:08:31 StandardContext[/balancer]org.apache.webapp.balancer.BalancerFilter]...
    2006-05-01 20:08:32 StandardContext[/jsp-examples]ContextListener: contextInitialized()
    2006-05-01 20:08:32 StandardContext[/jsp-examples]SessionListener: contextInitialized()
    2006-05-01 20:08:32 StandardContext[/servlets-examples]ContextListener: contextInitialized()
    2006-05-01 20:08:32 StandardContext[/servlets-examples]SessionListener: contextInitialized()Note there was no initialization of the context root_copy, but I'm unsure if there's any relevance here or not.

  • Problem in compiling jsp file

    Hi,
    i am using tomcat 4.12 and jdk 1.4.
    My login page contains 3 frames. after succesful login into ur application, 7 frames are getting called.
    i have called a jsp page for each frame.
    sometimes while accessing my application, i am getting jasper exception like cannot resolve symbol....
    for example
    D:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\sample\web\helpdesklogin_jsp.java:404: cannot resolve symbol
    symbol : method --ite  (java.lang.String)
    location: class javax.servlet.jsp.JspWriter
    out.write("<tr bgcolor=\"ffffff\">\r\n ");
    i do not understand the what is the problem here....
    likewise i am getting jasper exception. but it is not frequently occured in the frame.
    is there any relation with autoflush page directive attribute...?
    if it then should i increase default buffer size ?
    Reply please
    Thanks

    Your helpdesklogin.jsp file has a compilation error. It's hard to tell, but it looks like you mis-typed out.write() somewhere.
    - Saish

  • Maximum size of a compiled JSP page

    Has anybody else come accross a problem with weblogic not displaying .jsp pages greater than
              

              One solution could be to break the jsps in small jsps ...
              "John" <[email protected]> wrote:
              >
              >Apparently there's a resitrction in the Java spec that the size of a
              >compiled method
              >cannot exceed 64kb. I'm looking for a way to get around this now
              >
              >Adam Willis <[email protected]> wrote:
              >>Has anybody else come accross a problem with weblogic not displaying
              >>.jsp pages greater than
              >
              

  • Warning - When Compiling .jsp pages under WEB-INF

    Created a directory jsp under WEB-INF and when i compile the jsp pages i get the following warning message
    Warning: package name web2d_inf._jsp does not match source file name C:\ProviderEnrollment\ProvEnrollView\classes\.jsps\_WEB_2d_INF\_jsp\_searchprovider.java
    Need help
    Thanks

    We have encountered this warning too.
    I'm not an Oracle employee, but it looks like there's a bug in JDev that preserves the case for the output directories but not for the package name that is supposed to correspond to the output directories.
    In any case, we haven't seen any runtime problems that seem to be related to this warning, so you may be safe to disregard it. It does foul up the build log though.
    Any JDev team members watching this topic are welcome to chime in with a confirmation and details of this apparent bug, as well as any workaround that might exist to avoid having the warning appear. Thanks!

  • Compile jsp page

    Hi,
    I hope someone could help me there is a point i haven't undeerstood!
    I want to print data from a base to a jsp.
    So i have created my driver and a bean to access my base.
    I compile my bean and the driver without any pbm(they belong to a package).
    But i can't compile my jsp page, impossible to find my package when compiling!!
    There is my so simple code:
    <%@ page language="java" import="Beandb.FieldBean" %>
    <jsp:useBean scope="page" id="FieldBean" class="Fieldbean" type="FieldBean" />
    <%
    String lang=request.getParameter("lang");
    System.out.println("language selected: "+lang);
    %>
    <%
    FieldBean.connect();
    Resultset RS = FieldBean.getResults(lang);
    if (RS != null)
    RS.next();
    %>
    <HTML>
    <head>
         <title>WELCOME ON SOUTH EUROPE INTRANET</TITLE>
    </head>
         <body>               
                   <%= RS.getDate(DATE_FIELD) %>
                   <%= RS.getString(TITLE_FIELD) %>
                   <%= RS.getString(CONTENT_FIELD) %>     
         </body>
    </HTML>
    <% } %>
    there are some of my error messages(3 only!!!):
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 2 in the jsp file: /welcome/welcome.jsp
    Generated servlet error:
    [javac] Compiling 1 source file
    C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\hollister\welcome\welcome_jsp.java:43: cannot resolve symbol
    symbol : class FieldBean
    location: class org.apache.jsp.welcome_jsp
    FieldBean FieldBean = null;
    ^
    An error occurred at line: 2 in the jsp file: /welcome/welcome.jsp
    Generated servlet error:
    C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\hollister\welcome\welcome_jsp.java:45: cannot resolve symbol
    symbol : class FieldBean
    location: class org.apache.jsp.welcome_jsp
    FieldBean = (FieldBean) pageContext.getAttribute("FieldBean", PageContext.PAGE_SCOPE);
    ^
    An error occurred at line: 2 in the jsp file: /welcome/welcome.jsp
    Generated servlet error:
    C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\hollister\welcome\welcome_jsp.java:48: cannot resolve symbol
    symbol : class FieldBean
    location: class org.apache.jsp.welcome_jsp
    FieldBean = (FieldBean) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "Fieldbean");
    ^

    I rename the id of the bean and change it too in my code.. But i still have a problem. Impossible to compile because of my package Beandb isn't find(message error: package Beandb does not exist.
    Whereas my Bean: FIeldBean belong to this package(i'm sure).
    I use tomcat, and there is my three:
    %hollisterpath%\welcome\welcome.jsp
    %hollisterpath%\WEB-INF\CLASSES\Beandb\FieldBean.class (compiled without any problem).
    I indicate in my classpath:
    %hollisterpath%\WEB-INF\CLASSES;%hollisterpath%\WEB-INF\CLASSES\Beandb;.\
    Does I have somewhere else to declare my package??
    Thanks for any response!!

  • Problem in custom jsp page when pressing enter button

    Hi to all,
    <pre>
    I am created a cutom jsp page. When i am clicking on a button it working fine, but if i am pressing
    Enter key it redirecting to home page and showing an exception in cosole.
    <b>Exception is </b>
    18:00:50,718 ERROR [WEBAPP] Class/Method: tcActionBase/execute encounter some problems: {1}
    java.lang.NullPointerException
    at com.thortech.xl.webclient.actions.tcLookupDispatchAction.execute(Unknown Source)
    at com.thortech.xl.webclient.actions.tcActionBase.execute(Unknown Source)
    at com.thortech.xl.webclient.actions.tcAction.execute(Unknown Source)
    at org.springframework.web.struts.DelegatingActionProxy.execute(DelegatingActionProxy.java:110)
    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at com.thortech.xl.webclient.security.SecurityFilter.doFilter(Unknown Source)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
    at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
    at java.lang.Thread.run(Thread.java:619)
    18:00:50,718 ERROR [WEBAPP] Class/Method: tcAction/execute encounter some problems: {1}
    java.lang.NullPointerException
    at com.thortech.xl.webclient.actions.tcActionBase.execute(Unknown Source)
    at com.thortech.xl.webclient.actions.tcAction.execute(Unknown Source)
    at org.springframework.web.struts.DelegatingActionProxy.execute(DelegatingActionProxy.java:110)
    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at com.thortech.xl.webclient.security.SecurityFilter.doFilter(Unknown Source)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
    at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
    at java.lang.Thread.run(Thread.java:619)
    18:00:50,718 WARN [RequestProcessor] Unhandled Exception thrown: class java.lang.NullPointerException
    18:00:50,718 ERROR [[action]] Servlet.service() for servlet action threw exception
    java.lang.NullPointerException
    at com.thortech.xl.webclient.actions.tcAction.execute(Unknown Source)
    at org.springframework.web.struts.DelegatingActionProxy.execute(DelegatingActionProxy.java:110)
    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at com.thortech.xl.webclient.security.SecurityFilter.doFilter(Unknown Source)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
    at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
    at java.lang.Thread.run(Thread.java:619)
    </pre>
    Edited by: iceman513 on Aug 11, 2010 7:14 PM
    Edited by: iceman513 on Aug 24, 2010 10:32 AM
    Edited by: iceman513 on Aug 24, 2010 10:33 AM

    once you click a button, say, "Draw Rectangle", it should draw a rectangleYes, but you need to repaint() the component (in your case panel) to see the change.
    The error is: The method paintComponent(Grpahics) is undefined for the type ObjectThe compiler never lies. As far as your code goes, you have added a method paintComponent(...) to a class that implicitly extends Object. Perhaps you wanted to create an anonymous subclass of JPanel.JPanel panel = new JPanel() {
      public void paintComponent(Graphics g) {
        super.paintComponent(g);
        myPaint(g);
    };Note the changes in brace and semicolon placement.
    Also:
    1. You're setting a FlowLayout to a JPanel, which is anyhow the default layout manager. And when using a layout manager, setSize calls are redundant and effectively ignored.
    2. For a JFrame to be centered on the screen, setLocationRelativeTo(null) after setting the size, not before.
    3. To void visual artifacts, setVisible(true) after all other properties are set.
    It looks to me like you've been throwing together bits of code from here and there without adequate understanding. I recommend you go through the Swing tutorials linked from the topic listing page for this forum.
    db

  • Appserver unable to Compile JSP pages

    Hello
    I have deployed a webapplication on SunONE application server installed on a SunOS 5.8 box. When I try to access any page , I keep getiing errors indicating that the page could not be compiled. An attempt to compile the page seperately using the javac installed with the App server however succeeds.
    The errors I get are as shown. The same webapp runs fine when installed on SunONE application server installed on Windows 2000 machine. Any help would be greatly appreciated
    org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.
    An error occurred at line: 175 in the jsp file: /filesfolders/process_parameters.jsp
    Generated servlet error:
    /actu01/appserver7/appserv/instances/server1/generated/jsp/j2ee-modules/ap/_jasper/_filesfolders/_index_jsp.java:1962: Variable jbs may not have been initialized.
    bFilter = jbs.isDocChanFiltersEnabled();
    ^
    An error occurred between lines: 175 and 176 in the jsp file: /filesfolders/process_parameters.jsp
    Generated servlet error:
    /actu01/appserver7/appserv/instances/server1/generated/jsp/j2ee-modules/ap/_jasper/_filesfolders/_index_jsp.java:1970: Variable bFolders may not have been initialized.
    boolean bEmptyRS = !(bFolders || bExecutables || bDocuments);
    Thanks
    -Aniruddha

    I am having a similar problem on Windows 2000. Servlets run but jsp's all hit this error. Here is a copy of the log:
    [15/May/2003:07:40:16] INFO ( 1924): CORE1116: Sun ONE Application Server 7.0^M
    [15/May/2003:07:40:20] INFO ( 1924): CORE5076: Using [Java HotSpot(TM) Server VM
    , Version 1.4.1_01] from [Sun Microsystems Inc.]^M
    [15/May/2003:07:40:35] INFO ( 1924): JMS5023: JMS service successfully started.
    Instance Name = domain1_server1, Home = [C:\tools\as7se\imq\bin].^M
    [15/May/2003:07:40:40] INFO ( 1924): JTS5014: Recoverable JTS instance, serverId
    = [100]^M
    [15/May/2003:07:40:41] INFO ( 1924): RAR5060: Install JDBC Datasources ...^M
    [15/May/2003:07:40:41] INFO ( 1924): RAR5059: Binding [JDBC DataSource Name: jdb
    c/jdbc-simple, Pool Name: PointBasePool]^M
    [15/May/2003:07:40:42] INFO ( 1924): JMS5015: Install JMS resources ...^M
    [15/May/2003:07:40:44] INFO ( 1924): WEB0100: Loading web module [webapps-simple
    ] in virtual server [server1] at [webapps-simple]^M
    [15/May/2003:07:40:48] INFO ( 1924): HTTP3072: HTTP listener http-listener-1 [ht
    tp://LINDENBERGR-LT01:80] ready to accept requests^M
    [15/May/2003:07:40:48] INFO ( 1924): CORE3274: successful server startup^M
    [15/May/2003:07:40:48] INFO ( 1924): CORE5053: Application onReady complete.^M
    [15/May/2003:07:42:53] WARNING ( 1924): CORE3283: stderr: java.lang.ClassFormatE
    rror: sun/tools/java/Parser (Illegal constant pool index)^M
    [15/May/2003:07:42:53] SEVERE ( 1924): StandardWrapperValve[jsp]: Servlet.servic
    e() for servlet jsp threw exception^M
    at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:322
    )^M
    at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:287)^M
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)^M
    at org.apache.catalina.core.StandardWrapperValve.invokeServletService(St
    andardWrapperValve.java:720)^M
    at org.apache.catalina.core.StandardWrapperValve.access$000(StandardWrap
    perValve.java:118)^M
    at org.apache.catalina.core.StandardWrapperValve$1.run(StandardWrapperVa
    lve.java:278)^M
    at java.security.AccessController.doPrivileged(Native Method)^M
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
    alve.java:274)^M
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
    a:505)^M
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
    alve.java:212)^M
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
    a:505)^M
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
    ava:203)^M
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
    a:505)^M
    at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProce
    ssor.java:157)^M
    at com.iplanet.ias.web.WebContainer.service(WebContainer.java:598)^M
    ^M
    [15/May/2003:07:42:53] WARNING ( 1924): CORE3283: stderr: at java.lang.Cla
    ssLoader.defineClass0(Native Method)^M
    [15/May/2003:07:42:53] WARNING ( 1924): CORE3283: stderr: at java.lang.Cla
    ssLoader.defineClass(ClassLoader.java:502)^M
    [15/May/2003:07:42:53] WARNING ( 1924): CORE3283: stderr: at java.security
    .SecureClassLoader.defineClass(SecureClassLoader.java:123)^M
    [15/May/2003:07:42:53] WARNING ( 1924): CORE3283: stderr: at java.net.URLC
    lassLoader.defineClass(URLClassLoader.java:250)^M
    [15/May/2003:07:42:53] WARNING ( 1924): CORE3283: stderr: at java.net.URLC
    lassLoader.access$100(URLClassLoader.java:54)^M
    [15/May/2003:07:42:53] WARNING ( 1924): CORE3283: stderr: at java.net.URLC
    lassLoader$1.run(URLClassLoader.java:193)^M
    [15/May/2003:07:42:53] WARNING ( 1924): CORE3283: stderr: at java.security
    .AccessController.doPrivileged(Native Method)^M
    [15/May/2003:07:42:53] WARNING ( 1924): CORE3283: stderr: at java.net.URLC
    lassLoader.findClass(URLClassLoader.java:186)^M
    [15/May/2003:07:42:53] WARNING ( 1924): CORE3283: stderr: at java.lang.Cla
    ssLoader.loadClass(ClassLoader.java:299)^M
    [15/May/2003:07:42:53] WARNING ( 1924): CORE3283: stderr: at sun.misc.Laun
    cher$AppClassLoader.loadClass(Launcher.java:265)^M
    [15/May/2003:07:42:53] WARNING ( 1924): CORE3283: stderr: at java.lang.Cla
    ssLoader.loadClass(ClassLoader.java:255)^M
    [15/May/2003:07:42:53] WARNING ( 1924): CORE3283: stderr: at java.lang.Cla
    ssLoader.loadClassInternal(ClassLoader.java:315)^M
    [15/May/2003:07:42:53] WARNING ( 1924): CORE3283: stderr: at java.lang.Cla
    ssLoader.defineClass0(Native Method)^M
    [15/May/2003:07:42:53] WARNING ( 1924): CORE3283: stderr: at java.lang.Cla
    ssLoader.defineClass(ClassLoader.java:502)^M
    [15/May/2003:07:42:53] WARNING ( 1924): CORE3283: stderr: at java.security
    .SecureClassLoader.defineClass(SecureClassLoader.java:123)^M
    [15/May/2003:07:42:53] WARNING ( 1924): CORE3283: stderr: at java.net.URLC
    lassLoader.defineClass(URLClassLoader.java:250)^M
    [15/May/2003:07:42:53] WARNING ( 1924): CORE3283: stderr: at java.net.URLC
    lassLoader.access$100(URLClassLoader.java:54)^M
    [15/May/2003:07:42:53] WARNING ( 1924): CORE3283: stderr: at java.net.URLC
    lassLoader$1.run(URLClassLoader.java:193)^M
    [15/May/2003:07:42:53] WARNING ( 1924): CORE3283: stderr: at java.security
    .AccessController.doPrivileged(Native Method)^M
    [15/May/2003:07:42:53] WARNING ( 1924): CORE3283: stderr: at java.net.URLC
    lassLoader.findClass(URLClassLoader.java:186)^M
    [15/May/2003:07:42:53] WARNING ( 1924): CORE3283: stderr: at java.lang.Cla
    ssLoader.loadClass(ClassLoader.java:299)^M
    @[15/May/2003:07:42:53] WARNING ( 1924): CORE3283: stderr: at sun.misc.Laun
    cher$AppClassLoader.loadClass(Launcher.java:265)^M
    [15/May/2003:07:42:53] WARNING ( 1924): CORE3283: stderr: at java.lang.Cla
    ssLoader.loadClass(ClassLoader.java:255)^M
    [15/May/2003:07:42:53] WARNING ( 1924): CORE3283: stderr: at java.lang.Cla
    ssLoader.loadClassInternal(ClassLoader.java:315)^M
    [15/May/2003:07:42:53] WARNING ( 1924): CORE3283: stderr: at sun.tools.jav
    ac.BatchEnvironment.parseFile(BatchEnvironment.java:453)^M
    [15/May/2003:07:42:53] WARNING ( 1924): CORE3283: stderr: at sun.tools.jav
    ac.Main.compile(Main.java:486)^M
    [15/May/2003:07:42:53] WARNING ( 1924): CORE3283: stderr: at org.apache.ja
    sper.compiler.SunJavaCompiler$JavacTask.run(SunJavaCompiler.java:240)^M
    Thanks,
    Bob

  • Problem launching a jsp page with eclipse and tomcat

    Hi,
    I have just started using eclipse and tomcat for creating dynamic web pages. I tried to launch a jsp page after starting the tomcat server with the URL: http://locahost:8080/HelloWorld/, an error page was displayed as below:
    HTTP Status 404 -/
    type Status report
    message /_
    description The requested resource (-) is not available
    Apache Tomcat/5.5.17
    I didn't get any error at the console and when i just typed http://localhost, a pop up menu saying that the connection was refused when attempting to contact localhost.
    I'm not sure what is the problem here. Could it be the permssion to the localhost is not granted by the system as the eclipse IDE is running using linux?
    Hope someone can help.
    Thanks.

    http://www-128.ibm.com/developerworks/library/os-ectom/

  • Problem in creating Jsp Page.

    i am working on bulletin board Project.
    now my problem is that how to create Dynamic Page.
    Suppose :-
    i have created a Jsp page in that page there are 4 Categories like ( Java , dot net , PHP , XML ).
    ok
    Now when u click on it suppose java a new jsp page will open if u logdin through yout login ID the u can able to post any thing related to java lie Quation or Ans etc.
    ok
    now u have posted a quation now the problem is that wen u have posted a quation in java section it will stored in database but how can i display that quation in new page & if some one reply to that Quation the how can i display that Ans just under that quation.
    At that moment i have to create a jsp page Dynamically. i am right so how can i do that PL help me i have to submit my project withen 3 to 5 days in my collage PL.
    PL Hellp me & tell me how to do that.
    Thanks
    HARSH

    It is generally a bad idea to start threads in JSPs and Servlets. However, there is a need for them ... sometimes... Stress the rarety of sometimes. If you want to cancel the TimeTask, then chances are you don't want the Timer running from your JSP.
    To answer your question, how is the Timer/TimerTask objects you are working with stored? To make changes, they would need to be stored in some scope where they can be accessed later. That means session if you want different users to have dirrerent tasks. application scope if all users should control the same task (be careful with this, you may have problems with synchronization issues).
    I would think there is probably a better solution to your problem. Maybe if you explain in more detail, we can come up with a better one.

  • Problem in loading jsp page

    Hi ,
    I'm facing a problem in displaying a JSP page . I'm displaying records from the database on the page . I want to display only 20 records at a time . I have given the navigation facility for previous,first ,last ,next etc.
    I'm getting all the records at once and displaying them at once . But , I show only 20 records at a time ,hiding the remaining records .
    This works fine for less no . of records but for more records ,say 2000-3000 records , it gets quite slow as expected .
    I don't want to fire the query again .
    Is there any other way possible using this technique .
    It's very urgent . So kindly help .
    Thanks.

    Just get a scrollable ResultSet with the row amount for 1 page, e.g.
          * Returns a result set for the given query, that is read only and scrollable
         * (cursor can move forward and backward). The default fetch size is used and
         * can be changed anytime by calling resultSet.setFetchSize(newFetchSize).
         * <p>
         * Note: be sure that the used JDBC driver supports scrollable result sets via
         * <code>DatabaseMetaData.supportsResultSetType(ResultSet.TYPE_SCROLL_SENSITIVE)</code>
          * @param select SQL select query.
         * @param fetchSize Number of rows to prefetch.
          * @return Scrollable, read-only result set.
        private ResultSet getScrollableResultSet(String select, int fetchSize) {
            ResultSet result = null;
            if (select != null) {
                try {
    //TYPE_SCROLL_SENSITIVE can throw SQLException "Unsupported syntax for refreshRow()" with the
    //current ORACLE driver (8.1.7.0.0).
    //                Statement stmt = createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);
                    Statement stmt = createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
                    int maxRows = stmt.getMaxRows();
                    if (fetchSize < 0 || fetchSize > maxRows) {
                        fetchSize = 0; //ignore fetch size
                    stmt.setFetchSize(fetchSize);
                    long t = System.currentTimeMillis();
                    result = stmt.executeQuery(select);
                    logger.debug(select + (" ("+(System.currentTimeMillis() - t)+")"));
                    if (result == null) {
                        stmt.close();
                } catch (SQLException sqle) {
                    logger.error("Error getting scrollable ResultSet for '"+select+"'.", sqle);
                    throw new BavException(sqle);
            return result;
        }//getScrollableResultSet()and fetch the next/previous page records via the resultSets next()/previous() methods. But beware that the SQL statement doesn't use an ORDER BY or GROUP BY that needs to fetch all rows anyway.

  • Compiling jsp pages in wl 10.0 2 times slower than wl 9.1

    Hi:
    I have enterprise application. In weblogic 9 it took 4-5min to compile all the jsp pages, in weblogic 10 it takes 10-11min!!
    Is there anything I can do to speed it up?

    Hi, thanks for your answers.
    Yes, I actually build the ear file and then I call weblogic.appc on it. And again, on wl 9 it used to take 4-5min, now it is taking 10-11min. Most of the time of the build process is taken by the page compilation.
    The other thing I noticed is that if I change a page the time it takes WL to recompile the page is way longer than before. I have to wait for a good 14-15seconds until the weblogic returns the new page. The weblogic java process goes up to almost 100%. Before, in WL 9 I had to wait just a few seconds. And ok, my computer is a dual core at 2.33GHz. Don't tell me I need to upgrade :-).
    I realize that the jsp compilation must have gotten more complicated because now jsf & jsp are unified but still....
    My app is a jsf application and I also use tag files.
    About precompiling the pages... I build the application on windows then I deploy it on linux. In WL 9, whenever I deployed the app, I had to precompile the pages otherwise the users experienced slower responses the first time. For whatever reason WL 9 didn't think the pages were already precompiled (they were part of the ear file). In WL 10 that seemed to have been fixed.

  • Jsf problem go from jsp page to another jsp in new window

    I’ve two jsp pages attendReport.jsp and printAttendReport.jsp
    attendReport.jsp contains inputs for attend duration and employee id and command button “view” to view attendance data entered employee during entered duration inside the same page(this work very good)
    the problem is the same page includes another command button “print” its job is to get the same data but view them in the second page printAttendReport.jsp in another window in order to print the data in some suitable format , but the print button opens attendReport.jsp instead of printAttendReport.jsp and does not hold the inputs else if I set <managed-bean-scope> to session not request which cause caching data , please help me if you to solve this problem
    and here the related lines of code
    <faces-config >
    <managed-bean>
    <managed-bean-name>attendReportBean</managed-bean-name>
    <managed-bean-class>csc.attend.bean.AttendReportBean</managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    <navigation-rule>
    <from-view-id>/attend/attendReport.jsp</from-view-id>
    <navigation-case>
    <from-action>#{AttendReportBean.attendReport}</from-action>
    <from-outcome>attendReport</from-outcome>
    <to-view-id>/attend/attendReport.jsp</to-view-id>
    </navigation-case>
    </navigation-rule>
    <navigation-rule>
    <from-view-id>/attend/attendReport.jsp</from-view-id>
    <navigation-case>
    <from-action>#{AttendReportBean.printAttendReportAction}</from-action>
    <from-outcome>printAttendReportAction</from-outcome>
    <to-view-id>/attend/printAttendReport.jsp</to-view-id>
    </navigation-case>
    </navigation-rule>
    </faces-config> // here is managed bean code
    public class AttendReportBean {
    // data , getters and setters
    init();
    //Preload in initialization block.
    public void init() {
    // initialize data
    public String attendReport() {
    // code to get attend data to go to view page(same page) it is ok
    return "attendReport"; // Navigation case.
    public static String getRequestParameter(String name) {
    return (String) FacesContext.getCurrentInstance().getExternalContext()
    .getRequestParameterMap().get(name);
    public void printAttendReportListener(ActionEvent event) {
    String fromYearStr = getRequestParameter("fromYearAtt");
    System.out.println("fromYearStr = "+fromYearStr);
    // try to get inputs through ActionListener but it gives me null
    public String printAttendReportAction() {
    // code to get attend data to go to print page(another page in new //window) but inputs come in default values
    return "printAttendReportAction"; // Navigation case.
    }attendReport.jsp
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <f:view>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    //title . styles and validations //
    </head>
    <body>
    <h:form id="attendReportForm">/the form tag appear in running source as <form id="attendReportForm" method="post" action="/newdiwan/faces/attend/attendReport.jsp" enctype="application/x-www-form-urlencoded" >
    i.e. it always submit to attendReport.jsp page
    / some inputs and outputs /
    <h:commandButton onclick="return check();" id="view" action="#{attendReportBean.attendReport}" value="" styleClass="linksNumBlue" />//it works good/
    // some outputs to view data /
    <h:commandLink immediate="true" id="printLink" value="" action="#{attendReportBean.printAttendReportAction}" actionListener="#{attendReportBean.printAttendReportListener}" target="_blank" styleClass="linksNumBlue">
        <f:attribute  name="fromYearAtt" value="2009" />
        <f:attribute  name="fromMonth" value="01" />
       <f:attribute  name="toYear" value="2010" />
       <f:attribute  name="toMonth" value="06" />
    </h:commandLink>//this has two problems 1)submit to attendReport.jsp not printAttendReport.jsp which I want to go to.
    //2)does not get the inputs but return the default values only /
    </h:form></body></html></f:view>I use libraries { jsf-api.jar , jsf-impl.jar , jstl-1.1.0.jar and tomahawk-1.1.6.jar } and deploy on tomcat 6.0
    I’m sorry for the prolongation, please help me if you can
    Edited by: alynoor on Jul 8, 2010 1:51 AM
    Edited by: alynoor on Jul 8, 2010 1:55 AM

    my problem solved 1- i use 2 managed bean , one of request scope (used in attendReport.jsp ) and the other with session scope (used in printAttendReport.jsp)
    2 - add new jsp contains the h:commandLink of the print (attendReportPrintAction.jsp)
    3 - divide the view of attendReport.jsp to two subviews (each subview has its own form) one contains inputs and outputs of attend and the other contains include to (attendReportPrintAction.jsp)
    <%@ include file="attendReportPrintAction.jsp" %>
    4 - send and get parameters using two methods
                public static Object getSessionMapValue(String key) {
                   return FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get(key);
                public static void setSessionMapValue(String key, Object value) {
                   FacesContext.getCurrentInstance().getExternalContext().getSessionMap().put(key, value);
                }faces-config.xml
       <managed-bean>
          <managed-bean-name>attendReportBean</managed-bean-name>
          <managed-bean-class>csc.attend.bean.AttendReportBean</managed-bean-class>
          <managed-bean-scope>request</managed-bean-scope>
       </managed-bean>
        <managed-bean>
          <managed-bean-name>print_attendReportBean</managed-bean-name>
          <managed-bean-class>csc.attend.bean.AttendReportBean</managed-bean-class>
          <managed-bean-scope>session</managed-bean-scope>
       </managed-bean>
    <navigation-rule>  
        <display-name>viewReport</display-name>  
        <from-view-id>/attend/attendReport.jsp</from-view-id>  
        <navigation-case>  
            <from-action>#{AttendReportBean.attendReport}</from-action>
            <from-outcome>attendReport</from-outcome>  
            <to-view-id>/attend/attendReport.jsp</to-view-id>  
        </navigation-case>  
    </navigation-rule>
    <navigation-rule>  
        <display-name>printReport</display-name>
        <from-view-id>/attend/attendReport.jsp</from-view-id>  
        <navigation-case>  
            <from-outcome>printAttendReportAction</from-outcome>  
            <to-view-id>/attend/printAttendReport.jsp</to-view-id>  
        </navigation-case>  
    </navigation-rule>attendReportPrintAction.jsp
    <f:subview id="printAttendReportSubView" >
    <h:form id="printAttendReportForm" onsubmit="return check222();" >
                                <table width="100%" border="0" cellpadding="0" cellspacing="0">
                                  <tr>
                                    <td width="11%">
                                    <table width="70" border="0" cellpadding="0" cellspacing="0">
                                        <tr>
                                          <td width="7" height="28"><img src="../images/B-left.gif" width="7" height="28" /></td>
                                          <td align="center" background="../images/B-bg.gif">
                                            <!--a href="printAttendReport.jsp" class="linksNumBlue" target="_blank" >&#1591;&#1576;&#1575;&#1593;&#1577;</a-->
    <h:commandLink id="printLink" value="&#1591;&#1576;&#1575;&#1593;&#1577;" title="&#1591;&#1576;&#1575;&#1593;&#1577;"  action="#{print_attendReportBean.printAttendReportAction}"   target="_blank"  styleClass="linksNumBlue">
                                        </h:commandLink>
                                            </td>
                                          <td width="7" height="28"><img src="../images/B-right.gif" width="7" height="28" /></td>
                                        </tr>
                                      </table>
                                      </td>
                                    <td align="right"> </td>
                                  </tr>
                                </table>
    </h:form>
    </f:subview>i hope this helps someone

Maybe you are looking for