Jsp beginner

Sorry for the trifle question..........
I am new to JSP and would like to begin coding........ What do I need to install so that I can compile the code and view the results locally on my IE browser........
In what folder do I have to store my program files. What extension should my program files have. (ie: .html, .jsp)
My operating system is Windows ME. I have a 1Gig pentium3 processor and 128 megs of ram.
What is the best method of install........
Thanks for the help........

u need to put javawebserver2.0. Download it from java.sun.com.
Or any other server like tomcat or jrun.
Then the storing of program is different in all this. In javawebserver u need to put ur jsp in
\example\jsp\samples\urjsp.jsp
and run it from ur browser
do this and write if u come across any problem
bye,
Samir

Similar Messages

  • JSP beginner's question

    I have a standalong application using Swing. Im converting it to a web / JSP/Servlets application.
    Can my JSP acess my database using the same classes it used to or should I configure in my Tomcat a data source and call my database using the jndi name ?
    thx in advance,
    Giselle

    You can use the same classes but from my standpoint there is a good gain by using the Tomcat JNDI DB stuff. I'd really consider porting your stuff over.
    One thing- your existing classes were probably written for the Swing app to allow one user at a time per instance of your code. The Jakarta DB stuff allows connection pooling, which will be important since JSP takes you to a multi-user scenerio.

  • Jsp beginner and dout.

    Hi all,
    I done some projects in JSP.
    I didn't understand why we should use java beans.
    Can u tell me what is the use of using java beans in jsp page ?
    Why we shlould use ?
    What is the necessity ?

    By using Java beans we can separate the presentation and the logic, we leads to more clarity and moreover resusability...
    for example you can make a bean and within it a methd, that connects to the databse and executes queries, now instead of establishing a connnection in each jsp page, u can simply make an object of the bean, and use its method.
    apart from re-usability, another advantage it wud offer is that any changes made in the code where you establish the connection, wud not have to be done for each jsp, it can be done centrally.
    these are just some of the reasons why we use beans.

  • JSP beginner.  class problems

    Hello,
    While following the example tutorial at
    I got the following error after submitting the form when attempting to test the app: http://www.jsptut.com/Forms.jsp
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: userdata/UserData (wrong name: UserData)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    java.lang.NoClassDefFoundError: userdata/UserData (wrong name: UserData)
         java.lang.ClassLoader.defineClass1(Native Method)
         java.lang.ClassLoader.defineClass(Unknown Source)
         java.security.SecureClassLoader.defineClass(Unknown Source)
         org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1626)
         org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:850)
         org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1299)
         org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1181)
         org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1210)
         org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1116)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
         org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
         org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
         org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
         org.apache.jasper.compiler.Generator.generate(Generator.java:3268)
         org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:189)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:296)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
         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.4 logs.

    SOLVED !!!
    My fault...DUH! The system was working fine, I just couldn't see it.
    Synopsis:
    I had 3 JSPs. JSP1 uses jsp:forward to JSP2 or JSP3 depending on condition.
    All 3 JSPs loaded the same corploginDataBean using jsp:useBean.
    I corrected JSP1, but kept getting ClassLoad failure. I thought (wrongly) the message
    pertained to JSP1, when it had got into JSP2 and was failing there. Once I corrected JSP2 and
    JSP3, all went well.
    (I teased out the solution by changing the name of the loaded bean in JSP1 to something
    completely different, yet it still complained about ClassLoad failure of corploginDataBean...which
    made me wonder....why the heck are you still asking for the OLD bean name?...and that tripped
    the solution.
    Pity the stack doesn't reveal that the flow had passed from JSP1 to JSP2. All it shows is that
    forward has been invoked, but where it's gone. Ah well.
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:683)
         at
    org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:431)
         at
    org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:355)
         at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:414)
    (No hint of which new JSP/Servlet has been entered, just doForward() has been invoked)
    --- eom ---

  • JSP beginner needs help

    Hello. I am trying to learn J2EE, so please forgive me if I sound incredibly dense asking these questions. I have two JSP files, GetName.jsp and NextPage.jsp, which I am trying to run under Tomcat. Here are the listings.
    GetName.jsp:
    <HTML>
    <BODY>
    <FORM METHOD=POST ACTION="NextPage.jsp">
    What's your name? <INPUT TYPE=TEXT NAME=username SIZE=20>
    <P><INPUT TYPE=SUBMIT>
    </FORM>
    </BODY>
    </HTML>
    NextPage.jsp:
    <%
    String name = request.getParameter("username");
    session.setAttribute("theName", "username");
    %>
    <HTML>
    <BODY>
    Hello, <% session.getAttribute("theName"); %>
    </BODY>
    </HTML>
    Two questions:
    1. I tried to save GetName as just an HTML, but I got a message saying, "The requested resource() is not available." I had to save it as a JSP to get it to work. Is it possible to save GetName.jsp as an HTML and still get it to work? If so, how?
    2. When I click on the button in GetName.jsp, NextPage.jsp does come up, but the string I entered in the field doesn't show up. All I get is "Hello,". What am I doing wrong here?

    FHSerkland wrote:
    1. I tried to save GetName as just an HTML, but I got a message saying, "The requested resource() is not available." I had to save it as a JSP to get it to work. Is it possible to save GetName.jsp as an HTML and still get it to work? If so, how?It sounds like you've placed the HTML page in the wrong location or not hitting its URL correctly. Your HTML is also extremely dirty, not well-fromed and not quoting attributes.
    2. When I click on the button in GetName.jsp, NextPage.jsp does come up, but the string I entered in the field doesn't show up. All I get is "Hello,". What am I doing wrong here?
    <%
    String name = request.getParameter("username");
    session.setAttribute("theName", "username");
    %>You know you are assigning "username" literal, not the parameter value, right?
    <% session.getAttribute("theName"); %>You need to print to the output stream when inside of the scriptlet like this:
    <% out.print(session.getAttribute("theName")); %>or like this:
    <%= session.getAttribute("theName") %>

  • JSP dynamic form processing

    Hi, I'm a JSP beginner. I have a form, which contains several tables. The number of the tables is not fixed. All the tables have the same data structure, just the size of them are not the same. Now I need to submit the form and then use JSP to process the data in it. What I know is to use JavaBean to deal with a form with fixed number of inputs. But if the number of inputs is not fixed, like what I described above, is there any efficient way I can use to read it with JSP?
    Thank you!

    When you submit a JSP page, each input tag in the form must have a unique name so that whatever you submit the JSP page to can read those unique name/value pairs of values.
    If you have a list of indeterminate length (myArray.size() ), here is an example of how you would give each textfield a unique name:
    <%for(int ii=0;ii<myArray.size();++ii){%>
    <input type="text" name="firstName_<%=ii%>" >
    <%}%>
    In the above, the first textfield name will be firstName_0, the second would be firstName_1, etc.
    Back on the servlet, you read it as follows:
    for(int ii=0;ii<myArray.size();++ii){
    String firstName= request.getParameter("firstName_"+ii);
    }

  • JSP 101

    I am brand new to JSP and need a good JSP tutorial site to start building JSP. Please provide urls for me to start with. Also any recommendations of good JSP beginner books??
    Thanks

    Hans Bergsten's O'Reilly book is excellent. - MOD

  • Configuration problem?

    Greetings,
    this might well be a very stupid question to you who are in the knowing,
    but this is my problem: I started using servlets (together with the Spring
    framework) and JSPs using Tomcat 5.5 as the servlet container.
    I configured everything by hand and the first rudiments of my application
    ran quite ok. Someone advised me to use WTP (an eclipse plugin)
    together with SpringIDE instead.
    Being the good boy that I am, I installed the plugin and the SpringIDE
    nature and all of a sudden my cripple HTML/JSPs were validated
    which is a Good Thing (TM).
    Except for one thing. A simple:<c:out value="${status.value}"/>doesn't work anymore, i.e. when the page is being compiled, the compiler
    whines about:org.apache.jasper.JasperException: /WEB-INF/jsp/sql.jsp(24,44)
    According to TLD or attribute directive in tag file, attribute
    value does not accept any expressionsIMHO that is just silly and would render the <c:out> tag useless if that
    were true. I suspect the compiler is validating against some wrong
    schema but I don't know how to fix it. Any takers?
    FYI, I did include the taglib directives at the top of my JSP file:<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
    <%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %> 
    <%@ taglib prefix="spring" uri="/spring" %>Thanks in advance and
    kind regards,
    Jos (JSP beginner)

    Hi, yes it can be very confusing! Any classes and
    resources you put in jar files in the /WEB-INF/lib
    directory of your WAR file are made visible to the
    containing web application, but to no others, via a
    WebappX classloader. Here is a link showing the
    various classloaders tomcat employs and where they
    look:
    http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html
    And yes, if the jar file contains a subdirectory
    named meta-inf and that sub-directory contains .tld
    file(s) then tomcat 5.x will read those files and
    determine automagically (lol) what tags are available
    to any .jsp page in the containing web application.
    So if you look in the jars you will see these tld
    files and their respective uri's. This is what I mean
    when I say look in the spring jar and you will find a
    uri you can use rather than declaring the taglib in
    your web.xml file. Documentation wise I can't suggest
    anything really as I've just sort of found this stuff
    out as I've gone along.Well, all I can say is "chapeau" (hats off) and thank you very much. I did
    as you advised and everything runs perfectly. It all is starting to make
    sense now for me after being totally lost with this set-up. How come
    there's no proper documentation available for all this and how come
    there are so many (obsolete) versions roaming around?
    It certainly doesn't make web-based programming feel like there are
    solid standards around to help you out. All those contradicting tips and
    hints all over the place, no authoratative documentation (I couldn't find
    it for starters). This is like a rodeo where this web thingy acts as a
    raging bull ... all those different technologies with all their different
    versions in existence ... This makes program development another type
    of voodoo instead of a science related activity. I suspect it's a "time to
    market" type of thingy going on here ...
    I hope you'll forgive me my little rant and I hereby thank you again a lot:
    your hints, tips and advice have helped me tremendously and I feel I
    have the courage again to dig deeper and deeper into this drifting world
    of wannabe standards and versions and technologies ...
    kind regards,
    Jos

  • Still stuck with report problem

    Hi guys,
    As you said i downloaded crystal report and ireport.I tried to connect my database to ireport.i got it.i can view my report .but now i dont know how to call the jxrml file from jsp.i googled alot but couldnot find anything suitable for a jsp beginner.Please help me to solve this.I am in a dead end.

    In your example you selected the pair with the greatest
    distance from the first set, and the pair with the least
    distance from the second. I don't see how the distance
    function was used.
    Also it's not clear to me that there is always a solution,
    and, if there is, whether consistently choosing the
    furthest or the closest pairs will always work.
    The most obvious approach is to systematically try
    all possibilities until the answer is reached, or there
    are no possibilities left. This means backtracking whenever
    a point is reached where you cannot continue. In this case
    backtrack one step and try another possibility at this
    step. After all possible choices of the previous step,
    backtrack one more step and so on.
    This seems rather involved, and it probably is.
    Interestingly, if you know Prolog, it is ridiculously
    easy because Prolog does all the backtracking for you.
    In Java, you can implement the algorithm in much the same
    way as Prolog implementations do it--keep a list of all the
    choice points and work through them until success or there
    are none left.
    If you do know Prolog, you could generate lots of random
    problems and see if there is always a solution.

  • The basics

    Can someone please point me to a good basic overview tutorial of JSP/servlets/web apps
    I have searched in vain: all I get is stuff which assumes one knows the basics. I need to understand how all the different components fit together. Many thanks

    Try:
    http://en.wikipedia.org/wiki/Jsp
    And...
    http://www.google.ch/search?hl=de&q=jsp+beginner&meta=
    http://builder.com.com/5100-6387-1050460.html

  • Collecting values from multiple check boxes with same name

    Hi,
    I have a jsp-page with one form with several check boxes sharing the same
    name (but with different values).
    Can I collect the values in an array/list or something?
    /jsp-beginner and google ain't my friend in this case

    this answer not good enough for you?

  • Beginner to learn jsp, need help!

    hello, i am beginner to learn jsp..i don't know what i should do...pls tell me what i should do now for a beginner...i also need some tutorial that help me to learn jsp..can anyone give me the address to link to there??? i also don't know are me should to install tomcat??? i don't have to use the tomcat...

    first, you have to setup a jsp environment, include web server and database server.
    www.jspin.com
    www.jspindex.com
    www.code4u.com
    try to get some resources over these web site.
    good luck

  • Beginner trying to get my beans to work with jsp on tomcat

    Please help me open my eyes!
    I know this is a stupid oversight on my part, but I've been working for days on getting other things to work on my tomcat server, so I'm out of ideas on this one.
    I've followed all the tomcat docs instructions on where to put my jsp and bean files and set my classpath to where my beans are located. jsps work fine for me but when I try to run this jsp that uses my CalcBean, I get this and similar internal server errors:
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 1 in the jsp file: /jsp/calc/calculate.jsp
    Generated servlet error:
    C:\jakarta-tomcat-4.0\work\Standalone\localhost\research\jsp\calc\calculate$jsp.java:56: Class org.apache.jsp.CalcBean not found.
    CalcBean calc = null;
    ^
    Do I need to register my bean somewhere like web.xml?
    Thanks so much in advance for any help!!

    rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww

  • Beginner's question: how to call JSP

    Hi,
    Is the following a right way to call a JSP?
    GET /app/im/iClient.jsp?user=[email protected]&pass=welcome HTTP/1.1
    Host: st5.abc.com
    I am trying to manually send a HTTP request. I am sure the directory is right, but no response. Should I use "POST" instead of "GET"?
    Thank you!

    I dont believe that... If you're trying to get a response InputStream, or the response formatted as some object, for a request to an HTTP server, and you are just now writing Socket connection stuff, then you can just replace that with URLConnection and let it do the work given a URL.
    Otherwise, you should already have a class which uses Sockets internally to get what you want, and you shouldn't be asking us this question because it should take a URL and make the connection and give you what you want...
    I don't see any other possible "stage" at which you could be at that you need to a) use Sockets over URLConnections, b) need to know the details of HTTP, and c) can't change one or the other.

  • JSP with useBean beginner problems need help

    I start to learn JSP and now I am facing a problem which cannot be solved for a whole day.
    I make a simple JSP and want to use a my defined class to make some logic outside JSP file. It can be built by "ant build".
    But there is always an error-message when I see through browser. Also, I have already "ant deploy" to copy all classes in WEB-INF/classes/...
    Besides, my tomcat can run JSP without importing external class or javaBean.
    Please help. I really have no idea. Thanks.
    The simple Converter.class in Test.Beans package
    package Test.Beans;
    import java.math.*;
    public class Converter {
         static BigDecimal yenRate = new BigDecimal("131.7800");
         static BigDecimal euroRate = new BigDecimal("0.0084");
    public BigDecimal dollarToYen(BigDecimal dollars) {
    BigDecimal result = dollars.multiply(yenRate);
    return result.setScale(2,BigDecimal.ROUND_UP);
    public BigDecimal yenToEuro(BigDecimal yen) {
    BigDecimal result = yen.multiply(euroRate);
    return result.setScale(2,BigDecimal.ROUND_UP);
    public Converter() {}
    The simple JSP:
    <%@ page import="java.math.*" %>
    <jsp:useBean id="c" class="Test.Beans.Converter" scope="page"/>
    <html>
    <head>
         <title>Converter</title>
    </head>
    <body bgcolor="white">
         <FONT SIZE=+1>
         <h1><center>Converter</center></h1>
         <hr>
         <p>Enter an amount to convert:</p>
         <form method="get">
         <input type="text" name="amount" size="25">
         <br>
         <p>
         <input type="submit" value="Submit">
         <input type="reset" value="Reset">
         </form>
         <%
         String amount = request.getParameter("amount");
              if ( amount != null && amount.length() > 0 ) {
              BigDecimal d = new BigDecimal (amount);
         %>
         <%= c.yenToEuro(d) %> Euro.
         <%
         %>
         </FONT>
    </body>
    </html>
    Here is the error message:
    org.apache.jasper.JasperException: /main.jsp(2,0) The value for the useBean class attribute Test.Beans.Converter is invalid.
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    org.apache.jasper.JasperException: /main.jsp(2,0) The value for the useBean class attribute Test.Beans.Converter is invalid.
         org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
         org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:405)
         org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:146)
         org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1174)
         org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1116)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
         org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
         org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
         org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
         org.apache.jasper.compiler.Generator.generate(Generator.java:3304)
         org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:198)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:303)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    Message was edited by:
    BillyHui

    Works fine for me, copied and pasted exactly.
    Try recompiling your java class again, to make sure it is valid.
    Check that the class file is copied into the correct place by your ant build.
    Should be WEB-INF/classes/Test/Beans/Converter.class

Maybe you are looking for

  • Error while making excise invoice

    Hi When i post excise invoice then i receive error No matching record found 'G/L accounts'(OACT)(ODBC-2028) i have given accounts to all excise formulas ie A/ptax account and A/Rtax account of  BED,Cess and Vat. how to solve? Thanks

  • Should I go utf8 all the way?

    I think I need some advise on the topic of encodings. My system right now is a mess: One old Windows partition (NTFS), one shared FAT32 partition, both with files from a long time ago in i don't know which encoding, filenames with and without non-asc

  • How do you make a new action that adds a signature?

    I want to make a new action that performs OCR, and then adds a drag and droppable signature to the top of the document. I figured out how to do the OCR, but I dont see an option for adding a signiture. How can this be done?' I have acrobat pro x

  • Recognising ip address but can't display page

    please please please help me!!! everything seems fine. the network connection shows it's connected, signal - excellent. it's got an ip address assigned, everything looks perfect. but i just can't connect to a site on internet explorer!!! and i know i

  • Glitchy typing when hands are on sides of trackpad.

    My 2006 MacBook is glitchy if my hands rest on either side of the trackpad. It will randomly delete chunks of text or move the cursor and begin entering text elsewhere. It's really annoying, and I've lost a lot of work because of it. Help? (And thank