Importing .class file into jsp file

i am unable to import a .class file into my .jsp file
please give me the correct method to import and also tell me where to deploy the .class file

i am unable to import a .class file into my .jsp
file
please give me the correct method to import and also
tell me where to deploy the .class filehttp://www.apl.jhu.edu/~hall/java/Servlet-Tutorial/Servlet-Tutorial-JSP.html#Section5

Similar Messages

  • Using an imported class in a JSP file

    When you import a class you wrote into a JSP file, is there a way to submit values from forms to the entire class, or can you only use the methods within the class??

    When you import a class you wrote into a JSP file, is
    there a way to submit values from forms to the entire
    class, or can you only use the methods within the
    class??Yes, there is a way in JSP. You can use,
    <jsp:useBean id="your_bean_id" scope="page or request etc" class="your_class">
    <jsp:setProperty name="your_bean_id" property="*"/>
    </jsp:useBean>
    So, <jsp:setProperty> sets all the values inside your request object into the bean, if the class is having the properties (variables) with same name as of request object's parameters. You must have coded set method for all the properties whatever you want your jsp to set the values in the bean.
    if your request is .../yourjsp?name=xxxx&age=25
    then <jsp:setProperty> method will set the name and age inside bean if you have,
    public class YourBean {
    String name;
    int age;
    public void setName(String name) {
    this.name=name;
    public void setAge(int age) {
    this.age=age;
    Hope this helps.
    Sudha

  • Call java class file into jsp file

    Hello experts,
    I wrote a class file which have validation functions it successfully created a class file of that java file.
    and I puted that class file into tomcat's ../WEB-INF/classes folder.
    And whenever I am going to execute the jsp page it give error like
    "regexFunctions cannot be resolved to a type"
    My class file is like follows,
    import java.util.regex.*;
        public class regexFunctions
        private static int SUCCESS = 0;
        private static int FAILURE = 1;
        private static int MISSING_INFO = -1;
        public static String ALL_STRING_REGEX = "^[a-zA-Z]+$";
        public static String ALL_NUMBER_REGEX = "[0-9]+";
    public static int checkForString(String inputtedValue)
             int retCode = FAILURE;
             if ((inputtedValue != null) && (inputtedValue.length() > 0))
                 Pattern pattern = Pattern.compile(ALL_STRING_REGEX);
                 Matcher matcher = pattern.matcher(inputtedValue);
                 if (matcher.find())
                     retCode = SUCCESS;
             return retCode;
    }My jsp page is like follows,
                <%
                     regexFunctions reg = new regexFunctions();
         String id = request.getParameter("txtId");
         int i = regexFunctions.checkForString(id);
               %>So Please Let Me Help Out...

    Put it into a package. Classes in packages can't access classes with no package, since about 2003.

  • How to include a .js file into .jsp file.[.js file resides in a package]

    Hi,
    How do i include an external .js(JavaScript) file into a JSP file?My .js file is located in some package(lets say abc.jar). Below is my application structure:-
      jsp
       |
       ->MyJsp.jsp
      lib
       |
       |
    abc.jar
        |
        |
        ->com.abc.test
                     |
                     |
                     ->Test.java
                     ->abc.jsHow do i include "abc.js" file in "MyJsp.jsp" file?
    Please help.
    Thanks,
    Kiran
    Edited by: Adimulam on Jun 2, 2008 1:22 PM

    Even this is also not possible because, the code in that package is developed by DWR and i am just adding it to my lib folder and importing the respective classes. In the same manner i need to include the *.js* file in the JSP.It took me about 3 minutes reading through the [DWR Getting Started|http://getahead.org/dwr/getstarted] page to learn that you don't have to do any of that. Perhaps you should read that page?

  • How to include .css file into jsp file in portal application

    Hi,
    I have included a .css file in a .jsp file using following tag :
    <link rel="<%=componentRequest.getWebResourcePath()%>/css/ts.css">.
    I have kept .css file under /dist/css folder.
    Preview of jsp file is fine but when I upload the jsp file and .css file to server, Look and feel of the screen is changing. When I paste the style code in jsp file, look and feel is fine.
    Can some body suggest me that why the look and feel is changing when I put the style code in css file and include it in jsp.
    Thanks in advance.
    Manish

    Hello
    We're using <link rel="stylesheet" type="text/css" href="http://ourserver/eclib/css/ecstandard.css">
    between <head> and </head>
    It works.
    Hope it helps.
    Regards
    Benoit

  • Can't find the imported java class when run .jsp file

    Hi,
    I want to run a jsp web application using tomcat. I put all my .jsp files under "TOMCAT_HOME/webapps/junmin" directory, and put all .class files under "TOMCAT_HOME/webapps/junmin/WEB-INF/classes" directory. I set up TOMCAT_HOME AND JAVA_HOME already. But when I type in the address like below:
    http://db1.acad.emich.edu:8080/junmin/login.jsp
    The IE will give me error msg indicating that it can't find all the .class files which I imported them in login.jsp file.
    So, does anyone know that if I miss some configuration in order to let the .jsp file recognize the .class files. Thanks a lot!
    Sincerely, Junmin

    Ha, this might be the reason.
    Can I add sth like this:
    <Context path="/junmin" docbase="junmin" debug=0 reloadable=true>
    </Context>
    But in my local computer, I didn't add this <Context> either. It works well.
    Thanks a lot! I will ask the administrator to try this.
    And will write down the reason.
    Sincerely, Junmin

  • How to convert a .class file into .java file without .jad using DeJDecompil

    Hi all,
    I am using DeJDecompiler and working with swing applications.If I try to convert a .class file into .java file,it is converting into .jad file only.Fine but if I try to save that file into .java file,It is giving lot of errors in that program.When I went into that program the total style of the program is changed and TRY-CATCH block is not recognised by the dejdecompiler,hence If I try to include some methods in the existing .java file thus got,I could not do.Kindly help me.
    If I get the .java file without error then I can process the rest of the functionality.
    Thanks in advance
    With kind Regs
    Satheesh.K

    Not so urgent today then!
    http://forum.java.sun.com/thread.jsp?thread=553576&forum=31&message=2709757
    I'm still not going to help you to steal someone�s code.

  • How to decompile a .class file into .java file using DEJDecompiler?

    Hi all,
    I am using DeJDecompiler and working with swing applications.If I try to convert a .class file into .java file,it is converting into .jad file only.Fine but if I try to save that file into .java file,It is giving lot of errors in that program.When I went into that program the total style of the program is changed and TRY-CATCH block is not recognised by the dejdecompiler,hence If I try to include some methods in the existing .java file thus got,I could not do.Kindly help me.
    If I get the .java file without error then I can process the rest of the functionality.
    Thanks in advance
    With kind Regs
    Satheesh.K

    Not so urgent today then!
    http://forum.java.sun.com/thread.jsp?thread=553576&forum=31&message=2709757
    I'm still not going to help you to steal someone�s code.

  • How to update link and import data of relocated incx file into inca file?

    Subject : <br />how to update link and import data of relocated incx file into inca file.?<br />The incx file was originally part of the inca file and it has been relocated.<br />-------------------<br /><br />Hello All,<br /><br />I am working on InDesignCS2 and InCopyCS2.<br />From indesign I am creating an assignment file as well as incopy files.(.inca and .incx file created through exporing).<br />Now indesign hardcodes the path of the incx files in inca file.So if I put the incx files in different folder then after opening the inca file in InCopy , I am getting the alert stating that " The document doesn't consists of any incopy story" and all the linked story will flag a red question mark icon.<br />So I tried to recreate and update the links.<br />Below is my code for that<br /><br />//code start*****************************<br />//creating kDataLinkHelperBoss<br />InterfacePtr<IDataLinkHelper> dataLinkHelper(static_cast<IDataLinkHelper*><br />(CreateObject2<IDataLinkHelper>(kDataLinkHelperBoss)));<br /><br />/**<br />The newFileToBeLinkedPath is the path of the incx file which is relocated.<br />And it was previously part of the inca file.<br />eg. earlier it was c:\\test.incx now it is d:\\test.incx<br />*/<br />IDFile newIDFileToBeLinked(newFileToBeLinkedPath);<br /><br />//create the datelink<br />IDataLink * dlk = dataLinkHelper->CreateDataLink(newIDFileToBeLinked);<br /><br />NameInfo name;<br />PMString type;<br />uint32 fileType;<br /><br />dlk->GetNameInfo(&name,&type,&fileType);<br /><br />//relink the story     <br />InterfacePtr<ICommand> relinkCmd(CmdUtils::CreateCommand(kRestoreLinkCmdBoss)); <br /><br />InterfacePtr<IRestoreLinkCmdData> relinkCmdData(relinkCmd, IID_IRESTORELINKCMDDATA);<br /><br />relinkCmdData->Set(database, dataLinkUID, &name, &type, fileType, IDataLink::kLinkNormal); <br /><br />ErrorCode err = CmdUtils::ProcessCommand(relinkCmd); <br /><br />//Update the link now                         <br />InterfacePtr<IUpdateLink> updateLink(dataLinkHelper, UseDefaultIID()); <br />UID newLinkUID; <br />err = updateLink->DoUpdateLink(dl, &newLinkUID, kFullUI); <br />//code end*********************<br /><br />I am able to create the proper link.But the data which is there in the incx file is not getting imported in the linked story.But if I modify the newlinked story from the inca file,the incx file will be getting update.(all its previous content will be deleted.)<br />I tried using <br />Utils<IInCopyWorkflow>()->ImportStory()<br /> ,But its import the incx file in xml format.<br /><br />What is the solution of this then?<br />Kindly help me as I am terribly stuck since last few days.<br /><br />Thanks and Regards,<br />Yopangjo

    >
    I can say that anybody with
    no experience could easily do an export/import in
    MSSQLServer 2000.
    Anybody with no experience should not mess up my Oracle Databases !

  • Help me to convert Java and Jsp Files into WAR File!!!!

    I need someone to help me to convert some java servlet files and jsp files into a WAR file. I need it URGENTLY and I'll be very grateful to anyone who is willing to help me! My email is [email protected] Thanks!!!!

    Are the Oracle JDBC drivers 11g used?
    oracle.jdbc.driver.OracleDriver is not supported in 11g drivers.
    Please replace with:
    oracle.jdbc.OracleDriver

  • Decoding .class file into .java file

    How can i decode .class file into .java file?
    can any one suggest the same?

    sekhar145 wrote:
    How can i decode .class file into .java file?by using a decompiler
    JAD is a known one , i am sure there are other on the internet, use you favourite search engine on Java Decompiler
    can any one suggest the same?by using a decompiler
    JAD is a known one , i am sure there are other on the internet, use you favourite search engine on Java Decompiler

  • How to include external .js file into .ear file using NetBean 5.5.1?

    is it possible to include external .js file into .ear file using NetBean 5.5.1? if not, then where should I placed the external .js file and how to write the src="xxx" element? (that is , how to write the path of "xxx"?)
    I am using JBOSS 4.2.2 GA as server
    thx!!

    Even this is also not possible because, the code in that package is developed by DWR and i am just adding it to my lib folder and importing the respective classes. In the same manner i need to include the *.js* file in the JSP.It took me about 3 minutes reading through the [DWR Getting Started|http://getahead.org/dwr/getstarted] page to learn that you don't have to do any of that. Perhaps you should read that page?

  • Converting html file into zip file and send email attaching zip file

    Hi Experts,
    I am trying to send email with attachment(html). Which contains more than 7MB. So, It is throwing an error like Size exceeded.
    So, Now i need to compress the data for less than 7MB.
    I decided to convert HTML File into ZIP File.
    Kindly suggest me to convert the HTML file into ZIP file and sending email with attached ZIP file.
    Correct answer rewarded,
    Thanks & Regards,
    N. HARISH KUMAR

    Hi Experts,
    *// HTML_TAB converting into ZIP File
       DATA  : zip_tool TYPE REF TO cl_abap_zip,
               filename TYPE string ,
               filename_zip TYPE string .
       DATA  : t_data_tab TYPE TABLE OF x255,
               bin_size TYPE i,
               buffer_x TYPE xstring,
               buffer_zip TYPE xstring.
    filename = text-007.                                                                          "'HTML_TAB
    *describe the attachment
       DESCRIBE TABLE html_tab LINES tab_lines.
       bin_size = tab_lines * 255.
       CALL FUNCTION 'SCMS_BINARY_TO_XSTRING'
         EXPORTING
           input_length = bin_size
         IMPORTING
           buffer       = buffer_x
         TABLES
           binary_tab   = html_tab.
       IF sy-subrc <> 0.
    *     message id sy-msgid type sy-msgty number sy-msgno
    *     with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
       ENDIF.
    *create zip tool
       CREATE OBJECT zip_tool.
    *add binary file
       CALL METHOD zip_tool->add
         EXPORTING
           name    = 'FSSAI_MAIL.HTML'
           content = buffer_x.
    *get binary ZIP file
       CALL METHOD zip_tool->save
         RECEIVING
           zip = buffer_zip.
       CLEAR: t_data_tab[],bin_size.
       CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
         EXPORTING
           buffer        = buffer_zip
         IMPORTING
           output_length = bin_size
         TABLES
           binary_tab    = html_tab.
    Thanks & Regards,
    N. HARISH KUMAR

  • Convert XML file into PDF file

    <b>XML to PDF</b>i want to Convert XML file into PDF file pl. any one can suggests API's

    Hi,
    There are many ways to convert XML files to PDFs through java.
    One of the easiest way is by using iText.jar which have classes for conversion.
    The following are the required steps
    1. Create a document object for the XML file ( Using DOM or SAX parser).
    2. Parse the xml document and extract the content to write in PDF.
    3.Create a itext Document object.
    4.Get a PdfWriter instance for the PDF file.
    5.Write in the pdf the extracted text using the document object.
    Refer <a href="http://itextdocs.lowagie.com/examples/com/lowagie/examples/general/HelloWorld.java">here</a> for a simple pdf writer example.
    Refer <a href="http://java.sun.com/developer/codesamples/xml.html">here</a> for examples of XML Parsers.
    Regards,
    Uma

  • How to chunk the XML files into smaller files using peoplecode.

    We are trying to load the Invoices through our XMLDoc PeopleCode that we have written long back.
      Previously the file is not that big and we are able to load them successfully. But now each file is more than 200MB and we are getting the below error when initiated the process..
      Process Request shows status of 'INITIATED' or 'PROCESSING' but no longer running “.
      I tried to chunk the file manually to 50MB it is able to run it properly but chuncking manually is not possible for all the files as it is time taking process..
      Is there any way that we can check on Webserver/Appserver whether whats happening and how to handle this error..
    Or any sample code to divide the big file into smaller files..
      Please let me know your thoughts..

    Good morning Ashok,
    Your data is in a SQL*Loader supported datatype, so basically it should not be a problem.
    Have you checked the Database Utilities guide (for Oracle9i for instance: http://www.lc.leidenuniv.nl/awcourse/oracle/server.920/a96652/toc.htm) on how to handle this?
    I'll also repeat my previous question, have you ever been able to load data into the database using SQL*Loader (either using ASCII values or any other datatype)?
    For the OWB part, have you read "Importing Data Definitions" (typically chapter 4)? More specifically, "Specifying Field Properties" in "About Flat File Sources and Targets"?
    In "SQL*Loader Properties" it says the following:
    Type Describes the data type of the field for the SQL*Loader. You can use the Flat
    File Sample Wizard to import the following data types: CHAR, DATE, DECIMAL
    EXTERNAL, FLOAT EXTERNAL, INTEGER EXTERNAL, ZONED , AND ZONED
    EXTERNAL. For complete information on SQL*Loader field and data types, refer to
    Oracle9i Utilities. Currently, only portable datatypes are supported.
    If you check the database utitlities guide (chapter 6 Field List Reference) and look for "SQL*Loader Datatypes", you'll find (packed) decimal under the Nonportable Datatypes. This implies that OWB does not support it.
    This does not mean you can't use SQL*Loader, you'll only have to define everything separate from OWB and call it separately as well.
    Good luck, Patrick

Maybe you are looking for

  • Can't connect to work through VPN.

    I have the following: Router: Linksys WRT54GS v.4 + latest firmware VPN Software: Cisco VPN Client 4.8.02.0010 Cable Internet provider: Comcast The VPN client works fine if I connect using a Sprint air card, so that part is working. I just can't conn

  • Failed to open the connection via BOE XI 3.1 CMC and Infoview

    Beginning Migration Project to move Crystal Enterprise 9 reports to Crystal Reports 2008 w/ intention to schedule  and view reports via  BusinessObjects Enterprise XI 3.1 Central Management Console and InfoView. I have created reports using Crystal R

  • Document Splitting - Business trans. variant differs from Customizing

    Dear experts, When doing General Ledger Simulation and selecting Expert mode, I see in the parametes, that Business Transaction has a value of 0000 when the customizing for the document type KZ is 1000. In the Document Display area, there is a messag

  • 1.4.1 Windows XP: Raw files not showing

    I downloaded a lot of files from my camera (where I'm shooting Camera Raw and Jpeg), but only the jpeg files are visible in the filmstrip. I assume I've changed some setting inadvertently but can't imagine what. If I just look in the folder from CS3,

  • Scaned Image won't let me select a section

    After scanning my image that I want to fix, I am not being able to make a selection on the image to fll in color or correction. I am getting this error message. "No pixels are more than 50% selected the Selection edges will not be visible" What am I