url-parameters

Struts 2 make dynamic parameter

我是研究僧i 提交于 2019-12-11 07:45:02
问题 I am using Struts2 and JavaScript. I want to edit a parameter value or add parameter to URL with JavaScript to make dynamic parameter. I can not set value for param why this not have id . Any other form of do? var urle = document.getElementsByName("vari"); urle.value = 5; <s:url var="urlex" action="actionDo"><s:param name="vari" value=""/></s:url> 回答1: Struts tags are JSP tags that compiled and executed on server, JavaScript is executed on client browser. You can't access the server from

JSF file download NullPointerException with view Parameter

血红的双手。 提交于 2019-12-11 05:25:03
问题 I hope I get this one straight: I try to create an JSF 2.0 Page optimized for mobile use on Tomcat 7 . Therefore I use Mojarra 2.1.6 and PrimeFaces (Core 3.1.1 and Mobile 0.9.1). My scenario: User visits simplified URL, e.g. www.someurl.eu/view.xhtml/12345678 ServletFilter rewrites Url to www.someurl.eu/view.xhtml?id=12345678 Url Parameter gets provided to ManagedBean Necessery Data gets evaluated and published to my view.xhtml On my view.xhtml a button for download is provided My problem: By

Detect Users Viewing Same Webpage, or URL

爷,独闯天下 提交于 2019-12-11 02:59:57
问题 I have a ticketing system that will allow any users to view any ticket they wish to select. Each ticket will share the same page. (ex. ticket.php) The URL will contain unique parameters to identify the ticket. For an example: /ticket.php?a=10000&tid=987654. Where tid is the ticket id number. I would like to detect if more than one user is viewing the ticket and show this as a notification in the webpage if the condition is true. How do I go about doing this? Would I have to use PHP Server

OpenSSO (OpenAM) : Turn off URL enforcement

一曲冷凌霜 提交于 2019-12-11 01:37:51
问题 We're using OpenAM to manage sessions on our application. The problem is everytime we're trying to pass a parameters with the GET method, the ressource is blocked (error 403 - forbidden). If no parameter is set, everything is wirking. EX: http://mysite.com/logo.jpg ----> Works. http://mysite.com/logo.jpg?foo=bar ----> ERROR ! For images or css, it's normal to do not have parameters, but all links with using the GET method aren't working. How could we solve our problem? Actually, disabling

Maintaining values of action variables?

无人久伴 提交于 2019-12-10 10:27:55
问题 class SampleAction extends ActionSupport { private Map<String,String> circleIdNameMap; public String preprocess(){ --logic for populating value of MAP } --getters and setters } Now my problem is on page load I call preprocess function and populate the value of Map . After page submit another method is called and during that after some DB interaction it redirects to JSP, but this time the value of Map is empty. I am using this Map for drop-down tag in Struts2. My preprocess is associated in

Express Framework app.post and app.get

强颜欢笑 提交于 2019-12-09 17:48:22
问题 I am fairly new to the express framework. I couldn't find the documentation for application.post() method in the express API reference. Can someone provide a few examples of all the possible parameters I can put in the function? I've read a couple sites with the following example, what does the first parameter mean? I know the second parameter is the callback function, but what exactly do we put in the first parameter? app.post('/', function(req, res){ Also, let's say we want the users to

asp.net core JWT in uri query parameter?

牧云@^-^@ 提交于 2019-12-08 19:07:20
问题 I have an api that is protected by JWT and Authorize attribute and at the client I use jquery ajax call to deal with it. This works fine, however I now need to be able to secure downloading of files so I can't set a header Bearer value, can it be done in the URI as an url parameter? =-=-=-=- UPDATE: This is what I ended up doing for my scenario which is an in-house project and very low volume but security is important and it might need to scale in future: When user logs in I generate a random

The name 'id' does not exist in the current context in Javascript method

元气小坏坏 提交于 2019-12-08 14:16:10
问题 I cannot use the parameter passed to my javascript method in lambda expression by trying several ways as shown below. How can I use id parameter in the expression below? Thanks in advance. There is a hyperlink in the FileName and I pass the ID parameter to the Javascript method successfully: <a onclick="downloadFile(@p.ID);">@p.FileName</a> function downloadFile(id) { $.fancybox({ //This works: (p.ID == 82) content: '<img src="data:image/png;base64,@System.Convert.ToBase64String(Model

Chrome Extension: Get Parameter from URL [duplicate]

杀马特。学长 韩版系。学妹 提交于 2019-12-08 08:15:33
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Get query string values in JavaScript I am working on a extension for Chrome. I already figured out how to get the URL from the actual Chrome-Tab. chrome.tabs.getSelected(null, function(tab) { document.getElementById('currentLink').innerHTML = tab.url; }); But now i need to know how to get a specific Parameter from the URL. I already tried out different Javascript-Functions but when i implement them, my

Golang: Passing a URL as a GET parameter

纵饮孤独 提交于 2019-12-08 02:13:29
问题 I want to get an URL as a get aparameter ex: example.com?domain=site.come?a=val&b=val the problem when i use query := r.URL.Query() domain := query.Get("domain") to get the domain name it give just domain=site.come?a=val I think because when the r.URL.Query() meet & it consider it as a new parameter does anyone know how can I solve this problem Thank you in advance. 回答1: You need to URL-Encode your query string, like this: package main import ( "fmt" "net/url" ) func main() { query := make