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

Similar Messages

  • I can't upgrade my Mac to OS Mavericks. I still don't know the problem why. I have my mac with OS 10.8.5 and also a 2012 model . Please help me :((

    I can't upgrade my Mac to OS Mavericks. I still don't know the problem why. I have my mac with OS 10.8.5 and also a 2012 model >.< Please help me :((

    Oh that really works ;D Thanks

  • 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

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

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

  • 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

  • I just wanna buy a new iOS device and I'm confused between the iPod touch 5th generation, iPhone 4s 8GB, iPad 4th generation 16GB and iPad mini with the retina display 16GB model. Please help me figure out.

    I have an iPhone 4s 16GB Model and I've been using it for about more than an year now. The reason I wanna get a new iOS device is because my 4s has got lots of scratches now and it's ambient light sensor seems not to work properly. Apparently, another reason is that the iLife and iWork suit are not free for me as my device is older and new devices get those softwares for free.
    I thought to go with a new iPhone 4s again but the problem is that new 4s come with only 8GB of storage and they don't support AirDrop. So next, I thought to go with an iPod touch 5th gen because of its jaw-dropping design, bigger screen, more storage and AirDrop support. Because iPod touch is phone-less iPhone and they come at affordable price, I can also buy any cheap cell phone like moto e to replace my current iPhone 4S.
    Another options that I thought a little bit on, is iPad 4th Gen and iPad mini with Retina display 16GB.
    Now, should I just stick with my current 16GB iPhone 4s, or get a new one.
    Or should I buy an iPod touch 5th gen and moto e (since iPod can't make phone calls)
    Or should I go with one of the two iPad models that I aforementioned.
    Awaiting your valuable suggestions.
    Thank you!

    Found one on best buy
    http://www.bestbuy.com/site/Belkin+-+Grip+Neon+Glo+Case+for+Apple%26%23174%3B+iP od%26%23174%3B+touch+5th+Generation+-+Pink/1331013.p?id=1219050712926&skuId=1331 013
    by Belkin, so a place to start.
    They're a lot more expensive, but Griffin has some of their 'survivor' cases with sealed ports, so you could cover up the ones you don't need.
    If best buy isn't an option for you, at least there's a manufacturer to look for.

  • 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

  • Mail server model! (Please help me)

    Dear all,
    Now i am having problem, i want to create a server and client app.
    User logs in client monitor and anytime server recieves a message that sent to that person will show an alert on a client screen!
    This works like chat program! But i wonder some problems:
    1 - when user login in client app, i created an connection to server and we will remain this connection all time until that user sign out?
    2 - i want when user login successfully, client app will be minimized or show small icon like yahoo messenger at the bottom-right of the screen, i'm quite new one in java so it is quite difficult to me!

    This works like chat program! But i wonder some problems:
    1 - when user login in client app, i created an connection to server and we will remain this connection all time until that user sign out? It could "remain this connection all time". Or it could die in the middle for a reason you'll never even be able to know. Your code will need to be able to detect / recover from connection failures.
    2 - i want when user login successfully, client app will be minimized or show small icon like yahoo messenger at the bottom-right of the screen, i'm quite new one in java so it is quite difficult to me!This isn't a networking question, so address it elsewhere in the appropriate forum.

  • 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 ME, should i buy a macbook pro 2011?

    please help me if the problems of the new model they can fix it with an update or if mac need to fix the entire model? please help me

    No! Don't get it.
    I am having so much trouble.
    I bought the new MBP 17 and used it for three weeks and I had at least 10 crashes.
    My DVD drive didn't work for a week and my friend told me to restart it and it worked.
    Just right now, my battery wasn't charging so I had to restart again and it worked.
    I don't know. Yeah the hardware is pretty and the customer service is all great but I am so disappointed by their performance.
    I 've been using Window 7 at work for 3-4 months and I didn't have any crash and any problem.
    I think it's great for doing daily tasks but as a professional use, I don't recommend it.

  • Colourmaps. Please help

    I am developing a colour palette much like the one used by Microsoft paint. I however do not know how to program this in java and was wondering if anyone can help me out in this difficult task. The thing is I need to program the RGB colour model and the HSL colour model.
    Please help.

    Can't you use the JColorChooser?
    It has a highly customizable API and you can do very powerful things with it.
    Have a look at
    http://java.sun.com/docs/books/tutorial/uiswing/components/colorchooser.html

  • Please help.  Got TopLink working, but now I can't run a JSP page

    I am using JDeveloper 9.0.3.
    I got TopLink working successfully. Meaning I can access the DB using my mapped TopLink classes from my java code in JDeveloper.
    However, now I can't even run the default .jsp page.
    I am getting the error:
    Error instantiating application at file:/C:/LBIT/LBIT-oc4j-app.xml: Error parsing data-sources config at file:/C:/LBIT/LBIT-data-sources.xml: Fatal error at line 0 offset 0 in file:/C:/LBIT/LBIT-data-sources.xml: The encoding "windows-1252" is not supported.
    If I go change the "LBIT-data-sources.xml" file to "ISO-8859-1," as soon as I run the .jsp page (from JDeveloper) the "LBIT-data-sources.xml" file gets overwritten with a new one that contains the "windows-1252" encoding line again.
    What can I do to fix this???
    I know someone else has run into this problem!!!
    Please help. Thanks so much.
    Andy

    You could change the encoding by doing the following.
    Stop Embedded OC4J Server (Run | Terminate | Embedded OC4J Server)
    Tools | Preferences
    Select Environment
    Change the Encoding to ISO-xxxxx
    Click OK
    Run your JSP now.
    Atleast this should fix encoding generated into data-sources.xml
    raghu
    JDev Team

Maybe you are looking for