Servlet 2.3 - Filters for every request to the WebContainer

I want to filter every request to the web container. How do I deploy the filter without confining it to a particular context? For example, I would want to filter everything that went to www.bea.com. But if I deploy it as a webapp, it will only filter from www.bea.com/mywebapp. So I lose any request that go to www.bea.com/anothercontext. I have tried mapping the filter to the FileServlet, but once again, it only works inside of the context of the webapp.
          Is there a way to map the Filter to the docroot of the server?
          I am using Weblogic 6.1 and am currently deploying every thing as a .war file
          

yep - thats my understanding
          I dont know of a way to deploy a single filter at the server level that
          covers all webapps. I'm not saying there isnt a way - I don't know of one
          Anyone out there know for sure?
          "Chip Sands" <[email protected]> wrote in message
          news:[email protected]...
          >
          > Please correct me if I am wrong, but that would mean that I would have to
          deploy
          > my filter into every webapp on the server because "/" is relative to the
          context.
          >
          > Unfortunately, that is not an option for me. I do not have knowledge of
          the other
          > webapps deployed on the server, but am required to have all requests to
          those
          > contexts go through my filter.
          > I was hoping there was a way to deploy a filter outside of a webapp and
          stick
          > it at the docroot of the server.
          >
          > Chip
          > "Matt Krevs" <[email protected]> wrote:
          > >I'm not sure you can do this
          > >
          > >The only way I can think of is to deploy your filter in all of your web
          > >apps
          > >and map it against the root context of each web app
          > >
          > >What happens if you deploy the filter within the default web app that
          > >has a
          > >context of "/" ?
          > >
          > >"Chip Sands" <[email protected]> wrote in message
          > >news:[email protected]...
          > >> I want to filter every request to the web container. How do I deploy
          > >the
          > >filter without confining it to a particular context? For example, I
          > >would
          > >want to filter everything that went to www.bea.com. But if I deploy
          > >it as a
          > >webapp, it will only filter from www.bea.com/mywebapp. So I lose any
          > >request that go to www.bea.com/anothercontext. I have tried mapping
          > >the
          > >filter to the FileServlet, but once again, it only works inside of the
          > >context of the webapp.
          > >> Is there a way to map the Filter to the docroot of the server?
          > >> I am using Weblogic 6.1 and am currently deploying every thing as a
          > >.war
          > >file
          > >
          > >
          >
          

Similar Messages

  • New instance for every request to Servlet

    I want to create new instance for every request to Servlet ...
    I am running my servlet on weblogic

    Hi!
    what functionality can there be that has to be put into init()?
    Another idea:
    why not include your needed functions in a private method within the servlet and call this method from init() and from doPost/doGet so it is processed any time the servlet is called?
    btw: more instances of the same servlet seems to me as going back to the roots (cgi).
    Thomas.

  • Client handler is invoking for every request.

    Hi EveryOne
    i am new to JAXWS welogic.
    i have a web consumer/client, while sending the request from client the handler is invoking for every request. I could not able to restrict.
    i would like to intialize only once and need to use that instance like (init() method initialization). How to resolve this issue.
    can anyone come across a solution for JAX-WS in general? Please throw your thoughts here.
    Any help in this regard would be appreciated.
    Thanks & Regards
    Suresh

    Two common reasons for this are:
    (1) Problem with the system clock: date, time, or time zone differs substantially from the rest of the internet
    (2) Firefox not set up to work with your security software that filters your web traffic
    In order to filter secure traffic, your security software needs to present "fake" certificates to Firefox so it can be the "man in the middle" and see everything sent to and from the site. Firefox distrusts the fake certificates until instructed otherwise.
    Do you use any software with that kind of feature? On Windows, products with that feature include avast! 2015, Bitdefender, ESET, and Kaspersky.
    A less common problem is malware performing a "man in the middle" attack.

  • Specify filter for every request except one

    Can a in me web.xml file specify that a filter should be used for every request except one.
    I can write;
    <filter-mapping>
         <filter-name>MyFilter</filter-name>     
         <url-pattern>/*</url-pattern>
    </filter-mapping>
    to use it on every request. But how do I exclude one specific resource that shouldn't go though the filter.
    I know that this may not be exactly the right forum but i'm really lost. I appreciate all suggestion.
    Thanks / Daniel

    This is the right forum, but unforutanetly you cannot exclude some urls.
    I would suggest you handle that logic in the filter itself.

  • Ajax:callback function not called for every readystatechange of the request

    Author: khk Posts: 2 Registered: 2/17/06
    Feb 17, 2006 11:04 PM
    Hi
    I am working with an ajax program.
    In that i have defined a callback funtion
    but that function is not being called for every readystatechange of the request object for the first request .
    but it is working fine from the second request.
    function find(start,number){
    var nameField=document.getElementById("text1").value;
    var starting=start;
    var total=number;
    if(form1.criteria[0].checked) {
    http.open("GET", url + escape(nameField)+"&param2="+escape("exact")+"&param4="+escape(starting)+"&param5="+escape(number));
    else if(form1.criteria[2].checked) {
    http.open("GET", url + escape(nameField)+"&param2="+escape("prefix")+"&param4="+escape(starting)+"&param5="+escape(number));
    http.onreadystatechange = callback2;
    http.send(null);
    function callback2(){
    if (http.readyState == 4) {//request state
    if(http.status==200){
    var message=http.responseXML;
    alert(http.responseText);
    Parse2(message);
    }else{
    alert("response is not completed");
    }else{
    alert("request state is :-"+http.readyState);
    }

    Triple post.
    You have been answered here: http://forum.java.sun.com/thread.jspa?threadID=709676

  • Alternatives to loading .properties files for every request

    I am just starting for a company, and they loading a bunch of .properties files for every request. I've told them that according to JEE specs, using the file system like that is a violation, as it's not scalable. I've suggested the following alternatives:
    1. Load a file once, in a static initializer, or something to that effect. Re-start the app if a change needs to be made in properties.
    +: few changes
    -: requires a new war/ear to make a change
    2. Put properties that are truly variable in a database record.
    -: requires DB schema change.
    3. For instance, i've though about using something like jconsole to change an mbean property, and then web apps using that property.
    4. Define a single web app that exposes an EJB/JMS/RMI object which serves properties to other web apps. If a change is needed, only 1 web app needs to be re-started, although it would still have to be re-packaged. Perhaps this app could load this stuff from the DB.
    5. Have a properties service, and expose it as an RMI object. If a change needs to be made on the fly, use rmi to make the updates.
    I'm leaning towards a combination of 1, 5, and possibly 4.
    I would like to know what other alternatives might be available.
    Thanks.

    I am just starting for a company, and they loading a
    bunch of .properties files for every request. I've
    told them that according to JEE specs, using the file
    system like that is a violation, as it's not
    scalable. well, it's just boneheaded that's all
    I've suggested the following alternatives:
    1. Load a file once, in a static initializer, or
    something to that effect. Re-start the app if a
    change needs to be made in properties.that's what most people do
    2. Put properties that are truly variable in a
    database record.well, databases don't normally hold config info, but you can do what you want
    -: requires DB schema change.
    3. For instance, i've though about using something
    like jconsole to change an mbean property, and then
    web apps using that property.
    4. Define a single web app that exposes an
    EJB/JMS/RMI object which serves properties to other
    web apps. If a change is needed, only 1 web app needs
    to be re-started, although it would still have to be
    re-packaged. Perhaps this app could load this stuff
    from the DB.doing EJB or RMI for getting properties sounds like overkill in the extreme to me

  • Is lookup required for every request(SLSB)?

    Hi,
    I have a SLSB and a client that makes frequent requests as needed. The question is, should the client make a fresh lookup for every request in a session or just once per session?
    I have tried both the ways and got it to work...but can someone tell me the correct approach for lookup?
    thanks in advance.

    Thanks for the reply!
    By your statment that EJB Home Handle can be cached, I understand the following..
    MyBeanRemote mybean = null; // declaring as class variable.
    // making a request
    if(mybean==null)
    lookupBean();
    mybean.doSomething();
    // making next request
    if(mybean==null)
    lookupBean();
    mybean.doSomethingMore();
    // here goes the lookup...
    lookupbean() {
       mybean = ...lookup("......");
    }so, this is how before each request, I check if the mybean is null. in lookupBean(), the bean-lookup process is executed and reference is set to mybean.
    am I right?

  • My MacBook Pro keeps making copies of a document that I am trying to save. I don't want to duplicate the file. I only want to save it on both my hard drive and my external hard drive. I do not want to change its name for every save, which the computer see

    My MacBook Pro keeps making copies of a document that I am trying to save. I don't want to duplicate the file. I only want to save it on both my hard drive and my external hard drive. I do not want to change its name for every save, which the computer seems insistent on doing. Help!!

    11lizzyp wrote:
    can't be saved because the file is read-only.
    I did not create the file to be read-only. I created to be able to continue to add to it as I work on it.
    More on versions here:
    http://support.apple.com/kb/ht4753
    local snapshots:
    http://support.apple.com/kb/HT4878
    Sounds like a permissions problem ie read only.
    If running repair permissions from your DiskUtility.app does not sort it,
    Someone should jump in here with erudite and concise fix.

  • Access 2010 Chart - Report returns an identical chart for every record in the underyling query

    Hi there, I hope someone can help me with this. I've created a stacked column chart in a Report. The chart seems to be working fine but my report is returning a chart for every record in the source query.  The chart adds up the days each vehicle in
    a fleet was used in a given time frame.  I'm not a code writer so wizarded my way to the following:
    TRANSFORM Sum(QVehicleDaysUsed.[DaysOfUseThisMonth]) AS SumOfDaysOfUseThisMonth SELECT QVehicleDaysUsed.[YearMakeModelPlate] FROM QVehicleDaysUsed GROUP BY QVehicleDaysUsed.[YearMakeModelPlate] PIVOT QVehicleDaysUsed.VehicleUseForMonthStarting;
    The chart seems to be producing exactly what I want but it's repeated once for every record in the source query. I don't know if this is the issue but I don't have a Master/Child field linking the chart to the report it's in - chart is unbound and therefore
    won't allow me to link fields. I'd sure appreciate any help you can offer! Thanks!
    (Incidentally VehicleUseForMonthStarting is a date field - ideally it should be shown as a DatePart MMMM but for whatever reason Access is balking at the Format expression.)
    Thanks!

    GOT IT! Hurray.  Obvious after giving it more thought... I had to make the report the chart was in Unbound. :) Leaving post up in case it helps someone else out.

  • Session is set for every request

    Hi,
    With WL Server 6.1SP1 we have some peculiar problem. Every request
    is considered as a new request and a new session object is created. So
    the information we stored in the session is no longer available for
    subsequent requests. This behaviour is seen intermittently. Session is
    not invalidated and session is not timed out.
    Thanks,
    Prasad

    Try:
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Reset all settings      
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:                                 
    iOS: How to back up                                                                
    - Restore to factory settings/new iOS device.             
    If still problem, make an appointment at the Genius Bar of an Apple store since it appears you have a hardware problem.
    Apple Retail Store - Genius Bar                                      

  • How to generate a new rhread for every request

    Hello,
    I'm trying to write a server side program that does the following, recieves a Single connection from a client, client sends a request to the server side program, the server side program sends to a third party(back end) and waits for a reply.
    The problem i am facing is the following, I want to for each message(request) recieved from the Client to generate a new thread and establish a new connection with the third party, I have tried creating a new thread for the communication with the third party, in this case if the response from backend takes time I will still be able to recieve other requests from the client. But I dont know how to return the message that his been to the Father thread. The reason why I am doing this is that I dont want the same thread that recieves the request from client to wait until the reply for the previous thread is sent.
    Here's the code which I have been trying to implement.
    ClientCommunicator {
    Socket soc= new Socket(IPAddress,port);
    Thread backEndComm= new Thread (new BackEndCommunicator
    (soc,"Message To Back End"));
    backEndComm.setPriority(8);
    backEndComm.start();
    public class BackEndCommunicator implements Runnable
    Socket socket;
    String messageToBeSentToBE= "";
    public BackEndCommunicator(Socket socket, String messageTOBE)
    this.socket= socket;
    messageToBeSentToBE= messageTOBE;
    public void run()
    PrintWriter outtBackEnd= null;
    BufferedReader innBackEnd= null;
    String replyFromBE= "";
    try
    outtBackEnd= new PrintWriter(new OutputStreamWriter(socket.getOutputStream()));
    outtBackEnd.println(messageToBeSentToBE);
    outtBackEnd.flush();
    innBackEnd= new BufferedReader(new InputStreamReader(socket.getInputStream()));
    replyFromBE= innBackEnd.readLine();
    How can I return the String "replyFromBE" to the ClientCommunicator class so it can be sent to the client as soon as recieved from the back end.
    regards,
    [email protected]

    I assume the problem you are having is that your ClientCommunicator thread is blocking in a read and has no way of receiving notification from the other thread. Seems like you have a couple options at least.
    1. Use non-blocking IO and a selector to do service both the client socket and the backend socket. Usually, NIO is more of a pain than it is worth unless you need to service hundreds of connections at once, but I think that in this case where you know that there are only two connections it might be easy enough to use.
    2. A second option would be to avoid blocking on the read by using the available method on the input stream to first determine if you can actually read anything. This would allow you to wait with a small timeout on a monitor that the backend communicator could notify when it receives a response. This is not the ideal solution because you are limiting how fast you respond to the client and could be using more cpu time than necessary. However, it might be a lot easier to implement and could be adequate for what you need.
    First solution is more elegant but potentially not worth the trouble. Second solution is less elegant, but may be good enough.

  • Generate yearmonth for every month of the year

    Hi,
    I need to generate all the dates in the format of yyyymm starting with the last month.
    I mean something like below :
    rownum            yearmonth
    1                       201204
    2                       201203
    3                       201202
    4                       201201
    5                       201112
    ...I know we need to make of pseudo column LEVEL, but cant seem to make it work. Please advise.
    Thanks
    Billu

    Thanks for responding.
    marcusrangel -- I need to use the list of dates from the query for every cutoff that we have for comparision.
    stew -- your query worked just fine.
    Thanks

  • User role for service requests from the SSP

    Does the End User role have enough permissions for users to create service requests from the SSP?  I know for incidents it is but I am not sure about service requests.  If you go through the Service Catalog Checklist, step 5 to create the User
    Role brings up a new role based on the Author role and not on the end user.

    here step by step procedure with user access.
    http://www.concurrency.com/blog/scsmportalpermisions/
    Cheers
    Antoine AL Ibry

  • Session gets created for every request.

    Hi ,
    I have two servlets where i set a object in the session in one servlet say servlet1.java and get in another servlet say servlet2.java.
    When i pass my session object from servlet1 to servlet 2 , servlet2 is supposed to get the arrtibute , but its always gives me a null value.
    I found out that a new session is getting created every time when i try to access servlet2.
    I tried to print the session object , and it clearly tells me that the object is differet from the one i set.
    Can anyone let me know why is this happening and how do i solve this .
    This happens for me in weblogic 8.1 setup.
    In my JBOSS set up with the same code it works fine.
    Thanks in advance.

    Sasikanth,
    Pardon me if I am stating the obvious, but according to your description the problem is with WebLogic. So did you try a WebLogic specific forum?
    Good Luck,
    Avi.

  • Setting up MPD for every user on the machine

    I'm having a few problems setting up MPD. What I want to do is configure MPD such that it starts automatically at login using the current user config file (so that it uses the correct db) and stops playing and exit (to free port 6600) on logout. This way when a different user logs in MPD will use the correct database and playlists dir.
    So far I've created all the needed files (.mpd/{.conf,.pid,etc}) in the home dirs of every user and followed this (MPD/Autostart with systemd/Current Setup) then I followed these steps for user1 (created the needed files in user1's home) Using systemd to manage your session (Should I repeat them for user2?). I'm using this service for mpd:
    [Unit]
    Description=Music Player Daemon
    [Service]
    ExecStart=/usr/bin/mpd %h/.config/mpd/mpd.conf --no-daemon
    ExecStop= /usr/bin/mpd %h/.config/mpd/mpd.conf --kill  #I expected this to stop mpd on logout
    [Install]
    WantedBy=default.target
    The problem is that when I log out the music keeps playing which means mpd is still running. If I log in as user2 I can see users1 database (using ncmpc) but I can't control the playback e.g:If I want to skip the current track it stops playing.
    Any ideas?

    rodrigomb81 wrote:ExecStop= /usr/bin/mpd %h/.config/mpd/mpd.conf --kill  #I expected this to stop mpd on logout
    That will stop mpd when the service is stopped, which will happen when the user instance of systemd exits. So logout should do `systemctl --user exit`. (This might be mentioned on the wiki, but that systemd/user page is a big mess.)

Maybe you are looking for

  • Performance of ABAP query program

    Hi All, A custom program AQNWZ_TALAT=====TCS_AP_ITEMS== is taking lot of time running. And when checked the cost of the select statement is very high. I guessed it must be some custom abap query. Correct me if I am wrong. Also please let me know how

  • NW BPM Configuration

    I have configured NW BPM scenario for the blog: http://scn.sap.com/community/pi-and-soa-middleware/blog/2013/09/10/step-by-step-guide-for-merging-two-different-interfaces-in-netweaver-bpm But Sender SOAP Communication Channel is not routing the messa

  • DVD drives rendered useless

    Hello, Recently, my G5 Dual 2.0 decided that it would no longer burn DVDs. I have previously burned many DVDs on the internal superdrive (a Pioneer DVR-107D) as well as my external LaCie (a Pioneer DVR-K12D), and an older 1x LaCie. Now, I get the sam

  • How to use iSight for webstreaming video

    hello, recently my wife and I purchased a dog(mini bulldog). she is obsessed with the dog. the dog stays home durring the day. she would like for me to place our laptop in the dog room to provide a live video feed. is there any possible way to do thi

  • Send birthday reminder to multiple emails

    Hey guys I was wondering is there's a way to send an email reminder to multiple email addresses. Every year we celebrate our co-workers' birthdays by surprising them within a two-week period of their birthdays, it could be before or after it, that wa