Putting own custom Writer class in the runtime enviornment of JSP

Hello All:
i have a doubt that i have made my own JSPWriter class and i want to use this class to be loaded in the runtime enviornment of the tomcat to get a custom output that is required by me .... for this i have written my own PageContext and through it i am instanciating this writer and successfully using it but is it the right procedure or i shall somehow need to follow some other procedure to get the task done. Another doubt that i have is if i load my suitable classes and in the runtime enviornment, will it effect the other applications that are running on the server ... and what ahould be the ways to overcome this .... is they follow the same procedure as i have then i think they are not supposed to face any problem ... kindly give me suggestions as i am in need of finding a solution as soon as possible ...
One another thing that i need to ask is that if we want to read the contents that are being sent to the client brower through the JSP then how to get that .....
I hope you will try to understand my urgency..
thanks in advance
Dodo

Please read http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/Servlets8.html#82361 on filters and response wrappers. The advantage to this approach is that you can target your replacement writer to specific web resources and capture output.

Similar Messages

  • How to remove a static class from the Runtime of the JVM

    I want to remove a static class from the Runtime of the JVM.
    My goal is to clear the cache of the "InetAddress.getByName(String host)" static method.
    Thanks in advance.
    Floweb

    Sorry, It means a class that has been loaded in the JVM by the call to a static method......
    Floweb

  • Compile and call the class during the runtime

    Hi guys,
    I am struggling with a project, which allow user to modify the behavior of the program.
    To do this, my Java code must be able to compile the Java code (*.java) and call the class from the code during the runtime.
    Here are my code:
    com.sun.tools.javac.Main javac = new com.sun.tools.javac.Main();
    String[] options = new String[] {"d:\\javaExternal\\RunTimeCompilation.java"};
    System.out.println(Main.compile(options));This allows me to compile the .java file into .class file. However, I can't find the way to access/use the .class file.
    Do you guys have solution for this?
    Thanks a lot.

    You will also need to investigate class unloading and proxies since presumably they can modify the file and compile it again.
    Might note that in general this seldom works for business solutions. It seems like allowing the users to add their own functionality would be a good idea so the programmers don't have to keep doing it. But the reality is that then the users must become programmers. And often must be pretty good at it as well since they must not only know the programming language but also the framework too. The second problem is that it also becomes a maintenance nightmare for the real developers to upgrade the existing system.

  • Add jar files and use those classes at the runtime

    Hi All,
    I need to add some jar files at the runtime depends on which the user selects where the jar file is located and i need to import those classes in other class for some functionalities . I could add jar files by using the URLClassLoader and Class.forName("myjar.myclassname") is also succeeded and i have no clue how to use those classes with in the jar file as i couldn't import those classes also in the source because the jar files are being added at the runtime(This leads to class not found exception at the compile time).
    I had found a complicated way of using those classes after being added at the run time as below.
       Class clazz = Class.forName(myClass);
                final Method method = clazz.getDeclaredMethod(requiredMethod, new Class[]{URL.class});
                final Object returned = method.invoke(clazz.newInstance(), new Object[]{request}); but, its really pain to use in this way in all the places.
    Does any of you have simpler suggestions on how to achieve this?
    Thanks,
    Venky.

    Thanks jschell. Yes, you are right. I had found that using reflection API is the only way to load classes at the run time. But according to our application using reflection makes the application little complex, so while start of the application or during other modifications, i am overwriting my jar file to the latest one using FileChannel class as below
          FileChannel ic = new FileInputStream("new.jar").getChannel();
          FileChannel oc = new FileOutputStream("old.jar").getChannel();
          ic.transferTo(0, ic.size(), oc);
          ic.close();
          oc.close();After this code is executed, our application totally uses the new jar file.It is little fast than using reflection. Is this a good idea?

  • Can I call my own custom java class from JavaScript?

    You can instantiate a "JavObject" from client-side JavaScript:
    http://developer.netscape.com/docs/manuals/js/client/jsref/javobj.htm#1193137
    What I don't know is, does JavaObject mean only the browser's JRE classes? Can I instantiate a class I wrote?

    Also, does this even work in IE anymore? I'm trying it and it doesn't seem to work! Anyone know if this feature was removed? I have the latest Java plug-in.

  • Here's how to use your own custom Webclip icons for the sites you visit.

    This method is pretty much 95% taken from this URL: http://allinthehead.com/retro/319/how-to-set-an-apple-touch-icon-for-any-site , so credit where credit is due. The instructions are a bit hard to understand though, so I'll try to make it easier for everyone.
    Fortunately, this works for both Macs and PCs.
    INSTRUCTIONS:
    Requirements:
    - iPhone on 1.1.3 and any version of iTunes that can sync to iPhone
    - Adobe Photoshop or any other image editing program that can crop, alter image size, and save .png image files. (Recommended 24-bit .pngs as they are higher quality)
    - Apple Safari ( http://www.apple.com/safari/, and yes, you need it.)
    - A website or ftp where you can upload images and directly link to them, like Google Pages.
    Warning:
    - This requires you to sync your Safari bookmarks to your iPhone. You will probably lose all of your iPhone's bookmarks if you don't already sync your Safari bookmarks with your iPhone. Only proceed if you do not mind losing your iPhone's current bookmarks and do not mind re-entering them after the bookmark sync. NOTE: The bookmark sync DOES NOT get rid of your current Webclips though, so don't worry about those.
    Easy Steps:
    1) First, make sure that you are following these instructions in the Apple Safari web browser.
    2) Find an image you wish to make into a Webclip icon. (ex: I prefer to use movies.yahoo.com to look at movie showtimes, so I found an image of a movie reel from Google Image Search and decided to use that.)
    3) Open the image with your preferred image editor and crop your desired image into a perfect square. Resize that picture down to 57x57 pixels. Save as a 24-bit .png file. Upload the icon to your webpage or ftp. (ex: I ended up with this icon of a movie reel: http://ctolpin.googlepages.com/appleicon01.png )
    4) Select and copy the javascript code in this .txt file: http://ctolpin.googlepages.com/webclipcode.txt
    5) Go to Bookmarks and select "Add Bookmark..."
    6) Type in "Webclip Icon URL"
    7) Go to Bookmarks again and select "Show all Bookmarks."
    8) Right-click your new "Webclip Icon URL" bookmark and select "Edit Address"
    9) Paste your clipboard's contents into the field.
    10) Plug your iPhone into the computer if it's not connected already.
    11) In iTunes, select your iPhone from the right column. Select the Info tab. Scroll down to "Web Browser" and check "Sync bookmarks with: Safari" (obviously, make sure Safari is selected from the dropdown menu).
    12) Once your iPhone is synced, use your iPhone to navigate to your intended website target to make into a Webclip. Remember that Webclips save where you zoom in as well! (ex: For me, it was movies.yahoo.com and then entering in my zip code.)
    13) Once you've loaded your target website, open up the bookmarks in iPhone's Safari, select Bookmarks Bar, then select Webclip Icon URL.
    14) Type in the address of your uploaded icon. (ex: In my case, it is http://ctolpin.googlepages.com/appleicon01.png)
    15) iPhone's Safari will seem like it didn't do anything. However, add that webpage now to your home screen as a Webclip. Magic.
    Additional note:
    It is easiest to make a bunch of icons at first and to upload them. However, once that "Webclip Icon URL" bookmark is in your iPhone, there is no need to go back and do any of the computer Safari steps again
    My front page icons in order (Sorry Stocks, it's the second page for you!):
    Google, Wikipedia, Definr, Showtimes
    http://ctolpin.googlepages.com/iphonecampics007.jpg
    Message was edited by: LumpOfCole

     3 Go to the port forwarding section and copy down the Applied Rules. 
    Example:  
    Network Computer/Device: 192.168.1.100:63145
    Application & Ports Forward:  Application UDP Any -> 6347  
    Note: There may be up to three entries for each one of your Set Top Boxes.G
    Your display obviously is not like mine as mine does not dosplay the port associated with the ip address
    whatever, the STB's start at 192.168.1.100 and icement by 1 for each
    the port addr's will be 63145 alo incrementing by 1
    there is 1 entry for each in my pf list
    however each ip addr also has a port entry starting at 35000 also incrementing by 1 for each ip addr
    For some unknow reason these are duplicated e.g I appear to have 11 entries exaactly the same for each stb and as the fios services rules have no action switc there is nowhere to delete the extraneous garbage.
    Why do you clone the mac addr??

  • Can I put my custom developed Apps on the iPod touch?

    I am a software developer considering getting an iPod Touch device to develop App for that device and the iPhone.
    For testing purposes, what path would I take to move my test App from my Mac to the iPod?

    http://developer.apple.com/iphone/

  • How to implement custom Model Class in Oracle ADF?

    I am using Oracle ADF for one of my project and i am using Query component of ADF. For given tables the query component creates view objects and maps the relations. ADF uses its own custom model class for this component and it should understand the DB tables. But for my project i have no access to database. All i can do is pass a string or object/query to the existing (custom) Java class/object, and this model class formulates query and queries the database and returns the value to my Java class. I have to display these results using ADF to the front end. Is There a way to achieve this? Can i replace/override the existing Model class of ADF. If so how?
    Thanks in advance for your help.

    Hi, there:
    Best thing to do is to start with the default login.html page, and then modify it. The login screen is fairly complex and it's easy to just miss a JS function you need to call. To get to default page, you would need to do one deploy (to simulator or whatever), and then look for login.html page in the temporary Xcode or Android project generated from the deployment. It should be under the "deploy" directory in your JDev workspace.
    You can also see all the framework JS files and CSS files that way as well.
    We have had customers implementing custom login screen so we know it can work, but they all had to start with the default login screen and then modify it.
    Thanks,
    Joe Huang

  • Where should i put html with applet class embedded?thanks

    Tomcat4.0 server
    i put html and applet class in the root of my project(/webapps/test/)
    when i hit the html file locally, it displays well. but it doesn't work when it comes to service.
    plus:the applet class is developed with jdk1.1.8
    any help is apprieciated!

    The first thing I would do is recompile the applet with a newer JDK. Second, you need to post more info on the problem. What do you mean by "service"?

  • Sql Query in Custom Java Class in OIM 9x

    Hi All,
    I m having requirement where I need to execute SQL Select Query in custom java class.
    The class is a action class ,in a method I m trying to execute SQL Query as below
         sdkDataSet = new tcDataSet();
              dataprovider =sdkDataSet.getDataBase();
                   //sdkDataSet = new tcDataSet();
                   sdkDataSet.setQuery(dataprovider, sdkQuery);
                   sdkDataSet.executeQuery();
                   logger.debug(CLASSNAME + methodName + "Query Executed");
                   if (sdkDataSet.getRowCount() > 0)
                        sdkName = sdkDataSet.getString(0);
                        logger.debug(CLASSNAME + methodName+ "The sdkName is " + sdkName);
    Error is returned in logs
    tcDataSetException    Must set a query before executing
    I hope issue is coming due to dataprovider dbrefence.
    Kindly let me know how to execute sql query in a action class.
    Regards,
    Krish

    Hi Pallavi,
    Thanks for your reply...
    OOTB class Name is com.thortech.xl.webclient.actions.ApprovalsAction
    This class will display the pending Approvals for a user.On pending approval page, I need to add one more attribute let say email of the beneficiary user.I have a query which will fetch email value based on RequestID.
    select usr.usr_email from rqu rqu, usr usr, act act  where rqu.usr_key=usr.usr_key and usr.act_key=act.act_key and rqu.req_key=1234*
    Pls let me know if there is any way to get email with or with out executing Query.
    Regards,
    Krish

  • 11g iBots(Agents) calling custom java class?

    We upgraded from 10g to 11g and we have iBots that call a custom java class in the form of a jar file.
    This all worked fine in 10g.
    I followed all configuration steps in the documentation, but we are unable to get our iBots(Agents) to work in 11g.
    Keep getting "Can't find Class" errors.
    Has anyone successfully created agents that call custom java classes with 11g, if so, can you please share your steps for doing this?

    Hi glova,
    The document refers to the RPD and catalog migration....what ever customization used in 10g wont effect in 11g i suppose most of the things.
    i would suggest you to copy the java class of ibots and do the copy paste or manually do it in 11g and see if it works ...this is the only alternative.
    hope helps you.
    Cheers,
    KK

  • Custom fields to change the actions ;list

    Dear all,
    I had put a custom check box in the new custom tab.
    Based on this check box value I want to set the actions in the action list.
    for example ...say the custom check box is 'Approval required' . if this is checked only then the action list should have action as Approved ...otherwise not.
    This is field is created in the crmd_customer_h table thru the structure.
    Now I have created a parameter in the container editor like the same screen field (with import and export options checked) and in the condtions for this action, I have written to display this action only if this parameter has the value 'X'.
    Its not working.please advice me how to proceed.
    Also can we set the break point here.
    thanks
    regards
    sanjeev

    Hi,
    please use BADI CONTAINER_PPF to fill the value of your parameter.
    Check note [865619 - Actions should only be scheduled if status is newly set|https://service.sap.com/sap/support/notes/865619] for further examples.
    Regards,
    Christoph

  • How to assign my customized smart style to the SO10 texts?

    Hi .
    In the standard text which we enter through SO10, I want some of the words to be coloured(blue) and some lines should be highlighted with yellow backgnd colour.
    For the first part at least, how can I change the SO10 text's style to my customized style?
    I can see the style list in text editor format menu->change style, but there, only some of the styles are able to select and I am not able to see my own customized style created through the tcode /NSMARTSTYLES.
    Please help.
    Rgds,
    Madhuri
    Edited by: madhuri sonawane on May 24, 2010 12:43 PM

    Hi Maduri,
    Check this link.....
    Using custom styles in SO10
    Hopet it is useful..
    Regards,
    Raj.

  • How to create html files while the request to a jsp file of same

    Hi..
    i need to create html thumbnails during the runtime for a jsp page. so that i can display it in a table (number of pages.). For that, i need to create html pages for each and every request to that jsp file with different data. please help me in this..
    Thanks
    Suresh S

    I believe you will need to more clearly describe what you are trying to do and what the problem is that you are having before you get a reply to your question.

  • SAP TAO Customizing the Runtime Library

    All,
    I am trying to build SAP TAO Customizing the Runtime Library for and following the instructions:
    1. Edit “CBASE_Custom_Wrappers.vbs
    2. added code as follows:
         Sub CUSTOM_CaptureScreen( windowTitle )
         Dim activeWindow
               Set activeWindow = TAO.GetSapGuiSession().ActiveWindow
                        If activeWindow.Text = windowTitle Then
                                 TAO.CaptureScreen()
                        End If
          End Sub
    3. Verifying the Syntax of Custom Code by executing CBASE_Bootstarp.vbs was able to see CBASE_Custom_Wrapper.vbs
    4. Call the Execute statement :
    PARAMETERS
         Library: CBASE_Custom_Wrappers.vbs
         Statement "CUSTOM_CaptureScreen “Screen Name”
    But I am getting error as * ERROR DETECTED * Error: 1032 Description: Invalid character Source: Microsoft VBScript compilation error * LAST CONTROL URI * label -> titl type -> GuiTitlebar id -> /app/con[0]/ses[0]/wnd[0]/titl
    I was expecting the custom wrapper to work according to SAP TAO 3.0 SP2 and above Runtime Library and default component...page 184
    Any help would be welcome
    Thanks!
    PS: Check the screen shots

    Hello
    CUSTOM_CaptureScreen %quote%Screen Name%quote% worked in SAP ECC. But when I try the same with CRM Portal it fails.
    Fig 1: Screen to be captured
    Fig 2: Object Spy: [TAF] Identifcation
    Fig 3: ALM Component setting for Execute Statement
    Fig 4: ALM Error 424.
    I have tried both "" and %quotes%
    Seems that object is not recognizable or this wrapper sub works only for ECC and not CRM
    ' CBASE_Custom_Wrappers is the library where to put custom functions          
    ' This library is delivered empty within SAP TAO                            
    ' - Custom functions written here should not override existing TAO Functions
    ' - Please make sure to use a prefix to avoid name conflicts especially when
    ' declaring global variables                                               
    '# AssemblyTitle("SAP TAO Application")
    '# AssemblyDescription("SAP Test Acceleration and Optimization")
    '# AssemblyCompany("SAP")
    '# AssemblyProduct("SAP_TAO")
    '# AssemblyCopyright("Copyright (c) 2008-2013 SAP AG. All rights reserved.")
    '# AssemblyTrademark("Trademark 2008-2013 SAP AG")
    '# AssemblyVersion("3.0.4.3")
    '# AssemblyFileVersion("3.0.4.3")
    '# AssemblyInformationalVersion("3.0.4.3")
    ' Begin - Custom Code
    ' Put your custom code here - No custom code is delivered by SAP
    Sub CUSTOM_CaptureScreen (windowTitle)
        Dim activeWindow
        Set activeWindow = TAO.GetSapGuiSession().ActiveWindow
      If activeWindow.Text = windowTitle Then
      TAO.CaptureScreen()
            End If
    End Sub
    ' End - Custom Code
    If Not IsEmpty(Environment) Or CBASE_BOOTSTRAP Then
      'This line prevents from loading the library twice.
      ExecutionContext().DeclareLibrary "CBASE_Custom_Wrappers.vbs"
    End If 
    Thanks for your help in advance
    Regards
    Saurabh

Maybe you are looking for

  • Oracle9i Rel2 installation fails on Redhat linux 7.3

    Hello there. My m/c is Pentium III 500MHz m/c with 320MB physical RAM and it has Redhat Linux 7.3 installed. I'm trying to install oracle 9i and it fails in DB creation. The "dbca" shows an error message "ORA-27123: unable to attach to shared memory

  • How do you hide one dimension from EPM context pane without locking it

    Hi Experts, Simple question: How can I programmatically (using vba) hide a particular dimension in the EPM context pane, without locking it? Following API's could be used, but they all have have a mandatory parameter for the dimension member... which

  • Getting ORA-01476 and ORA-06512 in alert log

    I am getting this error in my alert log file frequently ORA-12012: error on auto execute of job 734 ORA-12008: error in materialized view refresh path ORA-01476: divisor is equal to zero ORA-06512: at "SYS.DBMS_SNAPSHOT", line 803 ORA-06512: at "SYS.

  • Responding to multiple emails via multiple templates

    Hi! I'm looking for a way to implement templated email responses via the mail or gmail app. What I would like to do is this. After receiving an email I would like to respond with a one of many templates via e-mail in the most efficient way possible.

  • Java 6 upgrade -- ant replicating class files on compilation

    On upgradation to java 6 , ant seems to replicated class files which have already been compiled into jars (which i have mentioned in classpath). This is the ant script <javac srcdir="src" destdir="/WEB-INF/classes" classpath="${library.jar}" deprecat