• RELEVANCY SCORE 3.35

    DB:3.35:Ajax Issues pf





    I am working with ajx project in servlet and jsp in which i have used inner html pages within the index page but when i try to submit in the inner page it submits the values to the index page action.. please help me making the inner page submit button work. the submit button in index page and inner page both user post method .

    DB:3.35:Ajax Issues pf

    the inner pages are div contents ...
    and can u tell me the method to dispach a servlet from other servlet.

  • RELEVANCY SCORE 3.06

    DB:3.06:Problem With Jsp za





    Hi,

    Iam working on struts application , which is deployed on jboss server.
    the application has functionality like users can submit their request through this application.here problem is:
    some times create request form is working fine and users are able to submit request and some times not able to submit the request(whenever they click on submit button, just jsp page refreshes and giving same jsp page with out any error). it is not giving any error also.

    could you please some one help me out?

    DB:3.06:Problem With Jsp za

    There can be only one answer: you made a mistake somewhere that only causes this unwanted behavior under certain conditions. So what you need to do is figure out those conditions, and that will require some debugging on your part.

    One thing to look are quotes. Perhaps you fill in certain values of the form yourself using JSP output and at times those values may contain a quote that make the html markup invalid.

    There really is no more advice I can give you without having access to the source of the JSP.

  • RELEVANCY SCORE 3.03

    DB:3.03:User Authentication Prob 9j





    Hi,
    I have a web application consisting of several jsp's and a servlet. To access jsp2.jsp below, I must make use of login.jsp. And if I go to jsp2.jsp and I click on the text, I go to jsp3.jsp. The thing is, I don't wanna use "request.getParameter" as I am currently doing, since this is not working properly. I would like to use sessions instead. Anyone know how I can achieve this?

    login.jsp
    !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

    html
    head
    titleLogin/title
    link rel="stylesheet" href="style/edx_styles.css" type="text/css" /
    /head
    %@include file = "logo.html"%
    body
    table cellpadding="0" cellspacing="0" border="0" width="100%" align="center"
    form action="myservlet" method="post"
    input type="hidden" name="action" value="LOGIN"
    tr
    td
    table cellspacing="0" cellpadding="0" border="0" width="80%" align="center"
    trtd colspan="2"

    /td/tr
    tr
    td class="formlabel" align="center" colspan="2"Enter login Details

    /td
    /tr
    tr
    td width="50%" align="center" class="formlabel"Username:/td
    td input type="text" name="username" maxlength="255"/
    /td
    /tr
    tr
    td width="50%" align="center" class="formlabel"Password:/td
    tdinput type="password" name="password" maxlength="255"//td
    /tr
    trtd colspan="2"/td/tr
    tr
    td align="center" colspan="2" input type="submit" value="Submit" class="formbutton" value="Logon"//td
    /tr
    /table
    /td
    /tr
    table
    /body
    /html

    jsp2.jsp

    %@page session="true" import="java.util.*, java.sql.*%
    html
    head
    title
    jsp1
    /title
    /head
    body bgcolor="#ffffff"
    %
    String username = request.getParameter("username");
    String password = request.getParameter("password");

    System.err.println("JSP uid "+username);
    System.err.println("JSP psw "+password);
    if(username==null || password==null){%
    brbr
    table
    tr
    td class="formlabel" align="center" You are not logged in!/td
    td align="center"input type="button" class="formbutton" value="Go to index page" onclick="document.location.href='index.jsp'"/td
    /tr
    /table
    %}else{
    h1
    a href='jsp3.jsp'Go here!/a/h1
    %}%
    /body
    /html

    jsp3.jsp:
    Here I get a problem when I click on the cancel button. It goes to a page that says I am not logged in, instead of going to jsp2.jsp.

    html
    head
    title
    hi
    /title
    /head
    body bgcolor="#ffffff"
    table
    tr
    tdinput type="button" value="Cancel" class="formbutton" onclick="document.location.href='jsp2.jsp'"/
    /td
    /tr
    /table
    /body
    /html

    DB:3.03:User Authentication Prob 9j

    you want to store after a successful login some object in the session scope. After that, you want to put on all pages a check for that object and redirect to login if not found.

  • RELEVANCY SCORE 3.02

    DB:3.02:Simple Jsp Page Not Working... 1a


    I wrote a JSP page, and it wouldn't work as expected. So I continued to whittle down the code until it was VERY simple, and it still doesn't operate as expected. Maybe I've been staring at it for too long, but I cannot find what's wrong. If anybody can help me out, it would be greatly appreciated.

    Basically, it should change from "HI" to "BYE" upon submitting each time.

    Here's the code (for upload.jsp):

    %@page contentType="text/html"%

    html
    head
    titleTest Program/title
    /head

    %
    if( request.getParameter("submit") == "form1" ){
    %
    body
    h1HI!/h1
    form name="uploadFile" action="upload.jsp" method="post"
    input name="submit" type="submit" value="form2"
    /form
    /body
    %
    }
    else {
    %
    body
    %= request.getParameter("submit") %
    h1BYE!/h1
    form name="uple" action="upload.jsp" method="post"
    input name="submit" type="submit" value="form1"
    /form
    /body
    %
    } %

    /html

    DB:3.02:Simple Jsp Page Not Working... 1a

    I must be losing it if I couldn't find that myself. :) It's working now, thanks for your responses.

  • RELEVANCY SCORE 2.98

    DB:2.98:How To Submit A Form. pm


    Iam new to jsp.I have a jsp form.In this form iam not using submit button instead iam using an image hyperlink to submit the form.What is the code i have to write for this.If u want i will give u the source code of the forms

    Thanks

    Naveen

    DB:2.98:How To Submit A Form. pm

    Thanks it helped me a lot.This is the third time u
    have helped me.Thanks very muchThanks. By the way, what are the first two threads? I am sorry, I have a poor memory.

  • RELEVANCY SCORE 2.93

    DB:2.93:How To Prevent Submit Twice? jm


    i just use jsp and jstl.
    There is some way can prevent submit twice?

    i use sql in jdbc, first get the last record in table, compare the submit data and the last record, if same, prevent submit.

    but it can't check the date -- not the last record, same with the submit record.

    anyway can do it?

    DB:2.93:How To Prevent Submit Twice? jm

    You can disable the Submit button as soon as user clicks on it for the first time using Java script.

    - Subramanyam V

  • RELEVANCY SCORE 2.93

    DB:2.93:Jsp Edit Page As Popup On List Page With Javascript pp


    I'm working with a jsp listing page that I want to actually pop open a div that contains a dynamic edit page of the item on it. I can't get the edit page to display within the div of the listing page because I don't know how to code the html:link tag to display the page properly.

    When constructing the mockup in html, I use hide and show of the divs like this:
    1.

    The supporting divs are below:

    div id="edit_item" style="position:absolute; width:422px; height:455px; left:300px; top:10px; visibility:hidden; z-index:5;"
    iframe src="unitData_hqsUnitData_edit.html" name="test" width="422" height="455" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" allowtransparency="true" style="background-color: transparent;"/iframe
    /div

    div id="cover_large" style="position:absolute; top:0px; left:0px; width:1018px; height:500px; border:1px solid #fff; background: transparent url(../images/transparent.gif) center repeat; visibility:hidden; -index:1;"/div

    In addition to display of the edit page, I would like to press the submit button on the edit page inside a div of the listing page and cause the listing page to refresh and update the database.

    The part I'm not getting is on the listing page and causing the listing page to retrieve item information and populate the edit page inside the listing page. Right now, I doing this:
    html:link action="hqsunitdataEdit.do?do=editHqsunitdata" paramName="hqsunitdata" paramProperty="id" paramId="id" styleClass="displayTD1l"Edit/html:link

    But it does open, it's in the current browser window which isn't what I want.

    Any suggestions?

    DB:2.93:Jsp Edit Page As Popup On List Page With Javascript pp

    I'm working with a jsp listing page that I want to actually pop open a div that contains a dynamic edit page of the item on it. I can't get the edit page to display within the div of the listing page because I don't know how to code the html:link tag to display the page properly.

    When constructing the mockup in html, I use hide and show of the divs like this:
    1.

    The supporting divs are below:

    div id="edit_item" style="position:absolute; width:422px; height:455px; left:300px; top:10px; visibility:hidden; z-index:5;"
    iframe src="unitData_hqsUnitData_edit.html" name="test" width="422" height="455" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" allowtransparency="true" style="background-color: transparent;"/iframe
    /div

    div id="cover_large" style="position:absolute; top:0px; left:0px; width:1018px; height:500px; border:1px solid #fff; background: transparent url(../images/transparent.gif) center repeat; visibility:hidden; -index:1;"/div

    In addition to display of the edit page, I would like to press the submit button on the edit page inside a div of the listing page and cause the listing page to refresh and update the database.

    The part I'm not getting is on the listing page and causing the listing page to retrieve item information and populate the edit page inside the listing page. Right now, I doing this:
    html:link action="hqsunitdataEdit.do?do=editHqsunitdata" paramName="hqsunitdata" paramProperty="id" paramId="id" styleClass="displayTD1l"Edit/html:link

    But it does open, it's in the current browser window which isn't what I want.

    Any suggestions?

  • RELEVANCY SCORE 2.92

    DB:2.92:Regarding Hashmap 1c


    hi all,
    iam working on a small servlet and jsp application.Iam sending a categoryid id (pk) from jsp to a servlet and running a query a database query in this servlet and all the result set i have kept in hashmap and sending this back again to the jsp.Now my prob is how to retrieve back this hashmap in the jsp.request.getParameter() method returns a string and iam not knowing how to get this hashmap.

    My jsp page is
    html
    body
    form action='../GetCategoryDetails' method='post'
    input type='text' name='categoryid' value='RT02OT03'
    input type='submit' name='submit' value='submit'
    /form
    /body
    /htmlMy servlet code is
    //query and the result set
    HashMap hm=new HashMap();
    hm.put("roomtype",strRoomTypeid);
    hm.put("occupancy",strOccupancyid);
    hm.put("roomrent",new Float(fltRoomRent));
    hm.put("extraperson",new Float(fltExtraPerson));
    hm.put("facilitylist",strFacilityList);
    hm.put("noofadults",strNoOfAdults);
    hm.put("noofchildren",strNoOfChildren);
    response.sendRedirect("Admin/test.jsp?hm="+hm);Is this the proper approach to use a HashMap.Pls suggest.thanx in advance.

  • RELEVANCY SCORE 2.92

    DB:2.92:≪Af:Outputtext≫ Not Working With Partialtriggers Option. 8p


    I have below code in jsp ,af:outputText not showing in below case but when i removed partialTriggers="cb2" and partialSubmit="true" from button
    ,af:outputText showing the expected value,any ieda why it is not working with partialTriggers?

    af:outputText value="#{bean.result_data}" id="ot1"
    inlineStyle="color:rgb(214,231,255);"
    escape="false" partialTriggers="cb2"/

    af:commandButton text="Submit" id="cb2"
    action="#{txnwatch.cb2_action}"
    partialSubmit="true"/

    Thanks
    Hridyesh

    DB:2.92:≪Af:Outputtext≫ Not Working With Partialtriggers Option. 8p

    Hi Frank,
    I got the issue ,if i change escape="true" ,PPT is working fine.Is it expected behavior?
    Also i have to set escape="false",as my out put string have br to make line break.
    Please suggest where i can use both line break br and PPT.

    Thanks
    Hridyesh

  • RELEVANCY SCORE 2.90

    DB:2.90:How To Submit Large String To Jsp. 9p


    Hi all,
    I user Tomcat as jsp-server. I have a form with one large text field. If I have 200 symbols in this field I can not submit my form to jsp.

    How can do it?
    Exist any limitation for submitting size?

    Many thanks in advance.

    DB:2.90:How To Submit Large String To Jsp. 9p

    Hi ,

    There is no limitation in the size .check whether you are using POST or GET method ..Use POST method

  • RELEVANCY SCORE 2.89

    DB:2.89:Reset Request Object Parameter z8


    Hi everyone,

    I have a solution to a problem, but I'm not sure if its the best solution. So let me explain the issue. I have a JSP that performs a search. You enter various criteria in the form and then click submit. it loads the same page with the search results. if it returns more than 10 rows, I split up the result into multiple pages. I do this by having a zero-indexed combo box (HTML Select) that contains the descriptions e.g., rows 1-10, rows 11-20, rows 21-30, etc...whenever the user changes the value in the combo box, i reload the page and filter in only those rows that match the index on the combo box.

    The problem is when the previous search returns 10 rows the user has the option to go to rows 11-20 (index 1 instead of 0). Then the user can select some other criteria and hit the search button. The index is left at value 1. The next result only has 5 rows, but because the index was left at 1, it shows nothing in the search results. it should reset to index 0.

    But the only way I can tell is if I inspect if the criteria has changed, then manually reset the index. i don't like that way because its a lot of logic to implemented in a JSP and it depends on the number of criteria for the page (i have several JSP pages that need this functionality).

    This index is passed to the request object via the form submit so I can't set the parameters. Are there any other options?

    Thanks for your input.

    DB:2.89:Reset Request Object Parameter z8

    Okay...i figured out that I can just inspect the query string. I can have the Submit button post one query string and the showNextPage function submit another query string.

    Thanks for you input!

  • RELEVANCY SCORE 2.89

    DB:2.89:In Jsp How To Display Code? ak


    in jsp how to display some code like this:

    /**

    String body=body1;
    String body_new="";
    int Position = 0;

    while(true){
    int index = body.indexOf(0x0D, Position);
    if(index == -1){break;}
    if(index Position){
    body_new += body.substring(Position, index);
    }
    body_new += "br";
    Position = index +1;
    }

    if(Position = 0){
    body_new += body.substring(Position);
    }
    body=body_new;
    */

    ==================
    i find IE will not display the "br" and some char like "'"
    i use text textarea post

    thanks

    DB:2.89:In Jsp How To Display Code? ak

    you can replace things like br with special
    character sequences such as brOk, the forum is now converting special characters back to br tags, which is actulally the solution to your problem.

    I will add a * character to stop this, so when you try this, remove the * character

    **l*t*;*b*r**g*t*;

    Have a play with this also:

    http://www.plus2net.com/html_tutorial/tags-page.php

  • RELEVANCY SCORE 2.88

    DB:2.88:Jsp View Problem: Send The Content Of The File To The Client cs


    I posted similar problem before, the problem is when the user selects a file, and submit,
    it will show the content to the user, or pop up a file download dialog to save the file
    in the local machine.

    The approach I am using is to send the content of the file (character text)
    to the client.

    It will pop up a file download dialog box, which is fine,
    but the problem is the file name is the JSP file name, not the filename of
    the file I want to open. For example, I want to open myfile.doc, in the file
    download dialog box, it still shows fileview2.doc, and prompts the user
    to save the file as fileview2.doc instead of myfile.doc.

    any ideas?? In my problem, what is the best approach to this problem? Should I let
    the web browser should take care of the file, or I should read the file byte by
    byte, and write it to the client??

    //fileview.jsp
    FORM ACTION="fileview2.jsp" method="POST"
    Pinput type="FILE" name="filename"
    Pinput type="submit"

    //fileview2.jsp

    %@ page import="java.io.*"%
    %
    try
    {
    String fileName = request.getParameter("filename");
    File file = new File(fileName);
    response.addHeader("content-type", "application/msword"); //OPEN MS-WORD DOCUMENT
    BufferedInputStream bis = new BufferedInputStream(new FileInputStream(file));
    long count = file.length();
    PrintWriter rsp = response.getWriter();
    for (long index = 0; index count; index ++)
    {
    int ch = bis.read();
    rsp.write(ch);
    }
    bis.close();
    }
    catch(Exception e)
    {out.println(e);
    }
    %

  • RELEVANCY SCORE 2.88

    DB:2.88:Jsp, Internet Explorer And Big Forms Not Working sp


    Greetings,

    I have had this form in my JSP page for a while now and it worked perfectly, recently I had to add more columns to a TextArea because I needed more space to write articles ( It's an info admin) and now when I try to submit it with IE , it just doesnt work !.

    It works with Firefox and Opera but not IE, anyone can shed some information regarding why ?

    DB:2.88:Jsp, Internet Explorer And Big Forms Not Working sp

    It's a post, I know about the 4KB limit in get.

    That's not it, when I click submit it just stalls there.

  • RELEVANCY SCORE 2.87

    DB:2.87:Textfields Empty After Submit 1p


    Hello everyone,

    I hope this is not a stupid question(newbe..)?

    I have a JSP file, where i use a submit button in a
    FORM
    After clickking the submit button al my fields are empty,
    Is there a way to avoid this?

    Can somebody help me out,please!
    Thanks in advance...
    by

    stoneJ

    DB:2.87:Textfields Empty After Submit 1p

    In your post from the html form, write the content of your fields to a cookie.
    In your re-load of the page, populate the values from your stored cookie. I belive there should be a Java object for accessing the cookie, otherwise you could always try using javascript (but you would probobly want to handle the writing of the cookie through javascript then).
    Dan Hughes

  • RELEVANCY SCORE 2.86

    DB:2.86:Working With Non Jsf And Jsf Pages dm


    Hi ALL,

    I wanted to know wheter it is possible or not
    Here is scenario

    I have 2 pages. First one is JSF Page and second one is JSP Page

    I wanted to submit the JSF Page contents to JSP Page. Is it possible??

    Below is by Navigation Rule for it where postJob is JSF and postJobDetails is JSP Page

    navigation-rule
    from-view-id/consumer/postJob.jsp/from-view-id
    navigation-case
    from-outcomepostJobDetails/from-outcome
    to-view-id/consumer/postjobDetails.jsp/to-view-id
    /navigation-case
    /navigation-ruleAnd in my button action I am doing like this
    public String btnContinue_action()
    {
    return "postJobDetails";
    }And I am not able to submit JSF contents to JSP Page.

    Thanks
    Sudhakar

    DB:2.86:Working With Non Jsf And Jsf Pages dm

    You should be able to do this with a HyperLink component.

  • RELEVANCY SCORE 2.86

    DB:2.86:Jsp Called Twice Only On Internet Explorer 6. z1


    I have jsp that on submit it called itself.
    when working with Internet Explorer 6 the page calls itself twice.
    Any idea why ?

    DB:2.86:Jsp Called Twice Only On Internet Explorer 6. z1

    I've ran into the same, or similiar, problem. Unfortunately, I haven't found a good solution yet either.

    I'm now in the process of refactoring my JSP's to fit more into the Model-View-Controller paradigm and will have the servlets (controllers) do page forwards instead (I previously had one JSP calling another JSP, but it sometimes executed twice).

  • RELEVANCY SCORE 2.83

    DB:2.83:Passing Javascript Value To Jsp sc


    Hi,

    Any idea how to pass a value from javascript to jsp page when the page gets load on browser.

    I use below code but an event is require to pass the value. Is there any code that pass automatically the value from javascript to jsp.

    html
    head
    titlePassing Javascript value to Jsp/title
    script type="text/javascript" language="javascript"
    var scriptVar = "Noy"
    var WinNetwork = new ActiveXObject("WScript.Network")
    document.write (WinNetwork.username)
    document.index.hiddenTextBox.value = WinNetwork.username
    /script
    /head
    %
    String jspVar = null;
    if(request.getParameter("submit") != null){
    jspVar = request.getParameter("hiddenTextBox");
    out.println("Jsp Var : " + jspVar);
    }
    %
    body
    form name="index" onSubmit="index.jsp" method="post"
    input type="hidden" name="hiddenTextBox"br
    input type="submit" name="submit" value="Submit"
    /form
    /body
    /html

    Thanks,
    ~ukbasak

  • RELEVANCY SCORE 2.83

    DB:2.83:Error... Apache Tomcat/4.0.3 - Http Status 404 ?? 7d


    When I type
    http://localhost:8080/test1.jsp

    the first JSP page comes. When I click the submit button I need to go to next JSP page test2.jsp
    which I have coded as
    FORM METHOD=POST ACTION="test2.jsp" in test1.jsp file

    But once I click the submit button I get the following error

    HTTP Status 404 - /test2.jsp
    -----------------------------------------
    type Status report
    message /test2.jsp
    description The requested resource (/test2.jsp) is not available.
    -----------------------------------------------------------------
    Apache Tomcat/4.1.18-LE-jdk14

    I have put test1.jsp and test2.jsp in Tomcat\Webapps\Root directory and I do not know what else to do. Tomcat is definitely running.

    Any ides? Kindly help me in solving this issue.I am new to JSp with Tomcat

    Thanks

    DB:2.83:Error... Apache Tomcat/4.0.3 - Http Status 404 ?? 7d

    how u can say it is not working , i have tried that and working fine on my system
    //test1.jsp
    HTML
    BODY
    FORM METHOD=POST ACTION="test2.jsp"
    what is your name ? INPUT TYPE = TEXT NAME=username SIZE=20BR
    what is your Email? INPUT TYPE = TEXT NAME=email SIZE=30BR
    what is your Age? INPUT TYPE = TEXT NAME=age SIZE=5BR
    PINPUT TYPE =SUBMIT
    /FORM
    /BODY
    /HTML

    //test2.jsp
    html
    head
    title
    Hello Testing is going on
    /title
    /head
    body
    h1Welcome /h1
    /body
    /html

  • RELEVANCY SCORE 2.83

    DB:2.83:How To Print Hard Copy On Client When Form Submit 88



    I am using JSP 1.2 and JSTL 1.0 .

    I have a situation where JSP sends dynamic content
    page to the client browser.
    On this page is a submit button. When the client
    clicks on submit, the content on that page gets printed
    to the default printer connected to the client' computer.
    Also the printer setup dialog should not appear when submit
    is clicked.

    Is there anyway to do it using only JSTL on JSP or Java code in servlet
    without using any scripting language like Javascript ?

    Thanks for your thoughts

    DB:2.83:How To Print Hard Copy On Client When Form Submit 88

    JSP cannot give you access to the local O/S commands such as the printing API. The closest you can get is to use form name="form1" method="POST" action="mythankyoupage.jsp" onSubmit="window.print()"
    ...
    /formUnfortunately, you can still not guarantee this behaviour, my IE6 pops up a print dialogue on this command, other user settings will behave differently.

  • RELEVANCY SCORE 2.83

    DB:2.83:Redirecting Url Servlet Not Working sc


    Hi all,

    All my JSPs are located in pages folder of my Application's Web Context. I need to redirect JSP URLs to the pages folder. For example if user requests http://localhost:8080/RedirectJSPApp/test.jsp then I need to redirect to http://localhost:8080/RedirectJSPApp/pages/test.jsp. But if user request http://localhost:8080/RedirectJSPApp/pages/test.jsp then i dont need to do any redirection.

    So I define a Servlet:

    package com.srh.servlet;

    public class RedirectServlet
    extends javax.servlet.http.HttpServlet
    {
    public void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException
    {
    doPost(request, response);
    }

    public void doPost(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException
    {
    String contextPath = request.getContextPath();
    String requestUrl = request.getRequestURL().toString();
    String targetRequestUrl = null;
    String jspRequested = null;
    int index = -1;

    index = requestUrl.indexOf("/pages/");

    // The JSP is not called properly;
    if (index == -1)
    {
    // Call the JSP properly
    index = requestUrl.indexOf(contextPath);
    if (index != -1)
    {
    targetRequestUrl = requestUrl.substring(0, index+contextPath.length());
    jspRequested = requestUrl.substring(index+contextPath.length()+1);
    targetRequestUrl += "/pages/" + jspRequested;
    response.sendRedirect(targetRequestUrl);
    }
    }
    }
    }In the web.xml I wrote:
    servlet
    descriptionThis Servlet redirects JSP URLs to appropriate lcoation w.r.t. Server/description
    display-nameRedirectServlet/display-name
    servlet-nameRedirectServlet/servlet-name
    servlet-classcom.srh.servlet.RedirectServlet/servlet-class
    /servlet
    servlet-mapping
    servlet-nameRedirectServlet/servlet-name
    url-pattern*.jsp/url-pattern
    /servlet-mappingI have a test.jsp in pages folder:
    html
    head
    titleTest/title
    /head
    body
    Inside test.jsp
    /body
    /htmlI deployed on JBoss 4.2.0. I type http://localhost:8080/RedirectJSPApp/test.jsp in my browser and it changes to http://localhost:8080/RedirectJSPApp/pages/test.jsp which is perfect but it never prints "Inside test.jsp" on the page. Why this is happening?

    If I remove RedirectServlet entries from web.xml and just type in http://localhost:8080/RedirectJSPApp/pages/test.jsp then it prints "Inside test.jsp" on the page. What I am missing here?

    TIA

    TV

    DB:2.83:Redirecting Url Servlet Not Working sc

    I tried forward of RequestDispatcher but still same problem:

    package com.srh.servlet;

    public class RedirectServlet
    extends javax.servlet.http.HttpServlet
    {
    public void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException
    {
    doPost(request, response);
    }

    public void doPost(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException
    {
    String contextPath = request.getContextPath();
    String requestUrl = request.getRequestURL().toString();
    String targetRequestUrl = null;
    String jspRequested = null;
    int index = -1;

    index = requestUrl.indexOf("/pages/");

    // The JSP is not called properly;
    if (index == -1)
    {
    // Call the JSP properly
    index = requestUrl.indexOf(contextPath);
    if (index != -1)
    {
    // targetRequestUrl = requestUrl.substring(0, index+contextPath.length());
    // jspRequested = requestUrl.substring(index+contextPath.length()+1);
    // targetRequestUrl += "/pages/" + jspRequested;
    // response.sendRedirect(targetRequestUrl);
    jspRequested = requestUrl.substring(index+contextPath.length()+1);
    RequestDispatcher rd = request.getRequestDispatcher("/pages/" + jspRequested);
    rd.forward(request, response);
    }
    }
    }
    }

  • RELEVANCY SCORE 2.82

    DB:2.82:Array Of Fields In Jsp Page 8a


    hi,
    i am just a biginer in java forum application developement,

    *********problem****************

    I am using jsp+struts2 combination. one of my jsp page contains a select field to select number (n).
    on basis of that selected number(n) I've to display n text fields.for every text field there is an submit button.
    how it is possible? using arry index?

    DB:2.82:Array Of Fields In Jsp Page 8a

    Yes, you can use the array notation in the name of the input element. You should end up with something like:

    table
    trtdinput name="input[0]"/td/tr
    trtdinput name="input[1]"/td/tr
    trtdinput name="input[2]"/td/tr
    /table
    input type="hidden" name="rows" value="3"You can use JSTL c:forEach with a varStatus for this.

  • RELEVANCY SCORE 2.81

    DB:2.81:Sending Form Parameters From Select Elements jc


    Hi,
    I have a HTML FORM that consists of several SELECT boxes and a SUBMIT button.
    As everybody knows it's trivial in JSP to retrieve the currently selected values of all SELECT
    elements via getParameter() "when the SUBMIT button is pressed".
    But I also want to send to a JSP the current state of selection of each SELECT element "when an Option in
    one of the SELECT boxes changes". This is because some of the SELECT elements are to be dynamically populated based on a value selected in another SELECT box. It seems that in this case the
    selected values are not easily retrievable as parameters, am I right?

    Currently, I am thinking to use JavaScript to first get the currently selected index of each SELECT element and then forward to JSP as parameters.
    I wonder if I can avoid Javascript here. Looking for a Java-only solution. Any ideas?
    Thank you.

    DB:2.81:Sending Form Parameters From Select Elements jc

    My problem is solved now. I am going to use the JS function as suggested
    by pgeuens. Thank you for the JS snippet.

  • RELEVANCY SCORE 2.81

    DB:2.81:Included File Not Able To Access Request.Get Parameters mc


    Hi all,

    I have to update a form. Whenever I hit the 'update' button on main.jsp that will submit the same page and stays in same page. I included a jsp page called update.jsp on the top of the jsp. In that jsp I am checking for request.getParameter of all the form fields. But the that included update.jsp not able to find the request.getParameter values and I am getting allthe values are null.

    Instead of including that jsp suppose I cut and past the whole code in the top of main.jsp updation working fine. How to resolve the problem.? Thanks in advance.

    Manian.

    DB:2.81:Included File Not Able To Access Request.Get Parameters mc

    HI beattris,

    Thanks for your answer. Today I tried again the included file able to access all the request and response objects. Your help is mostly appreciated. Thanks.

    manian.

  • RELEVANCY SCORE 2.81

    DB:2.81:Tomcat Can't Get The Specified Jsp-Page. p9


    there are three jsp-page : Step1.jsp Step2.jsp Step3.jsp
    Step2.jsp and Step3.jsp are placed at the same folder,but Step3.jsp is placed at the different folder.

    ------------------------
    Step1.jsp's content :
    request.getRequestDispatcher("/CH4/Step2.jsp").forward(request,response);

    ------------------------
    Step2.jsp's content :

    form name="form1" action="Step3.jsp" method="post"
    input type="submit" name="submit" value="submit"
    /form

    ------------------------
    Step3.jsp's content :
    c:out value="can you see this page " /

    the expectent procedure is : Step1 - Step2 -Step3
    but there is error : The requested resource (/CH4/MyJspCode/Step3.jsp) is not available.
    how to currect it ?

    DB:2.81:Tomcat Can't Get The Specified Jsp-Page. p9

    Insted of RequestDispather.forward user RequestDispather.redirect

  • RELEVANCY SCORE 2.80

    DB:2.80:How To Specify The Functions Of Buttons In A .Jsp dx


    Im working on struts frame work and I want to add 3 buttons to a jsp as cancel,reset ans submit. I have done it like this. submit and reset buttons are working properly but when click the cancel button it gives an error like this.

    Error ------
    message: Request[pages/jsp/smsserver/cancelData] does not contain handler parameter named rec

    description: The request sent by the client was syntactically incorrect (Request[pages/jsp/smsserver/cancelData] does not contain handler parameter named rec)

    --------------------------------------------------

    Submit button is for submit data and reset is for reseting.Also I just want to redirect to a .jsp when I clicked the cancel button. But when it clicked it given that error.Here I show my .jsp and action mapping in the strutsconfig.xml.

    .xml code--
    action
    name="showDetailsForm"
    path="/pages/jsp/smsserver/submitData"
    attribute="showDetailsForm"
    scope="request"
    type="com.ironech.myvoice.smsservice.struts.action.SendReportAction"
    parameter="next"



    forward

    name="updateSuccess"
    path="system.configuration.updateSuccess"
    /
    /action

    action

    path="/pages/jsp/smsserver/cancelData"
    type="com.ironech.myvoice.smsservice.struts.action.SendReportAction"
    parameter="rec"
    scope="request"


    forward

    name="sendSMSReportQueue"
    path="system.configuration.sendSMSQueue"/

    /action
    .jsp---- ( this .jsp can be editted by the user and submit...)

    table width="75%" border="0" id="showdatatable"

    logic:iterate name="showDetailsForm" property="allProducts" id="SingleItem"
    form method="post" action="submitData.do?next=updateData"
    tr
    tdRepeats/td
    td
    input type="text" name="srepeats" value="bean:write name="SingleItem" property="repeats"/"
    /td
    /tr

    tr
    tdMobile No/td
    td
    input type="text" name="smobileNo" value="bean:write name="SingleItem" property="mobileNo"/"
    /td
    /tr

    tr
    td width="41%" height="27"
    input name="Reset" type="reset" value="Reset"
    /td

    td width="59%"
    input type="submit" name="Submit2" value="submit"
    /form
    /td

    td width="41" height="27"
    form name="form1" action="cancelData.do?rec=sendReportQueue"
    INPUT name="cancel" type="submit" value="Cancel"
    /form
    /td

    /tr

    /logic:iterate
    /tablePlease help me to figurout this matter. thanx....

    DB:2.80:How To Specify The Functions Of Buttons In A .Jsp dx

    Would you please ask Stuts questions in a Struts forum?

  • RELEVANCY SCORE 2.80

    DB:2.80:How To Create Servlet Program 9p


    iam able to run the jsp program

    what is my Problem:
    created a jsp page Where a from has 2 attributes
    1)Textbox
    2) submit button
    used post method ,mentioned action servlet page

    In servlet page i am trying to display the content of textbox..

    iam running the same code by working manually but not able to do it inIDE

    Tell me the Procedures to create and deploy the project(web Project)

    DB:2.80:How To Create Servlet Program 9p

    In myeclipse i want to deploy the servlet program

  • RELEVANCY SCORE 2.79

    DB:2.79:Php-Mysql "Insert Into" Query Not Working sd



    Hi,

    The code below fails to update a MySQL table I have made called "tampa." I'm not sure why. The field "id" is an index field, auto-increment, and primary-type. The field "site" is also an index field, but just unique-type. Does the fact that these two fields are index fields have anything to do with why the code below won't update the table?

    Thanks in advance,

    John

    form action="process.php" method="post"Add a blog to this category: input name="site" type="text" size="50"input type="submit" value="Submit"/form

    PHP code in a file called "process.php":

    ?$site=$_POST['site'];mysql_connect("mysqlv3", "username", "password") or die(mysql_error());mysql_select_db("sand2") or die(mysql_error());mysql_query("INSERT INTO `tampa` ('id', 'site', 'value') VALUES (NULL, '$site',1)");

    $result = mysql_query("INSERT INTO `tampa` ('id', 'site', 'value') VALUES (NULL, '$site',1)");

    ?

    DB:2.79:Php-Mysql "Insert Into" Query Not Working sd


    bregent wrote:

    As an aside, you typically would not include the auto incrementing field in the insert statement. In fact, I believe that syntax will fail in some dbms's. I'm not familiar with MySQL syntax; does it require that the 'id' field is included? Does it allow it?

    MySQL doesn't require the primary field to be included if it's auto_increment. However, if you do include it in an INSERT query, it should be NULL. That's why I didn't change that part of the query. The primary key is normally left out, but it's perfectly acceptable to include it that way.

  • RELEVANCY SCORE 2.79

    DB:2.79:Jsp Pages Not Working :( 1c


    I am new to JSP and I can't seem to get any JSP pages to load or execute correctly. I have downloaded and am running Tomcat v4.0.1 on an NT 4.0 workstation. The JSP pages I'm trying to run either open as text documents in IE or show only the HTML code and do not process the JSP code.

    Below is an example of a file that loads only as a text document. When I open this file in my browser I only see the text below - nothing else.

    !--
    Copyright (c) 1999 The Apache Software Foundation. All rights
    reserved.

    Number Guess Game
    Written by Jason Hunter, CTO, KA Software
    http://www.servlets.com
    --

    %@ page import = "num.NumberGuessBean" %

    jsp:useBean id="numguess" class="num.NumberGuessBean" scope="session"/
    jsp:setProperty name="numguess" property="*"/

    html
    headtitleNumber Guess/title/head
    body bgcolor="white"
    font size=4

    % if (numguess.getSuccess()) { %

    Congratulations! You got it.
    And after just %= numguess.getNumGuesses() % tries.p

    % numguess.reset(); %

    Care to try again?

    % } else if (numguess.getNumGuesses() == 0) { %

    Welcome to the Number Guess game.p

    I'm thinking of a number between 1 and 100.p

    form method=get
    What's your guess? input type=text name=guess
    input type=submit value="Submit"
    /form

    % } else { %

    Good guess, but nope. Try b%= numguess.getHint() %/b.

    You have made %= numguess.getNumGuesses() % guesses.p

    I'm thinking of a number between 1 and 100.p

    form method=get
    What's your guess? input type=text name=guess
    input type=submit value="Submit"
    /form

    % } %

    /font
    /body
    /html

    DB:2.79:Jsp Pages Not Working :( 1c

    Probably, if u r trying to open the JSP page from the browser . u r following the FILE-Open from the menu bar and locating the file . This actually results in use of 'file' protocol by the browser instead of HTTP. So, it just tries to open a local file on the disk which is treated as a text file by the Operating System. For using HTTP, type http://your path in the addres bar of the browser. I assume u have saved the JSP file in right place.
    Vijay

  • RELEVANCY SCORE 2.79

    DB:2.79:Jsp xc


    Dear Sir/Ma'am,

    I am working on a JSP to store the data in database and to show the attributes from the database depending upon the fields I entered in the Same JSP.
    I have to show the contents from database in the same JSP after Submit.
    Help me out.

    In wait of your reply

    Gagan

    DB:2.79:Jsp xc

    Thank you
    I will try it..

  • RELEVANCY SCORE 2.78

    DB:2.78:Online Bill Payment Submit Button Is Not Working aj


    HELLO

    DB:2.78:Online Bill Payment Submit Button Is Not Working aj


    The site has the same issue on Chrome. After clicking 'Submit', the payment screen goes blank and payment is not submitted. The same problem occurs, though at a later step, for Safari.

    Would be nice to have a fix, or at least messaging letting users know that the system only works on a couple browsers.

  • RELEVANCY SCORE 2.78

    DB:2.78:Submitt Button In Jsp Is Not Working 1p


    Hi,

    I want submit jsp page which is having text field with more than 3500 character.
    It was not submitting if the character length is more than 1000.
    Can anyone help me out?

    Cheers
    Srinivasan v

    DB:2.78:Submitt Button In Jsp Is Not Working 1p

    Some web browsers, some web proxies and some application servers might truncate the GET query string if it is too long. Some does that at 256 chars, others at 1024 chars, and so on. Although this is not explicitly specified in the HTTP specification, this is generally done to prevent malicious attacks.

    If you want to send more data than that, use POST.

  • RELEVANCY SCORE 2.78

    DB:2.78:Refresh In Jsp Page 8d


    Dear....,

    Here is the sample code below...,when i refresh the page. "if" condition is executed because it(request.getParameter()) retains the value of Submit button on first click...My requirement as I refresh the page it should go into "else" condition not into "if".

    My JSP page should react to only to button click not by refreshing the page.

    This can be rectified by maintaining two JSP's .But I', supposed to maintain one JSP.

    I will be more happy to receive your help.

    html
    head
    titlejspscript/title
    /head
    body

    %if((request.getParameter("Submit") != null) (request.getParameter("Submit").equals(request.getParameter("Submit"))))
    {
    %
    script
    alert("if");
    /script
    %}else{%
    script
    alert("else");
    /script

    %
    }%
    h1JBuilder Generated JSP/h1
    form name="fm" method="post" action=""
    input type="text" name="texvalue" value="testing"BR
    input type="submit" name="Submit" value="Submit"
    input type="reset" value="Reset"
    /form
    /body
    /html

    DB:2.78:Refresh In Jsp Page 8d

    hi ,
    got ur real problem. u must understand one thing. whenever u refresh a page the data(form) is submitted once again(ie like pressing the submit button again").
    only way you could trap the button event is thru javascript.

    i give the code here
    html
    headtitlejspscript/title
    script
    function go(){
    alert ("You clicked submit");
    //check for some values in the form
    //if correct submit the form
    //else alert something
    //or forward to any page.
    document.fm.submit();
    }
    function alerter(){
    var i= document.fm.submit.value;
    if(i==null||i==""){
    alert("else");
    }
    else{
    alert("if and submit clicked");
    }
    }

    /script

    /head
    body onload="alerter();"

    h1JBuilder Generated JSP/h1
    form name="fm" method="get" action="somepage.jsp"
    brbr
    input type="button" name="Submit" value="Submit" onclick="go();"
    input type="reset" value="Reset"
    /form
    /body
    /html

    bye,
    sathyabalu.

  • RELEVANCY SCORE 2.78

    DB:2.78:Reloading Jsp Page sj


    hi,
    I am currently working on a struts project. I am not able to reload the JSP page. When I click on submit button it displays me the error regarding the text boxes but the text boxes r not getting refreshed. The previous values r still displayed on the screen.
    Plz reply as sson as possible
    Thanks in advance

    DB:2.78:Reloading Jsp Page sj

    Use the reset method in your form bean to reset the text box values to null
    It ll solve the probs!!

    Is ur form data in request or session?
    Cheers!!

  • RELEVANCY SCORE 2.77

    DB:2.77:Jsp Pages Not Redirecting Request Correctly ds


    Hi Guys,

    I am facing very strange problem. I am working on a simple JSP website deployed on jBoss 4.2.3 GA from there I am submitting my 'Form' into another JSP page with some queryString, let say;

    following executes on 'onclick' event of Submit button;

    document.main.action = "jsp/getConnection.sjp?testType=" + testType + "testStage=" + testStage;
    alert ("Action : " + document.main.action);
    document.main.submit();

    Now when I execute above page I can see alert which is 100% correct which is as follows;

    Action : jsp/getConnection.sjp?testType=AgenttestStage=1

    As soon as it submit to the above page the URL add some extras variables on queryString which exist but I am not calling it in this flow;

    http://localhost:8080/Utility/jsp/getConnection.sjp?testType=AgentpingLevel=abcroute=xyz

    I don't understand from where and why its adding above values 'pingLavel' and 'route' as they exist in another function from which I am executing an AJAX request but that is not called at all.

    Let me know if you need more info;

    Function from which I am Submitting the Request_

    function processRequest()
    {
    var testType = 'Agent';
    var testStage = 1;

    // If it is a PING request then just call ping() function
    if (testType == "echoSystem")
    {
    ping();// Simply call the function
    return;
    }

    // Now we know that user wants to test something
    var queryString = "?testType=" + testType + "testStage=" + (testStage+1);

    document.main.action = "jsp/getConnectionPool.jsp" + queryString;

    alert ("Action : " + document.main.action); -- I can see the action as expected on this alert

    document.getElementById("main").submit();
    }

    Next page URL comes as;

    http://localhost:8080/Utility/jsp/getConnectionPool.jsp?testType=Agent*pingLevel=Serverroute=Direct_ConnectionnumOfReq=5*

    I don't understand where its getting these (above BOLD) values from as these exist in the function 'ping()' which I am clearly not calling.

    Your help and comments will be appreciated,

    Thanks,

    --

    Sjunejo

    DB:2.77:Jsp Pages Not Redirecting Request Correctly ds

    Thanks guys for your helps and comments and I understand now that GET will post everything by default so I don't have to make a new URL at all.

    Secondly the parameter which was not passed...because it was just out side of FORM ... PORR ME....

    Now I am using javascript only to validate my input and submit with the default action.

    Thanks

    --

    SJunejo

  • RELEVANCY SCORE 2.77

    DB:2.77:Jsp-Validation 1k


    Pls, I want to do validation with jsp. I want it to return error messages that some data are omitted on the same page with the form submitting, but its not working. pls, assist!. See the code

    html
    body
    % String first = request.geParameter(firstname);
    if(first !=null || !first.equals(""))
    {
    // go to another page
    }
    else
    {
    %
    Fill in your first name
    form method="post action="accept.jsp"
    First Name: input type="text" name="firstname" %=first%
    input type="submit" value="Submit"
    %}%
    /body
    /html

    DB:2.77:Jsp-Validation 1k

    spelling mistake "getparameter"

  • RELEVANCY SCORE 2.77

    DB:2.77:Two ≪Hml:Form ≫ Tags Or Two Submit Button On The Same Jsp Not Working? Help a8


    this is my struts-config.xml

    form-beans
    form-bean
    name="LoginForm"
    type="com.f5infotech.StrutsT.struts.bean.loginForm"/

    form-bean
    name="Report"
    type="com.f5infotech.StrutsT.struts.bean.AssetReportBean"/

    form-bean
    name="ViewOtherExp"
    type="com.f5infotech.StrutsT.struts.action.OfficeExpenditureOther"/

    /form-beans

    !-- ========== Global Forward Definitions ========= --
    global-forwards
    forward name="loginException" path="/web/jsp/failure.jsp"/forward
    /global-forwards
    !-- ========== Action Mapping Definitions ======== --

    action-mappings
    // used for authentication and it is working
    action
    path="/login"
    type="com.f5infotech.StrutsT.struts.action.loginAction"
    name="LoginForm"
    scope="request"
    parameter="dispatch"
    validate="true"
    input="/web/jsp/login.jsp"
    forward name="genericReportPage" path="/web/jsp/genericReport2.jsp"/
    forward name="failure" path="/web/jsp/failure.jsp"/
    /action

    action // used to give company assets information and it is working alone. not with the action tag just below it
    path="/assetinfo"
    type="com.f5infotech.StrutsT.struts.action.ReportAction"
    name="Report"
    scope="request"
    parameter="dispatch"
    validate="false"
    input="/web/jsp/genericReport2.jsp"

    forward name="assetReport" path="/web/jsp/Asset.jsp"/
    forward name="failure" path="/web/jsp/failure.jsp"/
    /action

    action
    path="/otherinfo"
    type="com.f5infotech.StrutsT.struts.action.OtherExpenditureReportGetAttribute"
    name="ViewOtherExp"
    scope="request"
    parameter="dispatch"
    validate="false"
    input="/web/jsp/genericReport2.jsp"

    forward name="otherExpenditureReport" path="/web/jsp/Other.jsp"/
    forward name="failure" path="/web/jsp/failure.jsp"/
    /action

    this is my jsp

    html:form action="/assetinfo?dispatch=showAssetReport" method="post"

    html:submit show assets !/html:submit/td

    html:form action="/otherinfo?dispatch=otherReport" method="post"

    html:submit show assets !/html:submit/td

    this is my method i am using dispatch action

    public class OtherExpenditureReportGetAttribute {

    public class ReportAction extends DispatchAction{

    public ActionForward otherReport(

    ActionMapping mapping,
    ActionForm form,
    HttpServletRequest request,
    HttpServletResponse response) throws Exception{

    i am using two submit buttons in single jsp and it is not working i have "/assetinfo" and "/otherinfo" as u can see. i am using dispatch action , please help
    ... thanks

    regards

    DB:2.77:Two ≪Hml:Form ≫ Tags Or Two Submit Button On The Same Jsp Not Working? Help a8

    this is my struts-config.xml

    form-beans
    form-bean
    name="LoginForm"
    type="com.f5infotech.StrutsT.struts.bean.loginForm"/

    form-bean
    name="Report"
    type="com.f5infotech.StrutsT.struts.bean.AssetReportBean"/

    form-bean
    name="ViewOtherExp"
    type="com.f5infotech.StrutsT.struts.action.OfficeExpenditureOther"/

    /form-beans

    !-- ========== Global Forward Definitions ========= --
    global-forwards
    forward name="loginException" path="/web/jsp/failure.jsp"/forward
    /global-forwards
    !-- ========== Action Mapping Definitions ======== --

    action-mappings
    // used for authentication and it is working
    action
    path="/login"
    type="com.f5infotech.StrutsT.struts.action.loginAction"
    name="LoginForm"
    scope="request"
    parameter="dispatch"
    validate="true"
    input="/web/jsp/login.jsp"
    forward name="genericReportPage" path="/web/jsp/genericReport2.jsp"/
    forward name="failure" path="/web/jsp/failure.jsp"/
    /action

    action // used to give company assets information and it is working alone. not with the action tag just below it
    path="/assetinfo"
    type="com.f5infotech.StrutsT.struts.action.ReportAction"
    name="Report"
    scope="request"
    parameter="dispatch"
    validate="false"
    input="/web/jsp/genericReport2.jsp"

    forward name="assetReport" path="/web/jsp/Asset.jsp"/
    forward name="failure" path="/web/jsp/failure.jsp"/
    /action

    action
    path="/otherinfo"
    type="com.f5infotech.StrutsT.struts.action.OtherExpenditureReportGetAttribute"
    name="ViewOtherExp"
    scope="request"
    parameter="dispatch"
    validate="false"
    input="/web/jsp/genericReport2.jsp"

    forward name="otherExpenditureReport" path="/web/jsp/Other.jsp"/
    forward name="failure" path="/web/jsp/failure.jsp"/
    /action

    this is my jsp

    html:form action="/assetinfo?dispatch=showAssetReport" method="post"

    html:submit show assets !/html:submit/td

    html:form action="/otherinfo?dispatch=otherReport" method="post"

    html:submit show assets !/html:submit/td

    this is my method i am using dispatch action

    public class OtherExpenditureReportGetAttribute {

    public class ReportAction extends DispatchAction{

    public ActionForward otherReport(

    ActionMapping mapping,
    ActionForm form,
    HttpServletRequest request,
    HttpServletResponse response) throws Exception{

    i am using two submit buttons in single jsp and it is not working i have "/assetinfo" and "/otherinfo" as u can see. i am using dispatch action , please help
    ... thanks

    regards

  • RELEVANCY SCORE 2.77

    DB:2.77:Jsp Forms.. z3


    I had a small jsp form, which has one dropdown list and 6 checkboxes and a submit button.
    the user must select atleast one check box and an item from dropdown list.I had written front end code i.e., for displaying jsp form as below...HTML
    BODY
    FORM METHOD=POST ACTION="GetData.jsp"
    select some number
    select name="somenumber"
    option1/option
    option2/option
    option3/option
    option4/option
    option5/option
    option6/option
    option7/option
    option8/option
    option9/option
    option10/option
    /selectbr /

    select accessions

    INPUT TYPE="checkbox" NAME="REDFamily" Value="RED1" CHECKEDRED1BR
    INPUT TYPE="checkbox" NAME="REDFamily" Value="RED2"RED2BR
    INPUT TYPE="checkbox" NAME="REDFamily" Value="RED3"RED3BR
    INPUT TYPE="checkbox" NAME="REDFamily" Value="RED4"RED4BR
    INPUT TYPE="checkbox" NAME="REDFamily" Value="RED5"RED5BR
    INPUT TYPE="checkbox" NAME="REDFamily" Value="RED6"RED6BR

    input type="submit" value="Submit"

    /FORM
    /BODY
    /HTMLafter clicking submit button I want the values selected from this form so I created a java bean ..as below

    public class SaveData implements java.io.Serializable
    {
    private String string;
    private String REDFamily[];
    private int somenumber[];


    public String[] getREDs()
    {
    return this.REDFamily;
    }

    public void setREDs(String values[])
    {
    this.REDFamily= values;
    }

    public String getREDs(int index)
    {
    return this.REDFamily[index];
    }

    public void setREDs(int index, String value)
    {
    this.REDFamily[index] = value;
    }

    public int[] getsomenumber()
    {
    return this.somenumber;
    }


    public void setsomenumber(int values[])
    {
    this.somenumber= values;
    }


    public int getsomenumber(int index)
    {
    return this.somenumber[index];
    }


    public void setsomenumber(int index, int value)
    {
    this.somenumber[index] = value;
    }

    }after this bean I had written another jsp file to get the values selected...
    HTML
    BODY
    jsp:useBean id="user" scope="session" class="user.SaveData" /
    jsp:setProperty name="user" property="*"/
    /jsp:useBean

    %
    somenumber= %= request.getParameterValues("somenumber") %;
    %

    %
    if (REDfamily != null) {
    for (int i = 0; i REDfamily.length; i++) {

    -----------------
    -----------

    %I was stopped here(second jsp) i dont know what to do from here.......is the code i had written correct...my aim is to get the values selected and store in some variable...
    some help me ....thnks in advance..

    DB:2.77:Jsp Forms.. z3

    Modify the Bean: SaveData.java

    public class SaveData implements java.io.Serializable {
    private String somenumber; //will hold single value taken from combo-box
    private String REDFamily[];

    public SaveData(){
    }

    public String getSomenumber() {
    return somenumber;
    }

    public void setSomenumber(String somenumber) {
    this.somenumber = somenumber;
    }

    public String[] getREDFamily() {
    return REDFamily;
    }

    public void setREDFamily(String[] REDFamily) {
    this.REDFamily = REDFamily;
    }In another jsp, you can get the bean values by calling the getter of the fields:

    user.getsomenumber()
    user.getREDFamily()

  • RELEVANCY SCORE 2.77

    DB:2.77:How To Call Struts Action Manually In Onchange Property??? k9


    Hello!

    action defined in struts-config.xml:
    action path="/editLafLm" className="oracle.adf.controller.struts.actions.DataActionMapping" type="oracle.adf.controller.struts.actions.DataForwardAction" name="DataForm" parameter="/editLafLm.jsp"
    set-property property="modelReference" value="editLafLmUIModel"/
    forward name="Submit" path="/viewLaf.do"/
    /action

    In my JSP the following form:

    html:form action="/editLafLm.do" target="laf" onsubmit="self.close();"
    input type="hidden" name="c:out value='${bindings.statetokenid}'/" value="c:out value='${bindings.statetoken}'/"/
    html:select property="StaId1"
    html:optionsCollection label="prompt" value="index" property="StaId1.displayData"/
    /html:select

    c:out value="${bindings.editingMode}"/

    input name="event_Submit" type="submit" value="OK"/
    /html:form

    When i click choose an entry from the Select list and then click the Submit Button all works well (the action forward goes to viewLaf.do)

    But i want to use the "onchange" property on the select list:

    ...
    html:select property="StaId1" onchange="submit();"
    ...

    This is not the same as pressing the Submit button because here the action editLafLm.do is done in a new window (and then i have to click the submit button)...

    So can i call the action or the action forward manually in the onchange-property so that there is the same behavour as clicking on the submit button???

    Thanks
    Markus

    DB:2.77:How To Call Struts Action Manually In Onchange Property??? k9

    Hey, Charles.
    Could you tell if it is possible to use this on UIX page?
    Where, for example:

    from name="form0"
    contents
    messageChoice prompt="Sciences" name="metaType" onChange="???"
    contents
    option value="math" text="Math"/
    option value="phis" text="Phis"/
    option value="chem" text="Chem"/
    /contents
    /messageChoice
    submitButton name="mainSubmit" text="Submit" event="runServlet"/
    /contents
    /form

    I mean, if it is possible to click from messageChoice's onChange on submitButton, and how to do this?

  • RELEVANCY SCORE 2.76

    DB:2.76:Changing Checkbox Selection From Bean In Jsf jp


    Hi,
    All I need to do is check/uncheck some checkboxes based on a condition when a "select" checkbox is checked/unchecked.
    I created an ArrayList of beans and accessed them from the jsp page
    using datatable. After displaying the jsp page, i will click on the "select"
    checkbox. Here I have a valueChangeListener, which calls a method
    from my backing bean. Here is my code which explains the problem
    better:
    jsp page:
    dataTable value="#{handler.arraylist} var="bean"
    ...
    h:selectBooleanCheckbox value="#{bean.isChecked}"
    valueChangeListener="#{handler.processValueChange}"
    immediate="true" onclick="submit()"/
    ....
    /dataTablehandler.java:
    processValueChange(ValueChangeEvent event) {
    bean = arraylist.get(index);
    if (condition){
    bean.setIsChecked(true);
    arraylist.set(index, bean);
    }
    }This code is not changing the value of the checkbox. But when I display
    the value of "bean.isChecked", it is displaying "true". And the result is
    not reflected in the jsp page.
    Can anyone please help me with this?

    Thanks in advance.

    DB:2.76:Changing Checkbox Selection From Bean In Jsf jp

    Hi,
    If I add this line, I am able to see the child checkboxes values change for the first time I open this page. From second time, it is not even changing the state of the parent checkbox.

    Could you please help me with this.

  • RELEVANCY SCORE 2.76

    DB:2.76:Index.Jsp Submit Not Working z1


    Hi,
    I have written a JSP when the user clicks the submit button it would go to
    the servlet file.

    My JSP File is:
    %@ page language="java" %
    html
    head
    title
    Logon Verification Form
    /title
    /head
    body
    form action="/TestPro/Checkdetails" method="post"
    First name:
    input type="text" name="firstname" /
    br /
    Last name:
    input type="text" name="lastname" /
    /br
    input type="button" value="Submit"/
    /form
    /body

    /htmlMy Servlet File is:
    package testpackage;
    import java.io.IOException;
    import java.io.PrintWriter;

    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;

    public class Checkdetails extends HttpServlet {
    protected void doPost(
    HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException {
    String fname = request.getParameter("firstname");
    String lname = request.getParameter("lastname");
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    out.println("html");
    out.println("title");
    out.println("The name details");
    out.println("/title");
    out.println("body");
    out.println("p Your name is " + fname + "and your title is" + lname);
    out.println("/br");
    out.println("input type=" + "button" +"value=" + "Submit" +"/");
    out.println("/body");
    doGet(request,response);

    //TODO : Implement
    }

    }The Web.xml is:
    ?xml version="1.0" encoding="UTF-8"?
    !DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd"
    web-app
    display-nameWEB APP/display-name
    descriptionWEB APP description/description
    servlet
    servlet-nameLogonver.jsp/servlet-name
    jsp-file/Logonver.jsp/jsp-file
    /servlet
    servlet
    servlet-nameCheckdetails/servlet-name
    servlet-classtestpackage.Checkdetails/servlet-class
    /servlet
    servlet-mapping
    servlet-nameCheckdetails/servlet-name
    url-pattern
    /TestPro/Checkdetails
    /url-pattern
    /servlet-mapping
    /web-appI am building the Web Archive.
    Adding this Web Archive to an Enterprise Archive.
    Building the Enterprise Archive and Deploying it.
    The JSP is running fine.
    But whenever, I give some inputs to the JSP and click the
    Submit button, it is not going to the Servlet.
    Infact nothing is happening.

    Regards
    Neha Singh

  • RELEVANCY SCORE 2.76

    DB:2.76:My Submit And Reset Buttons Are Not Working In Dreamweaver Cc. Please Help!!! p9



    /p

    p align="center"

    input name="reset" type="reset" id="reset" value="Reset"

    input name="submit" type="submit" id="submit" formaction=

    "mailto:k123456789@hotmail.com?subject=Orders;" formmethod="POST" title="Submit" value=" Submit"

    /form

    /p

    DB:2.76:My Submit And Reset Buttons Are Not Working In Dreamweaver Cc. Please Help!!! p9


    Let's keep the discussion in one post (less confusing), here's the duplicate: http://forums.adobe.com/thread/1455243?tstart=0

  • RELEVANCY SCORE 2.76

    DB:2.76:Jsp Code Completion Not Working 77


    empty

    DB:2.76:Jsp Code Completion Not Working 77

    NitroX will have java completion in JSP pages as part of its JSP version
    (which would be available for the Struts version as well).
    Please consult the roadmap http://www.m7.com/roadmap.jsp for more
    information.

    M7 Support

    "M7 Support" support@m7.com wrote in message
    news:409beb5c$1@dwarf.m7.com...
    NitroX 1.0 does not have java code completion in jsp pages. It is truethat
    we are a little biased against having large amount of java code in jsp
    pages, but we will add it in future releases if we found that there is
    enough demand.

    Thanks,
    M7 Support

    "Michael Schulz" mike@mschulz.net wrote in message
    news:409baafa$1@dwarf.m7.com...
    I have imported my non-struts web application in NitroX build 143.
    Everything works fine - the app builds, I can set breakpoints in .jsp
    and
    java
    class files, and code completion works in java class files. However,
    code
    completion does not work in my .jsp files.

    How can I get the code completion working in the .jsp files?

    NitroX was installed standalone - that is, with the embedded Eclipse
    installation. I am connecting to my local Tomcat 5.0.19 server.

    -Mike

  • RELEVANCY SCORE 2.76

    DB:2.76:Unable To Load The Second Jsp Page 7f


    Hi,

    I have three jsp pages. The first is a Login.jsp which takes userid and password and after clicking on submit will take the user to the validate.jsp which validates the userid and password and if userid and password are valid redirects to a third jsp which has contentType="application/x-java-jnlp-file". All that is working fine, what is not working is after clicking on submit button I am not seeing validate.jsp page (i.e title and heading etc.), the browser stays in login.jsp page.

    Any suggestions.
    Thanks in advance.

    DB:2.76:Unable To Load The Second Jsp Page 7f

    Hi

    Couple of things :

    1. Make sure that the "ACTION" sttribute in the FORM is pointing to the right URL.

    2. Make sure that the SUBMIT button is inside the FORM tags, then make sure that the SUBMIT button is in the same FORM as the Text Fields .

    If it is still causing you problems , please post your code.

    Good Luck!
    Eshwar Rao
    Developer Technical Support
    Sun microsystems inc.
    http://www.sun.com/developers/support

  • RELEVANCY SCORE 2.75

    DB:2.75:Help With Jsp And Lucene - mj


    I downloaded Lucene (apache product) and put the jar files in the /webapps/lucene/WEB-INF/lib directory. I created a simple jsp file:

    test.jsp

    %@ page import = "org.apache.lucene.*" %
    %@ page import = "java.io.*" %
    %@ page import = "java.util.Date" %

    Test

    %
    Date start = new Date();

    IndexWriter writer = new IndexWriter("index", new StandardAnalyzer(), true);
    %

    Started %=start %

    -----------------------

    When pulling it up I get:

    org.apache.jasper.JasperException: Unable to compile class for JSP

    An error occurred between lines: 7 and 12 in the jsp file: /test.jsp

    Generated servlet error:
    /home/tpleasan/cots/jakarta/jakarta-tomcat-4.0.6/work/Standalone/localhost/lucene/test$jsp.java:73: Class org.apache.jsp.IndexWriter not found.
    IndexWriter writer = new IndexWriter("index", new StandardAnalyzer(), true);
    ^

    An error occurred between lines: 7 and 12 in the jsp file: /test.jsp

    Generated servlet error:
    /home/tpleasan/cots/jakarta/jakarta-tomcat-4.0.6/work/Standalone/localhost/lucene/test$jsp.java:73: Class org.apache.jsp.IndexWriter not found.
    IndexWriter writer = new IndexWriter("index", new StandardAnalyzer(), true);
    ^
    2 errors

    --------------

    I don't know what is wrong. The classpath I thought was set correctly to my jar files, but that doesn't seem to work. There isn't much documention on how to use JSP with Lucene. I got the basic examples they have working, but can't seem to get it working when I create my own stuff.

    PLEASE HELP!!!!!!!!!!!!!!!!!

    DB:2.75:Help With Jsp And Lucene - mj

    Apparently I have to set the classpath EACH TIME.
    How can I program this into the jsp so I don't have to do that? I thought that it would automatically find it if it was in the correct directory.

    Also I am following the directions of lucene but it won't search correctly. Nothing gets returned in the example search. What gives???

  • RELEVANCY SCORE 2.75

    DB:2.75:Jsp Not Working 91


    I have written code in JSP. But is not working on iPlanet server. Can anyone suggest me solutions for this?

    Thanks

    DB:2.75:Jsp Not Working 91

    Whenever i try ot execute jsp on iPlanet server, it just gives server error.
    Stating 'genericservlet error' : Could not find class .jsp filename.

    My Jsp attribute in iPlanet admin is already set.

  • RELEVANCY SCORE 2.75

    DB:2.75:Java Beans Persistence In All Jsp Pages aa


    I have a html form page (formpage.jsp), and when user fills out the data and
    click submit button, it will open page1.jsp, page1.jsp will store
    the form data in formpage.jsp to FormDataBean object, and able to retrieve the
    bean value. However, what if I want other jsp pages also able to retrieve
    the same object values?

    In the following, page1.jsp is able to get the value,
    but page2.jsp is not able to get the values.

    Any ideas??

    //----------------------------- formpage.jsp --------------------------

    html
    head
    titleForm Page/title
    body
    FORM ACTION="page1.jsp" METHOD="POST"
    PUser Name: INPUT TYPE="TEXT" NAME="username"
    PINPUT TYPE="SUBMIT" VALUE="submit here"
    /FORM
    /body
    /html

    //----------------------------- page1.jsp --------------------------

    jsp:useBean id="formDataBeanObj" class="formdatatest.FormDataBean"/
    jsp:setProperty name="formDataBeanObj" property="*"/

    HTML
    HEAD
    TITLEpage1.jsp/TITLE
    BODY
    FORM METHOD="POST" ACTION="page2.jsp"
    H2User Name = jsp:getProperty name="formDataBeanObj" property="username"//H2
    PINPUT TYPE="SUBMIT" VALUE="submit here"
    /FORM
    /BODY
    /HTML

    jsp:useBean id="formDataBeanObj" class="formdatatest.FormDataBean"/

    //----------------------------- page2.jsp --------------------------

    HTML
    HEAD
    TITLEpage2.jsp/TITLE
    BODY
    H2User Name = jsp:getProperty name="formDataBeanObj" property="username"//H2
    /BODY
    /HTML

    //----------------------------- FormDataBean.java --------------------------

    package formdatatest;

    public class FormDataBean
    {
    public void setUsername(String aUsername)
    {username = aUsername;
    }

    public String getUsername()
    {return username;
    }

    private String username;
    }

    DB:2.75:Java Beans Persistence In All Jsp Pages aa

    no, he means:
    jsp:useBean id="formDataBeanObj" class="formdatatest.FormDataBean" scope="session"/

    now on other pages where you wish to access values persisted in that bean, just use:
    jsp:useBean id="formDataBeanObj" class="formdatatest.FormDataBean" scope="session"/

    at the top of the bean. the container will find the bean named "formDataBeanObj" in the session and make it available for use on that jsp.

  • RELEVANCY SCORE 2.75

    DB:2.75:Display Success Message In Same Page When Submit Button Is Clicked 3x


    I have a jsp page, where i use a form to submit data into my database.when submit button is clicked, i am able to display "Data entered Successfully" in a different page. But i want to display the message in the same jsp page.

    what do i do?

    PS :- i have tried a javascript message box, but that is not working properly. I need this solved urgently.

    Thanks

    DB:2.75:Display Success Message In Same Page When Submit Button Is Clicked 3x

    I have a jsp page, where i use a form to submit data into my database.when submit button is clicked, i am able to display "Data entered Successfully" in a different page. But i want to display the message in the same jsp page.

    what do i do?

    PS :- i have tried a javascript message box, but that is not working properly. I need this solved urgently.

    Thanks

  • RELEVANCY SCORE 2.75

    DB:2.75:Anyone Succeeded In Making Fileupload (Java) Portlet? x8


    Hi,

    Has anyone ever succeeded in creating a java portlet that uploads a file?

    I am not getting the most basic thing working, such as the jsp snippet below:

    form name="%= formName %"
    method="POST"
    action="%= UrlUtils.htmlFormActionLink(pRequest,UrlUtils.PAGE_LINK) %"
    enctype="multipart/form-data"
    multipart/form-data seems not to be supported bij Portal?

    Is there any way to submit a multipart form via a portlet (and thus uploading a file)?

    Thanks in advance

    DB:2.75:Anyone Succeeded In Making Fileupload (Java) Portlet? x8

    Hi,

    Has anyone ever succeeded in creating a java portlet that uploads a file?

    I am not getting the most basic thing working, such as the jsp snippet below:

    form name="%= formName %"
    method="POST"
    action="%= UrlUtils.htmlFormActionLink(pRequest,UrlUtils.PAGE_LINK) %"
    enctype="multipart/form-data"
    multipart/form-data seems not to be supported bij Portal?

    Is there any way to submit a multipart form via a portlet (and thus uploading a file)?

    Thanks in advance

  • RELEVANCY SCORE 2.75

    DB:2.75:Form Objects In Email Not Working cx


    Hi All,

    I have designed a JSP which is sending survey form in an email to my clients in which I have put some form objects like radio button, text area, and a submit button. Few of my clients receive email with destorted form, or they are not able to press submit button, or form objects don't appear at all only the titles are displayed.

    Can someone suggest changes in code to overcome all these problems.

    Thanks

    Manu

    DB:2.75:Form Objects In Email Not Working cx


    Few of my clients So there is at least one client receives your survey well... So the problem is not with your code... it will be aat the client who receives your mail, maybe something needed to support at the Mail client like the "text/html" content-type. if you use JavaMail, or whatever, insure that you set the content type for the survey to be "text/html", so the mail client be able to recognize the Objects!
    Regards,
    Mohammed Saleem

  • RELEVANCY SCORE 2.75

    DB:2.75:Multiple Submit Buttons On One Form xa


    I'm developing an application that will have 4 buttons at the bottom of the form to do various things with the form information. One of the buttons will link to a separate web page for confirmation of the action. I tried to set a global variable and place an onclick event for the button which assigns a specific value for that variable. I then placed a jsp:forward tag in my code that would be included if the global variable was the specific value which the button changes it to. I"m not sure if I'm being clear here. There is the forms page with the 4 buttons. It possesses all of this code. So the global variable is declared at the top. The variable is set if the 'Delete' button is clicked. And further down there is an if statement used to include the jsp:forward tag when the 'Delete button has been pressed and this form is again being drawn up.

    What I describe doesn't work. The global variable I guess is reset when this form is drawn up a second time after the 'Delete' submit button is pressed. I''m not married to the way that I'm solving this problem at this point so I'll take any suggestions. But basically I want the Web Forms fields to be sent to this delete jsp so that I can confirm the command to delete the indicated record from the database. The three other buttons on this form are 'Add/Update', 'Rename', and 'Cancel'. The Add/Update and Rename buttons should also be submit buttons but they should link back to the same page as they are located on. The cancel button is to return the user to the index page. I have this working using a document.location.href command in the onclick event for that button.

    Brian

    DB:2.75:Multiple Submit Buttons On One Form xa

    Thanks r n,

    I found that if I gave three buttons the same name as you have done with the radio buttons, then used the getParameter request method and branched on that value in a redirect JSP I could get the desired effect.

    Brian

  • RELEVANCY SCORE 2.74

    DB:2.74:Button Not Working In Excel d7


    Hi,
    I have a JSP page that works perfect until I try to present it in excel format. The problem is that the button on the page does not working. This button should simply load a page.

    Here is the code:
    form action="overview_excel.jsp" method="post"
    input type="submit" name="orderButton" value="Submit"

    DB:2.74:Button Not Working In Excel d7

    It disappeared from the page. Maybe you typed the tag wrong.

  • RELEVANCY SCORE 2.74

    DB:2.74:Error 404--Not Found pa


    Hi,
    I have a jsp
    html
    head
    link rel="stylesheet" href="../css/mystyle.css" type="text/css" /
    /head
    body
    form name = "form1" method="post" action="hrms_user_login"
    table width="900" align=center
    tr
    td colspan="2"%@ include file="\jsp\hrms_header.jsp" %/td
    /tr
    tr
    td colspan="2"
    table border ="0" align="center"
    trtdUser Id/td
    td align="center" input type ="text" name="user_id" id="user_id" value="" //td/tr
    trtdUser Name/td
    td align="center" input type ="text" name="user_name" id="user_name" value="" //td/tr
    trtdPassword/td
    td align="center" input type ="password" name="user_pswd" id="user_pswd" value="" //td/tr
    trtd colspan="2" align="center" input type ="submit" name="submit" id="submit" value="Submit" /
    input type="hidden" name="action_submit" id="action_submit" value="hrms_user_login_submit"/
    /td/tr
    trtd colspan="2" align="center"
    input type ="submit" name="submit" id="submit" value="Change Password" /
    input type="hidden" name="action_chngpswd" id="action_chngpswd" value="hrms_change_pswd_submit"/
    /td/tr
    %
    String msg = (String)session.getAttribute("lErrorMsg");
    if ( msg != null msg.length() 0 ){
    %
    tr
    td colspan="2" align="center"
    %out.println("div class=boldred"+msg+"/div"); %
    /td
    /tr
    %}%
    /table
    /td/tr
    tr
    td colspan="2"%@include file="../jsp/hrms_footer.jsp"%/td
    /tr
    /table
    /form/body/html When I click the submit buttons of this page, I get Error 404--Not Found.
    My servlet class is inside webinf/classes, and the above jsp file is inside a directory called jsp.

    My web.xml is
    !DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"
    web-app


    servlet
    servlet-namehrms_user_login/servlet-name
    servlet-classhrms_user_login/servlet-class
    /servlet


    servlet-mapping
    servlet-namehrms_user_login/servlet-name
    url-pattern/hrms_user_login/*/url-pattern
    /servlet-mapping

    welcome-file-list
    welcome-fileindex.jsp/welcome-file
    welcome-fileindex.html/welcome-file
    welcome-fileindex.htm/welcome-file
    /welcome-file-list

    security-constraint
    web-resource-collection
    web-resource-nameMy secure resources/web-resource-name
    descriptionResources to be placed under security control./description
    url-pattern/private/*/url-pattern
    url-pattern/registered/*/url-pattern
    /web-resource-collection
    auth-constraint
    role-nameguest/role-name
    /auth-constraint
    user-data-constraint
    transport-guaranteeNONE/transport-guarantee
    /user-data-constraint
    /security-constraint

    login-config
    auth-methodBASIC/auth-method
    realm-nameWebApp/realm-name
    /login-config


    /web-appOther servlets which i try as examples, works fine for me. But when I call the hrms_user_login servlet from within the above given jsp, it isnt working. Can anyone give a solution?
    Regards,
    Anees

    DB:2.74:Error 404--Not Found pa

    hey can you tell me your web application name and what the following line will do.

    url-pattern/hrms_user_login/*/url-patterndon't keep your webapplication name here. directly give the url pattern which will come after your webapplication name.

    Diablo

  • RELEVANCY SCORE 2.74

    DB:2.74:Get Value From Dropdown (Without Submit) z3


    Hi!

    I hava a jsp-page with a dropDown. The values in the dropDown is from a list(person and age). My problem is that i have to show a value(age) from the list depending on the selected person in the list. (I get all the value to the list from the DB). Is it posible to get the index or value used in the dropdown so i can show the (age) value on the same index ????

    BRGDS
    //Nisse

    (I wont to show the age in a seperat place on the page, not i the same dropdown...)

    DB:2.74:Get Value From Dropdown (Without Submit) z3

    See this for example:
    http://www.servletsuite.com/tips/lists.htm

  • RELEVANCY SCORE 2.74

    DB:2.74:Savetoken(Getrequest()) Not Working On Weblogic 8.1 Sp4 dp


    Hi,

    I have a JPF-A with as usual multiple actions.

    I tried the following scenario

    JPF-A action actionA forward to JSP A1 - I put saveToken(getRequest()) in actionA
    JSP A1 calls action_B of the JPF-A and forward to JSP A2 - I put isTokenValid(this.getRequest()) in action_B.
    Now say I am on JSP A2 ,if I click the back button ( browser ) and refresh the browser I go back to JSP A1 and now if I submit the page it doesn't take it as an invalidToken().

    Let me know what should I do - a sample would be helpful and if you can be a little prompt that would be the best.

    Any help would be highly appreciated.

    Thanks,
    -Shashikant

    DB:2.74:Savetoken(Getrequest()) Not Working On Weblogic 8.1 Sp4 dp

    Hi,

    I have a JPF-A with as usual multiple actions.

    I tried the following scenario

    JPF-A action actionA forward to JSP A1 - I put saveToken(getRequest()) in actionA
    JSP A1 calls action_B of the JPF-A and forward to JSP A2 - I put isTokenValid(this.getRequest()) in action_B.
    Now say I am on JSP A2 ,if I click the back button ( browser ) and refresh the browser I go back to JSP A1 and now if I submit the page it doesn't take it as an invalidToken().

    Let me know what should I do - a sample would be helpful and if you can be a little prompt that would be the best.

    Any help would be highly appreciated.

    Thanks,
    -Shashikant

  • RELEVANCY SCORE 2.74

    DB:2.74:Passing Parameters From One Jsp To Another Jsp Inside A Portlet ak


    I have two jsp files, RequestLogin.jsp and RequestLoginMail.jsp. A user will fill out the form on RequestLogin.jsp when they click submit, RequestLoginMail.jsp is invoked. I got this working in a portlet but RequestLoginMail.jsp never receives the parameters that exist from RequestLogin.jsp. I'm just not sure on how I can retreive the parameters, would someone please point me in the right direction. Thanks.

    DB:2.74:Passing Parameters From One Jsp To Another Jsp Inside A Portlet ak

    I have two jsp files, RequestLogin.jsp and RequestLoginMail.jsp. A user will fill out the form on RequestLogin.jsp when they click submit, RequestLoginMail.jsp is invoked. I got this working in a portlet but RequestLoginMail.jsp never receives the parameters that exist from RequestLogin.jsp. I'm just not sure on how I can retreive the parameters, would someone please point me in the right direction. Thanks.

  • RELEVANCY SCORE 2.73

    DB:2.73:Autonomy Lite: Indexing Jsps 81


    I have installed autonomy lite portlet in WLPortal4.0. I am not able to index jsp files into autonomy's DRE. I have already set ImportHTMLExtns to *.htm,*.jsp Still DRE is not able to read jsp files and index it.

    Please help.

    Thanks,
    Kamlesh

    DB:2.73:Autonomy Lite: Indexing Jsps 81

    I have installed autonomy lite portlet in WLPortal4.0. I am not able to index jsp files into autonomy's DRE. I have already set ImportHTMLExtns to *.htm,*.jsp Still DRE is not able to read jsp files and index it.

    Please help.

    Thanks,
    Kamlesh

  • RELEVANCY SCORE 2.73

    DB:2.73:Unable To Compile The Class For Jsp cd


    Sir,
    When I run my application,I get following error:
    " Unable to compile the class for jsp
    ....
    .......
    Root cause: Array Index out of bound.
    ......."
    This error comes only to one of jsp page of our application and not to all.
    So I have to reinstall my j2sdkee and deploy my application again.
    Then the error is not shown.But its temperory this error is again viewed
    again if I run my application.
    I am working on the j2ee server.
    Please give the solution for this problem.
    Thanking you,
    Sameer

    DB:2.73:Unable To Compile The Class For Jsp cd

    Sir,
    Thanks for soon reply,
    I have not written any code for array in the jsp page where I am getting the erorr..thats the strange part..The first line of error is "Unable to Compile the class for jsp"
    At the back end if I see then it shows
    "Warning :bad type class".
    Please reply
    Thanks
    Sameer

  • RELEVANCY SCORE 2.73

    DB:2.73:Jsp And Javamail ds


    Hi, I would greatly appreciate some input. I have been working on this project where I need to create an input form and when the submit button is pressed, an email is sent automatically to one or more persons. I am not sure how to go about doing this. Thanks :0)

    DB:2.73:Jsp And Javamail ds

    With much trial and error, I finally got it. Thanks

  • RELEVANCY SCORE 2.72

    DB:2.72:How To Submit The Following Form pm


    Hi ,

    Iam having two forms one is form1.jsp and other one is form2.jsp.In form1.jsp iam not using submit button instead iam using an image hyperlink to submit it to form2.jsp.How can i do this.I used the following code but iam getting error unble to go to document.form1.submit()

    Pls help me in this regard.Thanks

    Naveen

    html
    body
    form name="form1" action="form2.jsp" method="get or post"
    // I wrote all my form elements.
    img src="xxx.gif".
    /form
    /body
    html

    DB:2.72:How To Submit The Following Form pm

    use:
    ()"img src="xxx.gif" onClick="document.form1.submit()"

  • RELEVANCY SCORE 2.72

    DB:2.72:Refresh A Jsp Page m1


    Can I refresh another jsp page from a jsp page submit ?

  • RELEVANCY SCORE 2.72

    DB:2.72:Link Not Working From Submit On Form cf


    When I have this link in my jsp
    Get ALL ClassifiedsBRBR

    and click on it i get this in the address bar:
    http://localhost:8080/mysite/servlet/getclassifieds?classifiedsearchtype=ALL

    Everything works fine.

    However when I put the link into a form like this:
    form method="get" action="http://localhost:8080/mysite/servlet/getclassifieds?classifiedsearchtype=ALL"
    input type="submit" value="Submit" /
    /FORM

    And click Submit I get this in the address bar
    http://localhost:8080/mysite/servlet/getclassifieds

    The submit action is not sending the parameter:

    getclassifieds?classifiedsearchtype=ALL

    Obviously my servlet returns a null pointer.

    Any ideas. I have googled this to death.

    DB:2.72:Link Not Working From Submit On Form cf

    javadev991 wrote:
    Now working.What?

    Just cross check certain things
    - The servlet you specified in Form Action is correct
    - The Form Method must be POST not GET
    - The query string param you are specifying in URL which is classifiedsearchtype, You are trying to get the same param in the servlet. It is case sensitive.

  • RELEVANCY SCORE 2.72

    DB:2.72:Single Jsp 2 Urls Select One Submit 81


    Hi All,
    I have following Jsp page:My requirement is: Page has a single submit button and two FORM tags. Each form tag has a Url to invoke on Submit button pressed. Meaning if user selects SIT1 radio button and presses Submit then the browser should display indexBM.jsp page If user selects SIT2 radio button and presses Submit, then browser should display indexComp.jsp page.Following is not working. What changes I need to do to achieve above?

    I can use only one Submit button for both the forms.

    So, the user interface series is
    1Page gets displayed
    2User selects the Radio button, either SIT1 or SIT2 and then presses the Submit
    3On Submit the either indexBM.jsp or indexComp.jsp is displayed depending upon which radio button user selected.
    What changes I need to do in Jsp page to achieve this series of events? Pl remember I have only one Submit button and two Radio buttons for selection

    thanks

    %@ include file="header.jsp" %
    script
    checkSubmit()
    {

    }
    /script
    request.getParameter("radio").equals("SIT1") action="indexBM.jsp"
    html
    body
    trtdbcenterBEST MATCH and CRES(Customer Related Enterprise Services)/td/tr

    form method="post" action="indexBM.jsp"
    table width="700" Align="center"
    !--DWLayoutTable--
    tr/tr
    tr/tr
    tr/tr
    tr/tr
    tr/tr
    tr/tr

    tr
    td/td
    tdBIService Type/I/B/td
    tdinput type="radio" name="env_Type" value="SIT1" Best Match/td
    /tr
    tr
    td/td
    td/td
    /tr
    input type="submit" name="submit" onclick="return checkSubmit()"

    /table
    /form


    form method="post" action="indexComp.jsp"
    table width="700" Align="center"

    tr
    td/td
    td/td
    tdinput type="radio" name="env_Type" value="SIT2" CRES(Customer Related Enterprise Services)/td
    /tr

    tr
    td/td
    td/td
    /tr

    /table
    /form

    tr
    BR
    P/P
    /tr
    tr
    td width="40"/td
    td/td
    td colspan=3
    input type="submit" name="submit" value="SUBMIT"
    /td
    td/td
    /tr
    /table

    /body
    /html

    DB:2.72:Single Jsp 2 Urls Select One Submit 81

    or that.....
    :-)

    much more reliable than javascript.

  • RELEVANCY SCORE 2.71

    DB:2.71:Save Changes Before Unload Using Jsp cd


    I need to confirm that the user pressed Submit before leaving a window if
    any changes are made, what's the easiest way to do that?

    I tried adding code to the On Unload event of the page but not working.
    can I stop unloading event if user opts to save changes?

    Regards,
    Prem

  • RELEVANCY SCORE 2.71

    DB:2.71:Problem With Sendredirect mm


    I am using one HTML Page and two JSP Pages. HTML page is a typical login page. It takes UserName and Password from the user and when "submit" is clicked for the form, the values are sent to the JSP page below.

    This JSP page checks the UserName and Password against the Strings AUTOMATION and password respetively. If authnicated it sends the user to second JSP page otherwise it redirects the user back to Login Page.

    My problems is that sendRedirect doesn't seem to be working for me. Because when I removed sendRedirect, code worked normally without an error.

    I m using Tomcat 5.5.11 and the error message its giving seems to be some language, I m not able to understand.

    Can somebody help ??

    Code for JSP ----

    %
    String UserName = request.getParameter("UserName");
    String Password = request.getParameter("Password");
    out.println(UserName);

    if(UserName.equals("AUTOMATION"))
    {
    if(Password.equals("password"))
    {
    response.sendRedirect("Tut.jsp");
    }

    else
    {
    response.sendRedirect("index.html");

    }
    }
    else
    {
    response.sendRedirect("index.html");
    }

    %

    DB:2.71:Problem With Sendredirect mm

    Thanks for your help guys .. I really appreciate that ..

    I have tried everything but unfortunately nothing clicked. So in the end I replaced JSP with a Servlet and used RequestDispatcher. It seems to be working fine for me.

    I appreciate your help .. Thanks a lot ..

  • RELEVANCY SCORE 2.71

    DB:2.71:Small Jsp Not Working ak


    Hi All,

    I am Trying to do the following task but the page is not getting forwarded so can anyone please help me on this.

    %@ page contentType="text/html;charset=windows-1252"%
    %@ page import="java.sql.*,java.util.*"%

    %
    String uname=request.getParameter("username")!=null?request.getParameter("username"):"";
    String pword=request.getParameter("password")!=null? request.getParameter("password"):"";
    %

    jsp:include page="header.html" flush="true"/

    script language="javascript"

    function calljs1()
    {
    document.forms[0].action='getunpw.jsp';
    }

    /script

    jsp:include page="body.html" flush="true"/

    form name="Login" method="post" AUTOCOMPLETE = "off"
    br
    br
    br
    br
    br
    br
    br
    br
    br
    br

    CENTER

    bUser Name:/b input type = "text" Name="username"br

    bPass Word:/b input type = "password" Name="password"br

    br
    input type = "submit" name="submit" value="Login" /

    input type = "RESET" name="Reset" value="Clear" /

    input type = "submit" name="submit" value="Change Password" onClick="calljs1()" /

    /table
    /CENTER

    %

    String log=request.getParameter("submit")!=null?request.getParameter("submit"):"";

    if(log.equals("Login"))

    {%

    jsp:forward page="index.jsp"

    %}%

    jsp:include page="footer.html" flush="true"/

    DB:2.71:Small Jsp Not Working ak

    Hi..
    I think your code is well. But i have doubt at footer.html. Anyhow now i am sending some working code like this.
    html
    headtitle:: Login ::/title/head
    body
    form name=login method=post action="login.jsp"
    centerh1Login/h1/center
    br
    hr
    br
    table align=center border=1
    trthEmpId/thtdinput type=text name=id/td/tr
    trthPassword/thtdinput type=text name=pass/td/tr
    trth/thtdinput type=submit value=Login input type=reset value=Reset a href="insert.jsp"SignIn/a/td/tr
    /table
    %@ include file="conn.jsp" %
    %
    try
    {
    if(request.getParameter("id")!=null request.getParameter("pass")!=null)
    {
    String id = request.getParameter("id");
    String password=request.getParameter("pass");
    ResultSet rs = st.executeQuery("select * from login where empid='"+id+"' and password='"+password+"'");

    if(rs.next())
    {
    session.putValue("no",id);
    session.putValue("pass",password);
    response.sendRedirect("list.jsp");
    }
    else
    response.sendRedirect("fail.jsp");
    }
    }catch(Exception e){e.toString();}
    finally{
    try
    {
    if(con != null)
    {
    con.close();
    }
    if(st != null)
    {
    st.close();
    }
    }catch(Exception e){e.toString();}
    }
    %
    /form
    /body
    /htmlI hope it will be help you.
    bye..
    sure..:)-

  • RELEVANCY SCORE 2.71

    DB:2.71:Htmlb/Jsp - Javascript Submit kf



    How do I submit an HTMLB form using javascript.

    document.forms[formId].submit();

    DB:2.71:Htmlb/Jsp - Javascript Submit kf


    Take a look at the following code. This is your solution except for bcontrol + S/b part.

    PS: Thanks for the points in advance if it works out for you.

    %@ taglib uri="tagLib" prefix="hbj" %
    %@ page import = "com.sapportals.htmlb.enum.EventTrigger" %
    %
    String buttonid = "";

    %
    hbj:content
    id="myContext"
    hbj:document
    hbj:documentHead
    title="test"
    /hbj:documentHead
    hbj:documentBody
    hbj:form
    id="simpleForm"

    hbj:inputField
    id="InputName"
    type="string"
    maxlength="100"
    value="Your name here"
    jsObjectNeeded="true"
    %
    InputName.setClientEvent(
    EventTrigger.ON_KEYDOWN,
    "Submit_Event()");
    %
    /hbj:inputField

    hbj:button
    id="SubButton"
    text="Submit"
    tooltip="Sends your info"
    onClick="onClicked"
    width="30px"
    design="EMPHASIZED"
    jsObjectNeeded="true"
    %
    buttonid = myContext.getParamIdForComponent(SubButton);
    %

    /hbj:button
    /hbj:form
    /hbj:documentBody
    /hbj:document
    script
    language="javascript"
    function Submit_Event() {
    var src= window.event.srcElement;
    k = window.event.keyCode;
    if (k == 13) {
    // enter key pressed
    document.all.%=buttonid%.click();

    }
    }
    /script
    /hbj:content

  • RELEVANCY SCORE 2.71

    DB:2.71:Generated Jsp Not Working 8c


    Below is a snippet of code that I use to generate a set of drop down menu. The drop down is populated from a database and then based on the selected index of the drop down an image is displayed and a textarea is populated. the problem is the last jsp:include. the drop down is populated and the images appear like they are supposed to but the textarea is not getting populated. I don't understand why because the html and the javascript are getting generated exactly like they should. can anyone help? Thanks.

    code
    form action="validateTree.jsp" method="post"
    table width="100%"
    tbody
    tr
    jsp:include page="/DropDown.jsp"
    jsp:param name="list" value="Beads" /
    jsp:param name="imgNum" value="Img1" /
    /jsp:include
    /tr
    tr
    jsp:include page="/DropDown.jsp"
    jsp:param name="list" value="Beads" /
    jsp:param name="imgNum" value="Img2" /
    /jsp:include
    /tr
    tr
    jsp:include page="/DropDown.jsp"
    jsp:param name="list" value="Wire" /
    jsp:param name="imgNum" value="Img1" /
    /jsp:include
    /tr
    tr
    jsp:include page="/DropDown.jsp"
    jsp:param name="list" value="Wire" /
    jsp:param name="imgNum" value="Img2" /
    /jsp:include
    /tr
    tr
    jsp:include page="/DropDown.jsp"
    jsp:param name="list" value="Stones" /
    jsp:param name="imgNum" value="Img" /
    /jsp:include
    /tr
    tr
    td align="right"Tree Size Large/td
    td align="left"input name="sizeInd" type="radio" checked="checked" value="large" //td
    /tr
    tr
    td align="right"Tree Size Small/td
    td align="left"input name="sizeInd" type="radio" value="small" //td
    /tr
    tr
    td align="center"input class="button" name="custTreeSubmit" type="submit" value="Submit" //td
    /tr
    /tbody
    /table
    /form
    /code

    DB:2.71:Generated Jsp Not Working 8c

    Below is a snippet of code that I use to generate a set of drop down menu. The drop down is populated from a database and then based on the selected index of the drop down an image is displayed and a textarea is populated. the problem is the last jsp:include. the drop down is populated and the images appear like they are supposed to but the textarea is not getting populated. I don't understand why because the html and the javascript are getting generated exactly like they should. can anyone help? Thanks.

    code
    form action="validateTree.jsp" method="post"
    table width="100%"
    tbody
    tr
    jsp:include page="/DropDown.jsp"
    jsp:param name="list" value="Beads" /
    jsp:param name="imgNum" value="Img1" /
    /jsp:include
    /tr
    tr
    jsp:include page="/DropDown.jsp"
    jsp:param name="list" value="Beads" /
    jsp:param name="imgNum" value="Img2" /
    /jsp:include
    /tr
    tr
    jsp:include page="/DropDown.jsp"
    jsp:param name="list" value="Wire" /
    jsp:param name="imgNum" value="Img1" /
    /jsp:include
    /tr
    tr
    jsp:include page="/DropDown.jsp"
    jsp:param name="list" value="Wire" /
    jsp:param name="imgNum" value="Img2" /
    /jsp:include
    /tr
    tr
    jsp:include page="/DropDown.jsp"
    jsp:param name="list" value="Stones" /
    jsp:param name="imgNum" value="Img" /
    /jsp:include
    /tr
    tr
    td align="right"Tree Size Large/td
    td align="left"input name="sizeInd" type="radio" checked="checked" value="large" //td
    /tr
    tr
    td align="right"Tree Size Small/td
    td align="left"input name="sizeInd" type="radio" value="small" //td
    /tr
    tr
    td align="center"input class="button" name="custTreeSubmit" type="submit" value="Submit" //td
    /tr
    /tbody
    /table
    /form
    /code

  • RELEVANCY SCORE 2.71

    DB:2.71:Jsp Help-Simple Question pp


    Hi,
    I am having trouble in dealing with JSP pages.
    I have a JSP page which has a set of submit buttons which were generated by using a for loop. Now I have set it up to go to the next JSP page.But I do want to know the index of the button which was clicked.
    Its a simple problem for the ones who has been doing it for a while.
    Please help me in this regard,
    Thanks

    DB:2.71:Jsp Help-Simple Question pp

    Thanks for the replies.They really helped me in getting it done :)

  • RELEVANCY SCORE 2.71

    DB:2.71:Save Selected Value In Jsp dj


    in 1.jsp

    form action=2.jsp name="form1"
    ...
    select name="table"
    option value=1table1
    option value=2table2
    option value=3table3
    /select
    ...
    /form

    input type="hidden" name="submit" value="select"

    i want to save the selected table (name or index) in a variable, when the form is submitted. but i don't know how to do it? can anyone help? thanks.

    DB:2.71:Save Selected Value In Jsp dj

    i got it myself :)

    in 2.jsp

    jsp:include page="1.jsp" flush="true" /
    String tabSel = request.getParameter("table")

  • RELEVANCY SCORE 2.71

    DB:2.71:Can Anyone Help Me??? Thanks p1


    how to avoid duplicating submit of jsp ????
    There are two jsp which i call 1.jsp and 2.jsp ; a method in a action.
    in 1.jsp one should write his or her name in the blank and then click the "submit" button to skip to the method in which the name will be transferred to a database which i can't control. If it succeeds, at the end of the method it will findForward to 2.jsp. But if you click the backout button on IE or the backspace button on keyboard to 1.jsp and write another name in the blank and also click the "submit" button to skip to the method and then the 2.jsp , the name in the database will be changed which is not supposed.
    thanks for your help!!!!
    jjrainbow

    DB:2.71:Can Anyone Help Me??? Thanks p1

    thanks for your help for the second time, evnafets

  • RELEVANCY SCORE 2.71

    DB:2.71:Cancel Button Is Not Working In Struts fk


    Hello All,

    I am new in struts.I have a problem,my cancel button is not working.

    Actually, I have two button in jsp page. one is html:submit/ and another is
    html:cancel/.my submit button is working fine .

    But when i click on cancel button is working same like submit but i want to go
    Input page on click on cancel.(means without doing anything go to input jsp )

    please help me.

    DB:2.71:Cancel Button Is Not Working In Struts fk

    this is not a struts forum
    either way, you failed to post the error message or any code

  • RELEVANCY SCORE 2.71

    DB:2.71:Relativley Simple Jsp Problem mx


    I'm working in a small project and part of it is when a user registers,
    there details are checked for errors (eg null value). If there is an error
    it should appear on screen if there is not it should forward to
    a confirmation page from the register page. A simple example of the code
    on both pages appears below. At the moment it is not working. I would appreciate
    any help

    JSP #1: exampleregister.jsp

    form name="form1" method="post" action="/exampleregister.jsp"
    pUSERNAME:
    input type="text" name="username"
    pAGE:
    input type="text" name="age"

    p
    input type="submit" name="submit" value="submit"
    /form
    p
    %if (request.getParameter("submit") == null) { %
    % if (request.getParameter("username") == null) {%
    brmust show user name
    % if (request.getParameter("age") == null) {%
    br must show age
    %}else{%
    jsp:forward page="/exampleconfirm.jsp" /
    % } %
    % } %
    % } %
    p

    JSP #2: exampleconfirm.jsp

    body bgcolor="#FFFFFF" text="#000000"
    Details entered =
    form name="form1" method="post" action=""
    pUsername:
    input type="text" name="username" value="%=request.getParameter("username")%"
    /p
    pAge:
    input type="text" name="age" value="%=request.getParameter("age")%"
    /p
    p
    input type="submit" name="Submit" value="Submit"
    /p
    /form

    Anybody any ideas where I'm going wrong??

    DB:2.71:Relativley Simple Jsp Problem mx

    Adam I tried that but what is the story with the line:
    status = failed;
    failed is an undefined variable so obviously it won't compile in the JSP page. I tried a few different things but I'm abit lost at the mo!! THanks for ur help

  • RELEVANCY SCORE 2.70

    DB:2.70:Jsp Problem km


    From the browser window, a popup window is opened which has a "ok" button.On click of a button a new jsp page is to be displayed in the main browser window (not in this pop up window).How to specify the target?Also this popup window need to be closed.
    The code used on click on ok button is as follows(it's not working):
    function cmdOK_Click()
    {
    document.forms[0].action="fetchnewreq.spi";
    document.forms[0].method="post";
    document.forms[0].target="_top";
    document.forms[0].submit();

    }

    DB:2.70:Jsp Problem km

    Try giving each window (including the main one) a unique name, then specify the desired window name in the target field (instead of "_top").

  • RELEVANCY SCORE 2.69

    DB:2.69:Search Box Not Working On A Jsp ma


    Hi folks,
    I have a normal Portalpage as our Intranet homepage (pulling its styles from an HTML template) that has a number of portlets on it.

    There's a search box that comes in the form of:

    form name="IntSearch" action="SLCINTRANET.keywordsearch" method="POST"

    input type="text" id="search" name="p_search_text" maxlength="2000" size="12"
    input type="submit" id="submit" name="p_request" value="Go"

    /form

    where SLCINTRANET.keyword search I think is a database package. Now this works fine on the normal Portal page but when I convert my Portal page to a JSP (new homepage is JSP because it's easier to design for), the search fails giving me:

    WWC-50003 - Object not found.

    Any ideas where it's failing given that the search works as a normal Portal page?

    DB:2.69:Search Box Not Working On A Jsp ma

    Hi folks,
    I have a normal Portalpage as our Intranet homepage (pulling its styles from an HTML template) that has a number of portlets on it.

    There's a search box that comes in the form of:

    form name="IntSearch" action="SLCINTRANET.keywordsearch" method="POST"

    input type="text" id="search" name="p_search_text" maxlength="2000" size="12"
    input type="submit" id="submit" name="p_request" value="Go"

    /form

    where SLCINTRANET.keyword search I think is a database package. Now this works fine on the normal Portal page but when I convert my Portal page to a JSP (new homepage is JSP because it's easier to design for), the search fails giving me:

    WWC-50003 - Object not found.

    Any ideas where it's failing given that the search works as a normal Portal page?

  • RELEVANCY SCORE 2.69

    DB:2.69:Command Link Not Working With Tabbed Pane zx


    I am calling one action on click of CommandLink in a DataTable,
    When I submit the action from an individual page , It is working fine,

    When I include that JSP in the TabbedPane , it is throwing JavaScript error "Error on the page" and action won't submit.

    Please help me in resolving out this issue.

    Thanks
    Gifin

  • RELEVANCY SCORE 2.69

    DB:2.69:Struts Problem, The Value Of A Text Field Gets Lost When Submitting fj


    Hi,
    the code Im using is the following,

    In the struts-config.xml
    action input="/hangman.jsp"
    name="HangmanForm"
    path="/checkLetter"
    scope="session"
    type="hangman.CheckLetterAction"
    forward name="success" path="/hangman.jsp"/
    /action

    In the JSP:

    script type="text/javascript"
    function checkLetter(){
    document.forms[0].action='checkLetter.do';
    document.forms[0].submit();
    }

    html:text property="currentletter" onkeydown="checkLetter()"/

    In the Action class:

    String currentletter=f.getCurrentletter();//we get the letter typed in

    When executing Ive got this error:
    javax.servlet.ServletException: java.lang.StringIndexOutOfBoundsException: String index out of range: 0

    because Im trying to get a String that does not exist

    Can anyone help, pls
    Thank you

    DB:2.69:Struts Problem, The Value Of A Text Field Gets Lost When Submitting fj

    Hi,
    the code Im using is the following,

    In the struts-config.xml
    action input="/hangman.jsp"
    name="HangmanForm"
    path="/checkLetter"
    scope="session"
    type="hangman.CheckLetterAction"
    forward name="success" path="/hangman.jsp"/
    /action

    In the JSP:

    script type="text/javascript"
    function checkLetter(){
    document.forms[0].action='checkLetter.do';
    document.forms[0].submit();
    }

    html:text property="currentletter" onkeydown="checkLetter()"/

    In the Action class:

    String currentletter=f.getCurrentletter();//we get the letter typed in

    When executing Ive got this error:
    javax.servlet.ServletException: java.lang.StringIndexOutOfBoundsException: String index out of range: 0

    because Im trying to get a String that does not exist

    Can anyone help, pls
    Thank you

  • RELEVANCY SCORE 2.69

    DB:2.69:Oats - Playback Is Not Working In Openscript For Load Testing With Web/Http zz


    Hi,I am able to record the script in Open Script successfully, but when I try to playback the same without making any changes....its fails with error : Failed to solve variable web.input.Submit using path .//input[@name='Submit']/@value I have already commented the part where password will be matched in the code....thus, login/bad credentials related issues is ruled out as well.Please help with me some solution.Following is the recorded script:import oracle.oats.scripting.modules.basic.api.internal.*;import oracle.oats.scripting.modules.basic.api.*;import oracle.oats.scripting.modules.http.api.*;import oracle.oats.scripting.modules.http.api.HTTPService.*;import oracle.oats.scripting.modules.utilities.api.*;import oracle.oats.scripting.modules.utilities.api.sql.*;import oracle.oats.scripting.modules.utilities.api.xml.*;import oracle.oats.scripting.modules.utilities.api.file.*;public class script extends IteratingVUserScript { @ScriptService oracle.oats.scripting.modules.utilities.api.UtilitiesService utilities; @ScriptService oracle.oats.scripting.modules.http.api.HTTPService http; public void initialize() throws Exception { http.setUserAgent("Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; InfoPath.2)"); http.setAcceptLanguage("en-US"); } /** * Add code to be executed each iteration for this virtual user. */ public void run() throws Exception { beginStep("[1] FLEXCUBE - PRIVATE BANKING", 0); { http.window(2, "window[@index='0']").get( "http://10.180.59.185:9500/wm", null, null, true, "UTF8", "UTF8"); { http.solveXPath("web.input.Submit", "/window[@index='0']", ".//input[@name='Submit']/@value", "Sign In", 0, EncodeOptions.None); http.solveXPath("web.input.strutstokenname", "/window[@index='0']", ".//input[@name='struts.token.name']/@value", "struts.token", 0, EncodeOptions.None); http.solveXPath("web.input.strutstoken", "/window[@index='0']", ".//input[@name='struts.token']/@value", "CFSZKA9Z6RSWJTW8TT35GXCNIOIGMJGA", 0, EncodeOptions.None); } } endStep(); beginStep("[2] FLEXCUBE - PRIVATE BANKING - Home", 8538); { http.form( 14, "window[@index='0']//form[((@id='formLogin' and @name='formLogin') or @action='http://10.180.59.185:9500/wm/j_spring_security_check;jsessionid=B8396BEC73D829538F5E55FEE125330D') and @index='0']") .submit(null, http.postdata( http.param("j_username", "HOHEAD1"), http.param("j_password", "a99fad1866af01d9375627d5d08d7f1c11ed4d3f6d5d2372d40908884a15b8e6"), http.param("Submit", "{{web.input.Submit,Sign In}}"), http.param("struts.token.name", "{{web.input.strutstokenname,struts.token}}"), http.param("struts.token", "{{web.input.strutstoken,CFSZKA9Z6RSWJTW8TT35GXCNIOIGMJGA}}")), null, true, null, null, null, null, null); } endStep(); beginStep("[3] FLEXCUBE - PRIVATE BANKING", 9875); { http.link( 28, "window[@index='0']//a[@text='Logout' and (@href='http://10.180.59.185:9500/wm/logout.jsp?logoutToken=0.1189281079747162' or @index='159')]") .click(); } endStep(); } public void finish() throws Exception { }}

    DB:2.69:Oats - Playback Is Not Working In Openscript For Load Testing With Web/Http zz

    Hi,I have already tried that and have even commented the password authentication check in our application code.None of this is working.Anyways thanks for your reply Anything else that i can try?

  • RELEVANCY SCORE 2.69

    DB:2.69:Refreshing The Content On A Jsp Page 39


    Hi,

    I am developing an application where a JSP page (index.jsp) is displaying some data from the database. There is an HTML form on the JSP page too. When the user fills in the data and clicks submit, he is redirected to a servlet (via form's action)... the servlet inserts the data into the database and the user is redirected back [Response.sendRedirect("index.jsp")] to the original JSP page.

    The problem I am facing here is that when the user is back on the original index.jsp page, the newly inserted data is not being displayed on the page. The user MUST refresh the page manually in order to view the new data.

    How can I display the new data automatically, without the user refreshing the page?

    PS: I have already tried META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE"... but it is not working...

    Any help will be greatly appreciated.

    Thanks.

  • RELEVANCY SCORE 2.69

    DB:2.69:Jsp Form And Elements x8


    I am working with JSP and forms.
    I want to know commands for an element.
    I have two JSP books they each have examples on elements for example checkbox, radiobutton etc but neither has the element I want.

    I do not know the name is, perhaps its called multiple textarea.
    Any way I want to display some employment area to the user in a textarea and the user can select more than one. For example

    |---------------------------|
    | Sales |
    | Marketing |
    | Accounting |
    | Programming |
    | Engineering |
    | Management |
    | Accounts |
    |---------------------------|

    [submit-button]

    I would be grateful if also web references is provided?
    Thanks in advance?

    Also does anybody know any good tutorials on JSP????
    I really enjoyed learning Java using the Sun Tutorial, but it doesn't have a section on JSP??

    DB:2.69:Jsp Form And Elements x8

    Is this what you are looking for ?

    select size="5" multiple name="MultiAssignment"
    option 1/option
    option 2/option
    /select/p

    I am working with JSP and forms.
    I want to know commands for an element.
    I have two JSP books they each have examples on
    elements for example checkbox, radiobutton etc but
    neither has the element I want.

    I do not know the name is, perhaps its called multiple
    textarea.
    Any way I want to display some employment area to the
    user in a textarea and the user can select more than
    one. For example

    |---------------------------|
    | Sales |
    | Marketing |
    | Accounting |
    | Programming |
    | Engineering |
    | Management |
    | Accounts |
    |---------------------------|

    [submit-button]

    I would be grateful if also web references is
    s provided?
    Thanks in advance?

    Also does anybody know any good tutorials on JSP????
    I really enjoyed learning Java using the Sun Tutorial,
    but it doesn't have a section on JSP??

  • RELEVANCY SCORE 2.69

    DB:2.69:Struts And Indexed Properties am


    I have searched all over the web and seem to be getting tantalizingly close, but...

    I have an ActionForm object ("parentForm") that contains an array of ActionForm objects ("childForm"). In my jsp page, I want to be able to set the value of multiple childForms (using text areas).

    Both ActionForm classes are listed in the struts-config.xml file.

    ---------

    The relevant portion of my ParentForm class looks like this:

    // variable
    private ChildForm[] children = new ChildForm[10];

    // constructor
    public ParentForm()
    {
    super();
    // initialize children
    for(int i = 0; i children.length; ++i)
    {
    children[i] = new ChildForm();
    }
    }

    // getter and setter methods
    public ChildForm[] getChildren(){
    return children;
    }

    public void setChilren(ChildForm[] children){
    this.children = children;
    }

    public ChildForm getChildren(int index){
    return children[index];
    }

    public void setChildren(int index, ChildForm child)
    {
    children[index] = child;
    }

    The ChildForm object is very simple:

    private String name = null;

    public String getName(){
    return name;
    }

    public void setName(String name){
    this.name = name;
    }

    My jsp page looks like this:

    html:form method="post" action="action.do"
    logic:iterate name="parentForm" property="children" id="child"
    html:textarea indexed="true" name="child" property="name" cols="40" rows="3"/
    /logic:iterate
    html:submit/
    /html:form

    The generated HTML seems correct:

    textarea name="child[0].name" cols="40" rows="3"/textarea
    ...
    textarea name="child[9].name" cols="40" rows="3"/textarea

    -------------

    When the input page comes up, all of the text boxes are created. However, after I enter information into them and submit and the page is redisplayed (b/c of a validation failure), the text areas do not contain any values. In my validate() method after hitting submit, I probe for any children values, but they are all null. There seems to be a disconnect b/w the values I enter in the jsp and what gets updated in the Actionform.

    There seems to be a lot of different ways to do this thing on the web, although none of them seemed to work for me. This appeared to be the cleanest method. Any ideas?

    DB:2.69:Struts And Indexed Properties am

    I have searched all over the web and seem to be getting tantalizingly close, but...

    I have an ActionForm object ("parentForm") that contains an array of ActionForm objects ("childForm"). In my jsp page, I want to be able to set the value of multiple childForms (using text areas).

    Both ActionForm classes are listed in the struts-config.xml file.

    ---------

    The relevant portion of my ParentForm class looks like this:

    // variable
    private ChildForm[] children = new ChildForm[10];

    // constructor
    public ParentForm()
    {
    super();
    // initialize children
    for(int i = 0; i children.length; ++i)
    {
    children[i] = new ChildForm();
    }
    }

    // getter and setter methods
    public ChildForm[] getChildren(){
    return children;
    }

    public void setChilren(ChildForm[] children){
    this.children = children;
    }

    public ChildForm getChildren(int index){
    return children[index];
    }

    public void setChildren(int index, ChildForm child)
    {
    children[index] = child;
    }

    The ChildForm object is very simple:

    private String name = null;

    public String getName(){
    return name;
    }

    public void setName(String name){
    this.name = name;
    }

    My jsp page looks like this:

    html:form method="post" action="action.do"
    logic:iterate name="parentForm" property="children" id="child"
    html:textarea indexed="true" name="child" property="name" cols="40" rows="3"/
    /logic:iterate
    html:submit/
    /html:form

    The generated HTML seems correct:

    textarea name="child[0].name" cols="40" rows="3"/textarea
    ...
    textarea name="child[9].name" cols="40" rows="3"/textarea

    -------------

    When the input page comes up, all of the text boxes are created. However, after I enter information into them and submit and the page is redisplayed (b/c of a validation failure), the text areas do not contain any values. In my validate() method after hitting submit, I probe for any children values, but they are all null. There seems to be a disconnect b/w the values I enter in the jsp and what gets updated in the Actionform.

    There seems to be a lot of different ways to do this thing on the web, although none of them seemed to work for me. This appeared to be the cleanest method. Any ideas?

  • RELEVANCY SCORE 2.69

    DB:2.69:Using The Fileupload Ojsp Taglibs jf


    After reading through the docs, I am trying to use the OJSP TagLib for uploading files to a directory. However, no matter what I do, I get the error, "javax.servlet.jsp.JspTagException: d:/temp is not a directory".

    I am using Windows and my fileaccess.properties, located in the WEB-INF directory, which contains one entry: fileaccess.basedir=d:/temp

    And my destination JSP (reached via a JSP that contains the fileaccess:httpUploadForm formsAction="review.jsp" submitButtonText="Submit"/ tag), review.jsp, uses the following tag fileaccess:httpUpload destination="d:/temp"/.

    Any idea as to why this is not working?

    DB:2.69:Using The Fileupload Ojsp Taglibs jf

    Thanks for the reply Steve. I seemed to figure it out after scouring the docs again. Basically, the classes want you to use recursive directories, and not the base directory that you put in fileaccess.properties. In other words, as soon as I created one directory within my d:/temp directory, and pointed the httpUpload to it (i.e. d:/temp/1), I was to upload to my heart's content - interesting, and I suppose useful to a point.

  • RELEVANCY SCORE 2.69

    DB:2.69:Parameters In Querystring xs


    I have a jsp page which displays a shopping cart of a user.
    The page contains a table with first column type of checkbox and then details of the products.
    When a user wants to update a row he first neet to select a chedkBox of a row and then choose the "update" button.
    The problem is that when i'm selecting the update button
    the queryString of the request contains only the values of the selected row.
    I want to get the values of all the rows in the shopping cart.
    When i'm using that table in a regular web application it's working fine (i can see all the values).

    The jsp page looks something like that -
    FORM METHOD="get" ACTION="CartServlet" NAME="CartForm"
    TABLE name="shoppingCartTable"
    TH/TH
    THQuantity/TH
    %
    ListShoppingCartItem items=(ListShoppingCartItem) request.getAttribute("items");
    int index=-1;
    for(ShoppingCartItem item : items)
    {
    index++;
    %
    TR ID="%=index%"
    TDInput ONCLICK="checkState(%=index%);" type="checkbox" name="selectCB" VALUE="%=index%"/TD
    TDInput type="textbox" name="txtQuantity" VALUE="%=item.getQuantity()%"/TD
    /TR
    %
    }
    %
    /TABLE
    INPUT TYPE="submit" VALUE="Update" NAME="update"
    /FORMIf i'm updating the first row then the queryString i'm getting is -
    selectCB=0txtQuantity=3update=Update

    In a regular web application i'm getting all the values -
    selectCB=0txtQuantity=3txtQuantity=1update=Update

    what could be the problem?
    thanks in advanced.

    DB:2.69:Parameters In Querystring xs

    each of your texbox input fields have the same name, while there is only one name in the querystring.

    Try to make each textbox field unique by padding it with the index variable.
    TDInput type="textbox" name="%="txtQuantity_" + index%"
    VALUE="%=item.getQuantity()%"/TDI am not an expert on jsp, but at first glance that should work

  • RELEVANCY SCORE 2.68

    DB:2.68:Modal Windows p8


    I have 2 jsp pages 1.jsp and 2.jsp . 1.jsp is the parent and 2.jsp is the child jsp. 2.jsp on submit calls a servlet which again forwards back to the same jsp which called it which is 2.jsp. My problem is this .
    I want 2.jsp to be modal . I can use window.showModalDialog for this but on submit the servlet opens another browser which i dont want . I want the servlet to forward to the same modal window that opened it .
    If i use window.open instead it works as expected but the window is not modal anymore . Is there any way using window .open to make a window modal ? Can somebody help me out with this please ? Thanks.

    DB:2.68:Modal Windows p8

    Include base target="_self" in the header of the 2.jsp page. It worked for me.

  • RELEVANCY SCORE 2.68

    DB:2.68:Using The Ojsp File Access Taglibs pf


    After reading through the docs, I am trying to use the OJSP TagLib for uploading files to a directory. However, no matter what I do, I get the error, "javax.servlet.jsp.JspTagException: d:/temp is not a directory".

    I am using Windows and my fileaccess.properties, located in the WEB-INF directory, which contains one entry: fileaccess.basedir=d:/temp

    And my destination JSP (reached via a JSP that contains the fileaccess:httpUploadForm formsAction="review.jsp" submitButtonText="Submit"/ tag), review.jsp, uses the following tag fileaccess:httpUpload destination="d:/temp"/.

    Any idea as to why this is not working?

    DB:2.68:Using The Ojsp File Access Taglibs pf

    Hi, Justin:

    I hope you have got it working.

    It is a bit confusing. However, if you read documentation more closely, the fileaccess.basedir is the base dir of file uploading. You should change your
    destination="d:/temp"
    to, say,
    destination="review"
    The your file will be uploaded to directory d:/tmp/review. Does that make sense?

    The error message actually means d:/temp/d:/temp is not a directory, which is alwasys true in windows as ":" is not allowed in file or directory names.

  • RELEVANCY SCORE 2.68

    DB:2.68:Need To Reload Page After Html:Select sj


    I have a jsp page with a LOV, after select a value from the list I reload the page and I will diplay a text field based on the selected value.
    The jsp page is an edit page, how can't I allow the validation of entity?
    Thi is the code:
    html:select property="LovCausali" onchange="submit();"
    html:optionsCollection label="prompt" value="index" property="LovCausali.displayData"/
    /html:select

    Thanks in advance for the help

    DB:2.68:Need To Reload Page After Html:Select sj

    I have a jsp page with a LOV, after select a value from the list I reload the page and I will diplay a text field based on the selected value.
    The jsp page is an edit page, how can't I allow the validation of entity?
    Thi is the code:
    html:select property="LovCausali" onchange="submit();"
    html:optionsCollection label="prompt" value="index" property="LovCausali.displayData"/
    /html:select

    Thanks in advance for the help

  • RELEVANCY SCORE 2.68

    DB:2.68:Submit Form From Jsp cs


    I have this line in my JSP to submit the form automatically

    BODY onload="document.test.submit();"

    When I invoke this JSP standalone , it works fine and submits the form'

    When I forward the control from a servlet using requestDispatcher , it does not submit .

    I get an error at the bottom of the browser saying "Object doesnot support this property or method" at the
    body tag

    Any ideas

    TIA

    DB:2.68:Submit Form From Jsp cs

    Thanks

    I got it ,

    the form had some input fields for which the name was 'submit' .

    Somehow it didn ot like it , when I changed the name it works

  • RELEVANCY SCORE 2.68

    DB:2.68:Jsp Resubmit On Iis Timeout 3c



    Hi all,

    Need your help. I got IIS as a webserver for my Weblogic 6.1 app server application.
    If I turn on the IIS, after 300 seconds (my guess it the iis timeout), the jsp
    that I submit (form submit) will resubmit again (so I will have 2 pararell jsp
    processing the submit).
    But when I turn off the IIS, this is not happened. Anybody know why ?
    Thanx,

    regards,
    Hendry

    DB:2.68:Jsp Resubmit On Iis Timeout 3c


    Hi all,

    Need your help. I got IIS as a webserver for my Weblogic 6.1 app server application.
    If I turn on the IIS, after 300 seconds (my guess it the iis timeout), the jsp
    that I submit (form submit) will resubmit again (so I will have 2 pararell jsp
    processing the submit).
    But when I turn off the IIS, this is not happened. Anybody know why ?
    Thanx,

    regards,
    Hendry

  • RELEVANCY SCORE 2.68

    DB:2.68:Data Insertion Problem In Jsp sj


    hi
    I am inserting data in same jsp page, with help of hidden field value,
    if i refresh the page, it is inserting again.
    Code is like this

    html
    body
    %
    if(request.getParameter("insert")!= null)
    {
    here i am taking max(pk)+1 for pk and
    inserting data in to table

    }
    %
    form name="frm" action="calling same page" method="post"
    /form
    input type="submit" name="Submit" value="Submit"
    input type="hidden" name="insert" value="true"
    /body
    /html

    first time it should not enter, when ever i click submit it enter insert block it working fine, but if refresh after inserting data inserting again.
    in my table only pk is the unique key and it is generated +1 everytime.

    if you know please give the solution.

    DB:2.68:Data Insertion Problem In Jsp sj

    This a master table entry in a table,
    I have a small clue...but it is not sufficient...
    User can enter the n number of different records.
    if i have a unique key then before inserting i am checking that the latest records(already inserted latest record unique key value) is present inserting value then i am skipping the insertion block.

    And if my entry field all are compulsary also i am doing the same thing,comparing total record (i know it is not good for large record)

    But the problem is if i didnot have unique key( except pk) and all entries or not compulsary then it is very difficult to check..

    Thats why i am searching any other solution.

    Imp: I should use only one file... means no send redirect machanism to another page...

    please tell me anybody...........a soution for this.....

  • RELEVANCY SCORE 2.68

    DB:2.68:Submit A Jsp In Scriptlet pf


    can we submit a jsp form using scriptlet code?

    DB:2.68:Submit A Jsp In Scriptlet pf

    hi harin , how are u , the above soln must work i suppose ...
    enjoy "jsp"ing

  • RELEVANCY SCORE 2.68

    DB:2.68:Submitting Request From Jsp With Out Submitting The Jsp 9s


    Hi All, is there any way to submit a request from jsp with some values with out submitting the form.

    My requirement is , i have to submit some values on some event in jsp, to start some background process, but at the same time the jsp should not be submitted or refreshed,

    any suggestions ?

  • RELEVANCY SCORE 2.67

    DB:2.67:Passing Parameters In Between Twojsp Pages 19


    Hi,

    Iam developing an application using JSP.IAm not using Sessions(not much awareness).
    I got 2 JSP pages Page1.jsp,Page2.jsp.

    Navigation start from Page1.jsp which contains two textfielsd(Name,age) and a Submit button which submits to Page2.jsp.

    In Page2.jsp I got some textfields and Submit button which submits to Page1.jsp and also passes two parameters Name and age again to Page1.jsp.

    My problem is if I use request.getParameter("Name") in Page1.jsp,it is giving an error,when Page1.jsp is executed for First time on the browser.

    Can anyone help me out from this problem....
    Thanks in advance

    Regards
    Rao

    DB:2.67:Passing Parameters In Between Twojsp Pages 19

    I'm not sure of the login behind doing this, but you must always check parameters for null values. So if you're in page1.jsp and you're trying to see if any values came from page2.jsp, you have to check at the top of the page for request.getParameter("SOMETHING") == null, if it is then don't do anything other than load the page1.jsp. And the same thing for page2.jsp.

    Making sure all the information is present before processing definitely saves a lot of headaches down the line.

    Hope this helps.

  • RELEVANCY SCORE 2.67

    DB:2.67:Jsp Flush Not Working On Submit To Page sz


    I have a page that gets called from another with a badic submit button. In the second page I flush the stream and then wait 10 seconds. The problem is that the browser does not show the response until it is done getting the data and then the whole page shows up. What gives? BTW If I hit the refresh button on the page then it works fine.

    Code below:
    html
    head
    titleThis is the title/title
    /head

    body
    here it is.
    /body
    /html

    %
    out.flush();

    Thread.sleep(5000);
    %
    Response after

    DB:2.67:Jsp Flush Not Working On Submit To Page sz

    The browser doesn't have to synchronize itself with your output, and there's so much buffering between your JSP and the browser that it couldn't even attempt that anyway. Also, it's quite common that the browser won't display the page until it has received it all, especially if there are tables involved, because it doesn't know how to render the first part until it sees what comes later. I can't imagine why you would want to stall the output, the Internet is slow enough as it is.

  • RELEVANCY SCORE 2.67

    DB:2.67:Textarea Values Not Populating In Struts fj


    HI
    I have a text area in jsp which i am trying to populate with a ActionForm . the problem is when i enter text and submit jsp to action class, i am able to read values from actionForm class in action class, however when i forward request back to same jsp i am not seeing the same value in text area. other input text boxes in the jsp are working fine, problem is with the textarea.

    here is my code, since ActionForm is not populating the data in textarea i am trying to populate with request parameter which i am settig in action class.
    % String myNotes = (String)request.getAttribute("notes");
    if(myNotes == null)
    myNotes ="";
    %

    html:textarea cols="100" rows="5" value="%=myNotes%" property="notes"/html:textarea

    any idea why actionfom is not working with textarea in both ways ?

    thank you

    DB:2.67:Textarea Values Not Populating In Struts fj

    I've had the same problem today and the solution found was to remove the atribute "value" of html:textarea.

    Maybe this is the case here as well.

    thanks,

    Edilson.

  • RELEVANCY SCORE 2.67

    DB:2.67:Jsp Call Servlet 91


    The following file start1.jsp can call Servlet - Init_S.java correctly, but start2.jsp can not call Servlet - Init_S.java.

    why start2.jsp can not find Init_S.java after submit the form ?
    The code of start1.jsp and start2.jsp are the same. The only difference is the location of the files.

    JSP: start1.jsp
    location: /ROOT/start1.jsp
    form action="Init_S" method="post"
    ...JSP: start2.jsp
    location: /ROOT/group/start2.jsp
    form action="../Init_S" method="post"
    ...Servlet: Init_S.java
    location: /ROOT/WEB-INF/classes/Init_S.java

    DB:2.67:Jsp Call Servlet 91

    easy!!

    Tomcat searches the longest path to find the servlet. You haven't told us about the mapping in the web.xml file, so I suggest the following

    you should try the following
    servlet-mapping
    servlet-nameInit_Sservlet-name
    url-pattern/group/servlet/url-pattern
    /servlet-mapping

    form action="Init_S" method ...

    If the above does not work, you cannot have "one" mapping for the two jsp's. I believe the above will work for the start2.jsp

    For the start1.jsp, if the above does not work, create another mapping

    servlet-mapping
    servlet-nameInit_S2servlet-name
    url-pattern/servlet/url-pattern
    /servlet-mapping

    So you have two different Servlet names for start1 and start2, and this will definetely solve your problem.

    HTH

    Trajano Roberto

  • RELEVANCY SCORE 2.67

    DB:2.67:Php, Html Index Page 1x



    I am having trouble trying to figure out why when I name a file index.php nothing works through my server, but if I change the extension to .html extension everything works fine. I am working on a 1 page site with a submit form so I started the file out with PHP extension. Should I not name my index page php? Any clarification would be greatly apprecated.

    DB:2.67:Php, Html Index Page 1x


    Most Linux (Apache) servers support .php.

    Most Windows servers support .asp.

    Contact your host.

    Nancy O.Alt-Web Design PublishingWeb | Graphics | Print | Media Specialistshttp://alt-web.com/http://twitter.com/altweb

  • RELEVANCY SCORE 2.67

    DB:2.67:About Jsp xp



    i made a jsp.

    and i put the jsp in welcome-content folder.

    but my jsp code is not working,

    what should i do?

    DB:2.67:About Jsp xp


    i made a jsp.

    and i put the jsp in welcome-content folder.

    but my jsp code is not working,

    what should i do?

  • RELEVANCY SCORE 2.67

    DB:2.67:On Click With Jsp Page 38


    I have the following scriplet that add ten to the value of start index and end index of these values when i submit the form. I have the script before the form. But when ever i load the JSP.... its sets the value of these indexes to plus 10... instead of waiting for me to click in the next link firtst.... I just want to increment by 10 when I click on the next button.....

    the same goes for the previous button which does not work at all...

    following
    % int start_next;int end_next;

    String start_pt;String end_pt;

    start_pt = request.getParameter("startIndex");
    end_pt = request.getParameter("endIndex");

    if (start_pt == null){
    start_next = 0;end_next = start_next+10;
    }
    else{

    start_next = Integer.parseInt((String)start_pt);
    end_next = Integer.parseInt((String)end_pt);

    start_next = start_next +10;
    end_next = end_next+10;
    } %

    form action="/lmcontrol/LMControlServlet" method="POST" name="nextform"
    %=START_INDEX_PARAM, ""+ start_next)%
    %=END_INDEX_PARAM, "" + end_next)%
    jsp:include page="cache.jsp" /
    Next
    /form

    DB:2.67:On Click With Jsp Page 38

    You have "onClick" attribute in the jsp html taglib. make use that
    regards
    shanu

  • RELEVANCY SCORE 2.67

    DB:2.67:Changes Label 7c


    How do i change a label when a checkbox is ticked.

    I am using a jsp and i'm using the following code.

    % String textFields = "Enter ID "; %
    td%=textFields% /td
    tdinput type="text" name="txtName" size="15"//td
    td/td
    tdinput type="submit" name="submit" value="Submit"/
    input type="reset" name="reset" value="Reset"//td
    input type="checkBox" name="changeLabel"
    onClick=" if (this.checked) {
    %=textFields = "abc"%;
    out.println(String.valueof(textFields));
    }" value="ON"but its not working...any ideas?

    DB:2.67:Changes Label 7c

    First thing to remind you, on the client side, JSP's are pure HTML documents.
    Also, there can't be no possible interaction between JSP variables and HTML-Javascript features in the client browser as the Java code is executed on the server side before the JSP's are sent to the client browser.
    That means that your textFields variable is charged with a constant value 'Enter ID ' by the server and its value will be used as part of the HTML document on the client side.

    Second thing, it's better to write separate functions when Javascript is using values generated by Java.
    It is not forbidden to store those values inside hidden inputs; example :
    form name="form1"
    %String textFields = "Enter ID ";%
    ...
    input type='hidden' name='label' value='%=textFields%'
    input type='button' value='Show Label' onClick='popup()'
    ...
    /formHere's the Javascript to popup the value :
    function popup() {
    var = document.form1.label.value;
    alert(var);
    }Finally, you should learn a bit more HTML and Javascript, [*W3schools*|http://www.w3schools.com/] is a good site to start with.

  • RELEVANCY SCORE 2.67

    DB:2.67:Calla Jsp From Jsp a1



    Hi to all

    I have created a jsp page in "portalApplication" project.

    Now I have the first jsp that contain one form with more element and one submit button.

    When i click this button i include a second jsp page with command

    %@include file="secondpage.jsp".

    I hidden the form of the first jsp.

    this work very fine.

    I have the problem in second jsp page.

    This page contain another form with more elment and one submit button.

    when i click on this button i submit the form.

    The problem is that the application return to the first page and not submit the second form.

    Help me please.

    How coll the jsp from another jsp??

    the forward page instruction don't work in my application

    DB:2.67:Calla Jsp From Jsp a1


    Hi,

    u can call a jsp from another jsp in portal application

    for that u have to place the jsp page in the following location

    dist-jsp(if not exists create one)

    and u can refer to that jsp page like this

    % String JspURL = componentRequest.getWebResourcePath() + "/jsp/filename.jsp"; %

  • RELEVANCY SCORE 2.67

    DB:2.67:Submit Form In Jsp mp


    Hi,

    Is there any way to submit a form in three different places in a jsp, by using java code and not javascript?

    many thanks,

    mike

    DB:2.67:Submit Form In Jsp mp

    You may need a hidden input as command -cmd

    and every time you have to change the command through

    onClick. ="javascript:fm.cmd.value="cmd1"/
    onClick. ="javascript:fm.cmd.value="cmd2"/
    onClick. ="javascript:fm.cmd.value="cmd3"/

    http://www.skillidpedia.com

  • RELEVANCY SCORE 2.67

    DB:2.67:Jsp And Submit Buttons x1


    I have a JSP page. The thing is that i do not want to the JSP code be executed when the page is first loaded or when i refreshes, just when the client hits a submit button. How can i do this?

    DB:2.67:Jsp And Submit Buttons x1

    easy!!!

    In your jsp1.jsp, when the user clicks submit, go to another jsp, let's say jspcontroller.jsp In this jspcontroller.jsp page you set an attribute, eg.
    request.setAttribute("myattribute", "YES");
    than you forward back to your original jsp, let's say jsp1.jsp

    In your jsp1.jsp you have the following code:
    %
    String sTest = (String)request.getAttribute("myattribute");
    if(sTest.equals("YES"){
    // add your code here for when user clicks submit button
    }
    else {
    // add your code here for first time access to jsp1.jsp
    }
    %

    What is happening is the jsp1.jsp gets refresed by going to jspcontroller.jsp and bounced back.

    HTH

    Trajano Roberto