How to get access to PageContext in a java class (.java file)?

Hi all,
I am trying to get access to PageContext from inside a java class, and it doesn't seem to work.
I could get the PageContext from a jsp page, at the object instantiation, through the constructor, but my class is not called by a jsp page.
Any ideas?
Thanks,
Paul

Basically I do not need to change any attributes from pageContext. However I need the pageContext object because I am using a third party component that is initialized with the pageContext .
I cannot change the implementation of that component: it is a black box to me, I simply need the pageContext in my java class that uses the component.
Any thoughts based on this clarification?
Thanks,
Paul

Similar Messages

  • How to get accessed to pagecontext in a tag file in JSP2.0

    I am writing a custom tag using JSP 2.0 to clean up the JSP pages for a big website.
    Now a question comes up. I need to access pageContext variable in my tag file since I need to get the bean using a lookup method. I know in JSP2.0 there is jspContext implicit object instead of pageContext. But this is not the end of the story.
    then I read Denis' post. and his solution are these two line codes:
    <%
    PageContext pageCtx = (PageContext)jspContext;
    tagBean.init(pageCtx);
    %>
    I am confused here what the tagBean here. Is that a webBean? and how can I get this object in my tag so that I could initialize the pagecontext and reference it?
    thanks in advance

    The lookup method just returned me a null. So I believe that there is
    some trick behind this simple cast.First I would double check your basic assumptions.
    Is the attribute you are looking up actually there? That would be a simpler explanation for why the lookup method returned null.
    Try a jspContext.findAttribute() , specific request/session.getAttribute() to see if you actually retrieve anything.
    Also be aware that the RequestUtils.lookup() method has been deprecated in Struts 1.2, in favour of org.apache.struts.taglib.TagUtils.lookup().
    Cheers,
    evnafets

  • How to get access to my iCloud back up when setting up a new iPhone 5s which needs the newest version of iOS7 first?

    how to get access to my iCloud back up when setting up a new iPhone 5s which needs the newest version of iOS7 first?

    Set up the new phone as a new iPhone (without using your backup), then update it to the latest iOS (7.1.2).  Then go to Settings>General>Reset, tap Erase All Content and Settings, go through the setup screens again and when given the option, choose Restore from iCloud Backup and follow the prompts.  This process is explained in more detail here: iCloud: Restore your iOS device from iCloud.

  • I loos my APPLE ID, I have a new one, how can get access to data stored in the old one?

    I loos my APPLE ID, Now I have a new one, how can get access to data stored in the old one?

    Do you have the email & password of the old Apple ID?

  • Photostream Issue - I have had several phones over the years all backing up via iCloud/Photostream. It seems that the oldest of my photos and videos are simply gone and I cannot seem to figure out how to get access to them. Why is this happening?

    Photostream Issue - I have had several phones over the years all backing up via iCloud/Photostream. It seems that the oldest of my photos and videos are simply gone and I cannot seem to figure out how to get access to them. Why is this happening? Is there anything I can do to get them back? I'm freaked out by the thought that I am paying for what I thought was a safe place for my photos to be stored and accessed later but now see that there are nearly 500 pictures/videos gone from my photostream folder. Any help would be greatly appreciated. Thank you. - Michael

    Hi newmarket,
    Photo Stream is not a respository for archiving photos. It is a cloud storage device that will store the last month or last 1000 photos taken by any device on the same Apple ID, and then will "share" those photos with all other devices that have Photo Stream turned on,and that are logged onto the same Apple ID.
    iCloud backups will contain all of the photos that were on your camera roll the last time you backed up your device.
    If you have photos outside of the Photo Stream parameters, and they are not all on your current camera roll, then you have no way to retrieve them unless you have imported them to the computer you sync with or have uploaded them to some other cloud service like DropBox.
    Sorry,
    GB

  • Qosmio G30-126 - How to get access to the bios!

    I have a laptop Qosmio G30-126 and I don't know the key for entering the bios to change to properties for the HDD or any thing... so how to get access to the bios? what is the key for the bios??

    Hi
    Try to press the F2 button while powering the unit.
    Older Toshiba notebooks supported the ESC and then F1 button
    So these two options are possible

  • How to get access to the OCM toolkit  ?

    how to get access to the OCM toolkit  ?
    the full version not the demo !

    I need to know how to do a complex query my task is to find out the names of people allergic to paracetomol and penicilllin from a list of names??? I REALLY NEED HELP ITS DUE IN TODAY!
    TASK: show the Pupils: forename, Pupil surname, Year group, teacher in charge to all children allergic to penicillin and paracetmol from the table of names (not everyones allergic) How do I query it!?????????
    <a href="http://www.ornsoft.com/">Custom software development</a>
    <a href="http://www.aconsultancy.co.uk">Acquisition Search Warwickshire</a>

  • How to get access to the HTTP-Manager Tomcat ?

    How to get access to the HTT-Manager Tomcat ?
    Whe i do:
    http://localhost:8080 - i have access to the Kablink.
    How i can get access to the Tomcat Manager ??
    Serg

    Originally Posted by skoltogyan
    How to get access to the HTT-Manager Tomcat ?
    Whe i do:
    http://localhost:8080 - i have access to the Kablink.
    How i can get access to the Tomcat Manager ??
    Serg
    Hey Serg,
    I don't think that's possible with the tomcat config that is supplied with Vibe.
    You might get a better answer in the community space for Vibe/Kablink at vibe.novell.com, direct link being atm: https://vibe.novell.com/ssf/a/do?p_n...beonprem_url=1
    Cheers,
    Willem

  • How to get access to my contact list?

    I have successfully (?) installed Skype on my Galaxy tablet and logged in using my account name from my laptop version. But I cannot find my contact list. How to get access to that! Even my photo is present!

    Hello Everyone, I'm trying to access my Skype contact list on my Galaxy S3 so that I can edit it, but I do not seem to be able to.  I've gone to the help page to try and find out where it is, but the steps say to tap the three dots in the upper right corner for "More"...but I do not have that emblem?!?!  Has this issue been resolved, or are people still unable to access their contacts?

  • Suddenly user account login requested, but was newer created (OS X 10.5.6), how to get access again

    suddenly user account login requested, but was newer created (OS X 10.5.6), how to get access again?

    No account ever created, or what?
    If not 1.6 Server, then...
    Reset OS X Password Without an OS X CD...
    http://theappleblog.com/2008/06/22/reset-os-x-password-without-an-os-x-cd/
    Admin Hack...
    http://www.hackmac.org/?q=node/4
    Starts up like the first time you buy a new Mac, but after filling in all that info again, you should have access to the computer and the other Users & files will still be there... give the new User a different name than an existing one.
    http://www.macyourself.com/2009/08/03/how-to-reset-your-mac-os-x-password-withou t-an-installer-disc/

  • How to  get the profile object in simple java class  (Property accessor)

    Hi All,
    Please guide me how to get the profile object in simple java class (Property accessor) which is extending the RepositoryPropertyDescriptor.
    I have one requirement where i need the profile object i.e i have store id which is tied to profile .so i need the profile object in the property accessor of the SKU item descriptor property, which is extending RepositoryPropertyDescriptor.
    a.I dont have request object also to do request.resolvename.
    b.It is not a component to create setter and getter.It is simple java class which is extending the RepositoryPropertyDescriptor.
    Advance Thanks.

    Iam afraid you might run into synchronization issues with it. You are trying to get/set value of property of a sku repository item that is shared across various profiles.
    Say one profile A called setPropertyValue("propertyName", value).Now another profile B accesses
    getPropertyValue() {
    super.getPropertyValue() // Chance of getting value set by Profile A.
    // Perform logic
    There is a chance that profile B getting the value set by Profile A and hence inconsistency.
    How about doing this way??
    Create PropertyDescriptor in Profile (i.e user item descriptor), pass the attribute CustomCatalogTools in userProfile.xml to that property.
    <attribute name="catalogTools" value="atg.commerce.catalog.CustomCatalogTools"/>
    getPropertyValue()
    //You have Profile item descriptor and also storeId property value.
    // Use CustomCatalogTools.findSku();
    // Use storeId, profile repository item, sku repository item to perform the logic
    Here user itemdescriptor getPropertyValue/setPropertyValue is always called by same profile and there is consistency.
    -karthik

  • In OBIEE 11G, how to get the special parameter created by JAVA?

    Hi Experts,
    In OBIEE 11G, how to get the special parameter created by JAVA?
    For example:
    In JAVA , it has set one parameter named 'test'.
    So how to get the parameter in filter area in OBIEE?

    Hi Kobe,
    No P2 holds the parameter name like PresentationTable.ColumnName, in your form you may go for complete name or just column name and before submitting the form you can define the Action url.
    I would suggest to read section 6.3.2.1.
    ex:
    <SCRIPT LANGUAGE="JavaScript">
    changeAction(url) {
    var TestVar = form.inputbox.value;
    document.this_form.action="saw.dll?Go&Path=/Shared/Test/SB2&Action=Navigate&P0=1&P1=like&P2=Customers.Region&P3="+TestVar;
    </SCRIPT>
    </HEAD>
    <BODY>
    <FORM NAME="myform" ACTION="" METHOD="GET">Enter something in the box: <BR>
    <INPUT TYPE="text" NAME="inputbox" VALUE=""><P>
    <INPUT TYPE="button" NAME="button" Value="Click" onClick="changeAction(this.value)">
    </FORM>
    If helps pls mark.
    Edited by: veeravalli on Oct 24, 2012 10:25 AM

  • How to get the current GMT time in java

    Hi,
    How to get the current GMT time in java
    Thanks

    System.getCurrentTimeMillis() or new Date().
    [url http://www.javaworld.com/jw-12-2000/jw-1229-dates.html]Calculating Java dates: Take the time to learn how to create and use dates
    [url http://www.javaalmanac.com/egs/java.text/FormatDate.html]Formatting a Date Using a Custom Format

  • How to get the current function name in java

    How to get the current function name in java.
    In c it is done as
    printf("%s",__func__);
    Thanx in advance.

    j0o wrote:
    System.out.println("Class Name: " + new Exception().getStackTrace()[0].getClassName() +
    "/n Method Name : " + new Exception().getStackTrace()[0].getMethodName() +
    "/n Line number : " + new Exception().getStackTrace()[0].getLineNumber());
    I pointed the OP at this approach yesterday in one of his multi-posts. I still have not been given my Dukes!

  • How to get string (specified by line and column) from txt file with labview

    Hi everyone
    How to get string (specified by line and column) from txt file with labview
    thx 
    Solved!
    Go to Solution.

    As far as I know, a text file has no columns.  Please be more specific.  Do you mean something like the 5th word on line 4, where words are separated by a space, and lines are separated by a newline character?  You could the Read from Spreadsheet String function and set the delimiter to a space.  This will produce a 2D array of strings.  Then use index array and give the line number and column number.
    - tbob
    Inventor of the WORM Global

Maybe you are looking for

  • How to keep the focus in a table cell as long as it is invalid?

    Hello, if you run the following code and enter some alphabetic characters in the Integer column, you can't get out of the cell as long as focus transfer is within the table. But if you click in the textfield, the cell is left invalid. (If you click i

  • Calendar sync only works in one direction

    I use an iPhone 3G with a MacBook Pro. When I enter a calendar item on the iPhone and synchronize using iTunes, the item shows up on the MacBook calendar (iCal). But if I enter an item on the MacBook and synch, the item does not show up on the iPhone

  • Migration from 7.1.2 to 11.1.1.3?

    Hi All, I am trying to migrate all applications from 7.1.2 to 11.1.1.3. (Windows 2003 Servers) I am able to migrate all the objects but data is mismatching while doing data migration(export & import). Please let me know What are the constraints to fo

  • Significance of messge ME 161 in Changing the PO quantity

    Hi All, Can someone explain me the significance of the message ME 161 "Notified quantity exceeds quantity ordered & &". I am getting this error message while changing the quantity in the purchase order .This message is customizable and this has been

  • How can I make message preview font larger?

    How can you increase font size in the message preview box?