How can i mention a java class in the form's action=" ...."  in jsp

if i am not using struts frame work, how can i call?
i am not using any of the frame work.
for example.
i am searching for a customer name from a database
i have coded the form fields in jsp
as
<%@page session="true"%>
<%@page errorPage="ErrorPage.jsp"%>
<%@page import="com.krysl.model.*"%>
<jsp:useBean id="model" scope="session" class="com.krysl.model.webmodel"/>
<html>
<head>
<title>Customer Seach</title>
<jsp:include page="SetBaseURL.jsp" flush="false"/>
<link rel="stylesheet" href="http://forums.sureshkumar.net/style.css">
</head>
<body>
<jsp:include page="Banner.jsp" flush="false"/>
<h1>Customer Search</h1
<form method="POST" action=".......................">
<b>Customer Name</b>
<input type="TEXT" name="customerSearchArgument" size="20">
<input type="submit" value="search">
</form>
</body>
</html>
this "customerSearchArgument" will receive a class method
package com.krysl.controller;
import java.io.*;
import java.sql.SQLException;
import javax.servlet.*;
import javax.servlet.http.*;
import com.krysl.model.*;
* @author dsdc
public class customersearchaction extends Action
public void run() throws ServletException, IOException
String arg = request.getParameter("customerSearchArgument");
if(arg != null)
arg = arg.trim();
if(!arg.equals(""))
try
model.customerSearch(arg);
catch(SQLException e)
throw new ServletException(e.getMessage());
final String next = "/CustomersList.jsp";
RequestDispatcher rd = application.getRequestDispatcher(next);
if(rd == null)
throw new ServletException("Could not find" + next);
rd.forward(request, response);
All other database connections and related things i coded in
some other classes webmodel, model, controller servlets etc....
in the above class the model.customerseach(arg);
will do all the searching.
my doubt is how to call this method in that action="" of jsp
i tried as action="com.krysl.model.customersearch"
action="com/krysl/model/customersearch"
its not working
please letme kno
urget
thank you

Hi.
go to otn.oracle.com/products/forms and get infromation about PJC and JavaBeans in Forms. The keyfilter example is available as sample as well. However, the link temporarily doesn't work
All Forms demos and code sources: http://download.oracle.com/otndocs/demos/Forms_Demos_10gr2.zip
Frank

Similar Messages

  • How do you call a java class from the main method in another class?

    Hi all,
    How do you call a java class from the main() method in another class? Assuming the two class are in the same package.
    Thanks
    SI
    Edited by: okun on May 16, 2010 8:40 PM
    Edited by: okun on May 16, 2010 8:41 PM
    Edited by: okun on May 16, 2010 8:47 PM

    georgemc wrote:
    To answer your impending question, either the method you're calling has to be static, or you need an instance of that other class to invoke it against. Prefer the latterAnd to your impending question after that: no, don't use the Singleton pattern.

  • How can i let my java application closes the other opened windows

    how can i let my java application closes the other opened windows: like any other Microsoft Internet Explorer windows ... provided that my java application is not the one i used to open those other windows.... thanks in advance

    you'll have to use JNI to access the windowAPI
    then you need a list of window handles ... I think there was a function called getWindow and in order to close them you use sendMessage .... for details check out msdn (microsoft developer network)
    somwhere I saw a tool called JUtil, which might help you getting started on accessing the win api from java
    regards
    Spieler

  • How can get difference between 2 dates in the form of days

    how can get difference between 2 dates in the form of days

    Hi,
    Check the following program:
    REPORT ZDATEDIFF.
    DATA: EDAYS   LIKE VTBBEWE-ATAGE,
          EMONTHS LIKE VTBBEWE-ATAGE,
          EYEARS  LIKE VTBBEWE-ATAGE.
    PARAMETERS: FROMDATE LIKE VTBBEWE-DBERVON,
                TODATE   LIKE VTBBEWE-DBERBIS DEFAULT SY-DATUM.
    call function 'FIMA_DAYS_AND_MONTHS_AND_YEARS'
      exporting
        i_date_from          = FROMDATE
        i_date_to            = TODATE
      I_FLG_SEPARATE       = ' '
      IMPORTING
        E_DAYS               = EDAYS
        E_MONTHS             = EMONTHS
        E_YEARS              = EYEARS.
    WRITE:/ 'Difference in Days   ', EDAYS.
    WRITE:/ 'Difference in Months ', EMONTHS.
    WRITE:/ 'Difference in Years  ', EYEARS.
    INITIALIZATION.
    FROMDATE = SY-DATUM - 60.
    Regards,
    Bhaskar

  • How can i run a java class file from shell?

    Hi all,
    I've a .class file named "File" that contains Main method, it is in the package "File2".
    How can I run it by shell command?
    PS: "java -cp . file" doesn't work it launch->
    Exception in thread "main" java.lang.NoClassDefFoundError: File2/File (wrong name: File2/File)
    Thanks in advance.

    Just to understand: is File2 ar jar archive or not? If it is a jar archive, have you tried open File2.jar? If File2 is a directory within the current directory, have you tried java -cp . File2/File? I just tested with a set of classes and it works... Let me be precise:
    * Let us imagine you are working in a directory whole path is PathToDir/
    * in this directory you have the classes put in a directory called File2
    * in order to launch File.class then you would have to invoke :
    cd PathToDir/ (just to be sure)
    java -cp . File2/File
    *if you were to do the following then you would have the problem you describe
    cd PathToDir/File2/
    java -cp . File

  • How can I call a java class from within my program?

    I was wondering if there's a platform independent way to call a java class from my program.

    Here's my scenario. I'm working on a platform independent, feature rich, object-oriented command prompt program. The way I'm designing it is that users can drop classes they write into my bin directory and gain access to the class through my program. For example, they drop a class named Network.class in the bin directory. They would type Network network at my command prompt and gain access to all the methods available in that class. They can then type system.echo network.ipaddress() at my prompt and get the system's ip address. I have it designed that there's a server running in the background and the clients connect to my port. Once connected the end-user can enter their user name and password and gain access to the system. When they type a command they actually call another java program which connects to my server using a seperate thread. They can then communicate back and forth. I have it set that everything has a process id and it's used to keep track of who called what program. Once the program is done it disconnects and closes. Rather than getting into the nitty gritty (I didn't want to get into heavy detail, I know how everything will work) I'm really interested in finding out how I can call a java program from my program. I don't want it to be part of the app in any way.

  • How can I execute a java class with arguments from an air application built from mxml?

    I have an mxml application. It has a button, and when that button select event occurs, I want my mxml air app to pass arguments to a java class I have built, which resides in a package path on my system. I need to be able to pass several arguments to my java method from my mxml call. How do I do this, and what config files are necessary? For the simple task I want to engineer, can you show me an example of a properly configured config file? My java class has been executed at the command line in the past as follows:
    java -cp %CP% com.abc.prism.queue.EmitMessage XYZ "my message text" 192.12.13.14 5672
    where %CP% is an env variable that tells my class the classpath it runs with, and XYZ, "my message text", the IP address, and the port are the arguments I must pass from mxml to my java class. How do I accomplish this?
    How do I make known to the java class I call from mxml the %CP% class path? It tells my java class where to find various rabbitMQ jars.

    Hi,
    You need to use Integration technology like BlazeDS or LCDS.

  • How can I sign up for classes for the ipad

    How do I sign up for classes on iPad

    Call your nearest Apple Store.
    This will get you started.
    You can download a complete iPad 2 User Guide here: http://manuals.info.apple.com/en/ipad_user_guide.pdf
    Also, Good Instructions http://www.tcgeeks.com/how-to-use-ipad-2/
    Apple - iPad 2 - Guided Tours
    http://www.apple.com/ipad/videos/
    Watch the videos see all the amazing iPad apps in action. Learn how to use FaceTime, Mail, Safari, Videos, Maps, iBooks, App Store, and more.
    You can download this guide to your iPad.
    iPad User Guide for iOS 5
    http://itunes.apple.com/us/book/ipad-user-guide-for-ios-5/id470308101?mt=11
     Cheers, Tom

  • How can I copy an email address from the form results while online?

    Our form contains a field where the users submitted their email address.  But I am not able to mouse over this data in the "View Responses" tab, and copy the email address by selecting the email address and Ctrl C, and neither can I right-click this data field and copy it.
    Our organization just switched to Microsoft Office 365, and "mailto" links on web pages can no longer be clicked to launch a native desktop email client program.  So the users tasked with responding to forms submitted via Formscentral now have a much harder workflow.  They are compelled to download the data as a spreadsheet, just to be able to cut and paste an email address into their reply email.
    I suggest and request that the Flash-based "View Responses" tab be modified to allow email addresses to be selectable and able to be  copied to the "clip board".  This would allow users who can't execute a clickable mailto link to copy and paste the email address from Formscentral into a new email.  Many organizations like mine are moving away from native client-based email programs like Outlook to save money,  in favor of cloud based SAS web-based email like Office 365.
    Is there some other way to enable mailto links where no client email program is installed on the users PC?
    Thanks,
    -Dave Bartholomew

    While I am still looking for a better answer, I've discovered a way to cut and paste email addresses from the FormsCentral "View Responses" dashboard.  I wrote up the instructions to help our users and thought I'd share them in this forum as well.
    But it would be nice if there was a simpler solution...  Can anyone offer a better way?
    -Dave B
    ) Right-click on the email address
    ) Select “Filter by: …”  Doing this will change the view to show only entries that were sent from the selected email address.
    ) And it will display the Filter in the header of the form.
    ) Left-click on the email address displayed in the filtered results, in the header of the form.
    ) A new sub-form will appear, and the email address can be cut and pasted from this new sub-form.  Highlight the email address and hit “Ctrl C”, or right-click and select copy.
    ) Now you can paste the email address into a new email in Office 365. (Ctrl V) or right-click and select “Paste”
    ) Click the “Clear” button and then “OK” to exit the filtered view of the data.

  • How can I add check boxes without using the form widget?

    I would like to use check boxes for our facets for our search engine.  You can see an example below.  Is there anyway to do this without using the form widget?
    PJM - Site Updates

    It is not possible to accomplish this with the Muse's Form Widgets. You may need to look for other online solutions and fetch the source code and add to the Muse page using the Insert HTML feature.
    Cheers,
    Vikas

  • How can i get all java class names from a package using reflection?

    hi,
    can i get all classes name from a package using reflection or any other way?
    If possible plz give the code with example.

    You can't, because the package doesn't have to be on the local machine. It could be ANYWHERE.
    For example, via a URLClassLoader (ie from the internet) I could load a class called:
    com.paperstack.NobodyExpectsTheSpanishInquisitionI haven't written it yet. But I might tomorrow. How are you going to determine if that class is in the package?
    This subject comes up a lot. If you want to do something a bit like what you're asking for (but not quite) there are plenty of threads on the subject. Use google and/or the forum search facility to find them.
    But the answer to your question, as you asked it, is "you can't do that".

  • How can we call one java class in another java class?

    Hi all,
    My problem is ,
    one java code creates a file i have to send that file through email as an attachment here i wrote a java code to send a mail with attachment
    can any one help me how i can implement this. my idea is to write a send mail function in 1st java code which creates the file
    Is this a better idea ???plz suggest me.

    Hi all,
    My problem is ,
    one java code creates a file i have to send that file
    through email as an attachment here i wrote a java
    code to send a mail with attachment
    can any one help me how i can implement this. my idea
    is to write a send mail function in 1st java code
    which creates the file
    Is this a better idea ???plz suggest me.may samaaj nahi atay

  • How can I load my java class dynamically ???

    Hi guyz !
    Please look on my problem:
    1. I write code under Windows.
    2. I have file testcls1.java with class by name 'TestCls1'. /package 'hs0'/
    3. I try to use method Class.forName.
    4. File on disk is "c:/shttpsrv0/SrvFiles/java/testcls1.java".
    5. I get exception ClassNotFound.
    Question: what is right way to write first parameter for method ???
    Thanx in advance !

    Hi guyz !
    Please look on my problem:
    1. I write code under Windows.
    2. I have file testcls1.java with class by name
    'TestCls1'. /package 'hs0'/
    3. I try to use method Class.forName.
    4. File on disk is
    "c:/shttpsrv0/SrvFiles/java/testcls1.java".
    5. I get exception ClassNotFound.
    Question: what is right way to write first parameter
    for method ???Class.forName can use *.class files only. If you have *.java file, you have to compile it first. Moreover, Class.forName uses CLASSPATH. If you want to provide the exact location of *.class file, try to use URLClassLoader.

  • How can  I access my java class file in a .jar file ...PLz Help anyone!!

    Hi Folks,
    I am new in Java programming, have a .jar file that contains .java files that I want no access and use from another .java file. These files in the .jar file basically form a library thus have no main-method. However I can not declare an instance of the library (in the .jar file) and use it within my program.
    Plz help ...I have tried all I know in vain.
    Thanks.

    temba wrote:
    Hi Folks,
    I am new in Java programming, have a .jar file that contains .java files that I want no access and use from another .java file. These files in the .jar file basically form a library thus have no main-method. However I can not declare an instance of the library (in the .jar file) and use it within my program. You are making little sense. You can't instantiate .java files.
    Plz help ...I have tried all I know in vain.
    Thanks.Could you post WHAT you have tried and also post what error messages you received?

  • How can I persist a Java object to the PCD via JNDI ?

    Hi,
    I'm trying to persist XML data on the PCD via JNDI. I'm using
    portal version 6.2.0.4.200408172051.
    I followed the instructions in the "Portal Runtime Technology 640"
    document.
    The example they showed was:
    import javax.naming.Context;
    Context context = PortalRegistry.getCentralConfigurationContext();
    Context applicationContext = context.lookup("MyAppName");
    It was possible to obtain 'applicationContext' in the above example by
    using:-
    Context context = PortalRegistry.getCentralConfigurationContext();
    String appName = request.getComponentContext().getApplicationName();
    Context applicationContext = (Context) context.lookup(appName);
    However, any attempt to bind, rebind an object (implementing IStreamSource)
    resulted in NamingExcptions. As did 'listBindings' and 'list' (see below).
    BeanWrapper d = new BeanWrapper("test input");
    applicationContext.rebind("PCD_LOOKUP_KEY", d);
    // where 'd' implements IStreamSource
    class BeanWrapper implements IStreamSource {
    String content = "balh";
    BeanWrapper(String s) {
    content = s;
    public InputStream getInputStream() throws IOException {
    ByteArrayInputStream bis = new ByteArrayInputStream(content.getBytes());
    return bis;
    } // getInputStream
    } // BeanWrapper
    I don't know what I've done wrong. I couldn't find any more documentation
    on this topic...
    Any help would be appreciated.
    cheers,
    Michael
    javax.naming.NameNotFoundException: [Xfs] Object not found. Root exception is javax.naming.NamingException: [Xfs] Object not found
    at com.sapportals.portal.pcd.gl.xfs.BasicContext.lookup(BasicContext.java:840)
    at com.sapportals.portal.pcd.gl.PcdPersContext.lookup(PcdPersContext.java:422)
    at com.sapportals.portal.pcd.gl.PcdFilterContext.filterLookup(PcdFilterContext.java:387)
    at com.sapportals.portal.pcd.gl.PcdProxyContext.basicContextLookup(PcdProxyContext.java:1083)
    at com.sapportals.portal.pcd.gl.PcdProxyContext.proxyLookupLink(PcdProxyContext.java:1170)
    at com.sapportals.portal.pcd.gl.PcdProxyContext.proxyLookup(PcdProxyContext.java:1132)
    at com.sapportals.portal.pcd.gl.PcdProxyContext.getBasicObject(PcdProxyContext.java:1330)
    at com.sapportals.portal.pcd.gl.PcdProxyContext.getBasicContext(PcdProxyContext.java:1306)
    at com.sapportals.portal.pcd.gl.PcdProxyContext.rebind(PcdProxyContext.java:473)
    at com.sapportals.portal.pcd.gl.PcdGlContext.rebind(PcdGlContext.java:1185)
    at com.sapportals.portal.pcd.gl.PcdProxyContext.rebind(PcdProxyContext.java:515)
    at com.sapportals.portal.pcd.gl.PcdProxyContext.rebind(PcdProxyContext.java:683)
    at com.sapportals.portal.pcd.gl.PcdProxyContext.rebind(PcdProxyContext.java:688)
    at com.sapportals.portal.prt.jndisupport.util.AbstractContextWrapper.rebind(AbstractContextWrapper.java:46)
    at com.siemens.pct.employee.cu_selector.CUSelector.saveCuBeanToPCD(CUSelector.java:305)
    at com.siemens.pct.employee.cu_selector.CUSelectorUpload.doUpload(CUSelectorUpload.java:70)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.sapportals.portal.prt.component.AbstractPortalComponent.handleRequestEvent(AbstractPortalComponent.java:700)
    at com.sapportals.portal.prt.component.AbstractPortalComponent.handleEvent(AbstractPortalComponent.java:412)
    at com.sapportals.portal.prt.pom.ComponentNode.handleEvent(ComponentNode.java:250)
    at com.sapportals.portal.prt.pom.PortalNode.fireEventOnNode(PortalNode.java:333)
    at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:627)
    at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:208)
    at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:532)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:415)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.inqmy.services.servlets_jsp.server.InvokerServlet.service(InvokerServlet.java:126)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.inqmy.services.servlets_jsp.server.RunServlet.runSerlvet(RunServlet.java:149)
    at com.inqmy.services.servlets_jsp.server.ServletsAndJspImpl.startServlet(ServletsAndJspImpl.java:832)
    at com.inqmy.services.httpserver.server.RequestAnalizer.checkFilename(RequestAnalizer.java:666)
    at com.inqmy.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:313)
    at com.inqmy.services.httpserver.server.Response.handle(Response.java:173)
    at com.inqmy.services.httpserver.server.HttpServerFrame.request(HttpServerFrame.java:1288)
    at com.inqmy.core.service.context.container.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:36)
    at com.inqmy.core.cluster.impl5.ParserRunner.run(ParserRunner.java:55)
    at com.inqmy.core.thread.impl0.ActionObject.run(ActionObject.java:46)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.inqmy.core.thread.impl0.SingleThread.run(SingleThread.java:148)

    Hi Michael,
    here my comments to your questions:
    0.:[Michael says:]
    "So basically you're saying that under SP10 its not possible to store objects on the PCD ... ?"
    I want to clarify this:
    It is possible to store objects in the PCD in lower releases than SP10 (e.g. SP2). But due to the fact that PCD API is not public before SP10 you should not develop a SP2 iView that programmatically uses the PCD API and complain afterwards because some "tiny" things of it are not working in SP10. It might be that you have to adjust some parts of this SP2 iView.
    The kind of object that can be stored in the PCD depends on the fact if the objects have a corresponding object provider or not. If you want to store iViews, roles or one of the other commonly known portal objects you can do it because corresponding object provider (iViewservice, roleservice, etc.) are always available in a running portal.
    If you want to store objects (like your BeanWrapper class) then you should write a corresponding object provider (what I explained in my first reply).
    1.:[Michael asked:]
    Why does list and listBindings fail ? surely that should just
    list the existing bound objects ???
    Nothing was bound!
    Your code line
    applicationContext.rebind("PCD_LOOKUP_KEY", d);
    throws a NamingException because no object provider for class of object d was found.
    So I gess you did a lookup on  applicationContext.lookup( "PCD_LOOKUP_KEY" ) before you did the list/listBindings and because this
    context does not exist the corresponding "Name not found" exception was thrown?
    A list/listBinding on the applicationContext itself should work even if nothing was bound.
    2.:[Michael asked:]
    Is there not some kind of default object/object provider pair
    that can be used to store base types like Strings/Integers etc ?
    No. There are no default object providers for java string/integers. But for this case "persisting a string or integer value at any PCD context" the PCD offers another way to do it: Just create an additional attribute (of type STRING or INT) and persist the corresponding value in this attribute (of type IPcdAttribute - an extension of javax.naming.directory.Attribute )   
    The code for creating a pcd attribute looks e.g. like this:
    IPcdObjectFactory pcdObjFactory = ((IPcdGlService) PortalRuntime
                                                   .getRuntimeResources()
                                                   .getService(IPcdGlService.KEY))
                                                   .getPcdObjectFactory();
    IPcdAttribute newPcdAttr = pcdObjFactory.createPcdAttribute(     PcdAttributeValueType.STRING,
                                            "new_attrId" );     
    newPcdAttr.set(     0,
              "new_AttrValue" );
    ModificationItem mods[] = new ModificationItem[1];
    mods[0] = new ModificationItem(      DirContext.REPLACE_ATTRIBUTE,
                               (Attribute)newPcdAttr );
    pcdCtx.modifyAttributes(     "",
                        mods );
    Hope, that helps you!
    Regards,
    Jens

Maybe you are looking for

  • INTERNET STARTS UP THEN CANCELS

    Sometime around 3 weeks ago i was surfing the web,to cut the story short i stumbled onto a website which i think gave me a sometype of virus or somthing. So now my internet starrtup but swiftly shuts off saying an error. So i currently have to use OS

  • Safari on iPad defaults to nl

    When I perform a search it comes up with nl in front and appears in Dutch

  • Closing Display Lid while useing iTunes

    I have my Powerbook on a small sofa table with a long bar speaker behind it. I want to be able to close the lid all the way but still run iTunes, is that possible? When I close it now iTunes shuts off, I also have my security feature set to ask for p

  • 4.5.1 update hangs FB.

    I did the update when running Flash IDE.  The update window came up.  I let it install and FB no longer starts.  It just hangs at the splash page C:\Users\{Me}\Adobe Flash Builder 4.5\.metadata\.log is 0KB I have a licening.adobe.com license, maybe t

  • Can't repair or partition internal hard disk with disk utility

    Hi, For the past couple months I've been trying to repair and (re)format my second internal hard disk. It stopped showing up on the desktop after I attempted to install leopard on it. Until then I'd had no problems with the disk for the two years I'v