Accessing ServletContext in a Action file

Hi all,
I have a servlet which i load on start up and put in the context. Now, i want to retrieve that servlet from the context and use it in a Action file, what should i do?
The class Action, which every action file extends doesn't have any method to get the servlet context.
please help,
Seshu

You can use request dispatcher to forward the request to the servlet, I guess.Since the request object is available to you in the Action class, u can get the request dispatcher object from the request and use it to forward the request to the servlet.

Similar Messages

  • Windows 7 won't allow me access to some of my files and folders

    I installed a new copy of Windows 7 Professional SP1 on a new PC several months ago. I then restored my documents from a backup made on my old XP system. Ever since installation, I have had problems with Windows denying me access to some of my files
    and folders. I have full administrative rights on the machine. The various problems I've had, and steps I've taken to resolve them are:
    1. Try to open a file and get a message telling me I need permission from Steve to open this file. I am Steve.
    2.Try to open a file and get a message telling me I don't have permission to open it, but click this button to get permanent permission. I click the button, but still don't have permission.
    3. I then started opening the security settings for individual files and setting myself to have full access, and as the owner. This worked for individual files.
    4. I then tried setting the same security settings for entire folders. This didn't work and didn't improve anything.
    5. I tried setting the security settings so that Administrators owned the files/folders (I am an administrator). This also didn't achieve anything.
    6. After several months and still getting these messages, I got sick of trying to overcome them and decided to apply these security settings to my entire C: drive. I set myself to have full access and to be the owner of the C: root directory and all sub-objects.
    7. I inserted my Windows installation disk and tried to run the System Repair. It told me that System Repair was not compatible with the version of Windows I was running! WTF???
    Not only did setting permissions for the entire C: drive not help me, it has made matters a WHOLE lot worse. I now don't have permission to open almost all my files/folders. Most applications I try to run (Word, Excel, etc.) either tell me they can't open
    a file or let me open and edit it, then tell me I don't have permission to save to that location. When I press the Send/Receive button in Outlook, it now tells me I don't have permission to perform that action. I've tried going back to a restore point before
    I made this change, but that didn't change anything either.
    This problem has been driving me insane for months and now my PC is almost completely unusable and I'm considering a disk format and re-install Windows. When I initially installed it, so many problems came up in the first few weeks that I'm very reluctant
    to go through this procedure again. I spent hours and hours trawling the web looking for solutions to things that didn't work.
    Does anyone have any good news for me? Because as far as I'm concerned, Windows 7 is so far a piece of garbage.

    Hi Steve1904,
    So you have use the backup and Restore to restore your files from Windows XP to Windows 7 directly?
    This should be considered not work.
    If you would like to transfer files between Windows XP and Windows 7, you need another tool called Windows Easy Transfer.
    See the article below if you would like to upgrade from Windows XP to Windows 7:
    Upgrading from Windows XP to Windows 7
    If possible, follow the steps there, then things should be OK.
    Best regards
    Michael Shao
    TechNet Community Support

  • I can no longer access a password protected Numbers file with the correct password. Error message only says the file "cannot be opened."

    I'm using Numbers version 3.2.2.
    Suddenly I cannot access my password protected Numbers file with the correct password. I have the correct password written down so I know I haven't made a mistake.
    The response box that pops up says that the file cannot be opened. There are no other options for me to choose from.

    Also, I tried to open it through an older version of Numbers but it sent this error message.

  • Can I have an Action file install when a ZXP is opened in Extension Manager for CC 2014?

    I have an extension that I'm packaging as a .zxp file.  I'm using Adobe Exchange Packager and setting to the proper install location for the files for the extension.
    However, my extension requires an action file (.atn) is installed in the user's Actions panel.  Of course, I can include the .atn file in my package and copy it to a folder on the user's computer.... BUT, is there any way I can include that .atn file in the .zxp package and when Extension Manager unpacks the files, it INSTALLS the included .atn file into the user's version of Photoshop?  So, this way the .atn file is already installed in the user's Actions panel after the extension installs through Extension Manager...so the user doesn't have to worry about installing the .atn file as well?
    (If there were a folder to place the .atn file into, I could do that, but I do not believe that there are any folders for CC 2014 that hold .atn files in which the panel will read, if at first not installed in the normal way.  I believe this is new for CC, and that the actions are held in a .psp file.)

    I am not sure about the .atn file location but it sounds like you want to create a 'hybrid' extension.
    You create a .ZXP containing your CS extension and then create an MXI file which includes the .ZXP and .atn file.
    You would then wrap this into another .ZXP which will be used as the installer.
    Further information can be found at http://www.adobeexchange.com/resources/7

  • Problem accessing /config_general/null/Default.action   Reason:There is no Action mapped for namespace/ config_general and action name default

    in use:
    vRO 5.1
    eclipse 3.7.2
    vRo plug-sdk 5.1
    steps:
    1.create a plug-in project from samples(choose solar system)
    2.find the dar package and upload it by vRo configuration
    3.vRo configuration said upload successfully,but the solar system configuration is not properly configued..
    problem:
    Problem accessing /config_general/null/Default.action   Reason:There is no Action mapped for namespace/ config_general and action name default
    How to solve it??
    Thanks so much!!

    There was problem from crm side...its working now..

  • Missing information in Actions file specification

    I wrote some code that parses the Photoshop Actions palette file. I used the Photoshop CS2 File Formats Specification PDF (dated June 2005) to understand its format. However, the following OSType keys of the "Reference Structure" type are not documented:
    'Idnt' (Identifier)
    'indx' (Index)
    'name' (Name)
    They are mentioned in Table 3.4, page 62 of the PDF.
    This seems to be a lack in the document since all the other many elements are explained in great detail. Can anybody provide details of these missing fields? What I need is information on their size (length in bytes) and/or the description of their physical structure in the Actions file. I searched this forum for more info to no avail.
    Thanks in advance,
    Ettore Pasquini

    Name, Index, and Identifier (along with all other reference types) have a value
    structured like
    'unicode string' - 'desired classID' - 'actual value'
    The initial unicode string is not meaningful, as near as I can tell. It does get
    populated by actions on very rare occasions, but does not appear to be used
    anywhere. I always write it out as an empty unicode string and the action
    behaves the same.
    You've accurately deduced the classID part.
    I should have mentioned all of this in the previous email.
    For Name, the value is a Unicode string.
    For Index, the value is a simple 4 byte word.
    For Identifier, values a simple 4 byte key-classID.
    I have a test script that generates writes/read/writes and verifies descriptors
    in Javascript. This includes the code for ieee754 floats, Alias (pth or alis),
    and raw (tdta) data types. I haven't tested my Alias code out on an action
    created on a Mac, though. The only one I haven't figured out at all is
    ObjectArray (ObAr). I can't create it with the JS API nor have I found it in my
    largish collection of Action files.
    If you'd like, I can send you the script(s) that I use for my implementation and
    testing. You might find it of some use in your work. I also have a partial perl
    implementation if that's more your speed.
    Ettore Pasquini wrote:
    > thanks for the reply xbytor.
    >
    > 'indx' - a 4 byte word/integer
    > 'name' - a unicode string
    >
    >
    >
    >
    > According to my tests those mappings don't work. I have some actions files with those elements and the file is not correctly parsed if I adopt the formats above. However I found out the following seems to work:
    >
    > 'indx' :
    > Variable - Unicode string;
    > Variable - 4 bytes of length followed by ASCII string;
    No. This is a classID.
    > 4 - 4 additional bytes of unknown meaning.
    This is the actual value of the index. I see it used a lot when indexing a
    document's layers.
    >
    > 'name' :
    > Variable - Unicode string;
    > Variable - classID: 4 bytes (length), followed either by string or (if length is zero) 4-byte classID;
    > Variable - Unicode string.
    Exactly right.
    >
    > This is based entirely on empirical observations and of course it could be wrong. But so far these formats seems to satisfy the data in all my actions files.
    >
    > For the 'Idnt' element I haven't the slightest idea of what it could be, since I never saw one in an Actions Palette file.
    I can create Idnt's but I don't recall having seen them either.
    > Can anyone from Adobe please provide this information and verify the above hypotheses? It would be extremely helpful. Thanks!
    >
    > -Ettore
    Let me know if you want the scripts.
    for photoshop scripting solutions of all sorts
    contact: [email protected]

  • Access denied. Error in File C:\WINDOWS\TEMP\

    I have searched on Google and all over this forum and none of the solutions have fixed my problem.
    Crystal Version: Crsytal.Net for Visual Studio.Net 2005
    Server: Windows Server 2003
    Error:
    Access denied. Error in File C:\WINDOWS\TEMP\JuryDutyReport {D6296178-3E72-483E-B876-2DFC03D00841}.rpt: Access to report file denied. Another program may be using it.
    When I run my app locally through the Web Server that comes with ASP.Net, everything is fine, it is only when I deploy the application to the Windows 2003 Server that I get the error.
    I'm using impersonation in my ASP.Net application.  I have given that domain user full access to 'C:\Windows\Temp'', the export folder and even the folder where the Crystal Report resides on the Server.  When I run the application on the Web Server, I actually see the ".rpt" get created in the "C:\Windows\Temp" folder but yet it still says there is a permissions error.
    What is bizarre is that the code below that just sends the file to the printer automatically works:
      private void PrintJuryDutyReport(DataSet ds)
            //create report document
            ReportDocument crDoc = new ReportDocument();
            //load, set datasource and print options
            crDoc.Load(Server.MapPath("~/Reports/JuryDutyReport.rpt"));
            crDoc.SetDataSource(ds); //set datasource
            crDoc.PrintOptions.PrinterName = ddlPrinters.SelectedValue.ToString(); //set printername
            crDoc.PrintOptions.PaperOrientation = PaperOrientation.Portrait; //set paper orientation
            crDoc.SetParameterValue("ParamUsername", User.Identity.Name); //set parameter
            crDoc.PrintToPrinter(1, false, 0, 0); //send to printer
    I have to change the code to export to a PDF and this code doesn't work:
        private void PrintJuryDutyReport(DataSet ds)
            //report document
            ReportDocument crDoc = new ReportDocument();
            string myfile = @"G:\COPFS\COPFSPROD\ReportsTemp\MyPDF.pdf";
            //load, set datasource and print options
            crDoc.Load(Server.MapPath("~/Reports/JuryDutyReport.rpt"));
            crDoc.SetDataSource(ds); //set datasource
            crDoc.SetParameterValue("ParamUsername", User.Identity.Name); //set parameter
            //export through http
            crDoc.ExportToDisk(ExportFormatType.PortableDocFormat, myfile);
            crDoc.Close();
            crDoc.Dispose();
            Response.ClearContent();
            Response.ClearHeaders();
            Response.ContentType = "Application/pdf";
            Response.AppendHeader("content-disposition", "attachment; filename=" + myfile);
            Response.WriteFile(myfile);
            Response.Flush();
            Response.Close();
    Any help is greatly appreciated as I have to present this to end users tomorrow.

    Don, thanks for the response.
    As a last ditch effort, I granted "modify" to the Network Service Account on C:\Windows\Temp and that fixed the error.
    There are two things that are troubling about this:
    1) I'm impersonating a domain user in my ASP.Net application and when the PDF is created, the owner is that domain user, so I know impersonation is working.  So I wonder if ASP.Net picks and chooses what account it runs under at different times?
    2) It is a little scary for the Network Service Account to have this access but that people seem to be fine with it.
    http://aspadvice.com/blogs/rjdudley/archive/2005/03/14/2566.aspx

  • How do I access my encrypted User Account files from my Back Up hard drive?  Time Machine  was used to create the back up disk; File Vault was used to encrypt the files.

    How do I access my encrypted User Account files from my Back Up hard drive?  Time Machine  was used to create the back up disk; File Vault was used to encrypt the files.

    Thanks.  I will try going through TM.  Since my Simpletech is on the way out, I'll be plugging in a new external hard drive (other than the back-up drive) and trying to restore the library to the new drive.  Any advice or warning if this is NOT the right thing to do?
    Meanwhile, that is a great tip to do an alternate back-up using a different means.  It's been tough to figure out how to "preserve access" to digital images and files for posterity, knowing the hardware will always fail/obsolesce sooner or later, and that "clouds" are only as good as their consistent and reliable accessibility.  Upping the odds with redundancy will help dull the edge of my "access anxiety", though logically, it can never relieve it.  Will look into
    Carbon Copy Cloner.

  • Accessing config information in XML file in a Weblogic web service (JWS)

    Problem:
    I have implemented a web service for sending emails and pages via Java Mail and SNPP respectively using WebLogic Workshop on the BEA WebLogic 8.1 platform. In the service, I use certain pieces of information that are currently stored in an XML file on disk. Also, in its current state, the web service is implemented with public methods directly in the .jws Java file and not as a session bean. The file read from disk is performed every time the web service operation to send a message is invoked. As we all know, the I/O files access is very expensive and a performance bottleneck, especially when it is incurred on every invocation of the web service ‘sendMessage’ [operation.
    Without radically re-writing the application, I am looking for a way to improve the performance of the web service and can only come up with the following 2 ways:
    1) Move the code out of the sendMessage operation: Here, the main question I have is 'to where should I move it to'? I have seen in the WebLogic Workshop documentation that WebLogic Server maintains only a single instance of a Java class that implements a Web Service operation, and each invoke of the Web Service uses this same instance. In that case, I should be able to put the code in the constructor so that the files is read only at the time the class is instantiated, but a constructor in the .jws file that contains the web service operations itself does not seem to be invoked by the container (I tried to put a breakpoint in the constructor, but it seems that the constructor code never gets called)
    2) Move the configuration variables into some type of standard configuration file of WebLogic, something like web.xml or wlw-config.xml or jws-config.properties files. But I found that these XML files have an associated schema to conform to and do not provide any custom elements or attributes that I could add for my application(is that true?). Also, if I can somehow put the configuration information into any of these standard files, how do I access it from within the application 'without' doing a file read from disk? Are these configuration file items available in memory for access and use by the web service and if they are, what API can I use to access and use them?
    Any and all ideas are welcome!
    Thanks!                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    I have been looking into a similar problem. Since web services are by design stateless, they aren't good for 'remembering' information between calls. Aside from a file read, the only other solution I have found is to use a database. You can make use of an entity bean or simply make some kind of JDBC call. I don't know if you need to stick with the config file, but if so maybe you could read the config data into a database once and then you might have faster access than reading from a file. I'm not sure about which would have better performace, but its all I have come up with so far. What parser are you using to read your XML file? Have you tried others to see if they have better performance?

  • When I try to access iTunes I get 'The file "iTunes Library.itl" cannot be read because it was created by a newer version of iTunes.' But when I try to download iTunes I get error (-42408)...help please.

    When I try to access iTunes I get 'The file "iTunes Library.itl" cannot be read because it was created by a newer version of iTunes. Would you like to download iTunes now?'' But when I try to down load I get "unknown error occurred (-42408)". Don't know what to do next and I can't get into my iTunes library. (I have an iMac, OS10.6.8.)

    Did you uninstall iTunes 11 and replace it with iTunes 10.7? If so, you'll need to go through a few steps to put things right:
    Rename "iTunes Library.itl" to some other name;
    Copy newst ITL file from the "Previous iTunes Libraries" folder into your main iTunes folder and rename it to "iTunes Library.itl";
    Download iTunes 10.7: http://appldnld.apple.com/iTunes10/041-7195.20120912.d3uzQ/iTunes10.7.dmg
    Download/install shareware app called Pacifist;
    Open Pacifist and, separately, mount iTunes DMG file -- drag iTunes PKG file into Pacifist and install iTunes via the Pacifist application -- be sure to answer yes to replacing everything Pacifist asks about;
    Enjoy iTunes 10.7.
    Cheers,
    trane

  • Can FTP-access to field point log file interrupt the running program?

    Can FTP-access to field point log file interrupt the running program?
    We have a problem where our factory process control program on a Field Pointer suddenly stops the process. We are running the development system on a PC, wich deploys the program on the Field point, with user interface on the PC. Quite often the process stops for no apparent reason. I'm not sure right now if the control program on the Field Point is still running or if it stops. We use FTP from a distant PC (over VPN) directly to the Field Point to check if the process is running, by looking for date and size of log files produced during running process. I've never opened och copied any log file during process run, because this I'm sure this would cause problems for new log entries to be written. But can the mere looking at the log folder via XP-pros ftp-functionality cause the Field Point to have problems writing data to a log file?
    I'm not sure how windows XP pro handles "my network places" when it comes to FTP, it look that it keeps some kind of local copy of the folders, or at least the files opened.
    Next version of the program will have only basic functionality on the Field Point, leaving logging etc. to another program on the PC, but right now we are stuck with this system.
    Ola A

    It turned out that the problem lies in the harware of the production machine, it was not a labiew-program problem at all!
    Ola

  • Installer has insufficinent privileges to access this directory c:\program files\ipod\bin log on as administrator

    I'm getting this error when I try to install the newest version of Itunes.  I have tried so many things.  Please help.
    installer has insufficinent privileges to access this directory c:\program files\ipod\bin log on as administrator

    Okay.
    Let's try running a disk check (chkdsk) over your C drive.
    XP instructions in the following document: How to perform disk error checking in Windows XP
    Vista instructions in the following document: Check your hard disk for errors
    Windows 7 instructions in the following document: How to use CHKDSK (Check Disk)
    Select both Automatically fix file system errors and Scan for and attempt recovery of bad sectors, or use chkdsk /r (depending on which way you decide to go about doing this). You'll almost certainly have to schedule the chkdsk to run on startup. The scan should take quite a while ... if it quits after a few minutes or seconds, something's interfering with the scan.
    Does the chkdsk find/repair any damage? If so, can you get an install to go through properly afterwards?

  • "insufficient privileges to access this directory C:/Program Files(x86)/iTunes/iTunes.Resources/nb.Iproj."

    I'm using a Windows 8 laptop and I updated my iphone 4s software to IOS7 and of course my itunes needs updating, but when I go to update it is in vain because it comes up with the message that the installer has insufficient privileges to access this directory C:/Program Files(x86)/iTunes/iTunes.Resources/nb.Iproj.
    and the installation cannot continue. I have tried changing the security permissions on this file which doesn't let me as it asks that I need Read Permissions etc...
    Has anyone encountered this issue, I've looked online but nothing helps for my situation

    If you can't delete the .lproj folders try renaming them or deleting/renaming a parent folder, i.e. \iTunes\iTunes.Resources or \iTunes.
    For general advice see Troubleshooting issues with iTunes for Windows updates.
    The steps in the second box are a guide to removing everything related to iTunes and then rebuilding it which is often a good starting point unless the symptoms indicate a more specific approach. Review the other boxes and the list of support documents further down the page in case one of them applies.
    Your library should be unaffected by these steps but there is backup and recovery advice elsewhere in the user tip.
    tt2

  • Problem with accessing init parameters from JSP file

    Hi,
    I have my init parameters and Jsp configured in web.xml
    <servlet>
              <servlet-name>TestJsp</servlet-name>
              <jsp-file>/Test.jsp</jsp-file>
              <init-param>
                   <param-name>username</param-name>
                   <param-value>Balboa</param-value>
              </init-param>
    </servlet> How do I access 'username' field from JSP file.
    Kindly help.
    Thanks.

    you can do this in the jsp
    <%=config.getInitParameter("username")%>or do it in the jspInit method in the jsp:
    <%!  String userName = null; 
      public void jspInit() {   
        ServletConfig config = getServletConfig();   
        userName   = config.getInitParameter("userName ");  
    %>
    Hello <%=userName%>

  • No access to OS X part files!

    I got access my OS X part files in Maverick while I was in Windows using boot camp. But I can't do so while I upgraded to Yesomite. Is there any way I could have this privilege back? I know parallel allows to do that but I do not want to spend more money. I am running Boot Camp 5.1 in MacBook Pro (early 2012).

    Please see Re: windows 8 does not recognise Macintosh HD, No drive Letter.

Maybe you are looking for

  • Realtek driver/pro​grams that came with my laptop

    I accidentally uninstalled a program thru control panel feature,  now i only have the usb card reader and ethernet controller and would like to get back what i uninstalled

  • Crystal Reports are not centered when viewing on Crystal Viewer

    Hi I´d like to ask you if you reported some problem of using subreports and during the visualization from the Crystal Viewer the main report and of course the subreports are not centered. I´m running Vs.Net 2005 with CR 10. The main report and subrep

  • Transferring Time Machine access from iMac to Macbook Air

    I have a five year old iMac and recently bought a MacBook Air. I want to eventually get rid of the iMac and use the MBA but I still want to have access to Time Machine files that backed up the iMac using my MBA. I'm thinking I can probably do this vi

  • OS X Yosemite is very slow on Macbook Air 2011

    After upgrading to 10.10 my 2011 11-inch Macbook Air became very slow. Sometimes it even freezes for about 5 seconds. I've tried to reinstall system 2 times but it didn't help. So the problem i think is in 10.10 itself. Right now I installed 10.9 bec

  • "save project as" problem

    I'm having this problem on both my mac book pro using FCE 3.5 upgrade as well as on my imac where I just use FCE. I will go to "save project as" and save as Tape 2 for example. I make changes and then I go to "save" but it is grayed out and I only ha