Calling perl using jsp

Hello,im using apache tomcat.
i'm trying to call perl script as cgi.But nothing happen.
ive changed the setting in web.xml
and i view the file "http:localhost:8080/InteractiveJavaTutor/cgi-bin/hello.pl"
the result is:
#!C:/Perl/bin/perl.exe print "Content-type:text/html\n\n"; $num_words = "eight"; print "There are "; print $num_words; print " words altogether in this sentence.\n"; print "setan";
nothing happen.
can sumbuddy help me out

Hi
Same problem as above and did everything as posted here in the page, but still doesn't solve my problem.
Here's the bean :
package com.partha;
public class CounterBean
private int counter=0;
public int getCounter()
return counter;
public void incrementCounter()
counter++;
Here's the JSP Page :
<%@ page language="java" %>
<jsp:useBean id="session_counter" class="com.partha.CounterBean" scope="session"/>
<jsp:useBean id="application_counter" class="com.partha.CounterBean" scope="application" />
<html>
     <head>
          <title>Exercise 3</title>
     </head>
     <body>
          <%= session_counter.incrementCounter() %>
          <%= application_counter.incrementCounter()%>
          The number of times this session was accessed :
          <jsp:getProperty name="session_counter" property="counter" />
          <br>
          The number of times this page was accessed :
          <jsp:getProperty name="application_counter" property="counter" />
     </body>
</html>
I am still getting a classnot found exception . Here's what I am getting :
java.lang.ClassNotFoundException: com.partha.FormBean
     at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1407)
     at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1252)
     at org.apache.jasper.compiler.BeanRepository.getBeanType(BeanRepository.java:133)
     at org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:650)
     at org.apache.jasper.compiler.Node$GetProperty.accept(Node.java:507)
     at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:983)
     at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:1025)
Please help me out ..

Similar Messages

  • Calling bean using jsp

    i've installed tomcat v3.3.2, and set the environment variable as normal procedure has mentioned..i have j2sdk 1.4.2_08, and recently has try to expirment calling java beans using jsp file located at D:\jakarta-tomcat-3.3.2\webapps\helloworld.jsp, and my bean file is located at D:\jakarta-tomcat-3.3.2\webapps\ROOT\WEB-INF\classes\com\bean\test\hellobean.class, and my hellobean.java source is :
    package com.bean.test;
    public class hellobean implements java.io.Serializable
    private String Name;
    public hellobean() {}
    public String getName()
    {return Name;}
    public void setName(String Name)
    {this.Name=Name;}
    and my jsp file source:
    <html>
    <body>
    <jsp:useBean id="hello" class="hellobean">
    <jsp:setProperty name="hello" property="Name" value="Alan"/>
    </jsp:useBean>
    <h1>hello, <jsp:getProperty name="hello" property="Name"/></h1>
    </body>
    </html>
    and when i run start.bat and type http://localhost:8080/helloworld.jsp, it gave me this error:
    Error: 500
    Location: /helloworld.jsp
    Internal Servlet Error:
    org.apache.jasper.JasperException: hellobean
         at org.apache.jasper.compiler.BeanRepository.getBeanType(BeanRepository.java:140)
         at org.apache.jasper.compiler.GetPropertyGenerator.generate(GetPropertyGenerator.java:59)
         at org.apache.jasper.compiler.JspParseEventListener$GeneratorWrapper.generate(JspParseEventListener.java:747)
         at org.apache.jasper.compiler.JspParseEventListener.generateAll(JspParseEventListener.java:176)
         at org.apache.jasper.compiler.JspParseEventListener.endPageProcessing(JspParseEventListener.java:131)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:169)
         at org.apache.tomcat.facade.JasperLiaison.jsp2java(JspInterceptor.java:765)
         at org.apache.tomcat.facade.JasperLiaison.processJspFile(JspInterceptor.java:706)
         at org.apache.tomcat.facade.JspInterceptor.preInitCheck(JspInterceptor.java:493)
         at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:413)
         at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:874)
         at org.apache.tomcat.core.ContextManager.service(ContextManager.java:790)
         at org.apache.coyote.tomcat3.Tomcat3Adapter.service(Tomcat3Adapter.java:64)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:793)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:702)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:571)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:644)
         at java.lang.Thread.run(Thread.java:534)
    Root cause:
    java.lang.ClassNotFoundException: hellobean
         at org.apache.tomcat.util.depend.DependClassLoader12Impl.loadClassInternal1(DependClassLoader12.java:205)
         at org.apache.tomcat.util.depend.DependClassLoader12Impl$1.run(DependClassLoader12.java:78)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.tomcat.util.depend.DependClassLoader12Impl.loadClass(DependClassLoader12.java:76)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
         at org.apache.jasper.compiler.BeanRepository.getBeanType(BeanRepository.java:138)
         at org.apache.jasper.compiler.GetPropertyGenerator.generate(GetPropertyGenerator.java:59)
         at org.apache.jasper.compiler.JspParseEventListener$GeneratorWrapper.generate(JspParseEventListener.java:747)
         at org.apache.jasper.compiler.JspParseEventListener.generateAll(JspParseEventListener.java:176)
         at org.apache.jasper.compiler.JspParseEventListener.endPageProcessing(JspParseEventListener.java:131)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:169)
         at org.apache.tomcat.facade.JasperLiaison.jsp2java(JspInterceptor.java:765)
         at org.apache.tomcat.facade.JasperLiaison.processJspFile(JspInterceptor.java:706)
         at org.apache.tomcat.facade.JspInterceptor.preInitCheck(JspInterceptor.java:493)
         at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:413)
         at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:874)
         at org.apache.tomcat.core.ContextManager.service(ContextManager.java:790)
         at org.apache.coyote.tomcat3.Tomcat3Adapter.service(Tomcat3Adapter.java:64)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:793)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:702)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:571)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:644)
         at java.lang.Thread.run(Thread.java:534)
    can anybody help me? thanks

    Hi
    Same problem as above and did everything as posted here in the page, but still doesn't solve my problem.
    Here's the bean :
    package com.partha;
    public class CounterBean
    private int counter=0;
    public int getCounter()
    return counter;
    public void incrementCounter()
    counter++;
    Here's the JSP Page :
    <%@ page language="java" %>
    <jsp:useBean id="session_counter" class="com.partha.CounterBean" scope="session"/>
    <jsp:useBean id="application_counter" class="com.partha.CounterBean" scope="application" />
    <html>
         <head>
              <title>Exercise 3</title>
         </head>
         <body>
              <%= session_counter.incrementCounter() %>
              <%= application_counter.incrementCounter()%>
              The number of times this session was accessed :
              <jsp:getProperty name="session_counter" property="counter" />
              <br>
              The number of times this page was accessed :
              <jsp:getProperty name="application_counter" property="counter" />
         </body>
    </html>
    I am still getting a classnot found exception . Here's what I am getting :
    java.lang.ClassNotFoundException: com.partha.FormBean
         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1407)
         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1252)
         at org.apache.jasper.compiler.BeanRepository.getBeanType(BeanRepository.java:133)
         at org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:650)
         at org.apache.jasper.compiler.Node$GetProperty.accept(Node.java:507)
         at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:983)
         at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:1025)
    Please help me out ..

  • How to call Servlet from jsp page and how to run this app using tomcat..?

    Hi ,
    I wanted to call servlet from jsp action i.e. on submit button of JSP call LoginServlet.Java file.
    Please tell me how to do this into jsp page..?
    Also i wanted to execute this application using tomcat.
    Please tell me how to do this...? what setting are required for this...? what will be url ..??
    Thanks.

    well....my problem is as follows:
    whenever i type...... http://localhost:8080/appName/
    i am getting 404 error.....it is not calling to login.jsp (default jsp)
    but when i type......http://localhost:8080/appName/login.do........it executes servlet properly.
    Basically this 'login.do' is form action (form action='/login.do').....and i wanted to execute this from login jsp only.(from submit button)
    In short can anyone please tell me how to diaplay jsp page using tomcat 5.5
    plz help me.

  • How to call java method using jsp

    how to call java method using jsp.....
    anyone can help me.....i having problem here...coz i very new in java and jsp.....
    thanks.....

    keep an eye on this person's thread...they have code there and everything.
    http://forum.java.sun.com/thread.jspa?threadID=777263&tstart=0

  • How to Call Custom BPEL Process using JSP

    Hi All,
    I m not able to find out the way " How to deploy Custom BPEL process using JSP." Suppose I m Designing my custom BPEL process , and I want to call process through JSP.
    In order to call the BPEL process using JSP I may get the Reference from Oracle guide, But it is for Existing Example like Hello world, Order Booking.
    But I am facing the problem in order to call the Custom BPEL process.
    In case of Oracle Example it looks Simple but How to call Custom BPEL process using JSP.
    Please help me.
    Thanks&Regards
    Devesh Mishra

    hi
    The BPEL Developer guide give the way to Locate the service.can you please specify where you are getting the problem.
    Thanks,
    Sivakumar

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

  • How to download a text file using jsp i

    I want to provide download facility in jsp page.
    if i have exe download is working . If I have a text / html file it is just displaying I want to make it download How to do it?
    regards
    subrahmanayma

    If you want to get an "Save as" dialogue, then you need to set the content-disposition in the header to "attachment". The default value is "inline".
    Best solution is to create kind of a FileServlet and let it stream the right file as a download to the client. You may find the downloadFile() snippets at the bottom of this article useful: http://balusc.xs4all.nl/srv/dev-jep-pdf.html Put it in a FileServlet and call it using for example .

  • Uploading a file using jsp and com.oreilly.servlet lib package

    Sorry to bother you but I need your help folks
    I am developing an application to pick up files from a database and sent to a specified location on a different system.
    I am presently trying to run this code,I have placed this lib package from oreilly which is supposed to encapsulate the usage of file uploads,which is a jar file called cos.jar into C:\Program Files\Java\jdk1.5.0_03\jre\lib\ext folder .I have a jsp page that calls the bean which does the upload and implement the classes in the oreilly package.I am using tomcat 5
    [b]the jsp page that acts as the user interface
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
    <title>Please Choose The File</title>
    </head>
    <body bgcolor="#ffffff">
    <table border="0"><tr>
    <form action="Upload.jsp" method="post"
    enctype="multipart/form-data">
    <td valign="top"><strong>Please choose your document:</strong><br></td>
    <td> <input type="file" name="file1">
    <br><br>
    </td></tr>
    <tr><td><input type="submit" value="Upload File"></td></tr>
    </form>
    </table>
    </body>
    </html>
    this is the jsp page that calls the bean
    <jsp:useBean id="uploader" class="com.UploadBean" />
    <jsp:setProperty name="uploader" property="dir" value="<%=application.getInitParameter(\"save-dir\")%>" />
    <jsp:setProperty name="uploader" property= "req" value="${pageContext.request}" />
    <html>
    <head><title>file uploads</title></head>
    <body>
    <h2>Here is information about the uploaded files</h2>
    <jsp:getProperty name="uploader" property="uploadedFiles" />
    </body>
    </html>
    [b]this is the bean class
    package com;
    import java.util.Enumeration;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.ServletRequest;
    import com.oreilly.servlet.MultipartRequest;
    import com.oreilly.servlet.multipart.DefaultFileRenamePolicy;
    import javax.servlet.*;
    public class UploadBean {
    private String webTempPath;
    private HttpServletRequest req;
    private String dir;
    // private ServletRequest request;
    public UploadBean( ) {}
    public void setDir(String dirName) {
    if (dirName == null || dirName.equals(""))
    throw new IllegalArgumentException("invalid value passed to " + getClass( ).getName( )+".setDir");
    //webTempPath = dirName;
    dir = dirName;
    /* public String getDir()
    return webTempPath;
    public void setReq(ServletRequest request) {
    if (request != null && request instanceof HttpServletRequest)
    req = (HttpServletRequest) request;
    } else {
    throw new IllegalArgumentException("Invalid value passed to " + getClass( ).getName( )+".setReq");
    public String getUploadedFiles( ) throws java.io.IOException{
    //file limit size of 5 MB
    MultipartRequest mpr = new MultipartRequest(req,dir,5 * 1024 * 1024,new DefaultFileRenamePolicy( ));
    Enumeration enume = mpr.getFileNames( );
    StringBuffer buff = new StringBuffer("");
    for (int i = 1; enume.hasMoreElements( );i++){
    buff.append("The name of uploaded file ").append(i).append(" is: ").append(mpr.getFilesystemName((String)enume.nextElement( ))).append("<br><br>");
    }//for
    //return the String
    return buff.toString( );
    } // getUploadedFiles
    On running the code I find this error messages
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: javax/servlet/ServletRequest
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
         org.apache.jsp.jsp.Upload_jsp._jspService(org.apache.jsp.jsp.Upload_jsp:73)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
         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.NoClassDefFoundError: javax/servlet/ServletRequest
         com.oreilly.servlet.MultipartRequest.<init>(MultipartRequest.java:222)
         com.oreilly.servlet.MultipartRequest.<init>(MultipartRequest.java:151)
         com.UploadBean.getUploadedFiles(UploadBean.java:49)
         org.apache.jsp.jsp.Upload_jsp._jspService(org.apache.jsp.jsp.Upload_jsp:63)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
         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
    tanks

    Hi,
    Looks like you are missing a file from the classpath. Make sure servlet.jar is available in your classpath. Ordinarily files in <tomcat_home>/lib directory should be added automatically. You need to check why it hasn't been added in your case. A good place to start would be the bat files in the bin directory viz startup.bat, catalina.bat etc.
    cheers,
    vidyut

  • Which one better to use - jsp:useBean or import statement

    Hi,
    I just want to know that which one is better to use jsp:useBean or import statement .
    I can instantiate and call method of myclass -
    1) by importing the class through import tag in jsp as <%@page import="myclass"%. or
    2). by using <jsp:useBean tag....
    i have these two option to do the same thing. i know that basically useBean is used to call setter and getter method of bean class and but it can be used to call a normal java file that have some logic .
    so what should i used , which one is better and why?
    useBean provides scope and object instance so no need to create object by new operator. and with import you have to create an instance .
    but which tag should i use in my jsp?
    i am confused???

    ok, means i can use jsp:useBean tag for all my
    classes that are not actually bean. so it will be
    instantiated at run time and provide efficiency .No. Jsp:useBean is used for java bean components.
    >
    but when should i use import statement in my jsp and
    it happen at translation time so will it create any
    type of burden for my code if i import multiple
    classes.For non-java beans, you need to import the classes, period.
    It's not a burden, it's a necessity.

  • Best Practice for using JSP in OBPM 10gr3

    Hi Guys,
    We are using JSP for UI in our project. We are new to the OBPM. wants to clarify some things.
    1. is it good to have jsp in screenflows or if we can manage it outside BPM also with same effect
    2. How is the BPM database structured. Is the PAPI API's avaialble to get all the desired information from it.
    3. Is notes/attachments/audits managed in BPM database or if we can manage it in external db also.. how to access these from java if it can be managed in BPM db.
    4. What are the pro's and cons of PAPI vs JMS
    Thanks in Advance!!!!

    1. is it good to have jsp in screenflows or if we can manage it outside BPM also with same effectOthers will probably disagree, but I always say to use Screenflows and to use the out of the box Workspace. They are built in as part of the product and you'll be facing a ton of work trying to duplicate this functionality outside.
    2. How is the BPM database structured. Is the PAPI API's avaialble to get all the desired information from it.Unless it's a project variable or a variable that is marked as "Separated", the instance variables are stored in a single blob in a row in the Engine's database. PAPI can retrieve the instance variable information (I posted something on how to do this a while back on this forum and can find it if you need it).
    3. Is notes/attachments/audits managed in BPM database or if we can manage it in external db also.. how to access these from java if it can be managed in BPM db.The out of the box notes and attachments are also stored as part of the blob. On the project I'm currently on, the customer wanted the attachments stored separately in an external database so we did not use the out of the box attachments. They wanted what they call "tasks" stored in a separate database. These tasks were for ad hoc queries to send a question to any department / user and then store the history of responses and routing.
    4. What are the pro's and cons of PAPI vs JMSSorry - you lost me here. Sure someone else will pick up on the comparison between the API Oracle BPM uses and JMS, but I'm not getting it.
    Dan

  • Dynamic select using jsp?

    grrrrr............ok so I'm kinda new to this, and just a little frustrated. I'm gonna ramble here, so any time I sound like I don't know what I'm talking about it 's because I don't..correct me. I want to include a bean in a jsp which will buil d a dynamic select box on the fly. That is, connect to an LDAP db and place each value returned in the query in a select box. Now, I can compile and run the bean in my IDE and watch the output in the console. It's correct because I see "<select><option value = hall>hall....</select>". In the buildSelectBox() method I'm using System.out.println to display each line of my select box (is that right?). Now, when I copy the .class file over to the server I was initially getting an error because the bean wasn't found. I resolved that by properly compiling the bean in a package. Problem is that if I call the bean.buildSelect() method in the .jsp nothing comes back. The page is left blank. What in the world is that about? Can someone push me toward a tutorial that can push me in the right direction or sumthin? Why am I having so much trouble with this? Should I be building the select on the jsp?
    regards,
    mat

    Hi!
    If i understand you correctly :-) you are doing not very right things. I don't want it to seem like I'm going to teach you, but:
    The Bean that has buildSelect() method is not a bean at all. Usualy Beans contain getter/setters and accumulate data. If you want to build html code dynamicaly then you should use servlets(Which is not very flexible in your situation, I think), not JSPs. And if you are using JSPs then you have to make Tag which will do this everything.
    Other way is to use Struts framework which is very good and flexible for building web applications - it has it's own tags for many cases. You can make loops in JSPs, use beans and all that stuff.
    Guys will correct me if I missed something.
    Good luck

  • Display binary data from DB in browser using JSP

    Hello everyone:
    I uploaded some files from browser and stored the files in bytes in the database, but later on I could not display the files in browser without saving them to a local storage first. Is there any way I can send the bytes to the browser in the right format using JSP?
    I tried the following:
    response.setContentType(..)
    response.getOutputStream().write(bytes);
    I can see that the browser can get the right contentType, but with a bunch of weird symbols in the browser. Please help.
    Thank you very much for your time.
    Heather

    I actually had to do this a few months ago. There are ways to perform this kind display using various distributed object (i.e., using MS Word OLE objects to "interpret" the byte for you, etc.). But this soon got extremely difficult to manage (and I actually had to use Perl/CGI for the majority of it).
    The solution I went with was to implement a "cache" directory on the web server. Basically, the JSP/Servlet can simply check the cache and if file not there, create it from the database. Then send a redirect back to the browser to this newly-created file. The browser will then appropriately open the document. I tested this with both Netscape and IE browsers and common MIME types such as text files, MS Office docs, zip files, PDFs, RTFs.
    Not ideal, but unfortunately the best I came up with.

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

  • How to send/receive XML using JSP

    Hi,
    I'm new to all this JSP/XML stuff so apologies if this is trivial.
    I'm trying to send an XML file via HTTP POST using JSP. Anyone know how to do this?
    Once the XML has been sent, how do you use JSP to request the XML file? I've figured out how to parse it already.
    Also, is it possible to call xsql directly within JSP?
    Thanks!

    I'm trying to send an XML file via HTTP POST using JSP. Anyone know how to do this?The question is, does anybody understand what you mean by this. Let me take a guess. You want to upload an XML file to a server. If this guess is right, then the answer is don't use JSP to do that. JSP is for generating output to be sent to a client. Use a servlet to handle an upload. And you don't need to write it yourself, there are already several file-upload servlets available on the web.
    Second guess: you have a POST request that asks your server to send an XML file back to the client. If it's a static XML file you don't need a JSP or a servlet or anything, just let your web server handle it just like any other static file. If it's dynamically generated then there's an answer worth giving, but I doubt that this is your question. But if it is, let us know.

  • How to store files in mysql database using JSP?

    I'm developing an online recruitment system using JSP in server side. For the users who registers in it, I want them to upload their cv's from the web site so that I can store it in the database..I'm using mysql as the db..
    Can I know how to do it.?..or else is there any better way of doing that?
    Need a quick reply..Tx

    The best way to put data in a database in a JSP is to not do it. Instead, use a Servlet that calls a DataAccessObject. The DAO puts the data in the DB and the servlet gives the data to the DAO. The JSP does nothing but display results.
    Take a google for JSP MVC and DAO. BalusC has a great example of DAO and a JSP that uses one on his blog.

Maybe you are looking for

  • Mac Book pro or Quad core machine

    I am running logic 6 on a 1.6G5. I want to upgrade to Logic 8 with a new Mac. I was wondering how stable / powerful are the macBook pros? Would a mac book pro be enough to use in my studio. My trusty old g5 is pretty slow now and only runs around 10

  • To show who released the PO in workflow email

    We use workflow WS20000075 for PO release, we want to show SAP user id or name who has released the Purchase order in the email (in description of task TS20000168), I can't find any container or field that contain this information, any help ? best re

  • Looking for materials in badi bapi and ale idoc

    dude     i got materials from <removed by moderator> and other few sites also.i need to know the full structure of bapi badi and ale idoc. ppl who are working in these areas pls post materials as well the real time issues facing in their comp.so that

  • [GRC] IS-Risks in Complex Value Networks

    Hi everybody, I would like to discuss my current research project with you: Especially in complex value networks, it is important to have mutual risk understanding and mechanisms to control risks among all value adding partners. How can global sourci

  • Regarding SAP Cariear

    Hi freinds,        Currently i m working as a SAP ABAP Condultant......from last 6 months..now i m getting a chance to learn....SAP BW,SAP XI,SAP SD................. pls,tell me which one is better for my future...........i  m very confuse....... Reg