Test Harness - connnecting to a JSP - Please help

I have three tiers
JSP page
Servlet
Then database
I have a problem where the code is failing if multiple users log on.
To recreate the problem, I am having to repeatedly press f5 to keep firing in database connections which is not graceful, scientific and probably making its own problems such as socket connection failures.
- i need a program (or help) that stimulates multiple users logging onto the JSP page so I can provide max and min connections.
I basically have tried to build a urlconnection to the JSP Page but that doesnt seem to work. Any ideas how to forward this.
Does anybody know how I can stimulate connecting onto a JSP!!
Any help will be most beneficial.
I have tried JMeter but doesnt seem to be too effective.

I followed through its original plan to test out its own site but it seems slow(really slow) and I cant really work out what the graphs were meant to be showing.
I limited to one thread and only one run and it was seriously taking ages.
Is there a better manual to JMeter as the manual seems a little schetchy especially when describing the results.
How long should it take to perform the tests.
Do you have a simple test plan for testing a JSP Page then that you could send me and I could try it through JMeter.
email [email protected]

Similar Messages

  • Language problem in JSP please help

    Hi all java guru;
    Altough I tried all different way I can not solve the my problem.
    My problem is Turkish language problem in JSP.
    If my jsp page use database applications such as push or pull data to my SQL 2000 database or call some datas from database, some data which contains turkish caracter are seen wrong. suc as ����� is to ??????
    what is the problem?
    But important point is that; this is only Database data which come from sql database. But I can see JSP data or HTML data truly.
    I try different method to solve in JSP page;
    1-request.setEncoding("iso-8859-9");
    or
    request.setCharacterEncoding( "windows-1250" );
    2-
    @contentType="text/html; charset=iso-8859-9"
    @page pageEncoding="iso-8859-9"
    3-
    <meta http-equiv="Content-Language" content="tr">
    <META http-equiv="Content-Style-Type" content="text/css">
    4-
    ISO-8859-9 is turkish charecter spefications
    String TR_tlp = new String(NEW_TALEP.getBytes(),"ISO-8859-9"); // this parm is inserting database but problem is go on.
    5-
    for the database...
    Properties props = new Properties();
    props.put("user","login");
    props.put("password","password");
    props.put("charSet","UNICODE");
    6-
    url= "jdbc:microsoft:sqlserver://IP_NO:1433;databasename=database;TRUSTED_CONNECTION = true;CHARSET="+sun.io.ByteToCharConverter.getDefault().getCharacterEncoding();
    or
    url= "jdbc:microsoft:sqlserver://IP_NO:1433;databasename=database;TRUSTED_CONNECTION = true;CHARSET=ISO-8859-9"
    con= DriverManager.getConnection(url, kulad, sifre);
    I am using tomcat 5.0.19,
    is there any way to solve this problem... Please help......

    Were you ever able to solve your problem?
    I have a similar problem.
    My database is storing the characters correctly and they can be viewed in Java, but when I try to convert them to unicode using:
    String inputUtf8 = new String(input.getBytes(),charset);
    it works for almost all characters, but some come through as noncharacter "boxes."
    The characters that come through as boxes in iso8859-1 are the ones that are in the "supplementary" character range of that set, such as:
    - curved left and right quotes
    - "TM" symbol
    - bullets
    - m dash and n dash
    (see this table: http://www.csgnetwork.com/htmlchrset.html for a more complete list of the supplementary characters )
    Any idea what I need to do to have these characters show up properly?

  • Uploading images with jsp-PLEASE HELP

    Hi
    I would like to allow users to upload images(photos) from the website im doing.
    i was gonna use perl which seems quite easy. Since everything else i used was jsp i thought i might try to do uploader in jsp (though its seems more difficult)
    id like to limit :
    the maximum file size to be uploaded ,
    the maximum width/height of the image file
    the list of the acceptable mime-types (Content-Types) -jpg, gif
    Any suggestions how to go about it PLEASE- ie. what packages, classes do i need- mimeparser, BufferedImage, FileFilter? cos im bit lost which classes to use.
    THANKS LOTS
    sabcarina

    This is the jsp File which helps me to upload the file
    But for this Jakarta Commons fileupload is needed which is normally provided with Tomcat 5.5
    The code is
    <%@ page contentType="text/html;charset=windows-1252"%>
    <%@ page import="org.apache.commons.fileupload.DiskFileUpload"%>
    <%@ page import="org.apache.commons.fileupload.FileItem"%>
    <%@ page import="java.util.List"%>
    <%@ page import="java.util.Iterator"%>
    <%@ page import="java.util.*"%>
    <%@ page import="java.io.File"%>
    <%@ page import="com.common.*"%>
    <!--<html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>Process File Upload</title>
    </head>-->
    <%
         DerivedLastNoEntity objLastNoEntity=new DerivedLastNoEntity();
         DerivedLastNoObject objLastNo=(DerivedLastNoObject)objLastNoEntity.getData(new DerivedLastNoObject(10)).get(0);
         int lastNo=objLastNo.getLastNo();
         String forwardString=null;
         StringBuffer parameters=new StringBuffer();
            DiskFileUpload fu = new DiskFileUpload();
            // If file size exceeds, a FileUploadException will be thrown
            fu.setSizeMax(1000000);
            List fileItems = fu.parseRequest(request);
            Iterator itr = fileItems.iterator();
            while(itr.hasNext()) {
              FileItem fi = (FileItem)itr.next();
              //Check if not form field so as to only handle the file inputs
              //else condition handles the submit button input
              if(!fi.isFormField()) {
              String fileName=fi.getName();
              if(fileName.length()>0)
                   fileName=(++lastNo)+fileName.substring(fileName.lastIndexOf("."));
                   File fNew= new File(application.getRealPath("/"), fileName);
                   parameters.append("&fileName=/struts-blank/"+fileName);
                   fi.write(fNew);
         else
              if(fi.getFieldName().equals("forwardString"))
                   forwardString=fi.getString();
              else
                   parameters.append("&"+fi.getFieldName()+"="+fi.getString());
         objLastNo.setLastNo(lastNo);
         objLastNoEntity.edit(objLastNo);
         System.out.println("before "+forwardString);
         if(parameters.length()>0)
              if(forwardString.indexOf("?")<0)
                   forwardString=forwardString.concat(parameters.toString().replaceFirst("&","?"));
              else
                   forwardString=forwardString.concat(parameters.toString());
         System.out.println("after "+forwardString);
         response.sendRedirect(forwardString);
    %>
    <!--<body>
    Upload Successful!!
    </body>
    </html>-->Bye for now
    CSJakharia

  • APPLET in jsp (please help)

    hi ,
    can someone tell me please how can i load an applet dynamically in my jsp
    i have some thing like this:
    <APPLET code=" SimpleApplet.class" width=800 height=500>An Applet</APPLET>
    in this case i have allways to copy the "SimpleApplet.class" to the same directory on my jsp and the redeploy.... how can i make it dynamically??
    the "SimpleApplet.class" is in the xxx.jar of my appllication....
    please any idea??
    thanx

    First thing is the applet cannot access the classes in the WEB-INF folder so all the applet classes have to be in the webroot directory.
    Change ur build script so that it will copy it in the web root directory
    Try this
    <applet code="SimpleApplet.class" archive="SimpleApplet.jar" name="SimpleApplet"
              codebase="." width=325 height=325>
    <PARAM NAME="fileName" VALUE="test">
    <PARAM NAME="basePath" VALUE="test">
    </applet>
    Review this tutorial and you should find the problem:
    http://java.sun.com/docs/books/tutorial/deployment/applet/html.html

  • File Download in JSP, Please help

    I am wondering if somebody can help me with a problem :
    I am trying to register a fact that somebody has downloaded a file
    from my company's website.
    When a user clicks on the link I provided, a message box came up to prompt user with the location to save the file. How can I register the fact that user press "Cancel" instead of OK. In other words I need to be able to tell whether the guy really downloaded it or not.
    Thanks

    So, how to determine if user had pressed 'Cancel' or just the connection is broken?
    The pure JSP cannot do it.
    I think you should have some binary code like applet or active-x to check it.

  • Use bean in jsp, please help me out

    Hi all,
    As a beginner in jsp I want to use a bean into my jsp page. But this bean is sourcing from a old applet (i've converted the code applet into beans code), and should return a chart (grpahics).
    Here is the heart of my problem : how can i replace, call , or set up the paint method from the applet. And call it into my jsp page in order to retrieve a chart ?
    Basically all applet shall have a paint method with a Graphics argument , in jsp i can't do
    Mypackage.mybean.paint(Graphics g);
    Hope someone will be able to help me
    Thanks in advance
    Shamann

    I don't think that you can use the Graphics object in a JSP. A JSP is executed on the server side and only the output from that will be sent to the client. If you want to use Graphics objects etc, I think that you'll have to send it to an applet (possibly embedded in the page), but since I've never done this, I can't help you, I'm afraid.
    HTH,
    Raj.

  • Modelling JSP - please help!

    I'm new to JSP and have been wondering what's the best way to model an application? I was planning on using UML, but it doesn't really seem to lend itself to JSP and I haven't been able to find much information about it.
    I will probably use JSPs and Javabeans. I've identified classes which I thought would probably correspond to my database tables and Javabeans, but wasn't sure how to model the actual JSPs? Would you put those on the class diagram too? Are the forms on the pages also classes? How would you show the interaction between JSPs and beans?
    Is there a better way than UML, or do you just use whatever bits of UML seem to be helpful?
    How do people usually do it?
    Thanks

    Hi.
    I would try it and see whether you think it has benefits. You might also like to ask your question again on one of the newsgroups that I suggest below. You will get a lot of helpful advice.
    Try to avoid being 'brainwashed' by assertions made by 'experienced' people that 'we must do more requirements analysis, more design up front or else projects fail'. It is quite likely that projects fail because people spend too long in the speculative phases of 'analysis' and 'design' in the Big Design Up Front style of waterfall development rather than adopting an incremental development/evolutionary delivery style of development and getting tangible results that provide definite feedback, thus allowing the project to be steered.
    I'm not saying don't do analysis and design. Neither am I saying don't document what you've thought about. What I am saying is don't be afraid to get to code and document what you really need to rather than slavishly producing documentation 'because that's what we do as professional software developers/engineers'. A couple of good naming conventions for your beans and JSPs might go a long way to help reduce the need for documentation.
    Modeling is about improving your understanding by abstracting out parts of the problem. If you put too much detail in a UML diagram, then you're just writing code on paper in UML and understanding will probably be lessened by having the artifacts of UML in the way.
    Realise too that you can do planning for lots of things that don't have anything to do with modelling - length of project, scope of project, number and skills of people needed, kind of resources you will need, etc.
    Also, keep in mind Dwight D. Eisenhower's statement that 'In preparing for battle I have always found that plans are useless, but planning is indispensible'.
    In case you're thinking that my advice is the words of a dangerous madman (I don't necessarily dispute either of those things, but that's not where the advice comes from :-) there are discussions about all of this kind of thing in the Agile Methods newsgroups. If you are interested (start with http://www.agilealliance.org and then have a look at Yahoo groups for groups with the words 'agile' and 'extremeprogramming' in their names - i.e. http://groups.yahoo.com/group/extremeprogramming/).
    Regards,
    Lance
    Lance Walton - [email protected]
    Team In A Box - Software without Tragedy
    http://www.teaminabox.co.uk

  • Why I can't writing in www, status bar and settings with Firefox? The full diagnostic testing not did any good. Please, help me.

    I cannot write in no window of the browser, even in options. What's interesting I can glue the text in. In the Flock browser I can write.

    please try and reset the browser setting because due to few setting and secure features few sites gets blocked.

  • Hi I am new to Jsp,Please help me.

    This is my Jsp Program:
    import javax.servlet.http.*;
    import java.io.*;
    import java.util.*;
    public class login extends HttpServlet {
    private String target = "/welcome.jsp";
    private String getUser(String username, String password) {
    // Just return a static name
    // If this was reality, we would perform a SQL lookup
    return "Frodo";
    public void init(ServletConfig config)
    throws ServletException {
    super.init(config);
    public void doGet(HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException {
    // If it is a get request forward to doPost()
    doPost(request, response);
    public void doPost(HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException {
    // Get the username from the request
    String username = request.getParameter("username");
    // Get the password from the request
    String password = request.getParameter("password");
    String user = getUser(username, password);
    // Add the fake user to the request
    request.setAttribute("USER", user);
    // Forward the request to the target named
    ServletContext context = getServletContext();
    RequestDispatcher dispatcher =
    context.getRequestDispatcher(target);
    dispatcher.forward(request, response);
    public void destroy() {
    when i compile this i got this error:
    cannot find symbol:
    setAttribute()
    request.setAttribute("USER",user);
    cannot find symbol:
    class RequestDispatcher
    RequestDispatcher dispatcher =
    context.getRequestDispatcher(target);

    Hey no need of that . you can use request scoped attributes too.
    and remember this is not JSP. it's a SERVLET
    your code is completely correct. there are no errors in it. i am pasting your code. just check it.
    It's working properly. no compile time errors occured.
    import java.io.IOException;
    import javax.servlet.RequestDispatcher;
    import javax.servlet.ServletConfig;
    import javax.servlet.ServletContext;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    public class login extends HttpServlet {
         private String target = "/welcome.jsp";
         private String getUser(String username, String password) {
    //          Just return a static name
    //          If this was reality, we would perform a SQL lookup
              return "Frodo";
         public void init(ServletConfig config)
         throws ServletException {
              super.init(config);
         public void doGet(HttpServletRequest request,
                   HttpServletResponse response)
         throws ServletException, IOException {
    //          If it is a get request forward to doPost()
              doPost(request, response);
         public void doPost(HttpServletRequest request,
                   HttpServletResponse response)
         throws ServletException, IOException {
    //          Get the username from the request
              String username = request.getParameter("username");
    //          Get the password from the request
              String password = request.getParameter("password");
              String user = getUser(username, password);
    //          Add the fake user to the request
              request.setAttribute("USER", user);
    //          Forward the request to the target named
              ServletContext context = getServletContext();
              RequestDispatcher dispatcher =
                   context.getRequestDispatcher(target);
              dispatcher.forward(request, response);
         public void destroy() {
    }Let me know where you are getting issues exactly.
    Diablo

  • I need e6567c wireless test manager...please help..

     can u give me e6567c wireless test manage installer for my agilent 8960 e5515c test set??...please help...

    Hi Puto,
    Looks like the e6567c Wireless Test Manger is available from agilent on their website.
    E6567C cdma2000/IS-95/AMPS/1xEV-DO Wireless Test Manager
    http://www.home.agilent.com/agilent/product.jspx?pn=E6567C&NEWCCLC=USeng
    If your looking for the LabVIEW / CVI drivers for your instrument, those are available from us from our driver network.
    Agilent Technologies E1968A
    http://sine.ni.com/apps/utf8/niid_web_display.model_page?p_model_id=12100
    Hope that helps.
    Scott M.
    Applications Engineer
    National Instruments

  • Urgent--Please help me in woklist customization

    I have a requirement where user wants to customize the worklist apllication, he wants to change the assignee users name from "jcooper" to "James cooper" where shold i change the code in jsp .please help to solve this issue..
    Thanks in advance.
    Shaik
    Edited by: user3983866 on Nov 17, 2009 5:34 PM
    Edited by: user3983866 on Nov 17, 2009 5:36 PM

    In that scenario, you assign the variable with the list of Users to be assigned to worklist user payload. Suppose you are storing the values of the users to be assigned in the variable /ns0:BPELProcess1Request/ns0:input. Now you append this to user payload /task:task/task:payload as it can accept Any Type. In the Human Task page(on .task page in the Assignment and Routing Policy select "By Expression") as an assignee add /task:task/task:payload//ns0:BPELProcess1Request/ns0:input. This should solve your problem.
    Can you check the Human Task Samples in SOA Suite? There is one example related to this. I could not find it handy as I have somehow deleted that from my system. I will tell you if I can find that.

  • PLEASE HELP - error Jdbc/jsp

    Hello
    I have a jsp file myfile.jsp?id=...
    This file was working fine before. I was ready from my testing and i needed to clean my access database's data so i deleted some records manually and copied database again onto live through ftp.
    After this step, myfile.jsp?id=.. was giving me errors only on certain ids for eg. it worked fine myfile.jsp?id=3, but did not work fine for myfile.jsp?id=6 giving this error:
    The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:372)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    java.lang.NullPointerException
         org.apache.jsp.viewprofile_jsp._jspService(viewprofile_jsp.java:320)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    I tried an id which does not exist in database and it worked fine ie. jsp page was executing the html message that i composed for unexisting ids.
    I also checked the records' data and these all look fine and appropriately filled.
    PLEASE HELP - any ideas?
    Thanks lodes
    sabcarina

    You could try adding logging statements or SOPs in the JSP. It would help you locate the line where the exception is occuring.

  • PLEASE HELP jdbc/jsp error

    Hello
    I have a jsp file myfile.jsp?id=...
    This file was working fine before. I was ready from my testing and i needed to clean my access database's data so i deleted some records manually and copied database again onto live through ftp.
    After this step, myfile.jsp?id=.. was giving me errors only on certain ids for eg. it worked fine myfile.jsp?id=3, but did not work fine for myfile.jsp?id=6 giving this error:
    The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:372)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    java.lang.NullPointerException
         org.apache.jsp.viewprofile_jsp._jspService(viewprofile_jsp.java:320)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    I tried an id which does not exist in database and it worked fine ie. jsp page was executing the html message that i composed for unexisting ids.
    I also checked the records' data and these all look fine and appropriately filled.
    PLEASE HELP - any ideas?
    Thanks lodes
    sabcarina

    Somewhere in viewprofile.jsp, you are accessing a variable that is null.

  • Jsp installation on win 2000 - please help me

    Dear All
    in the process to setup JSP environment on my window 2000 i gone through the article
    "Slapping Together A JSP Development Environment" and done the following steps.
    1. I installed the j2sdk1_3_1_01. I installed it to C:\JDK
    2. I installed the Apache 1.3.20 and its working fine.
    3. I installed the Tomcat3.2.3 to C:\TOMCAT
    then I setup the environment variable to run tomcat as below
    C:\>SET JAVA_HOME=C:\JDK
    C:\>SET TOMCAT_HOME=C:\TOMCAT
    C:\>SET PATH=%PATH%;C:\JDK\BIN
    then i started tomcat as
    C:\TOMCAT\BIN>TOMCAT START
    and i see like
    Including all jars in C:\TOMCAT\LIB in your CLASSPATH.
    Using CLASSPATH:
    C:\TOMCAT\CLASSES;C:\TOMCAT\LIB\ANT.JAR;C:\TOMCAT\LIB\JAXP.JAR;C:\TOMCAT\LIB
    \SERVLET.JAR;C:\TOMCAT\LIB\PARSER.JAR;C:\TOMCAT\LIB\WEBSER~1.JAR;C:\TOMCAT\L
    IB\JASPER.JAR;C:\JDK\LIB\TOOLS.JAR
    but i not seen any thing like below and finally Tomcat server not start.
    2001-01-30 02:47:19 - ContextManager: Adding context Ctx( /examples )
    2001-01-30 02:47:19 - ContextManager: Adding context Ctx( /admin )
    Starting tomcat. Check logs/tomcat.log for error messages
    2001-01-30 02:47:20 - ContextManager: Adding context Ctx( )
    2001-01-30 02:47:20 - ContextManager: Adding context Ctx( /test )
    2001-01-30 02:47:22 - PoolTcpConnector: Starting HttpConnectionHandler on
    8080
    2001-01-30 02:47:22 - PoolTcpConnector: Starting Ajp12ConnectionHandler on
    8007
    please help me to fix this problem.

    Hi shah_nasir,
    Below is the link for everything you need.
    The installation is for Tomcat 4.0, it's the same for
    your Tomcat 3.2 on win2000.
    http://www.onjava.com/pub/a/onjava/2001/03/29/tomcat.html
    --Paul.                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • PLease Help !Jsp Session expired when open Window with "_blank" atributte

    PLease please Help me!
    Hi ,
    I have a problem
    First , all my pages when load evaluate if session exists .
    If not exists session
    this page redirect other page (page_expired.jsp)
    this works correctly ... but
    when page01.jsp open page02.jsp from :
    <form action='page02.jsp' target ="_self"> - >works correctly (load on the same page ..)
    but when :
    <form action='page02.jsp' target ="_blank"> -> this redirect page_expired.jsp
    why this ??
    Sometimes work and Sometimes not work...
    but now it does not work
    Excuse my english not is goog...
    Greetings From Lima - Peru

    Hi
    This problem ocurred when testing on my server of testing(this is in my office) ,
    but when test in the server machine of my house this work!!! great! ,
    not appear session expired.!!
    this theme of configuration ??
    if is ths ?
    what configure ?
    Please Help Me .
    I am using EASERVER 5.2 with JSP
    Bye! Greetings From Lima Per�

Maybe you are looking for

  • Line Charts - X-axis Labels as function of X-axis value

    Hi, 1) Is there a way to put X-Axis labels in line chart as function of X-axis values ? For instance, X-axis values are in minutes and I need to show those as Hours. I'm having Hours as separate column as well, but when its selected as X-axis value c

  • Where I'm wrong

    Hello, I use a Centura Database I want to read a file and then insert some data from each line into a database. The file I read has at least 640 lines. Everything works for 81 lines readed but then, I receive the following error message : " SQLExcept

  • Passing variables: Functions

    Sorry if this is nooby questions: How can i pass variables between functions in AS. I know how to return a value and you can pass parameters into a function but say I had an outer function (say "a") with a local var (say "vara") with a subtended func

  • Problems Display WebDynpro (Abap)

    Hi, my browser version für IE and firefox changed to IE 8.0.7601.17514 64bit and Firexfox to 24.1. Now our wd application will not be displayed in IE and not correctly display in firefox (see attached jpeg), here the table design can't be displayed c

  • EJB compilation problem

    I'm migrating from Weblogic 5.1 to 6.1, and I'm having a problem in the compilation of a bean, specifically: C:\weblogic\source\ebeans\orderEntity\build\ejbcgen\sae\ebeans\orderEntity\Order EntityImpl_k8wq8h_Impl.java:172: unreported exception java.l