JSP newbie: My first JavaBean

Hey guys. This is my first time with JSP, and I'm trying to create a JavaBean. I seem to be getting an error when I try to set up the following:
I have a folder called "test" which is the root of my app. Under this directory, I have a folder called "WEB-INF", then a folder called "classes" then the folder called "mathy". Under "mathy" I have a the java file called average.java along with the compiled class file.
The code for average.java is as follows:
package mathy;
import java.io.Serializable;
public class average implements Serializable {
private double total = 0;
public average(double n1, double n2, double n3) {
total = n1 + n2 + n3;
total = total / 3;
public double getAverage() {
return total;
then under the original "test" folder, I have a jsp page called "exp-1.jsp" with the following code:
<% mathy.average av1 = new mathy.average(34.4, 56.1, 694.3); %>
Now, I'm not trying to execute any methods, just trying to see if a bean can be made. But now luck. Can anyone help? Thanks, I really appreciate it.
I get the following error by the way with Tomcat Version 4.0-b5:
A Servlet Exception Has Occurred
org.apache.jasper.JasperException: Unable to compile class for JSPC:\jakarta-tomcat-4.0-b5\work\localhost\test\exp_0002d4_jsp.java:55: Class mathy.average not found.
mathy.average av1 = new mathy.average(34.4, 56.1, 694.3);
^
C:\jakarta-tomcat-4.0-b5\work\localhost\test\exp_0002d4_jsp.java:55: Class mathy.average not found.
mathy.average av1 = new mathy.average(34.4, 56.1, 694.3);
^
2 errors

it's fine to put package mathy. I use this method all the time. After that, you have to put this line at the top of your jsp page <jsp:useBean id="name_of_bean" scope="application" class="mathy.NameOfYourClass" />.
If you can't have your last modified jsp file, try the following steps:
1) Shutdown Tomcat and Start Tomcat again.
2) Delete your root directory on tomcat\work\your_root_directory
3) Close your IDE and open again.
Any one of the steps above will be abled to solve your problems. Otherwise, just let me know.
Good Luck.

Similar Messages

  • Jsp newbie having trouble using JSP's with Jdev 10.1.3

    Hi,
    Have been bashing my head for about two hours with this, if anyone can help will substantially improve my life.
    First off apologies if question is stupid or obvious I am a jsp newbie.
    Have been experimenting with using the Jsp Taglibrary for tabbed panes in a browser.
    http://www.ditchnet.org/tabs/
    I have followed all the installation instructions but in JDeveloper when I build I get the message
    Error(18,2): method setJspContext(javax.servlet.jsp.PageContext) not found in class org.ditchnet.jsp.taglib.tabs.handler.TabConfigTag
    Any idea what jar file I'm missing.
    I'm a bit lost, thanks

    Arrrrrrrrgh,
    Sorted my problem.
    Rebuilt project, works fine now, no idea what was going on (just generally!).
    Thanks for input Shay
    Mark

  • JSP newbie.  Strange classnotfoundexception

    I have recently started writing JSPs. I am an experienced Java programmer, but have not ventured into JSPs until just now.
    While writing some test JSPs, I have run into a big problem that I cannot seem to resolve.
    While attempting to run my JSP from IE, tomcat throws the following exception in the console window: java.lang.ClassNotFoundException: RTSite
    Also, unless I change the SITES_FN to "C:\\sites.dat" and place the sites.dat file in C:\, it tells me it cannot find the file. For example, if I change SITES_FN to simply "sites.dat" and place sites.dat in the C:\tomcat_5.5\webapps\ROOT directory alongside my outages.jsp file, it tells me it can't find it!
    How on earth do I fix this? What am I doing wrong?
    Here is my JSP:
    ===================================
    <%@page import="java.util.*,java.io.*,test.RTSite"%>
    <HTML>
    <BODY>
    <%!
         String SITES_FN = "C:\\sites.dat";
         String OUTAGES_FN = "outages.dat";
         String OUTAGES_TXT_FN = "outages.txt";
         boolean eof = false;
         RTSite site;
         //site = new RTSite("http://www.georgianavigator.com/perl/trips", "ATL", "Atlanta", "GA");
    %>
    <%
         site = new RTSite("http://www.georgianavigator.com/perl/trips", "ATL", "Atlanta", "GA");
         out.println(site.getName());     
         try
              FileInputStream in = new FileInputStream(SITES_FN);
              ObjectInputStream s = new ObjectInputStream(in);
              while (!eof)
                   try
                        site = (RTSite)s.readObject();
                        out.println("TEST" + site.getCode());
                   catch (EOFException ex)
                        eof = true;
              //s.close();
              //in.close();
         catch (Exception ex)
              out.println(ex.getMessage());
              System.out.println("=====");
              ex.printStackTrace();
    %>
    </BODY>
    </HTML>
    ===========================================
    Here is my directory structure:
    C:\tomcat_5.5
    +-----webapps
    -------+----ROOT
    -------------+----outages.jsp
    -------------+----sites.dat
    -------------+----WEB-INF
    -------------------+----classes
    --------------------------+----test
    --------------------------------+----RTSite.class                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Too many things to count.
    "ClassNotFoundException" isn't strange. Sounds like you didn't deploy your Web app properly.
    Is RTSite a class that you wrote? Where is the .class file located? (Hint: Should be in the WEB-INF/classes directory for your Web app, in its package directory structure.)
    Tomcat won't deal with any servlets or Beans that aren't in a package. If you aren't using packages, you'd better start.
    You should not be putting your app in /ROOT. Learn how to deploy Web apps to Tomcat properly. The Tomcat site has "Your First Web App" to show you how.
    You shouldn't have scriptlet code in a JSP like that. Better to learn JSTL.
    Your Web app should be self-contained. I'd expect to see everything I needed within the Web context. Tossing files like that site.dat just anywhere in the file system is a bad idea.
    The JSP is compiled to a servlet and run on the host server. I'll assume that you know this, and will place that sites.dat file accordingly.
    I'd always prefer a relational database to a static text file in the file system, but that's just me.
    That's enough for now.
    %

  • JSP newbie question

    Hello,
    I am trying to interface a service using JSP and servlets. I am getting a couple of difficulties, i would appreciate any help.
    I am using Tomcat 4.1 and Java 1.4.2. I initially have a jsp that has a form, the action is my servlet and the method is post. Among the things i submit in form I have an
    <input type=file name="thename">
    which i later try to retrieve in the servlet as:
    Object o=request.getAttribute("thename")
    This doesnt seem to work (always null) and don't know what to use instead.
    At some point i want to show status information back to the user at a certain refresh rate. How can this be done. If i output from the servlet html code with <meta http-equiv="refresh" content="10"> i get an error at the first refresh attempt.
    Thank you for any help,
    Gabri

    Yes sorry, it is parameter.

  • Help with Servlet - JSP Newbie

    I'm trying to teach myself jsp. I've created a couple of classes to do my data I/O. I have a form to collect user data and the page the form posts to should write the data to a text file. When I run the form and form handler the data is presented back to the user and everything looks fine... no errors or anything. However, the text file I'm trying to create/append does not get modified. Any suggestions would be greatly appreciated as I can't move on with what I want to do until I figure this out.
    Thanks,
    Steven Lee / EMC
    [email protected]
    I'm running Apache 2.0.52/Tomcat 5.5 on Win 2000. Here's my directory structure:
    C:\Apache\Tomcat 5.5.\webapps\ROOT
    /ROOT
    index.jsp
    OptIn.jsp
    show_email_entry
    /admin
    /WEB-INF -->web.xml
    /classes
    /business -->User.class
    /data -->UserIO.class
    /lib
    ***UserIO.class:***
    package data;
    import java.io.*;
    import business.User;
    public class UserIO{
    public synchronized static void addRecord(User user, String filename)
              throws IOException{
                   PrintWriter out = new PrintWriter(
                        new FileWriter(filename, true));
                   out.println(user.getEmailAddress() + "|"
                        + user.getFirstName() + "|"
                        + user.getLastName() );
                   out.close();
    ***User.class***
    package business;
    public class User {
         private String firstName;
         private String lastName;
         private String emailAddress;
         public User() {}
         public User(String first, String last, String email) {
         firstName = first;
         lastName = last;
         emailAddress = email;
         public void setFirstName(String f) {
              firstName = f;
         public String getFirstName() { return firstName; }
         public void setLirstName(String l) {
              lastName = l;
         public String getLastName() { return lastName; }
         public void setEmailAddress(String e) {
              emailAddress = e;
         public String getEmailAddress() { return emailAddress; }
    ***OptIn.jsp***
    <%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Untitled Document</title>
    </head>
    <body>
    <p>Join E- Mail List</p>
    <form action="show_email_entry.jsp" method="get" name="FRMjoinList" id="FRMjoinList">
    <input name="txFN" type="text" id="txFN">
    first name
    <br>
    <input name="txLN" type="text" id="txLN">
    last name <br>
    <input name="txEMAIL" type="text" id="txEMAIL">
    e-mail <br>
    <input type="submit" name="Submit" value="Submit">
    </form>
    <p> </p>
    </body>
    </html>
    ***show_email_entry.jsp***
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Untitled Document</title>
    </head>
    <body>
    <%@ page import="business.*, data.*, java.util.Date" %>
    <%
         String firstName = request.getParameter("txFN");
         String lastName = request.getParameter("txLN");
         String emailAddress = request.getParameter("txEMAIL");
         User user = new User(firstName, lastName, emailAddress);
         UserIO.addRecord(user, "UserEmail.txt");
    %>
    <p>Today's Date is <%=new Date() %></p>
    <H2>Thanks for joining our list</H2>
    <p>Here's your information:</p>
    <table width="300" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td width="92">First Name </td>
    <td width="208"><%=user.getFirstName() %></td>
    </tr>
    <tr>
    <td>Last Name </td>
    <td><%=user.getLastName() %></td>
    </tr>
    <tr>
    <td>E-Mail</td>
    <td><%=user.getEmailAddress() %></td>
    </tr>
    </table>
    <p>Click here to enter another address.</p>
    <form name="form1" method="post" action="optIn.jsp">
    <input type="submit" value="Return">
    </form>
    <p> </p>
    </body>
    </html>

    I just realized that the file is given as just a filename. No path.
    Are you SURE the file isn't being created, just somewhere you don't expect?
    Try putting a full path in there instead of just a filename.

  • Dreamweaver Newbie making first site.  Trying to figure out this CSS thing...

    This is my first attempt and first site with DW and am having some newbie issues.  The website is www.accuvisionvideo.com.  The site is based on a DW template I picked up from a website.  If you go to the page you will see a menu on the left hand side and the body of the page mostly in the middle.  I am using Studio VII pop menu magic for that menu.  I want to make the thing horizontal, but still keep the side bar area (the photos and such underneath the menu)  However when I make the menu horizontal it removes everything from the left side space and does not give me the option to work in there any more.  How do I place images and text in the left column?  If I am not mistaken its a CSS thing...Also is there anyway to place images anywhere on the page.  Now when I insert an image it seems to have to be either fltlft or fltrt, I can't put multiple images on the same line?   Anyway I know these are noob questions, thank for any help guys.

    GasMaskProductions wrote:
    This is my first attempt and first site with DW and am having some newbie issues.  The website is www.accuvisionvideo.com.  The site is based on a DW template I picked up from a website.  If you go to the page you will see a menu on the left hand side and the body of the page mostly in the middle.  I am using Studio VII pop menu magic for that menu.  I want to make the thing horizontal, but still keep the side bar area (the photos and such underneath the menu)  However when I make the menu horizontal it removes everything from the left side space and does not give me the option to work in there any more.
    The PVII menu will insert into any div on your page.  What you need to do is create a brand new div just below your header div and insert the pvii menu into that div.  This way the new div won't take any styles from any of the current div styles on the page.
    How do I place images and text in the left column?  If I am not mistaken its a CSS thing...Also is there anyway to place images anywhere on the page.  Now when I insert an image it seems to have to be either fltlft or fltrt, I can't put multiple images on the same line?   Anyway I know these are noob questions, thank for any help guys.
    If the images are too wide, they will drop down to the next line (like the images at the bottom of the entry page now.)
    the fltlft and fltrt,are classes, that float and image to the left or to the right, so you can have text surrounding the image.
    Also, for such a simple page you have over 78 errors when you put the page throught he html validator:
    http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.accuvisionvideo.com%2F
    The majority of them will certainly need fixing before creating any further pages using a similar layout.
    Just notice this also:
    .style5
                                        font-family :
                                        "Charlemagne Std";
                                        font-size :
                                        xx-large;
                                        color :
                                        #000000;
    That's not a web-safe font, if someone doesn't have that on their system, they will not see that font, they'll be served the default font
    of their browser set.
    More about Web Safe Fonts:
    http://www.ampsoft.net/webdesign-l/WindowsMacFonts.html
    Nadia
    Adobe® Community Expert : Dreamweaver
    http://twitter.com/nadiap
    Unique CSS Templates |Tutorials |SEO Articles
    http://www.DreamweaverResources.com
    http://csstemplates.com.au/

  • Newbie:  My first project.  Is my workflow correct?

    I'm a newbie, working with After Effects for only a few hours. I want to make sure I'm doing things properly. I started with baby steps with my first project as follows:
    I created a 9 second composition and added a single photograph to it.
    I see that AE comes with some cool animated backgrounds like "Apparition". I want that as my background. 
    Now, I'm asking myself, "how do I add this background to my composition?". Well I double-clicked on it to see what would happen. It seems to have replaced my photo. Not what I wanted.  Oops! 
    I had to wonder if there was some attribute within my photo layer that would allow me to add an animated background, but I could not find anything like this.
    Then I wondered, "do I have to make the animated background it's own layer?". If so, how? 
    The only way I could figure out how to do this was by adding a solid color layer below my photo, then double-clicking "Apparition". This created the background I wanted. But is this the correct way to do this?
    OK, now I added a second photo and want it's background different, like the "Cinders" background. And I want this photo duration to be 6 seconds.
    When I added my second photo (photo 2), I had the CTI at the start, so photo 2 starts at the same time as photo 1, not what I wanted. I also discover that my timeframe does not extend beyond 9 seconds. Now what do I do?
    OK, I set the composition to 15 seconds via Composition Settings. Then I drag my photo 2 layer bar I guess you call it, to start at the end of photo 1. Now I position the CTI at the start of photo 2 and add a solid color layer below it.
    To my surprise, the solid color layer starts at zero, not at the CTI!   So, now I have to drag it over to line up with photo 2. Isn't there a better way? Anyway, I add the "Cinders" background and now have what I want.
    Now I start to figure that a $1,000 program should have all kinds of features to aid you in the creation of videos. I find the Keyframe Assistant! Wow, let me start playing with this! 
    I delete photo 2 and its background, leaving just photo 1 and its background. I add photo 2 back again to the composition. Then I run the Keyframe Assistant with no overlap.
    First I notice that my composition is not long enough to contain all of my layers, so I change the composition duration to 1 minute. OK, I see that the Keyframe Assistant shifted all the layers, each layer starting where the previous one ended. So I grab photo 1's background layer and drag it back to where it is supposed to be. The lesson to be learned here, I guess, is that you add your photos first, use the Keyframe Assistant, then add your backgrounds.
    Then I notice something peculiar with photo 2's duration! It looks longer than photo 1's duration. Then I try, without avail, to quickly ascertain the duration of photo 2. I right-click on the bar hoping to see an option to view the layer duration.  Nope, not there!  The only way I know how to do this is by tediously looking at the start and end points of the bar in relation to the timeline. Isn't there an a easier way?
    I find out that the duration of photo 2 is 15 seconds, the duration of the entire composition. So now I remember that when you add a photo, it's duration will match the composition settings duration that you set. So, for every layer that you create, do you have to go back to the Composition Settings and set the desired duration for that layer?
    I'm learning a lot, but is my workflow correct, or are there much easier ways to accomplish the same thing?

    I strongly recommend that you begin at the beginning and start here to learn After Effects.
    Regarding some of your specific questions:
    > Then I wondered, "do I have to make the animated background it's own layer?".
    Yes.
    The reason that the Apparition animation replaced the image in your layer was that you had the layer selected when you double-clicked the animation preset. This applied the animation preset to the layer. If you make sure that you don't have any layers selected when you double-click the animation preset, this will create a new layer and apply the animation preset to the new layer. Or you could create a new solid, as you did, and apply the animation preset to that layer.
    Here's some basic information about animation presets.
    > To my surprise, the solid color layer starts at zero, not at the CTI!
    See the first note on this page, which describes the Create Layers At Composition Start Time preference.
    > Then I notice something peculiar with photo 2's duration! It looks
    longer than photo 1's duration. Then I try, without avail, to quickly
    ascertain the duration of photo 2. I right-click on the bar hoping to
    see an option to view the layer duration.  Nope, not there!  The only
    way I know how to do this is by tediously looking at the start and end
    points of the bar in relation to the timeline. Isn't there an a easier
    way?
    Select the layer and look in the Info panel. Duration is given there.
    > So, for every layer that you create, do you have to go back to the
    Composition Settings and set the desired duration for that layer?
    No.
    "The Still Footage preference setting (Preferences > Import) controls the default duration of layers that use still footage items as their sources. By default, when you create a layer with a still image as its source, the duration of the layer is the duration of the composition. You can change the duration of the layer after it’s created by trimming the layer. "
    (from After Effects Help)
    Again, I strongly urge you to begin at the beginning and start here to learn After Effects. Work your way through the basic materials first. It makes everything else so much easier.

  • How a jsp file call a javabean??

              Under weblogic70b ,where should I place the .class file?
              Do I have to do some configuration in web.xml file like servlet??
              Thanks.
              

    The application object is the servletcontext that is passed to the servlet/JSP by the server during initialization. If you want to use it in a JavaBean you'll have to pass it in.
    <jsp:useBean id="myBean" scope="session" class="beans.MyBean" />
    <% myBean.setApplication(application); %>
    and in MyBean
    import javax.servlet.*;
    public class MyBean {
       ServletContext sc;
       public MyBean() { }
       public void setApplication(ServletContext inSC) { this.sc = inSC; }
    }

  • [JSP/Newbie]: howto write my own jsp:include tag?

    Hi folks,
    I'm trying to write a replacement tag for <jsp:include> (which shall later decide upon its context what to include..), i.e. I want to include another JSP from within a tag.
    Unfortunately right now my best bet does not allow to control the position of the included JSPs output in my output stream - it prints directly :-((
    // index.jsp is my startpage:
    <%@ taglib uri="/cistags" prefix="cis" %>
    index.jsp START:
    <cis:include file="/theincludefile.jsp" />
    index.jsp ENDE
    // theincludefile.jsp is the included file
    -->INCLUDEFILE<--
    // include.java is my current idea to approach this:
    public class include extends TagSupport {
    private String jspName;
    public void setFile(String name) {
    this.jspName = name;
    public int doEndTag() {
    HttpServletRequest request =
    (HttpServletRequest) pageContext.getRequest() ;
    HttpServletResponse response =
    (HttpServletResponse) pageContext.getResponse() ;
    try {
    request.getRequestDispatcher(
    response.encodeURL(jspName)).include(request,response) ;
    catch (Exception e) { }
    return EVAL_PAGE;
    the result expected is:
    index.jsp START:
    -->INCLUDEFILE<--
    index.jsp ENDE
    but instead I receive:
    -->INCLUDEFILE<--
    index.jsp START:
    index.jsp ENDE
    So how can I get hold of the ouput generated by the JSP I'm calling through RequestDispatcher.include so that I can rewrite it into my own output stream here?
    Is someone out there able to point me into the right direction?
    Ingo
    [email protected]

    check this article out
    http://www.javaworld.com/javaworld/jw-09-2000/jw-0915-jspweb.html

  • JSP Newbie setup question

    I installed Tomcat 4.0.3 and I had IIS running on my Win2k system. I thought I could make JSP work using IIS but I read somewhere that you have to make some modifications to get it to work. Then I realized that I had Apache 1.3 installed on my system. I know that Apache is running ok because I can successfully get to the default home page. However, after installing TomCat, the instructions tell you to browse http://localhost:8080 to get to the TomCat default page but I get a page not found error. Any ideas?

    After looking at it further, your right, the Tomcat server didn't start. I thought it was running but it is not. I run the startup.bat file and it launches a window but it closes too quick to show me the error msg. I tried launching the shutdown command anyway and got this for an error:
    C:\Jakarta\jakarta-tomcat-4.0.3\bin>shutdown
    Using CATALINA_BASE: C:\Jakarta\jakarta-tomcat-4.0.3\
    Using CATALINA_HOME: C:\Jakarta\jakarta-tomcat-4.0.3\
    Using CATALINA_TMPDIR: C:\Jakarta\jakarta-tomcat-4.0.3\\temp
    Using JAVA_HOME: C:\j2sdk1.4.0_01\
    Exception during startup processing
    java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina
    at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardC
    sLoader.java:1127)
    at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardC
    sLoader.java:992)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:218)

  • JSP newbie (from PHP)

    Hello!
    I want to re-write my php code into servlets or jsp.
    so, how do I do an include directive to include headers and footers such as in php with include("header.php") ?
    jason

    <jsp:include page="header.jsp" />

  • Jsp newbie, please help about @include

    I am new to JSP.
    I have two jsp files, say , jsp1 and jsp2.
    JSP2 is perfectly working. I want to display the result of jsp2 with the result of jsp1.
    But I additionally want to supply a value from jsp1 to a variable in jsp2 before calling jsp2.
    The result of jsp2 depends on the value supplied.
    I couldn't figure out how to do this. A simple @include directive like
    <%@ include file="jsp2.jsp" %> doesn't seem to be suitable here.
    What options are available here? Please help.
    Thank you.

    Thank you friends for the suggestion. I have yet to try your suggestions.
    Before that I came across another problem. Would someone help please?
    Why the jsp fails when I include the same JSP page twice in another jsp page?
    Of the following two jsp files, the upper one is OK, but the lower one complains that it cannot compile (org.apache.jasper.JasperException).
    test1.jsp:
    <html><head><title></title></head>
    <body>
    <table>
    <tr><td><%@ include file="single.jsp" %></td></tr>
    </table>
    </body>
    </html>
    test2.jsp:
    <html><head><title></title></head>
    <body>
    <table>
    <tr>
    <td><%@ include file="single.jsp" %></td>
    <td><%@ include file="single.jsp" %></td>
    </tr>
    </table>
    </body>
    </html>
    I want to populate the cells of an HTML table with the results from the same jsp file, by supplying different values to a variable in the jsp file so that its results will be different for each cell. Am I being to foolish here?
    Thanks.

  • JSP newbie - exception handling question

    I have created a method in the declarations sections of my jsp. When a particular exception is found (caught inside my method), i want to be able to redirect the output to either another jsp page, or simply print a message on the page in which the exception occurred. I am having some trouble figuring this out. Any advice?

    There are many ways to do so.
    One way is to define error pages. The details about this is given in the article below
    http://java.sun.com/developer/EJTechTips/2003/tt0114.html
    Other way is to do something like this :
    if ( haveError ) {
    out.println( errors.toString());
    pageContext.include( "GetName.jsp" );
    } else
    pageContext.forward( "NextPage.jsp" );
    But, I have a suggestion, if possible, do not put method declaration in JSP pages. Its not a good practice. Put all the code in beans. JSP should only contain display stuff.
    Vaibhav

  • JSP Newbie need help

    Hi to all,
    I'm very new in using JSP, I was debugging an existing JSP codes when I encounter this problem. There's this two files these are as follows:
    resourcecenter_requestinfo.html / resourcecenter_requestinfo.jsp
    contact_requestinfo.html / contact_requestinfo.jsp
    From what I have observe there's a confilict on the _requestinfo subtitle part of the filename because when I try to execute this code the template for contact and resourcecenter overlapped. What I mean by overlapped is both output of those template appears after execution.
    I hope someone could help me on this or give me some tips.
    Thansk in advance....!
    Regards,
    John Drayton C. Fule
    Jr. Systems Engineer
    Imperium Techonology Inc.
    Philiipines

    ok thanks I double check it and try to rename it and it works. But another problem occurs. The looks of the output it not what I expected. some colors turned to red. Is there any way i can determine why it happen.

  • Jsp newbie - quantity*price=�total - help!

    Hi, im new to jsp and have made a few pages, and can display them using Tomcat, ive made a page counter and managed some validation of a form, but i cannot get this to work:
    i have a form where you can select a product, then type in the price and quantity, so when you press order, it should display a page showing you what you chose and the total cost, (tryin to also use dp2??) , but im gettin in a right mess! i have ziped the two pages here: http://www.severnvalebathrooms.co.uk/ordermarbrex.zip
    if someone could have a look, any help would be great!
    thanks

    what level feedback do you have on your server.
    look at variable names,
    you have:
    <%
        String quantity    = request.getParameter( "quantity"    ); 
        String price       = request.getParameter( "price"      );
                                                 // Create a convert for 2 decimal places
        java.text.DecimalFormat dp2 
                            = new java.text.DecimalFormat( "�#,##0.00" );
                                            // convert a string to type int                
        int    quantity = Integer.parseInt(   quantity ); 
                                            // convert a string to type double         
        double price    = Double.parseDouble( price    );
        String strips      = request.getParameter( "strips"      );     
        String whofor      = request.getParameter( "whofor"      );
        String bluemosaic  = request.getParameter( "bluemosaic"  );         
        String greenmosaic = request.getParameter( "greenmosaic" );         
        String beigemarble = request.getParameter( "beigemarble" );         
        String delivery    = request.getParameter( "delivery"    );
        if( bluemosaic  == null ) bluemosaic  = "";
        if( greenmosaic   == null ) greenmosaic   = "";
        if( beigemarble == null ) beigemarble = "";     
    %> you should have like;
    <% 
        String quantity    = request.getParameter( "quantity"    ); 
        String price       = request.getParameter( "price"      );
                                                 // Create a convert for 2 decimal places
        java.text.DecimalFormat dp2 
                            = new java.text.DecimalFormat( "�#,##0.00" );
                                            // convert a string to type int                
        int    quantities = Integer.parseInt(   quantity ); 
                                            // convert a string to type double         
        double dPrice    = Double.parseDouble( price    );
        String strips      = request.getParameter( "strips"      );     
        String whofor      = request.getParameter( "whofor"      );
        String bluemosaic  = request.getParameter( "bluemosaic"  );         
        String greenmosaic = request.getParameter( "greenmosaic" );         
        String beigemarble = request.getParameter( "beigemarble" );         
        String delivery    = request.getParameter( "delivery"    );
        if( bluemosaic  == null ) bluemosaic  = "";
        if( greenmosaic   == null ) greenmosaic   = "";
        if( beigemarble == null ) beigemarble = "";     
    %> then change output vars to reflect this at bottom of page.
    also i would do some checking of input vars
    try calling this;
    process_marbrex.jsp?quantity=xyzkind regards,
    g00fy

Maybe you are looking for

  • Yosemite and Bootcamp Windows 7 booting problem

    Hello all, I upgraded to Yosemite from Mavericks from the App store on a MBP 2013 late which also had windows 7 installed on it using bootcamp. I can boot into Yosemite and Windows 7 by going to start up disk and selecting the OS and then restarting

  • Storing iMovie events and projects on a time capsule

    All I can say is Apple hasn't made this one as easy as drag and drop.  Have tried many configuration options on my TC, keep getting a message that the iMovie can not be moved required by the OS? I'm open...

  • Too many photos, how to organize?

    I have a macbook pro and with two little boys, our hard drive has been filled up with photos.  What is the best way to remove these photos from our computer but still keep them accessible and usable in iphoto?  We do have a time capsule, which might

  • Need help networking a photosmart 7960 to a windows 7 64 bit system from an XP Home 32 bit

    I'm trying to network an HP photosmart 7960 to a wireless notebook with Win 7 64 bit where the printer is connected via usb to a windows home 32 bit computer. Have downloaded vista 64 bit drivers for the printer but can't install them on the windows

  • Connecting to CUCM 6.0 Informix DB

    Is it possible & and can I coonect using Crystal Reports to the Cisco Informix Database on CUCM 6.0?