Not able to run a JSP file in Tomcat 5.5

Hello friends i am new to JSP programming.
I recently designed a application to enter values of certain field in a database (Using SQL Server Database)
i used a file name Register.jsp, so when the action is performed by clicking submit button it use to call another file named Register_DB.jsp in which database insertion is performed this 2nd file includes another .java file which is actually creating the JDBC ODBC connection drivers
but whenever i use to run the programme using tomcat-5.5 i use to get certain error as below ------------------->
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to load class for JSP
     org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:591)
     org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:137)
     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:305)
     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
java.lang.ClassNotFoundException: org.apache.jsp.Registration_jsp
     java.net.URLClassLoader$1.run(Unknown Source)
     java.security.AccessController.doPrivileged(Native Method)
     java.net.URLClassLoader.findClass(Unknown Source)
     org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:158)
     org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:71)
     org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:589)
     org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:137)
     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:305)
     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.9 logs.
Apache Tomcat/5.5.9***********************************************************************************************************
So can anybody tell me what should i do to resolve this error
here is the code what i have written
File Name Registration.jsp
<!--     *****     File Name Test.jsp     *****     -->
<%@ import="Login.connectionBean" %>
<%@ language="java" %>
<%@ import="java.io.*" %>
<%@ import="java.sql.*" %>
<%@ import="javax.sql.*" %>
<jsp:useBean id="sq" scope="page" class="Login.connectionBean" type="connectionBean"/>
     <jsp:setProperty name="sq" property="*"/>
<html>
<!-- DW6 -->
     <head>
          <!-- Copyright 2005 Macromedia, Inc. All rights reserved. -->
          <title>Registration Form</title>
     </head>
     <body>
          <form name="Test" action="Registration_DB.jsp" method="get">
               <table width="100%" border="0">
                 <tr>
                    <td colspan="5"></td>
                 </tr>
                 <tr>
                    <td width="10%" height="250"></td>
                    <td width="90%" colspan="4"><div align="center">
                      <table width="437" border="1">
                           <tr>
                              <td><div align="center">User ID </div></td>
                              <td> </td>
                              <td><div align="center">
                                     <input name="User_ID" type="text" size="25" maxlength="25" />
                              </div></td>
                           </tr>
                           <tr>
                              <td><div align="center"></div></td>
                              <td> </td>
                              <td><div align="center"></div></td>
                           </tr>
                           <tr>
                              <td width="149"><div align="center">User name </div></td>
                              <td width="27"> </td>
                              <td width="239"><div align="center">
                                   <input name="User_Name" type="text" size="25" maxlength="25" />
                              </div></td>
                           </tr>
                           <tr>
                              <td><div align="center"></div></td>
                              <td><div align="center"></div></td>
                              <td><div align="center"></div></td>
                           </tr>
                           <tr>
                              <td><div align="center">Password</div></td>
                              <td> </td>
                              <td><div align="center">
                                    <input name="Password" type="text" size="25" maxlength="25" />
                                   </div>
                              </td>
                           </tr>
                           <tr>
                              <td><div align="center"></div></td>
                              <td> </td>
                              <td><div align="center"></div></td>
                           </tr>
                           <tr>
                              <td><div align="center">
                                <input name="Button_Reset" type="reset" value="Reset Fields" />
                              </div></td>
                              <td> </td>
                              <td><div align="center">
                                   <input name="Button_Submit" type="reset" value="Submit Details" />
                                               <%
          String User_Id=request.getParameter("User_Id")
          String User_Name="";
          String Password="";
          %>
          <%
          try
          sq.connect();
          if(user_Id!==null && User_Id!="")
          ResultSet rs2.sq.execQuery("select User_Name FROM User_Login where User_Id='"+User_Id+"'");
          catch(Exception e)
               out.println("Exception Caught" +e);
               e.printStackTrace();
          %>
                                   </div></td>
                           </tr>
                           </table>
                    </div></td>
                 </tr>
               </table>
          </form>
     </body>
</html>***********************************************************************************************************
File Name Registration_DB.jsp
<!--     *****     File Name Test_DB.jsp     *****     -->
<%@ language="java" %>
<%@ import="Login.connectionBean" %>
<%@ import="java.sql.*" %>
<%@ import="javax.sql.*" %>
<%@ import="java.io.*" %>
<jsp:useBean id="sq" scope="page" class="Login.connectionBean" type="connectionBean"/>
     <jsp:setProperty name="sq" property="*"/>
<html>
     <head>
          <title>Untitled Document</title>
     </head>
<body>     
          <%
          String Button_Submit = request.getParameter("Button_Submit");
          String User_Id = request.getParameter("User_Id");
          String User_Name = request.getParameter("User_Name");
          String Password = request.getParameter("Password");
          %>
          <%!
          ResultSet rs1=null;
          ResultSet rs2=null;
          %>
          <%
          try
               sq.connect();
               if(Button_Submit!=null && Button_Submit!="")
                    String qry="INSERT INTO User_Login (User_Id, User_Name, Password) VALUES('"+User_Id+"','"+User_Name+"','"+Password+"')";
                    int i=sq.executeUpdae(qry);
                    if (i>0)
                         response.sendRedirect("Registration.jsp");
          catch(Exception e)
               out.println("Exception Caught" +e);
               e.printStackTrace();
%>
     </body>
</html>***********************************************************************************************************
File name connectionBean.java
package Login;
import java.sql.*;
public class connectionBean
     private Connection con;
     public connectionBean()
          super();
     public boolean connect() throws ClassNotFoundException, SQLException
           Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
           con=DriverManager.getConnection("jdbc:odbc:JAVA"," "," ");
           return true;
     public void close() throws SQLException
          con.close();
     public ResultSet execQuery(String qry) throws SQLException
          Statement stmt=con.createStatement();
          ResultSet rs=stmt.executeQuery(qry);
          return(rs==null)?null:rs;
     public int execUpdae(String qry) throws SQLException
          Statement stmt=con.createStatement();
          int i=stmt.executeUpdate(qry);
          return(i==0)?0:i;
}

hi
here the problem is tat the server culdnt find the class for u page,
check u hav deployed it properly or not,
check the tomcat installation and is it working fine,
regards
venkat

Similar Messages

  • Not able to run the mxml file (Browser window is not launching)

    Hello All,
    I have flex 2.0 version installed on my window xp desktop. I have created one very simple form using TextInput and Label (Like:Video 04: Using Pre Built Flex Controls) but when I am clicking on the "Run" button at top near Print icon nothing is happening and I am not able to see form in browser window( window is not launching).
    I have attached the flex project screen shot. (ProjectScreen.gif)
    Do anyone have any idea why it is happening.
    I would appreciate your help.
    Thanks & Regards,
    Chetan Tyagi

    Got It !!
    I have re-installed the flex builder 2 again and now its working file.

  • Not able to execute startEclipse.bat file in Eclipse (Oracle utilities SDK)

    In Eclipse installation, i am not able to run "startEclipse.bat" file in this path "C:\SPLSDK\SDK\shortcuts" which comes under Oracle Utilities Software Development Kit 4.0.0.
    once i start installing startEclipse.bat, i get a error message "windows cannot find /eclipse.exe, make sure you typed correctly and try again"
    and how do i find the eclipse.exe on the installables? also in error message it shows backslash "/"eclipse.exe while executing "startEclipse.bat" file.
    jdk and hibernate paths are located in "c:\spl". Is that fine?
    And When I click “eclipse” in this path “C:\SPLSDK\SDK4.0.0.4\eclipse\eclipse-jee-galileo-SR2-win32\eclipse”, I get error "java runtime or jdk should be available in order to run eclipse. and no JVM was found after searching for the folder "C:\SPLSDK\SDK\4.0.0.4\_jvm\bin\javaw.exe" ". I have installed Jdk in “C:\spl\jdk1.6.0_18”. And to install Eclipse, should I change the path of installing jdk to support Eclipse installation?
    what could be the reason?
    Please give me suggession that how to install eclipse?
    Regards
    Vijaya

    Please help. Its urgent.

  • Not able to run Applet after calling JSP with a Servlet

    Dear Java-Community :)
    At first I want to say, that my English isn't the best.. so I hope you'll understand my problem ;)
    I'm running a J2EE-Application, packed in a EAR-File, on my JBoss with following directory-structur:
    /jaw6c/bin
    /jaw6c/build
    /jaw6c/common
    /jaw6c/ejb
    /jaw6c/sql
    /jaw6c/src
    /jaw6c/webapp
    /jaw6c/webapp/build
    /jaw6c/webapp/build/classes
    /jaw6c/webapp/build/classes/com
    /jaw6c/webapp/build/classes/com/jbossatwork
    /jaw6c/webapp/build/classes/com/jbossatwork/ControllerServlet.class<<<<<<<<
    /jaw6c/webapp/build/distribution
    /jaw6c/webapp/build/distribution/webapp.war
    /jaw6c/webapp/build/gensrc
    /jaw6c/webapp/compile-lib
    /jaw6c/webapp/lib
    /jaw6c/webapp/src
    /jaw6c/webapp/src/com
    /jaw6c/webapp/src/com/jbossatwork
    /jaw6c/webapp/src/com/jbossatwork/ControllerServlet.java
    /jaw6c/webapp/web
    /jaw6c/webapp/web/WEB-INF
    /jaw6c/webapp/web/WEB-INF/classes
    /jaw6c/webapp/web/buyCarForm.jsp
    /jaw6c/webapp/web/carForm.jsp
    /jaw6c/webapp/web/carList.jsp
    /jaw6c/webapp/web/copy_darstellungErgebnisse.jsp
    /jaw6c/webapp/web/darstellungErgebnisse.jsp<<<<<<<<<<<<<<
    /jaw6c/webapp/web/default.css
    /jaw6c/webapp/web/diag.jar
    /jaw6c/webapp/web/diagram.class<<<<<<<<<<<<<<<<<<<<<<<<
    /jaw6c/webapp/web/error.jsp
    /jaw6c/webapp/web/index.jsp
    /jaw6c/webapp/web/selectBewertungslaeufeList.jsp
    /jaw6c/webapp/build.xml
    /jaw6c/build.xmlThe applet should be loaded in my "darstellungErgebnisse.jsp"-File.
    Now the strange situation:
    When I access "darstellungErgebnisse.jsp" DIRECTLY by entering a URL like "localhost:8080/jaw/darstellungErgebnisse.jsp" , the applet is loading perfectly !
    But when my server is forwarding me to the JSP-Site with
    RequestDispatcher dispatcher =  getServletContext().getRequestDispatcher(destinationPage);
    dispatcher.forward(request, response);
    . . . . . . . ..I'll get a ""java.lang.ClassFormatError: Incompatible magic value 1008813135 in class file diagram
    " -Error what means (referenced on the articles I've read here), that the diagram.class Is not found !
    I have tried to put the class file in a JAR, in different locations... using the codebase and archive tag but NOTHING solved my problem.
    So my question:
    Why I'm able to access the JSP-File directly and seeing the applet but after forwarding to the JSP-File via the Servlet, I'm not able to see anything.
    Would appreciate your help
    Thank you and best regards
    Edit:
    1) I'm able to download the diag.jar and diagram.class file from different locations
    2)I recognized, that after using the servlet, my url is changing from
    localhost:8080/jaw
    to
    localhost:8080/jaw/controller
    I tried added the class file to the position, where the controller-class file is, but without sucess.
    3)Opening the class-file with a hex-editor shows me, that
    the first bytes are
    "CAFEBABE0000002E02B9070002010007"
    (http://forum.java.sun.com/thread.jspa?threadID=648990&messageID=3820701)
    Message was edited by:
    Khaled01

    Hello everybody,
    I finaly have found the solution (after 16 hours).
    Like I mentioned before, I recognized (maybe a little to late), that my path is changing when I'm using the servlet :
    localhost:8080/jaw
    to
    localhost:8080/jaw/controller
    (made by url-pattern in my web.xml).
    So when my JSP tries to acces the class file, It's looking at:
    localhost:8080/jaw/controller/applet/diagram.class
    but the file is in:
    localhost:8080/jaw/applet/diagram.class
    So the solution is, to but a codebase-tag in my applet-declaration with following delcaration "basedir="../applet"
    I hope I'll help somebody with the same problems. It took me a day to find out, that the solution was two points and a slash..... lol
    Regards to everybody

  • Hi  can any body please tell me how to open the .exe files in mac and why it is not supported with unarchiever app , also i am not able to run and dvd's in my mac its not accepting any cd's or dvd'd why do i need to do some settings for it ?

    Hi  can any body please tell me how to open the .exe files in mac and why it is not supported with unarchiever app , also i am not able to run and dvd's in my mac its not accepting any cd's or dvd'd why? do i need to do some pre defined  settings to run the cd's and dvd's ?

    A .exe file is a Windows executable. OS X does not run Windows programs. If you need to use .exe files then you will need to install Windows on your Mac:
    Windows on Intel Macs
    There are presently several alternatives for running Windows on Intel Macs.
    Install the Apple Boot Camp software.  Purchase Windows XP w/Service Pak2, Vista, or Windows 7.  Follow instructions in the Boot Camp documentation on installation of Boot Camp, creating Driver CD, and installing Windows.  Boot Camp enables you to boot the computer into OS X or Windows.
    Parallels Desktop for Mac and Windows XP, Vista Business, Vista Ultimate, or Windows 7.  Parallels is software virtualization that enables running Windows concurrently with OS X.
    VM Fusionand Windows XP, Vista Business, Vista Ultimate, or Windows 7.  VM Fusion is software virtualization that enables running Windows concurrently with OS X.
    CrossOver which enables running many Windows applications without having to install Windows.  The Windows applications can run concurrently with OS X.
    VirtualBox is a new Open Source freeware virtual machine such as VM Fusion and Parallels that was developed by Solaris.  It is not as fully developed for the Mac as Parallels and VM Fusion.
    Note that Parallels and VM Fusion can also run other operating systems such as Linux, Unix, OS/2, Solaris, etc.  There are performance differences between dual-boot systems and virtualization.  The latter tend to be a little slower (not much) and do not provide the video performance of the dual-boot system. See MacTech.com's Virtualization Benchmarking for comparisons of Boot Camp, Parallels, and VM Fusion. Boot Camp is only available with Leopard or Snow Leopard. Except for Crossover and a couple of similar alternatives like DarWine you must have a valid installer disc for Windows.
    You must also have an internal optical drive for installing Windows. Windows cannot be installed from an external optical drive.

  • Just transfered M2TS files from PC to new mac, not able to run them in final cut? any ideas?

    just transfered M2TS files from PC to new mac, not able to run them in final cut? any ideas?

    FCP doesn't like mpeg2 transport streams. You might give ClipWrap a chance to do the conversion. They have a free trial. If it works, the full version is something like $50.
    Good luck
    x

  • Not able to run .msi file on windows XP Version 2002 (SP3)

    Hi I am not able to run .msi file in Windows XP Version 2002(SP3)..I am not able to find the log or the Error.Kindly help

    Hello,
    this forum is about problems within the forum itself. PLease ask in
    http://answers.microsoft.com/en-us/windows/forum?tab=Threads
    Best regards
    Meinolf Weber
    MVP, MCP, MCTS
    Microsoft MVP - Directory Services
    My Blog: http://blogs.msmvps.com/MWeber
    Disclaimer: This posting is provided AS IS with no warranties or guarantees and confers no rights.
    Twitter:  

  • Not able to run the SRList.jsp in ADF Tutorial

    When I try to 'Run' the SRList.jsp of the ADF Tutorial from the JDeveloper, I am getting a prompt to enter a 'Username' and 'Password'. When I submit my System 'Username' and 'Password', it is not accepting. Can someone tell me why I am being asked to authenticate, as ideally it should not ask for the same.
    I am working on a corporate system which is behind a proxy server. But my Systems Administrator told me that this error is related to the Application and it has nothing to do with the proxy settings. Any help would be greatly appreciated.
    Venky

    Hi Frank,
    Thanks for the timely help. Giving sking(not in upper case, as mentioned by you) and welcome as username and password respectively did help. I am now able to run my Jsp pages.
    Thanks, again.
    Venky

  • Not able to run validation using validation.xml & validator-rules.xml

    Hello Friends,
    I am not able to run validation using validation.xml & validator-rules.xml.
    Entire code in running prefectly but no error messages are prompted.
    Following is my code:
    File Name : struts-config.xml
    <struts-config>
    <!-- Form Beans Configuration -->
    <form-beans>
    <form-bean name="searchForm"
    type="com.solversa.SearchForm"/>
    </form-beans>
    <!-- Global Forwards Configuration -->
    <global-forwards>
    <forward name="search" path="/search.jsp"/>
    </global-forwards>
    <!-- Action Mappings Configuration -->
    <action-mappings>
    <action path="/search"
    type="com.solversa.SearchAction"
    name="searchForm"
    scope="request"
    validate="true"
    input="/search.jsp">
    </action>
    </action-mappings>
    <!-- Message Resources Configuration -->
    <message-resources
    parameter="ApplicationResources"/>
    <!-- Validator Configuration -->
    <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
    <set-property property="pathnames"
    value="/WEB-INF/validator-rules.xml,
    /WEB-INF/validation.xml"/>
    </plug-in>
    </struts-config>
    <br> File Name : <b> validation.xml </b>
    <form-validation>
    <formset>
    <form name="searchForm">
    <field property="name" depends="minlength">
    <arg key="label.search.name" position = "0"/>
    <arg1 name="minlength" key="${var:minlength}" resource="false"/>
    <var>
    <var-name>minlength</var-name>
    <var-value>5</var-value>
    </var>
    </field>
    <field property="ssNum" depends="mask">
    <arg0 key="label.search.ssNum"/>
    <var>
    <var-name>mask</var-name>
    <var-value>^\d{3}-\d{2}-\d{4}$</var-value>
    </var>
    </field>
    </form>
    </formset>
    </form-validation>
    <br> File Name : <b> SearchForm.java </b>
    package com.jamesholmes.minihr;
    import java.util.List;
    import org.apache.struts.validator.ValidatorForm;
    public class SearchForm extends ValidatorForm
    private String name = null;
    private String ssNum = null;
    private List results = null;
    public void setName(String name) {
    this.name = name;
    public String getName() {
    return name;
    public void setSsNum(String ssNum) {
    this.ssNum = ssNum;
    public String getSsNum() {
    return ssNum;
    public void setResults(List results) {
    this.results = results;
    public List getResults() {
    return results;
    <br> File Name : <b> SearchAction.java </b>
    package com.jamesholmes.minihr;
    import java.util.ArrayList;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    public final class SearchAction extends Action
    public ActionForward execute(ActionMapping mapping,
    ActionForm form,
    HttpServletRequest request,
    HttpServletResponse response)
    throws Exception
    EmployeeSearchService service = new EmployeeSearchService();
    ArrayList results;
    SearchForm searchForm = (SearchForm) form;
    // Perform employee search based on what criteria was entered.
    String name = searchForm.getName();
    if (name != null && name.trim().length() > 0) {
    results = service.searchByName(name);
    } else {
    results = service.searchBySsNum(searchForm.getSsNum().trim());
    // Place search results in SearchForm for access by JSP.
    searchForm.setResults(results);
    // Forward control to this Action's input page.
    return mapping.getInputForward();
    <br> File Name : <b> EmployeeSearchService.java </b>
    package com.jamesholmes.minihr;
    import java.util.ArrayList;
    public class EmployeeSearchService
    /* Hard-coded sample data. Normally this would come from a real data
    source such as a database. */
    private static Employee[] employees =
    new Employee("Bob Davidson", "123-45-6789"),
    new Employee("Mary Williams", "987-65-4321"),
    new Employee("Jim Smith", "111-11-1111"),
    new Employee("Beverly Harris", "222-22-2222"),
    new Employee("Thomas Frank", "333-33-3333"),
    new Employee("Jim Davidson", "444-44-4444")
    // Search for employees by name.
    public ArrayList searchByName(String name) {
    ArrayList resultList = new ArrayList();
    for (int i = 0; i < employees.length; i++) {
    if (employees.getName().toUpperCase().indexOf(name.toUpperCase()) != -1) {
    resultList.add(employees[i]);
    return resultList;
    // Search for employee by social security number.
    public ArrayList searchBySsNum(String ssNum) {
    ArrayList resultList = new ArrayList();
    for (int i = 0; i < employees.length; i++) {
    if (employees[i].getSsNum().equals(ssNum)) {
    resultList.add(employees[i]);
    return resultList;
    <br> File Name : <b> Employee.java </b>
    package com.solversa;
    public class Employee
         private String name;
         private String ssNum;
         public Employee(String name, String ssNum) {
         this.name = name;
         this.ssNum = ssNum;
         public void setName(String name) {
         this.name = name;
         public String getName() {
         return name;
         public void setSsNum(String ssNum) {
         this.ssNum = ssNum;
         public String getSsNum() {
         return ssNum;
    Pls help me out.
    Not able to prompt errors.

    Hello Friends,
    I am not able to run validation using
    validation.xml & validator-rules.xml.
    Entire code in running prefectly but no error
    messages are prompted.
    Following is my code:
    File Name : struts-config.xml
    <struts-config>
    <!-- Form Beans Configuration -->
    <form-beans>
    <form-bean name="searchForm"
    type="com.solversa.SearchForm"/>
    ans>
    <!-- Global Forwards Configuration -->
    <global-forwards>
    <forward name="search" path="/search.jsp"/>
    global-forwards>
    <!-- Action Mappings Configuration -->
    <action-mappings>
    <action path="/search"
    type="com.solversa.SearchAction"
    name="searchForm"
    scope="request"
    validate="true"
    input="/search.jsp">
    tion>
    </action-mappings>
    <!-- Message Resources Configuration -->
    <message-resources
    parameter="ApplicationResources"/>
    <!-- Validator Configuration -->
    <plug-in
    className="org.apache.struts.validator.ValidatorPlugI
    ">
    <set-property property="pathnames"
    value="/WEB-INF/validator-rules.xml,
    /WEB-INF/validation.xml"/>
    >
    </struts-config>
    <br> File Name : <b> validation.xml </b>
    <form-validation>
    <formset>
    <form name="searchForm">
    <field property="name" depends="minlength">
    <arg key="label.search.name" position = "0"/>
    <arg1 name="minlength" key="${var:minlength}"
    resource="false"/>
    <var>
    <var-name>minlength</var-name>
    <var-value>5</var-value>
    </var>
    </field>
    <field property="ssNum" depends="mask">
    <arg0 key="label.search.ssNum"/>
    <var>
    <var-name>mask</var-name>
    <var-value>^\d{3}-\d{2}-\d{4}$</var-value>
    </var>
    </field>
    /form>
    </formset>
    form-validation>
    <br> File Name : <b> SearchForm.java </b>
    package com.jamesholmes.minihr;
    import java.util.List;
    import org.apache.struts.validator.ValidatorForm;
    public class SearchForm extends ValidatorForm
    private String name = null;
    private String ssNum = null;
    private List results = null;
    public void setName(String name) {
    this.name = name;
    public String getName() {
    return name;
    public void setSsNum(String ssNum) {
    this.ssNum = ssNum;
    public String getSsNum() {
    return ssNum;
    public void setResults(List results) {
    this.results = results;
    public List getResults() {
    return results;
    <br> File Name : <b> SearchAction.java </b>
    package com.jamesholmes.minihr;
    import java.util.ArrayList;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    public final class SearchAction extends Action
    public ActionForward execute(ActionMapping
    mapping,
    ActionForm form,
    HttpServletRequest request,
    HttpServletResponse response)
    throws Exception
    EmployeeSearchService service = new
    EmployeeSearchService();
    ArrayList results;
    SearchForm searchForm = (SearchForm) form;
    // Perform employee search based on what criteria
    was entered.
    String name = searchForm.getName();
    if (name != null && name.trim().length() > 0) {
    results = service.searchByName(name);
    else {
    results =
    service.searchBySsNum(searchForm.getSsNum().trim());
    // Place search results in SearchForm for access
    by JSP.
    searchForm.setResults(results);
    // Forward control to this Action's input page.
    return mapping.getInputForward();
    <br> File Name : <b> EmployeeSearchService.java </b>
    package com.jamesholmes.minihr;
    import java.util.ArrayList;
    public class EmployeeSearchService
    /* Hard-coded sample data. Normally this would come
    from a real data
    source such as a database. */
    ivate static Employee[] employees =
    new Employee("Bob Davidson", "123-45-6789"),
    new Employee("Mary Williams", "987-65-4321"),
    new Employee("Jim Smith", "111-11-1111"),
    new Employee("Beverly Harris", "222-22-2222"),
    new Employee("Thomas Frank", "333-33-3333"),
    new Employee("Jim Davidson", "444-44-4444")
    // Search for employees by name.
    public ArrayList searchByName(String name) {
    ArrayList resultList = new ArrayList();
    for (int i = 0; i < employees.length; i++) {
    if
    (employees.getName().toUpperCase().indexOf(name.toU
    pperCase()) != -1) {
    resultList.add(employees[i]);
    return resultList;
    // Search for employee by social security number.
    public ArrayList searchBySsNum(String ssNum) {
    ArrayList resultList = new ArrayList();
    for (int i = 0; i < employees.length; i++) {
    if (employees[i].getSsNum().equals(ssNum)) {
    resultList.add(employees[i]);
    return resultList;
    <br> File Name : <b> Employee.java </b>
    package com.solversa;
    public class Employee
         private String name;
         private String ssNum;
         public Employee(String name, String ssNum) {
         this.name = name;
         this.ssNum = ssNum;
         public void setName(String name) {
         this.name = name;
         public String getName() {
         return name;
         public void setSsNum(String ssNum) {
         this.ssNum = ssNum;
         public String getSsNum() {
         return ssNum;
    Pls help me out.
    Not able to prompt errors.
    Hi,
    Your error message are not displaying because u does not made Message-Resoucrce property file (Resource Bundle) when you make it .
    give it entry in
    struts-config.xml
    <message-resources parameter="ApplicationResources" />
    and
    define key and corresponding error message to key in this ApplicationResources i.e
    #Error Resources
    label.search.ssNum=Plz Enter correct ssNum

  • Unable to run JSP file in TOmcat

    My Tomcat is running when i type http://localhost:8080/index.jsp , i'm able to see home page
    CLASSPATH=C:\j2sdk1.4.2_08\bin;E:\Grinder;E:\Grinder\lib\grinder.jar;C:\Program Files\Java\j2re1.4.2_08\lib\grinder.jar;
    JAVA_HOME=C:\j2sdk1.4.2_08
    I tried both pointing to JAVA_HOME C:\Program Files\Java\j2re1.4.2_08
    When i try to run the JSP file under C:\Tomcat 5.0\webapps\ROOT\add.jsp. I'm getting following error.
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: Unable to compile class for JSP
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:97)
         org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:346)
         org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:414)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
         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)
    root cause
    Unable to find a javac compiler;
    com.sun.tools.javac.Main is not on the classpath.
    Perhaps JAVA_HOME does not point to the JDK
         org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.getCompiler(CompilerAdapterFactory.java:106)
         org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:935)
         org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:764)
         org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:382)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
         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)

    I know the same.
    But problem is that whenever I am creating a new file containing single line say 'Hello world' and then try to run,
    the similar type of error msg comes.

  • Not able to run a report on BiPublisher version 10.1.3.4

    I am using Bipublisher version 10.1.3.4. i am not able to run the Report. I am calling this report using
    webservice from java code.I have added entry "Guest" in Guest Folder name also i have
    checked the checkbox AllowGuest acess in Admin->ServerConfiguration tab.
    i have xdo file in location /Guest/Test/InvoiceBatchReport/InvoiceBatchReport.xdo
    I am getting exception at line following line
    ReportResponse reportResp = (ReportResponse) call.invoke( new Object[] {report, "Administrator", "Administrator"} );
    following is the exception detail
    AxisFault
    faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
    faultSubcode:
    faultString: oracle.apps.xdo.webservice.exception.OperationFailedException: PublicReportService::generateReport failed: due to unable to read
    ReportDataFile [Guest/Test/InvoiceBatchReport/InvoiceBatchReport.xdo]
    faultActor:
    faultNode:
    faultDetail:
    {}oracle.apps.xdo.webservice.exception.OperationFailedException:null
    {http://xml.apache.org/axis/}hostname:GTMDevWS
    oracle.apps.xdo.webservice.exception.OperationFailedException: PublicReportService::generateReport failed: due to
    unable to read ReportDataFile
    [Guest/Test/InvoiceBatchReport/InvoiceBatchReport.xdo]
    at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
    at
    org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
    at
    org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContex
    t.java:1087)
    can any body provide me the solution ?

    I missed to attach the source code.following is mine source code.
    public static void runReport() throws Exception {
              final String bipEndpoint = "http://localhost:9706/xmlpserver/services/PublicReportService?wsdl";
              final String bipNamespace = "http://xmlns.oracle.com/oxp/service/PublicReportService";
              final String xdofile = "/Guest/Test/InvoiceBatchReport/InvoiceBatchReport.xdo";
    // set up the call object
    Service service = new Service();
    Call call = (Call) service.createCall();
    call.setTargetEndpointAddress(new URL(bipEndpoint));
    // TEST Run Report
    System.out.println("TESTING runReport Service BEGIN");
    // register the ReportRequest class
    QName reportReq = new QName(bipNamespace, "ReportRequest");
    call.registerTypeMapping(ReportRequest.class, reportReq, BeanSerializerFactory.class, BeanDeserializerFactory.class);
    // register the ParamNameValue class
    QName nmvals = new QName(bipNamespace, "ParamNameValue");
    call.registerTypeMapping(ParamNameValue.class, nmvals, BeanSerializerFactory.class, BeanDeserializerFactory.class);
    // register the BIPReportResponse class
    QName reportRespqn = new QName(bipNamespace, "ReportResponse");
    call.registerTypeMapping(ReportResponse.class, reportRespqn, BeanSerializerFactory.class, BeanDeserializerFactory.class);
    // Default return type based on what we expect
    call.setOperationName( new QName(bipNamespace, "runReport" ));
    call.addParameter( "ReportRequest", reportReq, ParameterMode.IN );
    call.addParameter("admin", XMLType.XSD_STRING, ParameterMode.IN);
              call.addParameter("yuvraj79", XMLType.XSD_STRING, ParameterMode.IN);
    call.setReturnClass(ReportResponse.class);
    ParamNameValue[] paramNmVals = new ParamNameValue[2];
    paramNmVals[0] = new ParamNameValue(false, "dept", null) ;
    paramNmVals[1] = new ParamNameValue(false, "emp", new String[] {"*"}) ;
    ReportRequest report = new ReportRequest("pdf", "en-US", "Simple",false, null, "/Guest/Test/InvoiceBatchReport/InvoiceBatchReport.xdo",null, xdofile, -1);
    // issue the reques
    ReportResponse reportResp = (ReportResponse) call.invoke( new Object[] {report, "Administrator", "Administrator"} );
    System.out.println("Return ReportResponse: ContentType = " + reportResp.getReportContentType());
    // Save the report
    byte[] binaryBytes = reportResp.getReportBytes();
    OutputStream out = new FileOutputStream("D:\\temp\\out.pdf");
    out.write(binaryBytes);
    out.close();
    System.out.println("Success for Run Report");
    }

  • Not able to run the Jdeveloper Pages in Local Machine

    Dear All,
    I am developing Custom OAF Pages in R12. while am not able to run the page in Local Machine Currently i am using Remote VPN. same page i import into server am able to run in Application.
    The error says:
    1, Increae the time limit bye setting the JRAD.RUNREG.TIMEOUT Parameter in ide.parameters file loacted in System directory.
    I found the file . am not able to find the JRAD.RUNREG.TIMEOUT Parameter option
    2, Check the Host Name in the Preferances, Under Embeded OC4J.
    I Verified same and using the Default Local IP Address.
    I am using Jdeveloper Version : p8431482_R12_GENERIC.zip
    Please help me. I approciate before
    Thanks
    Venkat Reddy Pulichintha
    00971502644919
    [email protected]

    Dear Gaurav,
    Thanks for you quick replay
    For this Patch number (p8431482_R12_GENERIC.zip), there is no (JAVA Options: remove this statement: -DFND_JDBC_STMT_CACHE_SIZE=200 -DCACHENODBINIT=true)
    Please guide me furthe steps. any other settings requird.
    Thanks
    Venkat Reddy Pulichintha
    00971502644919
    [email protected]

  • Could not able to RUN Java Programs in JRE 1.5.08

    hi
    I am using Jdk 1.5.8.
    I don�t have any problem in compiling the files.
    but i could not able to run the program through windows cmd prompt.
    Say name of the java file is newFile (no packages).
    When i try to run the program by using java newFile it raises a ClassNotFoundException.
    it s the same case when try to set any JDBC drivers ..
    is there any problem in my class path settings? Please help me out to fix this problem

    if your current directory is not in the classpath,you should include it in the classpath.
    To do that you can include .(dot) to your classpath variable.
    http://java.sun.com/j2se/1.3/docs/tooldocs/win32/classpath.html

  • I'm not able to run a simple Hello Program in java

    I have just now installed jdk 1.3.1_2.
    I have set the path and class path.
    I'm able to compile the class without any errors but am not able to run the program.
    when i say java Hello(after compiling Hello.java), i'm seeing the following error:
    Exception in thread "main" java.lang.NoclassDefFoundError:Hello
    Thanks in advance in this regard

    Hmm..
    Okay.. set aside any import or package stuffs.. lets say about a simple HelloWorld program which is called Hello.class. It resides in c:\, which means the full path is c:\Hello.class.
    Make sure you got one of your path as c:\jdk1.3\bin(assuming you are using jdk 1.3).
    If you are in the same directory as Hello.class, which is c:\>, you can execute the class file by typing:
    C:\>java Hello
    If you are not in the same directory and you wishes to run the class file, example you are in directory temp now:
    C:\Temp>java -cp C:\ Hello
    So the cp set will be just c:\. Hope that answers your question somehow.. well... if I never intepret it wrongly.

  • I am not able to run the java Program

    Hi All,
    I am not able to run a java program... I am able to complie the program sucessfully when i am trying to run it i am getting a error:
    Exception  in thread "main" java.lang.NoClassFoundError : filename
    i have complie and run my programs frequently but now i am not able run my prevoius examples also ...
    Can u any body help me out...... I have also update the latest version of JRE but still my problem is not sloved.
    Thanks & Regards,
    Ravi

    Make sure you take package structure into account.
    If you have say
    package testing.things;
    public class Test
        public static void main(String[] args)
            System.out.println("World Hello");
    }in file Test.java, you compile it with (assuming your current working directory is at the folder in which the source file is located).
    javac -d . Test.javaand run it with
    java testing.things.TestThe -d . option creates the output at the current directory (with a folder structure matching your package structure).
    #

Maybe you are looking for

  • Unable to open scanned Kaiser Baas jpeg files in Photoshop Elements 6

    I have scanned photos and negatives using Kaiser Baas Photo & Negative scanner.  I am unable to open the jpeg files produced using Photoshop Elements 6, any advice on how to?

  • Torch 9860 - Problem with wifi network

    Hi, I have a BB Torch 9860 and the internet access doesn´t work properly when connected to a wifi connection. With my carrier data plan, everything works. Every time i connecto to a wifi connection, the internet access stops working. I tried to clean

  • Can I tell if someone blocked my number?

    Hi.  New to the forums here, just signed up today. I'm wondering if there's a way to tell if someone has blocked me from texting or calling them?  We're both Verizon customers but for the past two days my messages to him are being sent (they have the

  • Keyword Exchange between Bridge CS2 and Lightroom

    Hello, I was was using bridge CS2 to sort my pics with keywords and EXIF and now switched to lightroom. When I imported the pics everything was OK, data were taken over. When I now use bridge to add new keywords they are not recognized in lightroom a

  • [nokia 1600] - program to connect to PC by usb?

    do anyone known what is a program to connect nokia 1600 to pc by usb ? Nokia PC suite is not works with that mobile phone.