Posting event from JSP/Servlet to Agent?

Hi everyone!
I would like to know if it is possible that a jsp file or servlet (runs behind the JWS) can post an event and be captured in the Agent (runs behind the IFS Server).
Any insight regarding this matter will be greatly appreciated.
Vince

I don't think that's possible and even if it is there's an easier way. Normally you just create an instance of the session bean in a servlet and pass it the information. The session bean then calls the entity bean which updates the database. You don't have to forward the request - just pass the data to the bean.

Similar Messages

  • Can we run external mail program from JSP / Servlet deployed on tomcat

    Hi folks,
    Had a tough time getting JavaMail API to work, finally when things seem to be working
    there were some issues with the vendor's server, so finally gave up the idea.
    On the server Apache and Tomcat are integrated via mod_jk and currently I redirect to a php page
    which acts as a helper to send mail, however for the given business needs and server's limitations
    there are potential security holes.
    So I was wondering if I could directly execute the linux sendmail program from JSP/Servlet
    as we would in a standalone java program or do we need special settings on Tomcat to execute external
    programs.
    Please let me know your views / ideas / comments on this
    Thanks in advance
    Abishek

    Hi
    It's not designed for you to be able to do this, it needs to run through 10gAS or 11gWeblogic.
    Tony

  • Sending Mail from JSP-Servlet

    hi all,
    Can any one help me, how can i send the mail from JSP-Servlet.
    in Spring, we have a the following package to send mail,
    import org.springframework.mail.MailSender;
    import org.springframework.mail.SimpleMailMessage;
    import org.springframework.mail.javamail.JavaMailSenderImpl;
    Suggest me to solve the problem.
    Thanx in advance.
    Bala

    Hi balu,
    i already go thru that API. My problem is if i add any additional jar file for sending the mail from JSP or Servlets only. not in high technology.
    i mention spring as an example.
    so, kindly suggets me on that.
    Bala

  • How can I call EJB from JSP/Servlets in iWS?

    Hi!!
    My JSP/Servlets are on iWS, and I deploy EJB on iAS.
    In this case, I don't know how JSP/Servlet call EJb on iAS.
    I'd like to know how I can set JNDI name in JSP/Servlet on iWS.
    I will thank you if you give me a simple example source using JSP/Servlet
    and EJB.
    Thanks in advance!!!
    - Park-

    Park,
    Why Are you running your JSP/Servlets in iWS instead of iAS? For whatever
    reason,
    look at the Converter sample from iAS. You will be doing RMI/IIOP in this
    case and the sample explains in detail what to do.
    hth,
    -robert
    "SungHyun, Park" <[email protected]> wrote in message
    news:9jpfmt$[email protected]..
    Hi!!
    My JSP/Servlets are on iWS, and I deploy EJB on iAS.
    In this case, I don't know how JSP/Servlet call EJb on iAS.
    I'd like to know how I can set JNDI name in JSP/Servlet on iWS.
    I will thank you if you give me a simple example source using JSP/Servlet
    and EJB.
    Thanks in advance!!!
    - Park-

  • Anyone know the way to call SQLLoader utility or similar from JSP/Servlet?

    Anyone know the way to call SQLLoader utility or similar from JSP or Servlet?
    i would like to make a big data load from web interface, using SQL Loader or similar, because this utility allows a great performance.
    I think that i can make a JSP or Servlet to open file, and create insert statement into a loop, but the performance is very bad for 30000 inpuits.
    Help me please
    Thanks
    Note: my english is very bad. Sorry.

    Hi there,
    I tried this codes into a Bean like this:
    package com.tuxedo.beans;
    import java.io.*;
    public class TuxTest
         public void RunTest()
              try{
                   Runtime rt = Runtime.getRuntime();
                   Process pr = rt.exec("command /k c:\test.bat");
              } catch (IOException e) {
                   System.err.println("Error: " + e.getMessage());
    }and call it with a JSP like this:
    <html>
    <head><title>Tuxedo Test</title></head>
    <body>
    To run a test on local batch file
    <jsp:useBean id="test1 " class="com.tuxedo.beans.TuxTest"/>
    <jsp: RunTest name="test1"/>
    </body>
    </html>i had created folder %tomcat%\webapps\ROOT\WEB-INF\classes\com\tuxedo\beans to store the bean.
    Yet the JSP file executed, but i dun see any response by calling the batch file, anyone have any idea?
    the batch file is like this:
    @echo off
    echo
    echo Hello World!
    echo
    pausePlease help!

  • Forwarding request from JSP/Servlet to EJB

    Is it possible to forward the HttpRequest,HttpResponse objects from a Servlet/JSP to an Entity/Session bean ?
    ie To forward the call using RequestDispatcher/forward to a Session bean which in turn calls the entiy bean for updating DB
    Ramesh

    I don't think that's possible and even if it is there's an easier way. Normally you just create an instance of the session bean in a servlet and pass it the information. The session bean then calls the entity bean which updates the database. You don't have to forward the request - just pass the data to the bean.

  • Calling WLI Workflows from JSP/servlets

    Hello,
    I'm looking for some help with WLI workflows.
    I want to create a JSP/Servlet that starts a workflow to request some
    data.
    I understand how to start a workflow by placing a message on a JMS
    queue, but I am unsure of how to get a response back from the workflow.
    How does a work flow return a result to a client?
    Does the workflow place the result onto a JMS queue? If so, how does the
    result message get associated with the request message? Is there any
    mechanisms to do this, or do I need to write this on my own?
    Would the servlet/JSP block until the response is returned, or does it
    need to poll some other queue?
    Any advice would be appreciated.
    Thanks
    Alan

    Alan
    Currently you do not need JMS to return a result. Here is a sample jsp
    based worklist, you can use this to see how to start one using the worklist
    api, however, what exactly do you want to return. ?
    Tony
    "Alan Mangroo" <[email protected]> wrote in message
    news:[email protected]..
    Hello,
    I'm looking for some help with WLI workflows.
    I want to create a JSP/Servlet that starts a workflow to request some
    data.
    I understand how to start a workflow by placing a message on a JMS
    queue, but I am unsure of how to get a response back from the workflow.
    How does a work flow return a result to a client?
    Does the workflow place the result onto a JMS queue? If so, how does the
    result message get associated with the request message? Is there any
    mechanisms to do this, or do I need to write this on my own?
    Would the servlet/JSP block until the response is returned, or does it
    need to poll some other queue?
    Any advice would be appreciated.
    Thanks
    Alan
    [worklist.zip]

  • Passing data from jsp/servlet to a Tuxedo Service thru VIEW

    Hi..
    We are using Tuxedo10g R3 on AIX 5.3..
    We have a Tuxedo Service running which takes values from the VIEW and converts that to upper case.. From the jsp page v r passing values to the VIEW fields which will be accepted by the service..
    For testing v checked the service with a tuxedo client and it is working fine..
    We have defined a jolt repository file for this service and finished bulkloading and coded the servlet also.. After passing the datas from the jsp, the Tuxedo service is called and it is ended.. but in the service only blank values are passed or the datas are not passed to VIEW fields.. It is not showing any error..
    The repository file for this service:
    service=NSIMPSRV
    export=true
    inbuf=VIEW
    inview=sample
    outbuf=STRING
    param=FIRSTSTR
    type=string
    access=in
    param=SECONDSTR
    type=string
    access=in
    param=THIRDSTR
    type=string
    access=in
    param=S-FIRST
    type=string
    access=out
    param=S-SECOND
    type=string
    access=out
    param=S-THIRD
    type=string
    access=out
    and the servlet code for this service:
    Result result1;
    ServletSessionPool servletsession = (ServletSessionPool) joltsession.getSessionPool("demojoltpool");
    ServletDataSet joltdataset = new ServletDataSet();
    joltdataset.setValue("FIRSTSTR","Testing");
    joltdataset.setValue("SECONDSTR","Tuxedo");
    joltdataset.setValue("THIRDSTR","Views");
    result1 = servletsession.call("NSIMPSRV", joltdataset, null);
    System.out.println("FIRSTSTR:"+result1.getValue("S-FIRST",""));
    System.out.println("SECONDSTR:"+result1.getValue("S-SECOND",""));
    System.out.println("THIRDSTR:"+result1.getValue("S-THIRD",""));
    we are not sure why the datas have not been passed.. do anyone have any idea regarding this??
    Thanks..

    Hi Wayne,
    This is my view definition:
    VIEW sample
    # type cname fbna count flag size null
    string firststr - 1 - 10 -
    string secondstr - 1 - 10 -
    string thirdstr - 1 - 10 -
    ENDJolt repository file:
    service=NSIMPSRV
    export=true
    inbuf=VIEW
    inview=sample
    outbuf=VIEW
    outview=sample
    param=FIRSTSTR
    type=string
    access=inout
    param=SECONDSTR
    type=string
    access=inout
    param=THIRDSTR
    type=string
    access=inoutThe Servlet code is:
    package Servlet;
    import java.io.IOException;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import bea.jolt.pool.servlet.weblogic.PoolManagerStartUp;
    import bea.jolt.pool.servlet.*;
    import bea.jolt.pool.ApplicationException;
    import bea.jolt.pool.SessionPoolException;
    import bea.jolt.pool.ServiceException;
    import bea.jolt.pool.SessionPoolManager;
    import bea.jolt.pool.*;
    * Servlet implementation class ZC00582Servlet
    public class VIEWServlet extends HttpServlet {
         private ServletSessionPoolManager joltsession = (ServletSessionPoolManager) SessionPoolManager.poolmgr;
    public VIEWServlet() {
    super();
    // TODO Auto-generated constructor stub
         protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
              // TODO Auto-generated method stub
         response.setContentType("text/html");
         ServletResult result;
         Result result1;     
         String String1 = request.getParameter("FIRSTSTR");
         String String2 = request.getParameter("SECONDSTR");
         String String3 = request.getParameter("THIRDSTR");
         System.out.println("THE VALUES BEFORE CONVERSION");
         System.out.println("FIRSTSTR:"+String1);
         System.out.println("SECONDSTR:"+String2);
         System.out.println("THIRDSTR:"+String3);
         System.out.println("1..");     
         //ServletResult message;
         ServletSessionPool servletsession = (ServletSessionPool) joltsession.getSessionPool("demojoltpool");
         System.out.println("2..");
         ServletDataSet joltdataset = new ServletDataSet();
         //joltdataset.importRequest(request);
         System.out.println("3..");
         //joltdataset.setValue("firststr","Hi");
         joltdataset.setValue("firststr",String1);
         System.out.println("4..");
         //joltdataset.setValue("secondstr","hello");
         joltdataset.setValue("secondstr",String2);
         System.out.println("5..");
         //joltdataset.setValue("thridstr","fine");
         joltdataset.setValue("thirdstr",String3);
         System.out.println("6..");
         //result = (ServletResult) servletsession.call("NSIMPSRV", joltdataset, null);
         result1 = servletsession.call("NSIMPSRV", joltdataset, null);
         result = (ServletResult) result1;
         System.out.println("THE VALUES AFTER CONVERSION");
         System.out.println("FIRSTSTR:"+result.getStringValue("firststr",""));
         System.out.println("SECONDSTR:"+result.getStringValue("secondstr",""));
         System.out.println("THIRDSTR:"+result.getStringValue("thirdstr",""));     
         protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
              // TODO Auto-generated method stub
    and my server program :
    IDENTIFICATION DIVISION.
    PROGRAM-ID. NSIMPSRV.
    AUTHOR. TUXEDO DEVELOPMENT.
    ENVIRONMENT DIVISION.
    CONFIGURATION SECTION.
    DATA DIVISION.
    WORKING-STORAGE SECTION.
    * Tuxedo definitions
    01 TPSVCRET-REC.
    COPY TPSVCRET.
    01 TPTYPE-REC.
    COPY TPTYPE.
    01 TPSTATUS-REC.
    COPY TPSTATUS.
    01 TPSVCDEF-REC.
    COPY TPSVCDEF.
    * Log message definitions
    01 LOGMSG.
    05 FILLER PIC X(10) VALUE
    "NSIMPSRV :".
    05 LOGMSG-TEXT PIC X(50).
    01 LOGMSG-LEN PIC S9(9) COMP-5.
    * User defined data records
    01 STRING-DATA.
    COPY SAMPLE.
    LINKAGE SECTION.
    PROCEDURE DIVISION.
    START-FUNDUPSR.
    MOVE LENGTH OF LOGMSG TO LOGMSG-LEN.
    MOVE "Started" TO LOGMSG-TEXT.
    PERFORM DO-USERLOG.
    * Get the data that was sent by the client
    MOVE LENGTH OF STRING-DATA TO LEN.
    CALL "TPSVCSTART" USING TPSVCDEF-REC
    TPTYPE-REC
    STRING-DATA
    TPSTATUS-REC.
    IF NOT TPOK
    MOVE "TPSVCSTART Failed" TO LOGMSG-TEXT
    PERFORM DO-USERLOG
    PERFORM EXIT-PROGRAM
    END-IF.
    IF TPTRUNCATE
    MOVE "Data was truncated" TO LOGMSG-TEXT
    PERFORM DO-USERLOG
    PERFORM EXIT-PROGRAM
    END-IF.
    MOVE FIRSTSTR TO LOGMSG-TEXT.
    PERFORM DO-USERLOG.
    MOVE SECONDSTR TO LOGMSG-TEXT.
    PERFORM DO-USERLOG.
    MOVE THIRDSTR TO LOGMSG-TEXT.
    PERFORM DO-USERLOG.
    INSPECT FIRSTSTR CONVERTING
    "abcdefghijklmnopqrstuvwxyz" TO
    "ABCDEFGHIJKLMNOPQRSTUVWXYZ".
    INSPECT SECONDSTR CONVERTING
    "abcdefghijklmnopqrstuvwxyz" TO
    "ABCDEFGHIJKLMNOPQRSTUVWXYZ".
    INSPECT THIRDSTR CONVERTING
    "abcdefghijklmnopqrstuvwxyz" TO
    "ABCDEFGHIJKLMNOPQRSTUVWXYZ".
    MOVE "Success" TO LOGMSG-TEXT.
    PERFORM DO-USERLOG.
    MOVE STRING-DATA TO LOGMSG-TEXT.
    PERFORM DO-USERLOG.
    SET TPSUCCESS TO TRUE.
    COPY TPRETURN REPLACING
    DATA-REC BY STRING-DATA.
    * Write out a log err messages
    DO-USERLOG.
    CALL "USERLOG" USING LOGMSG
    LOGMSG-LEN
    TPSTATUS-REC.
    * EXIT PROGRAM
    EXIT-PROGRAM.
    MOVE "Failed" TO LOGMSG-TEXT.
    PERFORM DO-USERLOG.
    SET TPFAIL TO TRUE.
    COPY TPRETURN REPLACING
    DATA-REC BY STRING-DATA.
    Thanks & Regards,
    Janani.

  • Download any type of files from JSP/Servlet

    Hi,
    I understood that if I want to download a file from a JSP or a Servlet I have to set the content type to the MIME type of the file itself.
    And then I have to set the Content-Disposition to "attachment; filename=\"" + file_name + "\";" if I want the Open/Save window displaied by the browser (otherise the "inline;...").
    How can I download a file if I don't know its MIME type? Am I suppose to use the "application/octet-stream" MIMETYPE?
    Where can I find documentation and sample code for doing it?
    Are there any free packages available to do so?
    Thank you very much

    Look at http://www.javaworld.com/javaworld/javatips/jw-javatip94.html for the basic method. This article also refers to the RFCs on MIME types which should answer your questions on what type to use for unknown or binary data.

  • Read xml file from jsp/servlet

    Hi all,
    I am a new comer to jsp and really appreciate if someone can help me on this:
    I will like to use a xml file to control access to my web app instead of using a database. Let say user.xml that will contains user name and password. Questions:
    1. where should I put this file? Under WEB-INF?
    2. In my jsp or servlet, how do i read the xml file, i mean how to i refer to the file (depend on question 1 as where the file should be placed)?
    Thank you very much.
    Sim

    Hi jlsim,
    you can place the xml file where you want, but remember that placing it under /WEB-INF is the most security way.
    I had a similar problem and I placed the xml file under /WEB-INF directory.
    To refer to it I did something like this:
    String realPath=getServletContext().getRealPath("WEB-INF/xml/workspaces.xml");//obtain the real path
    File f=new File(realPath);//obtain an instance of your file usable
    //to create an InputStream

  • Posting events from iphoto to facebook

    any idea why I can no longer publish my event in iPhoto to Facebook? The publish button is there but I can not select it., any idea why I can no longer publish my event in iPhoto to Facebook? The publish button is there but I can not select it.

    Back up all data.
    Quit the application, if it's running.
    Triple-click anywhere in the line below on this page to select it:
    ~/Library/Containers/com.apple.ShareKitHelper
    Right-click or control-click the highlighted line and select
    Services ▹ Reveal
    from the contextual menu. A Finder window should open with a folder selected. If it does, move the selected folder — not just its contents — to the Desktop.
    The folder you're moving has a name that begins with "com." It is not the subfolder named "Data" or anything else.
    Log out and log back in. Launch the problem application and test. If it works now, delete the folder you moved. Otherwise, quit again, and put the folder back where it was, overwriting the one that may have been created in its place.
    Caution: If you delete some or all of the contents of the selected folder, but leave the folder itself in place, the application may not launch. Deleting the folder will cause it to be rebuilt automatically.

  • WML Output From JSP/Servlets

    I need some assistance with WML output from someone who knows...
    I am writing a small subset of applications for mobile access. When testing them through the OpenWave Emulator (the UP browser) everything works just fine. However..the output varies greatly to where on some machines the login cannot be performed. My only problems tend to occur with forms and the lack of an <input type="submit"/> component.
    Here's the WML output of the login screen:
    <?xml version="1.0"?>
    <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN"
    "http://www.wapforum.org/DTD/wml12.dtd">
    <wml>
    <card id="login" title="Login Form">
    <p>Please login.<br/>
    <table>
    <tr><td>Username:</td></tr>
    <tr><td><input name="username" type="text" title="username"/></td></tr>
    <tr><td>Password:</td></tr>
    <tr><td><input name="password" type="password" title="password"/></td></tr>
    </table>
    </p>
    <do type="accept" label="Login">
    <go href="/portal/mobile/vendor/" method="POST">
    <postfield name="username" value="$(username)"/>
    <postfield name="password" value="$(password)"/>
    </go>
    </do>
    </card>
    </wml>Again, in OpenWave's UP browser, I can enter the username and password, then click options --> Login and things work great.
    However on the WinWap browser, I only get the labels, no input fields or login option.
    Does this WML look properly formed? Any help would be appreciated.

    I can't really tell you the fix, as I really can't remember, but I know I had a similar problem once... OpenWave was fine, but the Nokia emulator didn't like it.
    I think I ended up having a different DOCTYPE and having the username and password inputs on separate pages.
    Does WML support tables?

  • Unable to run URL from a servlet program

    Hi ,
    I have some problems in executing a URL which is coded to run the reports in HTML format from the J2EE-Oracle Web application. The servlet is coded to set the browser properties such as content type, content length, etc....The content length is -1 when this URl is run. Find below the servlet code which is currently used,
    /// code starts here
    private String executeReportUsingURL(String[] command)
              throws IOException,ClassNotFoundException,SQLException,InterruptedException {
    String filePath = "";
    try
    String paramString = "&otherparms=YES&";
    getp.info("In executeReportUsingURL method --- " + command);
    getp.info("In executeReportUsingURL method --- " + command);
    int len = command.length;
    String requestString="";
    String desfileFormat="";
    for(int k=9;k<len;k++)
    String tempParam = command[k];
    getp.info(tempParam);
    System.out.println(tempParam);
    if (k!=(len-1))
    paramString=paramString + tempParam + "&";
    }else
    paramString=paramString + tempParam;
    getp.info("Al Ansari Exchange: "+paramString);
    System.out.println("Al Ansari Exchange: "+paramString);
                   for(int i=0;i<len;i++)
                                            desfileFormat=command[5].toString();
    getp.info("Request String "+requestString);
    System.out.println("Request String "+requestString);
    String urlString = resource.getString("reportGeneratorUrl");
    DataOutputStream dataoutputstream;               
    BufferedReader bufferedreader;
    getp.info("URL string Before accessing : "+urlString);
    System.out.println("URL string Before accessing : "+urlString);
    java.util.Properties properties = System.getProperties();
    Security.addProvider(new Provider());
    properties.put("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol");
    System.setProperties(properties);
    getp.info("URL STRING : " + urlString);
    System.out.println("URL STRING : " + urlString);
    String userId = gitResource.getString("userid");
    String finalURLString ="";
    getp.info(" file format "+desfileFormat);
    System.out.println(" file format "+desfileFormat);
    if(desfileFormat.equals("desformat=html"))
    finalURLString = urlString + "?destype=file&desformat=html&server=ce&report="+rdfFileName+"&userid=" + userId + paramString;
    else
    finalURLString = urlString + "?destype=cache&desformat=pdf&server=ce&report="+rdfFileName+"&userid=" + userId + paramString;               
    getp.info("Final String "+finalURLString);
    System.out.println("Final String "+finalURLString);
    url = new URL(finalURLString);               
    int bfr = 128;
    String aafilename = null;
    String actfilename = null;
    URLConnection uc = url.openConnection();
    getp.info("1");
    System.out.println("1");
    uc.setRequestProperty("Content-Type","text/html; charset = windows-1256" );
    String ct = uc.getContentType();
    getp.info("2");
    System.out.println("2");
    int cl = uc.getContentLength();
    getp.info("3");
    System.out.println("3");               
    getp.info("4");
    System.out.println("4");
    InputStream theImage = uc.getInputStream();
    getp.info("5");
    System.out.println("5");
    byte[] b = new byte[cl];
    int bytesread = 0;
    int offset = 0;
    int tempoffset = 0;
    getp.info("6");
    System.out.println("6");
    while (bytesread >= 0) {
    if ((cl - offset) < 128)
    bfr = cl - offset;
    getp.info("7");
    System.out.println("7");
    bytesread = theImage.read(b, offset, bfr);
    tempoffset = offset;
    if (bytesread == -1) break;
    offset += bytesread;
         getp.info("8");
         System.out.println("8");
                        if (offset != cl) {
    System.err.println("Error: Only read " + offset + " bytes");
    System.err.println("Expected " + cl + " bytes");
    getp.info("9");
    System.out.println("9");
    String theFile = url.getFile();
    theFile = theFile.substring(theFile.lastIndexOf('/') + 1);
    String randomno = null;
    getp.info("10");
    System.out.println("10");                    
    getp.info(" rep src folder with path "+reportSourceFolderWithPath);
    System.out.println(" rep src folder with path "+reportSourceFolderWithPath);
    getp.info(" outputfile "+outputFileName);
    System.out.println(" outputfile "+outputFileName);
    filePath = reportSourceFolderWithPath + outputFileName;
    FileOutputStream fout = new FileOutputStream(filePath);
    getp.info("Writing file for after getting result from reports :"+filePath);
    System.out.println("Writing file for after getting result from reports :"+filePath);
    getp.info("12");
    System.out.println("12");
    fout.write(b);
    getp.info("122");
    System.out.println("122");
              catch (Exception e)
                   throw new InterruptedException(e.getMessage());
                   return filePath;
         // end of code
    Regards
    Mirza

    Mirza,
    Please post the entire error message and stack trace you are getting.
    Since you say the code you posted is from a servlet, then what servlet engine are you using? You seem to imply that it is Oracle Application Server. Or maybe it's just OC4J stand-alone? Please provide details of the application server you are using.
    By the way, you can use the [ code ] and [ /code ] tags (without the spaces) to format your code.
    Good Luck,
    Avi.

  • Error in accessing servlet from JSP

    Hello everybody,
    When I access a servlet from a JSP page,I am getting the following error message :
    Error 404--Not Found
    From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
    10.4.5 404 Not Found
    The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.
    If the server does not wish to make this information available to the client, the status code 403 (Forbidden) can be used instead. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address.
    I am using Weblogic 7.0 and my web.xml code is as follows:
    <web-app>
    <servlet>
    <servlet-name>TestServlet</servlet-name>
    <servlet-class>TestServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>TestServlet</servlet-name>
    <url-pattern>/TestServlet</url-pattern>
    </servlet-mapping>
    </web-app>
    I am accessing the servlet from a javascript function in my JSP page.
    I am quite new to the Java technology. So any help in this regard would be highly appreciated.
    Thanks in advance,

    The form action event is in a javascript function. I am sorry I mentioned that I am accessing this servlet from JSP. Actually,this servlet is accessed from an HTML document.
    The following is the javascript code:
    <script language="javascript">
    function lfnCallNext()
         alert("In the function");
         frmMain.method="POST";
         frmMain.action="/TestServlet";
         frmMain.hidChoice.value="GetList";
         frmMain.submit();
    </script>
    And this function is called from an hyperlink as follows:
    Work with Employee Database
    Thanks,

  • How to call servlet from jsp

    i m trying to call it from jsp using
    <a href="../purchaseP?orderno=<%=pno%>"><%=pno%></a>
    but its giving error..
    type Status report
    message HTTP method GET is not supported by this URL
    description The specified HTTP method is not allowed for the requested resource (HTTP method GET is not supported by this URL).

    i m trying to call it from jsp using
    <a href="../purchaseP?orderno=<%=pno%>"><%=pno%></a>
    but its giving error..
    type Status report
    message HTTP method GET is not supported by this URL
    description The specified HTTP method is not allowed
    for the requested resource (HTTP method GET is not
    supported by this URL).Are you implementing the doGet or doPost method in your servlet? If you are calling from a hyperlink then it needs to be implementing the GET method. To access the POST method use a html form.

Maybe you are looking for

  • IPod not being recognized by computer or iTunes

    This is all of the sudden; I plug my iPod into my computer and - nothing. I tried starting and stopping it through My Computer, upgraded iTunes, unplugged and plugged and everything, toggled the Hold button and still nothing. All my iPod is doing is

  • I reformatted my ipod to windows and now I get a blank screen. Help!

    My brother gave me his old Ipod 30Gb, I believe it's an IPOD Classic. When I first connected it to my PC I got a message that it needed to get reformatted to Windows, so I did that. After that when the IPOD came back on it had a blank screen. I tried

  • Cannot sync with Windows Vista and BB 7105t

    I was using Windows XP and everything worked great. Now I have Vista and cannot sync. I open the BB Desktop Manager and it says my device is disconnected. I am plugged in to a USB port, tried two different ones and makes no difference. Thus when I go

  • Bad Image Error

    I keep getting this error message when I try to open my Itunes. "The application or DLL C:\WINDOWS\system32\softpub.dll is not a valid Windows image. Please check this against your installation diskette." I have uninstalled and reinstalled it twice t

  • Kann kein labview vi von ni vision assistant machen

    habe labview 7 base development inklusive application builder, und ni vision development module 7.0 installiert