Wrapper to query custom, then later... the tag jsp:param

Hi people,

First of all: don't know if this question has to be asked under servlets or JSP because it slightly affects both... hope it's all right here

I have a Web application that I want to put a filter to manipulate the parameters received prior to their arrival in the application. My reasons to do so include a piece of third party software which I do not have permission to play with, so this approach (using the filter to the doctor the incoming parameters) is what I have to go with at the moment.

OK - so I've set up a filter. And then a custom requestWrapper that stretched javax.servlet.http.HttpServletRequestWrapper. I overrode getParameter() and getParameterMap(), getParameterNames() getParameterValues(). And everything went well. I was happy, my debugs showed the appropriate content and I went to plug the new filter in my application to test it.

Then, I hit a small stumbling block. A good number of the JSP in this application use jsp: include directive and then the jsp:param tag to pass information to the jsp included. Normally, when you read these values of jsp:param in an included jsp, you use request.getParameter (). But of course, request.getParameter () is now the method of my custom requestWrapper. He knows nothing about how the jsp:Param tag is magically inserting new parameters in the query.

If someone can tell me... How this happen? How can I change my wrapper to meet the parameters created by a JSP page using the jsp:param tag?

I am aware of an option at the moment - which is to review all these pages and remove the use of jsp:param and replace it with setAttribute()... but I'd have to do it! I have not seen any documentation on how works the jsp:param tag, and so how I would be able to substitute all it does...

flintdk wrote:
Hi Ram,

Thanks again for the response... for the record (answering your comments on the Dispatcher) I made my debugs using both:


Filter test

FrontControllerActions

... and...


Filter test


*.do
INCLUDE
FORWARD
REQUEST
ERROR

... and got exactly the same results each time.

Hmmm... interesting. Here's what the Servlet specification has to say about this (section S.R.V.6.2.5 in spec 3.0). It's too long to post here, but here is an excerpt

++
+Connection filter+.
+charges / *+.
+
+
would result in the filter of what logging by the demands of the customers from.
+ products... but not as a request dispatcher call where demand +
Dispatcher has the path starting products/...*.

Back to the original problem, I think it's a bug in tomcat. What version of tomcat, your application is running under? I went through all the source code for tomcat 6.x, and it looks clean to me. Because the version of the getParameter() in your Wrapper to alleviate the problem?

public String getParameter (String name) {}
String returnValue = null;
String [] params = getParameterValues (name);
If (paramArray! = null & paramArray.length > 0) {}
returnValue = params [0];
}
if(returnValue == null) {}
Return super.getParameter (name); Check if the param is there in the subject of the original application
}
}

see you soon,
RAM memory.

Tags: Java

Similar Questions

  • How to permanently remove a tag to an image? I tried to delete it by right-clicking, but when I go to the next image and then again the tag I removed is still there.

    In my personal folder under the images, I downloaded a lot of pictures. I tried to mark them in order to find them easily, but in the process, I made a few mistakes and now I would like to remove the tags excess system generated whenever I pressed Enter. When I right click each tag, the system gives me the option to remove and I did it, but when I then jump to the next image and then go back, all the deleted tags are still there. Pretty frustrating and I wonder what I can do about it. Thank you very much.

    Hi FrancescaZancan,

    Windows Photo Gallery that you use?

    You can check the suggestions provided by Halima S dated 19 February 2011from the following wire link and check the result.

    Tags that have been deleted on the library keep reappearing on the gallery the next time it opens.

  • I have most of my emails containing the tag. I need to sort those not marked.

    Are all of my emails in the Inbox and I tag them color. I need to find anyone who is not marked. Is there a way to sort them to show no marked ones all together?

    Make a right-click any button of the column (the buttons at the top of the columns that you click to sort), activate the Tag column, and then click the Tag sort by tag button column.

  • Problems with the removal of the tags

    PES 10 I have a lot of imported key words.  In this list are the tags like USA, Florida, Arizona, Utah, etc.  It is quite easy to drag Utah for a little less USA. I thought that I could then do each State, as a subcategory of the USA.  But when I try this I think that Utah is displayed at the bottom of the list is imported and not less USA as I expected.  What happens OK or not?  I would be able to achieve a tree of tag which if we took it even down another step will be able to see from the USA on the top branch, States like Utah on a branch down & then Salt Lake City on the branch?

    I expect to be able to use the tree of the tag as a way to sort of zoom in. So I would have the options to see all the pictures at the country, State or city level.

    Thanks in advance

    Thanks for the reply.  Because most of my tags were just imported that they were just in alphabetical order.  Some of them are really places & others are really the people or events...

    What I was able to make sense was to create new tags for a State to declare Utah. Then, I select in list of tags imported Utah who already has his tag of Utah.  Then I select all the images of Utah & drag each of them in the new tag in place of Utah.  It means that I have Utah tags on the photos twice (once as any & once as a place).  While images are always selected, then remove the tag imported from Utah.  I then find myself with the correct tags on the photos that are well placed in the tag tree.

  • The active network connection icon keeps changing on me. He began by showing only 2 connections to the internet and the changes and then later to 3.

    Hi, the active network connection icon keeps changing on me.  He began by showing only 2 connections to the internet and the changes and then later to 3. But does not show where is this extra connection to connect to the local network.  I have a laptop so no wireless and cannot understand why he continues to display an additional connection.

    original title: network access connection

    Hello

    1. what version of Windows operating system do you use?

    Click on the link below.

    http://Windows.Microsoft.com/en-in/Windows7/help/which-version-of-the-Windows-operating-system-am-i-running

    2 has there been any changes to your computer until the problem occurred?

    3. have you installed all types of network adapters on your computer?

    4. are you able to connect to the network and browse the Internet?

    I suggest you to follow the troubleshooting steps and check if the problem on your computer is resolved.

    Method:

    Check if the network adapter is displayed in the Device Manager.

    a. right click on computer or workstation.

    b. Select manage.

    c. click Device Manager on the left was next to the window.

    d. on the right side, locate the network adapters and click the arrow to expand the menu.

    If you have multiple NICs installed (watch), I suggest you uninstall the network adapters that is irrelevant to your computer by right-clicking on the adapter irrelevant and selecting Properties and then select uninstall.

    Please provide us with additional information. So that we can help solve you the problem on your computer.

    Hope this information helps you.

  • Cannot view XML input using XSL style sheet. Fix the error and then click the Refresh button, or try again later.

    This is the message I got when my backup stopped and said cannot complete backup. Need answers?
    Cannot view XML input using XSL style sheet. Fix the error and then click the Refresh button, or try again later.

    --------------------------------------------------------------------------------

    A name was started with an invalid character. Error during processing of the resources ' file:///E:/WindowsImageBackup/ray-PC/Backup 2011-0...

    Hi lrl1of5,

    (1) do you use Windows Backup and Restore?

    (2) if it works well before?

    (3) remember to make changes?

    It is sufficient to indicate the complete error message you receive.

    Method 1: Run the fixit available in the links below and check if that makes a difference-Worth to try
    Difficulty of broken desktop shortcuts and common system maintenance tasks

    Note: FixIt would attempt to recover bad sectors on the hard disk, in the course of this process there are chances of DATA loss from that particular area.

    Method 2:  Clean boot the computer, then try to backup again

    Follow step 1 in the link below,
    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7

    Important: n ' forget not to put the computer to a normal startup follow step 7 in the link.

  • Scope Descrepancy between the tag and the query script

    I'm fairly certain I've found a bug in scope. I use CF11 and FW/1 and I have the following query - the work of the tag, cfscript equivalent raises an exception "Table named rc.qSignerLinks is not found in the memory":

    / * Works * /.

    "< name ="cfquery local.qResultSet"result =" local.qResult "dbtype ="query">

    SELECT

    *

    Of

    rc.qRSRecipient

    where

    [email] = < cfqueryparam value = "#session.user.getEmail ()" # "cfsqltype ="CF_SQL_VARCHAR"maxlength ="50"/ >"

    < / cfquery >

    / * exception * /.

    < cfscript >

    local.qObj = new query();

    local.qObj.setDBType ("query");

    local.qObj.setSQL(")

    SELECT

    *

    Of

    rc.qRSRecipient

    where

    [email] =: email

    ");

    local.qObj.addParam (name = "email", value = "" #session.user.getEmail () # ", cfsqltype =" CF_SQL_VARCHAR", maxlength ="50");

    local.qObjResult = local.qObj.execute ();

    local.qResultSet = local.qObjResult.getResult () .recordCount NEQ 0;

    < / cfscript >

    Yes, Steve, this is a known issue for some years now. The usual solution is to add the result set using setAttributes(), like this:

    local.qObj.setAttributes(tbl = rc.qRSRecipient);

    local.qObj.setSQL ("SELECT * FROM tbl WHERE [email] =: email");

  • Custom component AS3 / the event for MXML Tag definition


    Custom component AS3 / the event for MXML Tag definition
    Expose a custom in the custom MXML tag event.



    I made a custom AS3 component named "CustomListComponent".
    Is a list type component which extends UIComponent.

    When an element is selected (selected) I generate a custom event named, 'selChange '.

    I want the user to be able to use this tag, set a handler on the MXML tag.
    I tried to use metadata as [vent ("selChange")] in the file of AS3 components with no luck.

    Any help / examples to expose a custom event from a custom component AS3 for the MXML tag for the developer/end user would help considerably.

    Anyone? Thank you.

    To send the event in an AS3 component, try the following. The click event is simply to show you the idea. The event generated by the interaction of the user (or programming) could be anything.

    TS

  • SQL query to meet all the conditions.

    ID of country client_name

    a                      india        1

    a                     US            1

    oneWE1

    b                      india         1

    c                      india        1

    c                      india         1

    c                      india         1

    c                     us             1

    c                    US            1

    If I do a count if the id of group by client_name and country column I'll get value like that...

    client_name country count (id)

    a                  india          1

    a                    US          2

    b                  india          1

    c                  india          3

    c                   US           2

    Condition of the obligation:

    (1) if the customer is in effect in several countries then show that the customer and country having count (id) > 2, (over the case it will be customer = 'b' and country India, country will be us skip)

    (2) if the customer is does not exist in several countries then show that client and default country (in above cases it will be customer = 'b') while count (id) is less than 2., we show him...

    Catch for me is :-also, we should not ignore any customer... so, as in a. customer... as count (id) for the two countries is not more than 2... so, as per above logic... this client will ignore if we apply only above two conditions

    but we need to show the customer in this case... and take the two value... so my end result I need will be:

    customer country

    a India

    a                    US

    b the India

    c India

    Please suggest the query to achieve even... I am able to get the query that meets condition 1 and condition 2. but failure to have taken also in request... so in my query output is all above, except customer one is ignored

    Thank you very much!

    Hello

    I think I see.  You want to display the lines of 'best' available for any client, where the lines with a COUNT (*) 2 > are 'better' than the lines with COUNT (*) <= 2. ="" if="" a="" client="" has="" any="" rows="" with="" count="" (*)="">2, then to display the lines were COUNT (*) > 2, but if all the lines for a customer have COUNT (*)<= 2,="" then="" those="" are="" the="" "best"="" rows="" available,="" so="" you="" want="" to="" show="" them. ="" how="" many="" different="" countries="" a="" client="" is="" related="" to="" doesn't="">

    I always CREATE TABLE and INSERT statements for your sample data, so I'll we table scott.emp to illustrate.  Instead of customer and country, as at your table, we will use deptno and job.  This query:

    SELECT deptno, job

    AS cnt ACCOUNT (*)

    FROM scott.emp

    GROUP BY deptno, job

    ORDER BY deptno, cnt

    ;

    display the relevant data, i.e.:

    DEPTNO JOB CNT

    ---------- --------- ----------

    10. THE CHAIRMAN 1

    MANAGER 10 1

    10 1 CLERK

    20 MANAGER 1

    20 2 ANALYST

    20 CLERKS 2

    30 1 CLERK

    30 1 MANAGER

    30 4 SELLER

    But we don't want to show all the data.  We want to only show the best available for each deptno line type, where the lines with the cnt > 2 (let's call these lines of class 'A') are better then with the NTC<= 2="" (let's="" call="" these="" class="" 'b'="" rows.) ="" the="" output="" we="" want="">

    DEPTNO JOB CNT

    ---------- --------- ----------

    10. THE CHAIRMAN 1

    10 1 CLERK

    MANAGER 10 1

    20 CLERKS 2

    20 MANAGER 1

    20 2 ANALYST

    30 4 SELLER

    Deptnos 10 and 20 only have rows of 'B' class, if we want to display the lines of 'B' class for these deptnos.  DEPTNO 30 has at least 1 row of class 'A', so we only show the lines of 'A' class of deptno = 30.  This is an example of a Query of Top - N, and here's a way to do it:

    WITH got_r_num AS

    (

    SELECT deptno, job

    AS cnt ACCOUNT (*)

    DENSE_RANK () OVER (PARTITION BY deptno

    ORDER OF CASES

    WHEN COUNT (*) > 2

    THEN "A".

    OF ANOTHER 'B '.

    END

    ) AS r_num

    FROM scott.emp

    GROUP BY deptno, job

    )

    SELECT deptno, job, cnt

    OF got_r_num

    WHERE r_num = 1

    ;

  • Group by query, and then add another dimension

    Hello guys,.

    I am facing problem while building a query. In this, I do group first, and then add a column with a condition more.

    I have following data in the table or existing query.

    create table tableA (key number (5), newspaper varchar2 (5), varchar2 (5) Blog, available1 number (10), disponibles2 number (1), Type varchar2 (5))

    Insert into tableA values (100, ' 501 ', ' 1501', 10000, 8000, "T1")

    Insert into tableA values (100, ' 501 ', ' 1501', 12000, 0, 'T2')

    Insert into tableA values (200, ' 502 ', ' 1505', 15000, 9000, "T11")

    Insert into tableA values (200, '502', '1505', 8000, 1000, "T12")

    Insert into tableA values (200, '502', '1505', 5000, 1000, "T13")

    Insert into tableA values (300, ' 503 ', ' 1510', 7000, 6000, "T21")

    Insert into tableA values (400, '503', '1510', 6000, 1000, 'T31')

    I created the 'Difference' on the fly using NVL (available1, 0)-NVL(Revenue2,0) as the difference

    Type of difference key1 journal Blog available1 disponibles2

    100 501 1501 10000 8000 2000 T1

    100 501 1501 12000 12000 T2

    200 502 1505 15000 9000 6000 T11

    200 502 1505 8000 1000 7000 T12

    200 502 1505 5000 1000 4000 T13

    300 503 1510 7000 6000 1000 T21

    400 503 1510 6000 1000 5000 T31

    Desired output

    We must show Type (Sun) only when the difference is high and have to group by (Key1, Journal, Blog) while the rank becomes a.

    It is like showing the first 6 columns first and then add the columns of 'Type' later (probably using subqueries).

    Type of difference key1 journal Blog available1 disponibles2

    100 501 1501 22000 8000 14000 T2

    200 502 1505 28000 11000 17000 T12

    300 503 1510 7000 6000 1000 T21

    400 503 1510 6000 1000 5000 T31

    Any idea or detail will be appreciated.

    Thank you

    Use the DUNGEON:

    Select the key,

    Journal,

    blog,

    Sum (revenue1) available1,

    Sum (revenue2) disponibles2,

    NVL (Sum (revenue1), 0)-nvl (sum (revenue2), 0) difference.

    Max (type) keep (dense_rank last order of nvl(revenue1,0) - type nvl(revenue2,0))

    from tablea

    Key, group

    Journal,

    blog

    order by key,

    Journal,

    blog

    /

    TYPE OF KEY JOURNAL BLOG AVAILABLE1 DISPONIBLES2 DIFFERENCE
    ---------- ----- ----- ---------- ---------- ---------- -----
    100 501 1501 22000 8000 14000 T2
    200 502 1505 28000 11000 17000 T12
    300 503 1510 7000 6000 1000 T21
    400 503 1510 6000 1000 5000 T31

    SQL >

    SY.

  • Retrieve the Name of the tag property

    I'm definitely a novice PowerCLI. However, I have a script which is heavily borrowed from http://www.vstrong.info/2013/10/18/vmware-powercli-script-to-query-virtual-machine-events/

    What I would like to make in addition to the values that are retrieved, also receive the Name property of the attribute of the tag.

    The script I use now is:

    $vcenterserver = "myvcenter".

    # Check if VMware Snapin is loaded, otherwise, load

    If ((Get - PSSnapin - name VMware.VimAutomation.Core - ErrorAction SilentlyContinue) - eq $null)

    {

    Add-PSSnapin VMware.VimAutomation.Core

    }

    SE connect-VIServer-Server $vcenterserver

    $CDT = get-Date

    Get-VM-name testvm | »

    Get-VIEvent-Types of information - start $CDT. AddDays(-30)-finishing $CDT | »

    Where {'}

    $_. GetType(). Name - eq "VmBeingDeployedEvent" "

    - or $_. GetType(). Name - eq "VmCreatedEvent" "

    - or $_. GetType(). Name - eq "VmRegisteredEvent"} | »

    Select the name of user, Createduserid, FullFormattedMessage, @{Name = "VM"; Expression = {$_.} Vm.Name}}, @{Name = "RC Code"; Expression = {$_.} Vm.Tag}}

    He retrieves the correct values with the exception of the tag for the virtual machine. I also tried @{Name = "RC Code"; Expression = {$_.} Vm.Tag.Name}}

    I can extract the value in a table using the following command, but can't seem to pull the Name property:

    Get-VM-name testvm | Get-TagAssignment-category RCCode | Select-Object - ExpandProperty tag

    Description of the categories of name

    ----                           --------                       -----------

    10031 technical RCCode except...

    Any help would be appreciated, thanks!

    OK, then try this. I have not yet tested, but it should do it for you:

    Select the name of user, Createduserid, FullFormattedMessage, @{Name = "VM"; Expression = {$_.} Vm.Name}}, @{Name = "RC Code"; Expression = {$vm = ($_.)} UMM name); Get-TagAssignment | where {$_.} Entity-like ("$VM")}}} | Export Csv c:\Temp\csv.csv - NoTypeInformation - UseCulture

    The issue was that as the expression of Code RC worked essentially a new request, the $_. UMM name was irrelevant for the entity. Instead I just had the previous $_. UMM name in a variable that is referenced in the cmdlet that followed. Let me know if it works for you.

  • When you tag photos in PSE13 and you select the tag, why don't you come to see these pictures?

    Lets say I have a bunch of photos "marked" as one of my weddings.   I then create another tag to identify some of these pictures to use in a slideshow for a client.   When I select the second tag to just see 'these' photos, it gives me always all the wedding photos with the little circle with the line in.    Why is it it just shows me what I ask?

    I do not have available right now, so I suggest you just to check that:

    -your two tags are simple tags, no categories or subcategories

    -you do not deal with fireplaces or sets of version.

    There is also an option to view "close matches" or files that "do not correspond".

    You can use the keywords Panel, or you can use the menu ' find / retail "." Does make a difference?

    If you describe exactly your steps, I'll be able to reproduce a little later.

  • Calling servlet using the tag &lt; satellite: form &gt;

    Hi all

    There was a useful discussion earlier, on how to use the tag < satellite: form >. Reference:How to add a Submit button for a model without type to freshen up

    Now, my query is, How to use the tag < satellite: form > when the target is a Servlet?

    -BSR

    Hi SSB,

    Are using your 11.1.1.6.1 version? If Yes, then you need to add the name of your servlet in 'excludeURL' list of comments ReqAuthConfig.xml or 'Authentication filter application' in the Web.XML as this filter request you send. This is a new filter, they added in this version.

    I hope this helps.

    Kind regards

    Nelash Jindal

  • Research Manager custom, caching of the «question»

    I have a custom research manager that is used on the attributes of qualitative research to provide a list of choices based on a SQL, other PLM objects. It works fine in that it shows the type of choice in the pop-up selection dialog box and fills the value of the attribute correctly when the user selects a choice and later when they consult the specification outside editing mode. The question that I am running is that, even if the result of changes to the search query, the available choices in the dialog box pop up (and those who are already related to attribute values) reflect not the updated values since they are apparently put cached after the first use of research (call AllLookupItems). The new values will be displayed after an IIS reset.

    Y at - there a way to force the cache for this choice list refresh every time the pop-up dialogue box opens, and also when PLM retrieves values from existing attributes by using the custom search when the specification is viewed? Potential impact of performance of database hits are included, I was wondering if this is possible.

    I appreciate all advice, thank you.

    The app updates cached custom within our service of extended attribute values of research manager.
    You can schedule a query cache to cache group dump "Extended attributes / Custom Sections ' which I think will purge your cached values.

  • How to import the tagged photos of friends in Organizer correctly PSE?

    Hello

    My father and I have two PSE, I he 11, version 10. When I get sharp pictures of him, people are normal tags after import PSE Organizer 11 and no faces. How can I import these images, I can filter for individuals already included without face detection repeated by myself later?

    Thank you

    Christian

    The simplest method is to simply drag the icon of new contacts to a batch of photos selected with the old labels.

    First make sure the people icons appear at the bottom of the right under the media tab panel. If you do not see them as a list go to the menu at the top of the page:

    View > show people in the tags panel

    Then click the icon pointing to the right to the left of the People Tags to expand the list (see image below) and you can also use the sign more and less symbols to add or remove icons of people.

    Now scroll to the top of your keywords and choose a name of people who have been imported by clicking the chevron to the right of the keyword highlighted (people). Press Ctrl + A to select all the photos of that person or use SHIFT + click on the first and the last. Now, drag the icon of new contacts for this person to one of the thumbnails and it will be added to all selected photos.

    Back to top of the list of key words and do a right-click on the old person tag and choose Remove. That will remove all the pictures of this term.

Maybe you are looking for