Scope of "user" in jsp

Hi. here is some code for a jsp to pull some data out of an HTML form.
<jsp:useBean id = "user" class="collect.CollectData" scope = "session"/>
<jsp:setProperty name = "user" property="*"/>
<%@ page import="java.util.*,java.sql.*,javax.naming.*,javax.sql.*" %>
<HTML>
<BODY>
Name: <%= user.getName() %>
<BR>
Age: <%= user.getAge() %>
<%! String name = user.getName();
String age = user.getAge();
%>
<BR>
</BODY>
</HTML>
but here is my error on compiling it
cannot resolve symbol
symbol : variable user
location: class org.apache.jsp.getData_jsp
String name = user.getName();
how come the name "user" isn't allowed here??
many thanks,
Rohit

S'ok i got it sorted.
just used a
<% ... %> tag instead of a
<%! ... %> tag!

Similar Messages

  • SUN IDM 8.1 - /user/login.jsp

    Hi
    Can anyone pls let me know from where is the Login button and the Forgot Password? link is coming from in the /idm/user/login.jsp ?
    The reason i want to know is because i want to add additional login when the user press the Login button or cliks the Forgot Password? link.
    Secondly. I willl like to know <jsp:useBean id="form" scope="page" class="com.waveset.ui.web.common.LoginForm"/> from where i can see all the methods in the LoginForm class.
    Thanks

    I don't think you can edit the login . as they are generated by class files.
    but another thing to explore might be the user/altlogin.jsp & user/altloginHandler.jsp

  • How to handle an update of the same record from two different user  in JSP

    how to handle an update of the same record from two different user
    how do you handle an update of the same record from two different users in JSP... if one person updates the record from one drop downs should be updated as well.. is the possible.

    Usually, if two users try to update the same row at the same time, you want the first to commit to succeed, and when the second commits, they should fail with the error that the row was being concurrently updated. They you may want to show them the new row values and give them the opportunity to merge their values with the new row values...
    How can you achieve this? Google optimistic locking.

  • Custom Help Message Text on user/login.jsp

    Hello,
    I am trying to get some custom text to appear in the help box associated with the user/login.jsp page. I did some digging around in the docs and looked at the includes/helpServer.jsp file. I found the <$WSHOME>/help/html/help/en_US/com/waveset/msgcat/help/user/login-help.html file.
    I replaced this file with our own custom version. I can not get our custom version to load. The old version still continues to load. I cleared out all the cache options I could find in the debug pages, then rebooted the server. Still no luck. Does anyone know how I can change the contents of this help message?
    Thanks,
    Jim

    Here's a solution that works too. Application server is: Tomcat 5.0.28. Identity Manger 7.0 Running on a Windows 2003 server and a SQL Server dbms.
    This is not the ideal solution because upgrades (i.e. new releases from Sun) will over write the changes.
    This example over writes the HELP button content on the End User Menu.
    This approach should work for all App servers however the folder structure will vary.
    1. Stop Tomcat
    2. Clear cache. (i.e. delete the localhost folder and its contents found in C:\tomcat\work\Catalina\localhost).
    3. Create the following folder structure C:\com\waveset\msgcat\help\user
    4. Copy the original html file from: C:\tomcat\webapps\wavex\help\html\help\en_US\com\waveset\msgcat\help\user to C:\com\waveset\msgcat\help\user. In this example main-help.html is the file being copied.
    5. Make your changes to C:\com\waveset\msgcat\help\user\main-help.html
    6. Open C:\tomcat\webapps\wavex\WEB-INF\lib\idm.jar with WinZip and add file C:\com\waveset\msgcat\help\user\main-help.html.
    7. Close WinZip
    7b. If you want you can check your results.
    7c. Open C:\tomcat\webapps\wavex\WEB-INF\lib\idm.jar using WinZip.
    7d. Find main-help.html and open it using your favorite web browser to see if your changes have been included.
    7e. Hope it worked for you.
    8. Start Tomcat
    9. Test Change
    9a. Log into Identity Manger's end user interface.
    9b. Click the HELP button to see your changes.
    Good Luck.

  • Application scope problem in a JSP

    Hi,
    I try to store an object with the following code :
    getServletContext().setAttribute("application", app);
    Later I want to access this object from a JSP with :
    <jsp:useBean id="application" scope="application" class="de.skillworks.SWApp"/>
    that dosn't work !? I can not debug my application because the jsp is initializing my app object new. When I try in my JSP :
    SWApp app = (SWApp)pageContext.getServletContext().getAttribute("application");
    it works fine. I get my object which I have store in my servlet.
    In a Tomcat environment my code is working just the Jdeveloper has a problem with it.
    null

    Andy -
    The web-to-go server has difficulty dealing with sessions. Testing in Tomcat is a good alternative, and this is resolved in Oracle9i JDeveloper.
    Hope this helps,
    Lynn

  • User authentication (JSP) with knowledge warehouse 4

    Hi all,
    I am not sure whether I am posting into the right forum regarding my question but I'll go ahead anyhow :).
    I need to add a link to the knowledge warehouse browser gui that calls a JSP. This JSP will finally call a function module on the R/3 KW, but needs to authenticate the user before being allowed to make the call.
    I am wondering how user and password information are stored/maintained in a knowledge warehouse browser context. They are definitely not stored in a cookie, as far as I found out. Does anyone know if they can be found and accessed somehow?
    This is a vital question for the project I am working on and therefor I am very thankful for any input on this!
    With best regards,
    Helga

    Hello Helga,
    does this Article helps you:
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sapportals.km.docs/documents/a1-8-4/enabling%20single%20sign-on%20from%20sap%20j2ee%20engine%20to%20non-sap%20java%20applications.article">Enabling Single Sign-On from SAP J2EE Engine/EP to Non-SAP Java Applications</a>
    Regards
    Gregor

  • Get Windows domain name and user through jsp

    I have a jsp page that will be viewed through ie on windows platform, that is a member of domain.
    I need to get the domain name and logged in windows user name to use it in my page.
    I've looked through similar topics. Found no answer.
    1.
    System.parameter("user.name") is not ok. it returns user that runs jvm.
    2.
    import com.sun.security.auth.module.NTSystem;
    NTSystem system = new NTSystem();
    system.getDomain()
    system.getName()that didn't work through jsp, though the answer is correct.
    3. I found some api at http://www.sinotar.com/download/swin/doc/index.html
    it did the right thing, but it's not free.
    Could anyone advice me smth?
    I've looked

    well, it won't work in your jsp because jsps run server-side
    could try putting an applet on your page that does it, but I wouldn't be surprised if the security manager put the kibosh on that, too
    a third - but clunky - way would be to write a quick java app that does it, and launch it through WebStart. bit ugly, and needs extra user input they might not want to do

  • How to get ip address of user in jsp?

    I want to get statistics of user in pages that is created by JSP.How can I code this in JSP?

    Here is the code:
    request.getRemoteHost()
    This will get the IP address of the requesting user.
    Thanks

  • Crosstab with different users in JSP

    I need to switch the content of a crosstab in JSP depending on the user accessing it, i.e. some users see more dimension members while other users see less. Can anyone advise a good way of accomplishing this?
    Please note that I have managed to implement this fine grain security control in Analytic Workspace. I have also tested this in JDeveloper using the wizard with different database connections containing different username and password. They seem to work all right.
    I want to bring this into JSP using the orabi tag containing BISession and ThinCrosstab. I have been trying metadataManager, connection and query etc. but have made a mess. Everytime I switch the connection I lose the thincrosstab. Can anyone provide some codes to show how to accomplish this? Thanks.
    Wilson

    Thanks very much for your reply.
    I have looked at the forecast sample and did what you have suggested. The executeCommand works when I pass in an OLAP DML PERMIT command. However there is still a major problem. For example, if I have A, B, C, D selected in the crosstab as dimension members and my PERMIT command only allows the user to see A and B. I may get the following result with crosstab:
    Dim. Members Mesaure
    A $100
    B $200
    C
    D
    The user can only use the dollar amount assoicated with A and B which is right. However C and D still show even though they do not contain any dollar amount. Worse still, if I have not selected A and B originally in the crosstab, the user cannot see A nor B at all. The problem is not only do I need to determine what to put in the PERMIT command, I also need to know what to include in the "Selection" object of the crosstab so that the user will see all the members he/she is allowed to see.
    If I already know what to pass into the "Selection", the permit command seems redundant. This makes my search for a solution of fine grain security control coming to a full circle. I end up where I started from.
    I was looking for a solution which does not require me to pass in dimension members programmatically into the crosstab, and that the security control is not done on the application level, i.e. something akin to what can be achieved using VPD in relational database. I have been trying VPD in relational cube and Permit command in Analytic Workspace. They deliver what they claim to do in their respective environments. However, whatever I do in VPD seems useless in AW and whatever I do in AW do not seem to be very useful in BI Beans either. Would you please correct me if I am wrong? I would imagine someone must have this common requirement before and I wonder how they would fix it.
    I am still very confused about how Oracle implements fine grain security as the security in different layers (ie. relational cube, AW and BI Beans) do not seem to gel together. Thanks.

  • Tracking Page user clicked (*.jsp)

    Hi,
    I have a custom iView with 5 pages the user can drill. Is there anyway I could find within my Java code which page the user drilled from (Get the name of the *.jsp page user clicked).
    Any help would be appreciated.
    ~NAC

    Hi NAC,
        Try the following code.
    public void OnClick(Event e) {
         String jsp_name = this.getJspName()

  • Capturing windows user in jsp

    hi friends,
    I have the next problem:
    I am creating a simple JSP/Struts app (front-end for a Oracle Workflow)
    and I need capturing (obtaint, getting) the username from windows logging.
    I can't do a login page (client request) and the webapp need be autologin.
    in the request object the getRemoteUser don't work because must be a 'validate' user.
    some idea how to make this...
    thanks in regards,
    Gustavo

    respond to me.
    a solution is using an ActiveX control that get the user via Win32 API and then write in some hidden field and next submit this dummy form.
    but this solution suck.
    another idea?
    thanks

  • User verification JSP?

    I have a secure side on my web app, and when a user logs into it with a valid login, it changes a value in a javabean to true(isVerified). On each subsequent page, I want to double check that the user is valid. Should I make a jsp page that pulls that bean value, and if it is invalid, forwards elsewhere, then just include this jsp into all my pages or should I make an actual servlet to do this. I understand that all a jsp does when loaded is compile to a servlet anyway, so I felt that making a JSP would be more useful.

    Imatos mentioned the drawback.
    The advantage for me is that I don't have to mess around with importing packages and, cloning classes (creating objects). Instead, I can create just one "header.jsp" where I set up everything, the opening HTML, the package imports if any, the JavaBean loading, and the verification file. When (if) you deal with hundreds of jsp pages on a web site, you can't overestimate how much time and effort that simplicity saves you.
    It's also a good security practice in the sense that you never accidently create a web page that doesn't require someone to be logged in first.
    As for the drawback, there are two ways to migitate the hazard. On UNIX and Linux systems (and presumably OS X), there's a shell command called "touch" that can update the timestamp on all the files you specify. That will fool Tomcat at least into thinking all of the JSP files have been changed and thus need to be recompiled.
    The second way is to get into the habit of creating a new WAR file each time you update a file. I admit I've never tested it, but I believe if Tomcat redeploys the WAR file, it assumes that all of the JSPs therein need to be recompiled anyway. I'll ask in a new thread and see if I can get a definite answer.

  • How to maintain more users in jsp page

    i need a multi user login. each user should have thier own username and password (supplied by me) then each user should have their own page

    k_paramesh wrote:
    i need a multi user login. each user should have thier own username and password (supplied by me) then each user should have their own pageThat's nice. Have you got a question?

  • Oracle Waveset 8.1.1 patch 1 - /user/login.jsp

    Has anyone else experienced the Log In and Forgot Password? buttons on the End User interface in version Oracle Waveset 8.1.1 patch 1 to be different sizes on the End User Interface? Also can anyone pls let me know from where is the Login button and the Forgot Password? link is coming from so we can fix this.
    Thanks,

    You must first go from Sun IDM 8.1 to Oracle Waveset 8.1.1 - then you can apply the latest patch.

  • What Process Does user/customEdit.jsp use?

    I made my own page based on user/customEdit to display and toggle some account attributes. I would also like check out and in a rename user view to modify the accountId. It seems like I would want to do this during the execution of the process that is modifying the user attributes currently. But I can't easily see what process this is. Which Workflow is handling it?
    Thanks!

    **I am speculating here**
    My understanding is that Verizon is moving to markets that already have enough preexisting infrastructure to support the LTE upgrade.  They appear to be converting the easiest markets first and will tackle the harder ones last.  More hardware may be necessary in your area before they can make thier move.  I do not believe it is as simple as looking at the actual population of a market.  Verizon may have started in a FIOS market because FIOS can provide the infrastructure to support the backbone of the 4G traffic.
    **End speculation**
    The truth is that Verizon still has the ambitious plan to replace all 3G service with 4G by the end of 2013.  It wont be long before they can get to everyone.  You can check thier 4G coverage map website for more updates and details:
    http://network4g.verizonwireless.com/#/coverage

Maybe you are looking for