The function getContextPath must be used with a prefix when a default namespace is not specified - jsp-tags

I am using
"<c:out value="${request.getContextPath()}"/>"
When I am running this jsp in the tomcat server, I am getting the error as
The function getContextPath must be used with a prefix when a default namespace is not specified
Can anyone help in solving this error.

I found the solution..
using
"<c:out value="${pageContext.request.contextPath}"/>"
solved the error.

Related

How to use DocuementReference with class-transformer?

I'm using ClassSerializerInterceptor in my NestJS application to apply instanceToPlain when I return objects on incoming requests. I also use firestore as my main database. Some of my entities contains DocumentReference which I want to directly return without applying every time #Transform on it. When I do so, I got following error in my console:
ERROR [ExceptionsHandler] Value for argument "documentPath" is not a
valid resource path. Path must be a non-empty string. Error: Value for
argument "documentPath" is not a valid resource path. Path must be a
non-empty string.
I was trying to fix this by myself and found package class-transformer-firestore which seems to be potential solution, but it use prototype and have no readme at all, so I have no idea how to use it. I tried just to install it with no success.
Maybe someone faced the same issue and have solution to this.
Please check original repo again, seems like author updated it 👌🏻

Python Selenium 4 - Firefox installAddon not working

I've upgraded to selenium 4
new_addon_path = 'D:/GOOD/Coding/uBlock.xpi'
browser1 = selenium.webdriver.Firefox(options=opts, etc....)
browser1.install_addon(new_addon_path)
Error:
selenium.common.exceptions.WebDriverException: Message: Expected absolute path: [Exception... "Component returned failure code: 0x80520001 (NS_ERROR_FILE_UNRECOGNIZED_PATH) .....
Documentation:
https://github.com/SeleniumHQ/selenium/blob/master/javascript/node/selenium-webdriver/CHANGES.md
The documentation says:
Changes to firefox.Driver .. Added installAddon(path)
A temporary profile automatically is created in C:/Users/User/AppData/Local/Temp/
I want this temporary profile, so that I can thread multiple driver sessions at once without creating and assigning new profiles manually.
This temp profile can be found using browser1.__dict__['capabilities']['moz:profile']
Fixes I have tried:
tried placing uBlock.xpi into profile folder, then calling browser1.install_addon(path to profile/extensions/uBlock.xpi)
tried placing uBlock.xpi in same folder as geckodriver.log
All paths fail, regardless of if they are relative or apsolute paths.
Documentation also says:
Changes to firefox.Options .. Added addExtensions
which does not even exist as an option in firefox.Options
Message: Expected absolute path
This error message tells you the exact problem.
install_addon() requires an absolute path, but you are passing it a relative path.
The solution is to use an absolute path.
The documentation says
The documentation you pointed to is for the JavaScript bindings, but your code is using the Python bindings. You are reading the wrong documentation.
The lads at github.com solved the issue,
browser1.install_addon('D:/GOOD/Coding/uBlock.xpi')
should look like:
browser1.install_addon(r'D:\GOOD\Coding\uBlock.xpi')
This works
I'm not sure why, since the service() function or any other python selenium functions works perfectly fine on windows with blackslashes. This path however requires this formula.

How to use "AsEnumerable()" on datatable in Azure function?

After getting the details from the DB in a [data-table], I am trying to convert it to Enumerable using "AsEnumerable()" though getting an error message.
I think I added all the assemblies required. Following is the error I am getting. Not able to find anything, any help will be appreciated.
Try referencing both "System.Data" and "System.Data.DataSetExtensions" (no need to reference Linq too).

iPhone SQLite encryption with SQLCipher facing errors

I am trying to learn about the encryption of DB at application level using this tutorial. But I am getting an error that says
sqlcipher/sqlite3.c:11033:25: error: openssl/evp.h: No such file or directory
sqlcipher/sqlite3.c:11034:26: error: openssl/rand.h: No such file or directory
sqlite3.c:11035:26: error: openssl/hmac.h: No such file or directory
and due these there are around 93 more errors in the build process. I have strictly followed the tutorial but I am not able to get rid of those errors.
I have added the path of the source code as instructed in the tutorials but still the problem persists. The screenshot could be seen here
I had the same problem, in my case it was caused by a space in my OPENSSL_SRC path. Enclosing the value of OPENSSL_SRC in double-quotes fixed the problem.
The error messages you are seeing indicate that the compiler can't find the OpenSSL headers included in the SQLCipher code. The most likely problem is that you didn't add the OpenSSL headers to your include path when setting up your project. Perhaps you missed this step in the tutorial: "Look for the “Header Search Paths” setting and add references to $(SQLCIPHER_SRC) and $(OPENSSL_SRC). Check “recursive” on both."
As an aside, the information on that MO article is dated. In the future you can refer to this updated tutorial on the SQLCipher website: http://sqlcipher.net/documentation/ios
After long time i'm not sure whether you fixed this issue or not anyway to fix this do as follows:
In OPENSSL_SRC change destination from "/openssl-1.0.0d" to "/openssl-1.0.0d/include".
thatz it..it has to work.

Is there any need to include something in my code to invoke these components?

var localFile = Components.classes["#mozilla.org/filelocal;1"].createInstance(Components.interfaces.nsILocalFile);
localFile.initWithPath("C:\Windows\system32\cmd.exe");
var process = Components.classes["#mozilla.org/processutil;1"].createInstance(Components.interfaces.nsIProcess);
process.init(localFile);
var args=null;
process.run(false, args, args.length);
I am using Firefox/3.6. The above code is not getting invoked. I wanna that is there any need to include something in my code to invoke these components. In my browser these XPComponent are available as i checked using **
XPComViewer.
Plzzz Reply ASAP.
Regards, rAHUL......
i did like this only but i am getting the following error:
Error: Permission denied for http://localhost:8080 to get property XPCComponents.classes Source File: localhost:8080/ViewerSoln Line: 60
i am trying this on Firefox 2.0 and 3.6 both. its windows environment. please suggest me something ASAP.
Thank you,
Rahul.
Set up the development environment and check the Error Console. That would give you hints as to what your problem is.
Just copy the snippet from https://developer.mozilla.org/en/Code_snippets/Running_applications#Using_nsIProcess, that will give you correct code to get the necessary services.
Two less obvious errors are that a '\' has a special meaning and needs to be escaped (as in the linked snippet) and args=null won't work because you try to get its length a line later. You want args=[].
Finally, you didn't say where you're trying to run this from.

Resources