When a jsp page opened

Hello everybody,
I have a jsp page that includes personal_no and code areas. I want the mouse on personal_no item when this page is opened.
Does any one have any idea?
Thanks

I dunno if I can get much more detailed than I did originally.
the onLoad attribute runs when the form loads (duh!)
<body onLoad="loadForm()">
basically says that when the page loads, it should call the javascript function loadForm().
The javascript function I defined was also fairly simple:
<script language='javascript'>
<!-- 
function loadForm(){   
  document.forms[0].personal_no.focus(); 
//-->
</script>This is the javascript function loadForm and should be included in the <head> of you html/jsp page (whatever you are writing)
It might need a little modification on your part - I was guessing as to the field name.
the standard format is document.formName.controlName.focus
where
- formName is the name of your form
- controlName is the name of your control (input type='text')
If you had
<form name="myForm">
<input type="text" name="personal_no">
</form>then the code could be
"document.myForm.personal_no.focus()"
This should put the cursor in the textfield personal_no on the form, so you can start typing without clicking in the field.
If you are using IE, check the little icon in the lower left of the window. If it has a yellow exclamation mark, double click it to see what the javascript error is.
jeez, thats a lot of explaining. Whether it clears things up, or just makes things more complicated, I dunno.
But please try for more than 2 minutes before posting for help again :-)

Similar Messages

  • Error when requesting JSP page

    We have just finished getting our environment set up. We are running
    WebLogic 4.5.1 sp7 on a Sun server, and are frontending it with IIS 4.0
    SP6a using the iisproxy.dll WebLogic plugin.
    We can get things working for a while, but eventually, we get the
    following error in the NT event log when requesting the first JSP on our
    site:
    "Out of process application '/LM/W3SVC/1/Root' terminated unexpectedly"
    The Web server is still up, it's just when the JSP page is called that
    we get "Page can not be displayed" errors. Any HTML pages come up just
    fine. To fix the problem, we just stop and restart the Web Publishing
    service.
    Has anyone seen this error or does anyone know what events cause this
    problem?
    Thanks,
    -Mike

    There is a big difference between this;
    http://www.mydomain.com/blabla
    and this;
    http://www.mydomain.com/blah.jsp
    blabla - this is the name of the Web application. When you reference this Web application name Tomcat will check the welcom file descriptor and redirect for that web application.
    blah.jsp - is the name of a JSP page. When you reference this page the way you did above, you are not stating where the JSP page is located. It would be locatied in the "http://www.mydomain.com/blabla/blah.jsp" location.

  • Error, package does not exist, thrown when calling jsp page

    Hi
    I have downloaded sample jsp pages for interaction with Crystal reports. When I compile these jsp pages in NetBeans 3.6 there are no problems. When I deploy these pages and associated libraries to Tomcat 5, I get the following error when attempting to call the jsp page, but all the jars used in NetBeans are present in the web-inf/lib directory and I have looked in the jars and found classes in the com.crystaldecisions.report.web.viewer package. I have been unable to find any information after googling and looking at the jakarta bug database. What am I doing wrong?
    The error...
    2004-09-22 17:40:30 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 1 in the jsp file: /CrystalReportsInteractiveViewer.jsp
    Generated servlet error:
    [javac] Compiling 1 source file
    E:\Tomcat5\work\Catalina\localhost\crystal\org\apache\jsp\SimplePreviewReport_jsp.java:9: package com.crystaldecisions.report.web.viewer does not exist
    import com.crystaldecisions.report.web.viewer.*;
    ^
    E:\Tomcat5\work\Catalina\localhost\crystal\org\apache\jsp\SimplePreviewReport_jsp.java:180: cannot resolve symbol
    symbol : class CrystalReportInteractiveViewer
    location: class org.apache.jsp.SimplePreviewReport_jsp
    CrystalReportInteractiveViewer viewer = new CrystalReportInteractiveViewer();
    ^
    An error occurred at line: 1 in the jsp file: /CrystalReportsInteractiveViewer.jsp
    Generated servlet error:
    E:\Tomcat5\work\Catalina\localhost\crystal\org\apache\jsp\SimplePreviewReport_jsp.java:180: cannot resolve symbol
    symbol : class CrystalReportInteractiveViewer
    location: class org.apache.jsp.SimplePreviewReport_jsp
    CrystalReportInteractiveViewer viewer = new CrystalReportInteractiveViewer();
    ^
    An error occurred at line: 1 in the jsp file: /CrystalReportsInteractiveViewer.jsp
    Generated servlet error:
    Note: E:\Tomcat5\work\Catalina\localhost\crystal\org\apache\jsp\SimplePreviewReport_jsp.java uses or overrides a deprecated API.
    Note: Recompile with -deprecation for details.
    3 errors
         at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:127)
         at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:351)
         at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:415)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:458)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
         at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:552)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:291)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:245)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:199)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:195)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:211)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:805)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:696)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:605)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:677)
         at java.lang.Thread.run(Thread.java:534)
    The offending page is ....
    <%
    /*==========================================================================
    INSTANTIATE THE VIEWER AND DISPLAY THE REPORT THROUGH THE INTERACTIVE VIEWER
    ============================================================================
        - Create a Viewer object
        - Set the source for the  viewer to the client documents report source
        - Process the http request to view the report
        - Dispose of the viewer object
    // Create an Interactive Viewer
    CrystalReportInteractiveViewer viewer = new CrystalReportInteractiveViewer();
    // Set the name for the interactive viewer
    viewer.setName("Crystal_Report_Interactive_Viewer");
    // Set the source for the interacive viewer to the client documents report source
    viewer.setReportSource(clientDoc.getReportSource());
    // Process the http request to view the report
    viewer.processHttpRequest(request, response, getServletConfig().getServletContext(), out);
    // Dispose of the viewer object
    viewer.dispose();
    %>included in...
    <%@ page import="com.crystaldecisions.sdk.occa.report.application.*"%>
    <%@ page import="com.crystaldecisions.sdk.occa.report.data.*"%>
    <%@ page import="com.crystaldecisions.sdk.occa.report.lib.*"%>
    <%@ page import="com.crystaldecisions.report.web.viewer.*"%>
    <html>
    <head>
    <title>Begin Here - Simple Preview Report</title>
    </head>
    <body>
    <%
    /*=================================================================
    WORKING WITH THE REPORT APPLICATION SERVER AND JSP TO VIEW REPORTS
    ===================================================================
    Authors Name: Ken Andony
    Technology supported by the app: Report Application Server
      ALWAYS REQUIRED STEPS
       - Create a new Report Application Session
       - Create a Report Application Server (RAS) Service
       - Set the RAS Server to be used for the service
       - Initialize the RAS Service
       - Create the report client document object
       - Set the RAS Server to be used for the report client document
       - Open the report, and set the open type to Read Only
      INSTANTIATE THE REPORT VIEWER
       - Create a Viewer object
       - Set the source for the viewer to the client documents report source
       - Process the http request to view the report
       - Dispose of the viewer object
    ==================================================================*/
    * This line creates a string variable called reportname that we will use to pass
    * the Crystal Report filename (.rpt file) to the OpenReport method contained in
    * the AlwaysRequiredSteps.jsp.
    String reportName ="SimplePreviewReport.rpt";
    %>
    <%
    /* ALWAYS REQUIRED STEPS
      Include the file AlwaysRequiredSteps.jsp which contains the code
      for steps:
       - Create a new Report Application Session
       - Create a Report Application Server (RAS) Service
       - Set the RAS Server to be used for the service
       - Initialize the RAS Service
       - Create the report client document object
       - Set the RAS Server to be used for the report client document
       - Open the report, and set the open type to Read Only */
    %>
    <%@ include file="AlwaysRequiredSteps.jsp"%>
    <%
    /* INSTANTIATE THE REPORT VIEWER
      There are three Report Viewers:
      1.  Crystal Reports Interactive Viewer
      2.  Crystal Reports Viewer
      3.  Crystal Reports Parts Viewer
      The choices are CrystalReportsInteractiveViewer.jsp, CrystalReportsViewer.jsp,
      CrystalReportsPartsViewer.jsp
      Note that to use this include you must have the appropriate .jsp file in the
      same virtual directory as the main jsp page.
      =============================================================================
        DISPLAY THE REPORT
        - display the report using one of the Thin Client DHTML viewers
       Include one of the DHTML Viewers.
        - Crystal Reports Interactive Viewer          =   CrystalReportsInteractiveViewer.jsp
        - Crystal Reports Viewer                                        =   CrystalReportsViewer.jsp
        - Crystal Reports Parts Viewer                         =   CrystalReportsPartsViewer.jsp
        Note** - To use the report parts viewer successfully you are required to
        choose and name three objects in the report to Node0, Node1 and Node2.
        You can access an objects name by using the Format Editor dialog box.
        For more information on the Format Editor Dialog Box and setting objects
        names, please refer to the Help Contents (Help Menu->Crystal Reports Help)
        or by pressing F1
      =============================================================================*/
    %>
    <%@ include file="CrystalReportsInteractiveViewer.jsp" %>
    </body>
    </html>

    Thanks Tien-Chih Wang. It worked...well I'm getting a new set of errors, but progress has been made!
    I understand that if placed in the common directory the jar will be available to all webapps but why does it make a difference whether a jar file is placed under the $TOMAT_HOME/common/lib or $TOMAT_HOME/webapps/appname/web-inf/lib directory if I only need to access the jar from one webapp?

  • Jsp page opening pdf file stored in an ORDDOC type column

    Dear All,
    i am building a jsp page that opens a pdf file stored in database. if column type is BLOB, i run the prepareStatement and store in a ResultSet, and then BufferedInputStream(result.getBinaryStream("FILE")). it works. page opens the pdf file.
    but when column type is ORDDOC, i get this error:
    Failure in java.sql.SQLException: Ongeldig kolomtype.: getBinaryStream not implemented for class oracle.jdbc.driver.T4CNamedTypeAccessor
    what more do i do to get a pdf(or txt, msword..) file to jsp page and open it?
    regards
    Jerry

    We are facing this problem with IE6 browser only. In firefox, it opens fine in a browser window. What configuration should we do in IE6?
    Thanks,
    Ananth.

  • Why doesn't doFilter work was expected when a .jsp page is accessed?

    I'm hoping an expert could point me in the right direction or tell me
              if this is a bug in WebLogic.
              My environment is WebLogic 6.1 (service pack 4), on Windows 2000.
              I need to capture all the response data that comes back from the
              servlet. So, I have a simple filter that wraps the response object,
              and sends the wrapped object into filterChain.doFilter() method.
              I've set up the web.xml so that any servlet access should trigger my
              filter (the <url-pattern> is /*). I've also configured a sample
              web-app called TEST to serve .html/.jsp pages.
              When the browser makes a .html request, everything works as expected.
              After the filterChain.doFilter(), I can take a look at the wrapped
              response object and print the contents of the response.
              However, when I access a .jsp page as part of form data submit, the
              output stream of my wrapper is empty after the filterChain.doFilter()
              completes.
              If I don't wrap the response, then everything seems to work fine. The
              .jsp gets interpreted properly by the servlet container, I can see the
              result page in the browser just fine.
              By inserting debug statements, I can see that if I wrap the responses,
              for a .html request, under the covers, wrapper's getOutputStream()
              gets called. But for a .jsp request, under the covers, wrapper's
              getWriter() gets called. I don't know how significant this is, but
              this is the only difference I see!
              If I don't wrap the response, I am not sure how to get at the response
              data. All I need to do is to take certain actions depending on the
              response. That is why I'm using a wrapper to get at the response data.
              In the JRun AppServer, the code just works fine.
              I've enclosed the source code & the output that demonstrates the
              problem.
              What am I doing wrong? Or, is this a bug in WebLogic? If this is a
              bug, is there a patch available?
              Thanks,
              --Sridhar
              // HeaderFilter.java
              // This is the filter that gets invoked through the web.xml
              configuration
              import javax.servlet.*;
              import javax.servlet.http.*;
              import java.io.*;
              import java.util.*;
              public class HeaderFilter implements Filter {
              public FilterConfig filterConfig;
              public void destroy() {
                        this.filterConfig = null;
                   public void init(FilterConfig filterConfig) {
                        this.filterConfig = filterConfig;
              public FilterConfig getFilterConfig() {
              return filterConfig;
              public void setFilterConfig(FilterConfig filterConfig) {
              this.filterConfig = filterConfig;
              public void doFilter(ServletRequest req, ServletResponse resp,
              FilterChain chain)
              throws java.io.IOException, javax.servlet.ServletException {
              ServletContext context = filterConfig.getServletContext();
              HttpServletResponse response = (HttpServletResponse)resp;
              TestResponseWrapper wrapper = new
              TestResponseWrapper(response);
              chain.doFilter(req, wrapper);
              OutputStream out = resp.getOutputStream();
              System.out.println("The content length is :" +
              wrapper.getContentLength());
              if ("text/html".equals(wrapper.getContentType())) {
              byte[] data = wrapper.getData();
              System.out.println("TEXT RESPONSE, length is " +
              data.length);
              System.out.println(new String(data));
              out.write(data);
              // out.close();
              // TestResponseWrapper.java
              // This class wraps the response object so that you could take a look
              at
              // the response contents after the filterConfig.doFilter() method
              import javax.servlet.ServletOutputStream;
              import javax.servlet.http.HttpServletResponse;
              import javax.servlet.http.HttpServletResponseWrapper;
              import java.io.ByteArrayOutputStream;
              import java.io.PrintWriter;
              public class TestResponseWrapper extends HttpServletResponseWrapper{
              private ByteArrayOutputStream output;
              private int contentLength;
              private String contentType;
              public TestResponseWrapper(HttpServletResponse response) {       
              super(response);
              output = new ByteArrayOutputStream();
              public ServletOutputStream getOutputStream() {    
              System.out.println("****** getOutputStream() called *******");
              return new FilterServletOutputStream(output);
              public byte[] getData() {
              return output.toByteArray();
              public PrintWriter getWriter() {   
              System.out.println("****** getWriter() called *******");
              return new PrintWriter(getOutputStream(), false);
              public void setContentType(String type) {       
              System.out.println("**** Wrapper setContentType called ****");
              this.contentType = type;
              super.setContentType(type);
              public String getContentType() {       
              return this.contentType;
              public int getContentLength() {    
              return contentLength;
              public void setContentLength(int length) {       
              System.out.println("**** Wrapper setContentLength called
              this.contentLength=length;
              super.setContentLength(length);
              // FilterServletOutputStream.java
              // This class is used by the wrapper for getOutputStream() method
              // to return a ServletOutputStream object.
              import javax.servlet.ServletOutputStream;
              import java.io.DataOutputStream;
              import java.io.IOException;
              import java.io.OutputStream;
              import java.io.*;
              public class FilterServletOutputStream extends ServletOutputStream {
              private DataOutputStream stream;
              public FilterServletOutputStream(OutputStream output) {       
              stream = new DataOutputStream(output);
              public void write(int b) throws IOException {       
              stream.write(b);
              public void write(byte[] b) throws IOException {       
              stream.write(b);
              public void write(byte[] b, int off, int len) throws IOException {
              stream.write(b, off, len);
              // test.html
              <html>
              <head>
              <meta http-equiv="Content-Type"
              content="text/html; charset=iso-8859-1">
              <title> Web Posting Information </title>
              </head>
              <body>
              <form name="myform" method="POST" action="resource.jsp">
              <input type="TEXT" name="input"></input>
              <br>
              <input type="SUBMIT" value="done"></input>
              </form>
              </body>
              </html>
              // resource.jsp
              // This gets referenced by the test.html file
              <HTML><BODY>
              <head>
              <title>JRun Programming Techniques</title>
              <meta http-equiv="Content-Type" content="text/html;
              charset=iso-8859-1">
              </head>
              <body>
              <H3>Secure Resource Page</H3>
              <p>This is a secure page.</p>
              <BR><B>User: </B>
              <%
              //     out.write(request.getParameter("input"));
              %>
              </BODY></HTML>
              // HERE IS THE OUTPUT
              // HERE IS WHAT I SEE WHEN I ACCESS
              // http://localhost:7001/TEST/test.html
              **** Wrapper setContentType called ****
              **** Wrapper setContentLength called ****
              ****** getOutputStream() called *******
              The content length is :331
              TEXT RESPONSE, length is 331
              <html>
              <head>
              <meta http-equiv="Content-Type"
              content="text/html; charset=iso-8859-1">
              <title> Web Posting Information </title>
              </head>
              <body>
              <form name="myform" method="POST" action="resource.jsp">
              <input type="TEXT" name="input"></input>
              <br>
              <input type="SUBMIT" value="done"></input>
              </form>
              </body>
              </html>
              // HERE IS WHAT I SEE WHEN I enter some value in the "input" field
              // of the form, and click on the "submit" button.
              // Why isn't setContentLength() getting called on the wrapper?
              // It appears as if the wrapper's output stream isn't getting used
              // at all!!!
              **** Wrapper setContentType called ****
              ****** getWriter() called *******
              ****** getOutputStream() called *******
              The content length is :0
              TEXT RESPONSE, length is 0
              

    If someone else runs into this, here is how I solved the problem -
              If you create a PrintWriter object with the autoflush option, it
              doesn't flush the underlying buffer till you call println on it. I
              looked through the generated code for the servlet, and it was doing a
              JSPWriter.print() to output information.
              So, I changed the ResponseWrapper to keep a handle to the PrintWriter
              object, and then flush it in the filter, and that works.
              Why the same code behaves differently in JRun & Weblogic, I'm not sure
              --Sridhar
              

  • When a web page opens a link in a new window, the new page/window is always blank and all i can do is click on the x in the top right corner to get rid of the page

    everytime i click on a link on a webpage that is supposed to open in a new window, the new window is always just a blank white window/page

    Is there a way for me to determine where on my desktop the new web pages open when I click on links?
    Not sure if that can be done but you can press the Expose   key which will show all open windows.

  • 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!

  • Intermitent pauses when loading JSP page.

    Solaris 7
    Weblogic V5.1 SP5
    Apache 1.3.12
    Mod_wl_ssl.so
    JDK 1.3
    Hi,
    We have two environments running very similar configurations.
    The first is a test environment with an Ultra5 running as an Apache server
    and an Ultra 10 as the weblogic server. Two databases are currently being
    used one is an SQL and the other Oracle.
    The second is our production site, and is the same apart from the hardware,
    the Apache system is a Netra and the Weblogic server is a 220R. (There are
    some other differences, physical location etc)
    On the test site everything is fine but on the live site we are experiencing
    a long pause when loading pages. This happens every 10-15 times a page is
    loaded, and only on JSP pages. It seems to stop after loading part of the
    page and around 30-60 seconds later the rest gets loaded.
    This is very easy to reproduce just by hitting the home page of our site
    about 10 times.
    I'm going to swap out as many network components at our co-location as
    possible, but I'm wondering if anybody else has experienced a similar
    problem.
    Regards
    Steve Haigh

    It turned out to be a faulty network component!! Strange behaviour though.
    Steve Haigh <[email protected]> wrote in message
    news:3a077a36$[email protected]..
    Solaris 7
    Weblogic V5.1 SP5
    Apache 1.3.12
    Mod_wl_ssl.so
    JDK 1.3
    Hi,
    We have two environments running very similar configurations.
    The first is a test environment with an Ultra5 running as an Apache server
    and an Ultra 10 as the weblogic server. Two databases are currently being
    used one is an SQL and the other Oracle.
    The second is our production site, and is the same apart from thehardware,
    the Apache system is a Netra and the Weblogic server is a 220R. (There are
    some other differences, physical location etc)
    On the test site everything is fine but on the live site we areexperiencing
    a long pause when loading pages. This happens every 10-15 times a page is
    loaded, and only on JSP pages. It seems to stop after loading part of the
    page and around 30-60 seconds later the rest gets loaded.
    This is very easy to reproduce just by hitting the home page of our site
    about 10 times.
    I'm going to swap out as many network components at our co-location as
    possible, but I'm wondering if anybody else has experienced a similar
    problem.
    Regards
    Steve Haigh

  • Tomcat - Error when executing JSP pages

    Hi,
    I installed tomcat 5.0.30 on a Windows XP os.
    I tried to write a simple JSP page, the classic "Hello World", but when I access the page, I obtain the following error message:
    org.apache.jasper.JasperException: Unable to compile class for JSP
    Generated servlet error:
    javac: invalid flag: -source
    Usage: javac <options> <source files>
    where possible options include:
    -g Generate all debugging info
    -g:none Generate no debugging info
    -g:{lines,vars,source} Generate only some debugging info
    -O Optimize; may hinder debugging or enlarge class file
    -nowarn Generate no warnings
    -verbose Output messages about what the compiler is doing
    -deprecation Output source locations where deprecated APIs are used
    -classpath <path> Specify where to find user class files
    -sourcepath <path> Specify where to find input source files
    -bootclasspath <path> Override location of bootstrap class files
    -extdirs <dirs> Override location of installed extensions
    -d <directory> Specify where to place generated class files
    -encoding <encoding> Specify character encoding used by source files
    -target <release> Generate class files for specific VM version
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
         org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:332)
         org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:437)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:497)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:476)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:464)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    What can be the problem? I use JRE v. 1.4.2.
    Thank for any help.

    I use JRE v. 1.4.2.What is your JAVA_HOME variable set to?
    Do you have a full Java1.4 installation? - ie not just the JRE but the compiler as well?
    javac: invalid flag: -sourceThis message would indicate that the -source flag is invalid for javac.
    This flag was introduced with java1.4.
    Most probably you have a java1.3 installed on the machine confusing tomcat.

  • ""." expected" error when compiling jsp page

    Hi all,
    I moved to develop all my applications from IBM WASD to JDeveloper but when I compile the projects in JDev, there's error ""." expected" for nearly all jsp pages. But these jsp pages for sure are working very well since almost of them are in production.
    Could you help me to get rid of this.
    Thanks in advance.

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <%@page language = "java"
    contentType = "text/html"
    session = "true"
    autoFlush = "true"
    import = "java.util.*,java.sql.*,C_DBHandler"
    buffer = "4kb"
    isThreadSafe = "true"
    info = "Common File"
    %>
    <jsp:useBean id="hndQuery" scope="page" class="C_DBHandler" />
    <%
    // these are the application settings included in the pages where needed
    String txtQuery = ""; // SQL statement
    String ipaddress = "";
    String ipport = "";
    String virtualdir = "";
    String rowdisplay = "";
    hndQuery.doConnect((String)request.getAttribute("DB_DRIVER"),
    (String)request.getAttribute("URL_CONNECTION"),
    (String)request.getAttribute("CMN.USER_ID"),
    (String)request.getAttribute("CMN.USER_PASS"));
    txtQuery = "select ip_address, ip_port, virtual_dir, row_display from xserver_config where environment='Live' and application='M13000'";
    hndQuery.doSelect (txtQuery, 1);
    if (hndQuery.getRowCount() > 0)
    hndQuery.moveFirst ();
    ipaddress = hndQuery.getColumn("IP_ADDRESS");
    ipport = hndQuery.getColumn("IP_PORT");
    virtualdir = hndQuery.getColumn("VIRTUAL_DIR");
    rowdisplay = hndQuery.getColumn("ROW_DISPLAY");
    request.setAttribute("CE_SERVER", ipaddress+":"+ipport+"/"+virtualdir);
    request.setAttribute("ROW_DISPLAY", rowdisplay);
    hndQuery.doDisConnect();
         hndQuery.finalize();
    %><HTML>
    <HEAD>
    <META name="GENERATOR" content="IBM WebSphere Studio">
    </HEAD>
    </HTML>
    The jsp page is as above. And the error line is line 1. It 's always line 1 no matter what content of that line.

  • Error "_blank is undefined" for a new popup jsp page opening from a button

    Added a new button, by personalization to a self service page. The new button on click should open a new jsp page. The jsp page is opening properly on the same page if I remove the blank from the target frame property. For opening the jsp page on a new window, on specifying blank property, getting page error as "_blank is undefined". Also the appearance of the new button added by personalization is different from other buttons. Please help me as I am clueless regarding what might be the cause of such java script(page error).

    If your button appears as a normal html button then your display server might not be generating the image properly, check the logs after turning on logging to see if there are any errors thrown from the display server. Secondly the images generated at runtime are cached in $OA_HTML/cabo/images/cache/en folder, check to see if that folder has proper write permissions for the display server to write the image there.
    What is the OAf version you are using ? Setting _blank on the target frame is the right approach, once you get the above problem rectified try it again.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Error message when using JSP pages

    Version 6.0
    The error I'm getting is as follows:
    trying to POST headerFragment.html, internal-redirect reports: no way to service request for headerFragment.html
    All I'm trying to do is a jsp:forward on JSP page 1 to JSP page 2 which, at the top of it, has a jsp:include (the headerFragment.html page mentioned in the error).
    Any thoughts on how to remedy this problem would be appreciated.
    Thanks,
    Mark

    By default, the server will not serve static files in response to POST requests, even when using jsp:include.
    This bug was addressed in 6.0 SP2, but instances created in an earlier release will continue to exhibit the problem even after upgrading. To fix the problem, locate the following line in the obj.conf configuration file:
    Service method=(GET|HEAD) type=*~magnus-internal/* fn=send-fileChange the above line so it reads as follows:
    Service method=(GET|HEAD|POST) type=*~magnus-internal/* fn=send-file

  • How to query from view with parameter, only  when the JSP-page loading

    I use JSF/ADF BC, create two viewes:view1 and view2, in the JSP page the user press a button to query from the view1, but I hope the view2 can be queried only when the page loading, it have no relation with user-operator, and pass the column value of view2 into some variables, the view2 return one record.

    Hi -
    You may want to have a look at this other thread:
    Re: Execute ViewObject with Parameters at JSF Page Load?  JSF/ADF/BC 10.1.3
    John

  • Server automatically restart when built jsp page

    When i want to build a jsp using the build.xml file the server automatically restart..
    the following error shows in console
    Buildfile: C:\AE10\ATG10.0.3\WatchCart\Storefront\build.xml
    copyFiles:
    [echo] Start Copying ----
    [copy] Warning: WEB-INF\web.xml modified in the future.
    [copy] Warning: checkout\gadgets\shippingInitialize.jsp modified in the future.
    [copy] Warning: javaScriptEx\first.jsp modified in the future.
    [copy] Warning: javaScriptEx\second.jsp modified in the future.
    [copy] Warning: javaScriptEx\second1.jsp modified in the future.
    [copy] Warning: javaScriptEx\third.jsp modified in the future.
    [copy] Warning: navigation\gadgets\sites.jsp modified in the future.
    [copy] Warning: sku\sku.jsp modified in the future.
    [copy] Warning: sku\skuDisplay.jsp modified in the future.
    [copy] Copying 2 files to C:\AE10\jboss-5.1.0.GA\server\atg_watchprod\deploy\ATG.ear\store.war
    [echo] Finish copying -----
    BUILD SUCCESSFUL
    Total time: 328 milliseconds
    Thanks in advance

    sachindere76 ,
    good question, but this is not the problem.
    I did re-code my "public int getCard1()" method though:
    it was:
    public int getCard1 () {
    return card1;
    and I changed it to:
    public String getCard1 () {
              return Integer.toString(card1);
    since my jsp page tag was aparently looking for a string to work with, returning a String from the method seems to have helped now.
    I rebooted my machine and re-strated jakarta-tomcat server to verify and it worked fine this time.

  • Could not invoke the service() method when the JSP page is loaded

    I am new to servlets/jsp so excuse if I am doing something silly here:
    I have a JSP page the suppose to be loading a session attrbute from a simple servlet. When I go to load the jsp page, I get Could not invoke the service() method.
    Any help is much appreciated:
    Here is my JSP:
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
         pageEncoding="ISO-8859-1"%>
    <%@ page session="true" import="insurance.PolicyObj,java.util.*"%>
    <% Vector VTable = (Vector) session.getAttribute("policyTable"); %>
    <HTML>
    <BODY>
    <Form name=listTable action="InsSer" method="post">
    <TABLE border="1">
         <TBODY>
              <TR>
                   <TD width="258" align="center"><B>Policy Id</B></TD>
                   <TD width="187" align="center"><B>Customer Name</B></TD>
                   <TD width="160" align="center"><B>Agent Name</B></TD>
                   <TD width="134" align="center"><B>Status</B></TD>
              </TR>
              <TR>
    <%
    for (int index=0; index < VTable.size();index++) {
    PolicyObj TableL = (PolicyObj) VTable.elementAt(index);
    %>
         <TR bgcolor="#99CCFF">
    <TD width="258" align="center"> <%= TableL.getPolicyId()%> </TD>
    <TD width="187" align="center"> <%= TableL.getCustomerName()%> </TD>
    <TD width="187" align="center"> <%= TableL.getAgentName() %> </TD>
    <TD width="187" align="center"> <%= TableL.getPolicyStatus() %></TD>
    </TR>
         <% } %>
         </TBODY>
    </TABLE>
    <P><INPUT type="submit" name="Submit" value="Refresh Active Policies"></P>
    </BODY>
    </HTML>
    Here is my servlet:
    package insurance;
    import java.io.IOException;
    import java.util.Vector;
    import javax.servlet.RequestDispatcher;
    import javax.servlet.Servlet;
    import javax.servlet.ServletContext;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import javax.servlet.http.HttpSession;
    public class InsSer extends HttpServlet implements Servlet {
         /* (non-Java-doc)
         * @see javax.servlet.http.HttpServlet#HttpServlet()
         public InsSer() {
              super();
         /* (non-Java-doc)
         * @see javax.servlet.http.HttpServlet#doGet(HttpServletRequest arg0, HttpServletResponse resp)
         protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
              doPost(req,resp);
              // TODO Auto-generated method stub
         /* (non-Java-doc)
         * @see javax.servlet.http.HttpServlet#doPost(HttpServletRequest arg0, HttpServletResponse resp)
         protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
              //PolicyObj[] policyTable = new PolicyObj[3];
              HttpSession session = req.getSession(false);
              //if (session == null) {
                   //resp.sendRedirect("http://localhost:9080/Insurance/error.html");
              //Vector buylist = (Vector) session.getAttribute("PolicyList");
              Vector policyList = null;
              policyList.addElement(new PolicyObj());
              ((PolicyObj) policyList.get(0)).setPolicyId("0009800002");
              ((PolicyObj) policyList.get(0)).setCustomerName("Salim Zeitouni");
              ((PolicyObj) policyList.get(0)).setAgentName("Jack Smith");
              ((PolicyObj) policyList.get(0)).setPolicyStatus("Pending");
              session.setAttribute("policyTable",policyList);
              ServletContext sc = getServletContext();
              RequestDispatcher rd = sc.getRequestDispatcher("InsSev1.jsp");
              rd.forward(req,resp);
    Message was edited by:
    sfz1
    Message was edited by:
    sfz1

    I am new to servlets/jsp so excuse if I am doing something silly here:
    I have a JSP page the suppose to be loading a session attrbute from a simple servlet. When I go to load the jsp page, I get Could not invoke the service() method.
    Any help is much appreciated:
    Here is my JSP:
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
         pageEncoding="ISO-8859-1"%>
    <%@ page session="true" import="insurance.PolicyObj,java.util.*"%>
    <% Vector VTable = (Vector) session.getAttribute("policyTable"); %>
    <HTML>
    <BODY>
    <Form name=listTable action="InsSer" method="post">
    <TABLE border="1">
         <TBODY>
              <TR>
                   <TD width="258" align="center"><B>Policy Id</B></TD>
                   <TD width="187" align="center"><B>Customer Name</B></TD>
                   <TD width="160" align="center"><B>Agent Name</B></TD>
                   <TD width="134" align="center"><B>Status</B></TD>
              </TR>
              <TR>
    <%
    for (int index=0; index < VTable.size();index++) {
    PolicyObj TableL = (PolicyObj) VTable.elementAt(index);
    %>
         <TR bgcolor="#99CCFF">
    <TD width="258" align="center"> <%= TableL.getPolicyId()%> </TD>
    <TD width="187" align="center"> <%= TableL.getCustomerName()%> </TD>
    <TD width="187" align="center"> <%= TableL.getAgentName() %> </TD>
    <TD width="187" align="center"> <%= TableL.getPolicyStatus() %></TD>
    </TR>
         <% } %>
         </TBODY>
    </TABLE>
    <P><INPUT type="submit" name="Submit" value="Refresh Active Policies"></P>
    </BODY>
    </HTML>
    Here is my servlet:
    package insurance;
    import java.io.IOException;
    import java.util.Vector;
    import javax.servlet.RequestDispatcher;
    import javax.servlet.Servlet;
    import javax.servlet.ServletContext;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import javax.servlet.http.HttpSession;
    public class InsSer extends HttpServlet implements Servlet {
         /* (non-Java-doc)
         * @see javax.servlet.http.HttpServlet#HttpServlet()
         public InsSer() {
              super();
         /* (non-Java-doc)
         * @see javax.servlet.http.HttpServlet#doGet(HttpServletRequest arg0, HttpServletResponse resp)
         protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
              doPost(req,resp);
              // TODO Auto-generated method stub
         /* (non-Java-doc)
         * @see javax.servlet.http.HttpServlet#doPost(HttpServletRequest arg0, HttpServletResponse resp)
         protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
              //PolicyObj[] policyTable = new PolicyObj[3];
              HttpSession session = req.getSession(false);
              //if (session == null) {
                   //resp.sendRedirect("http://localhost:9080/Insurance/error.html");
              //Vector buylist = (Vector) session.getAttribute("PolicyList");
              Vector policyList = null;
              policyList.addElement(new PolicyObj());
              ((PolicyObj) policyList.get(0)).setPolicyId("0009800002");
              ((PolicyObj) policyList.get(0)).setCustomerName("Salim Zeitouni");
              ((PolicyObj) policyList.get(0)).setAgentName("Jack Smith");
              ((PolicyObj) policyList.get(0)).setPolicyStatus("Pending");
              session.setAttribute("policyTable",policyList);
              ServletContext sc = getServletContext();
              RequestDispatcher rd = sc.getRequestDispatcher("InsSev1.jsp");
              rd.forward(req,resp);
    Message was edited by:
    sfz1
    Message was edited by:
    sfz1

Maybe you are looking for

  • KM Task Scheduler

    dear all, 2 questions: Q1 I created a scheduled task in the NWDS and deployed the par and configured the time table for it. The task is running every minute, so it's all working. Now i'm wondering, is it possible to set the user that executes the tas

  • How can I delete credit card information

    How do I delete my credit card information.

  • "No bootable disk" when installing Windows 7 on Macbook Pro (HDD caddy)

    Here's the deal. I have a 2011 Macbook Pro (8,1) that I bought a HDD caddy for.  It's beautiful. I replaced the superdrive with a 1tb hard drive and it's wonderful.  I want to install Windows 7 via bootcamp on it.  I go through the steps (create inst

  • Shared Reviews in Acrobat 9 Never End if File Kept Open

    It appears that an Acrobat Pro 9 shared review does not really end until everyone has closed the document, even if the deadline has already passed. Here are the details: 1. Using Acrobat 9 Pro I created a shared review that is hosted on a local netwo

  • J2ME Beginner

    I am new to MIDlets and J2me and am using it to complete a university project. I have successfully built simple midlets and deployed them to my nokia mobile phone, which can connect to my university server, and view a jsp page which displays data fro