Unable to pass a hidden variable from a JSP page to the action class

Posted on 2006-05-12
Last Modified: 2008-01-16

I am unable to pass a hidden variable in my JSP page to the action class..
I have a button which when clicked should popup a page and pass the frame from which it is popping up to my action class..
Could you please suggest something?
Question by:crazydiode
    LVL 14

    Accepted Solution

    we cant suggest unless you post the code where you think it needs correctness
    however read the below examples about reading form data thru JSP

    using bean:
    LVL 1

    Assisted Solution

    you can use

    request.setAttribute("name", variable);

    and then
    request.getParameter("name") to recover it

    Or you can declare the hidden
    <html:hidden property="id"/>  in the jsp page

    and in the action class you revover it using the form associated to the action...
    Form fform = new Form();
    String id = fform.getId();


    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    scoresClump  challenge 31 88
    hasOne  challenge 59 66
    Receive file in Servlet 1 28
    mapShare challenge 13 42
    INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
    Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
    Video by: Michael
    Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
    Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now