Help coderanch get a
new server
by contributing to the fundraiser

Jan Kostelansky

Greenhorn
+ Follow
since Nov 24, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Jan Kostelansky

I have developed resource factory which produces desired objects and is accessible through JNDI context implementing javax.naming.spi.ObjectFactory. It is possible to register such a factory in tomcat's server.xml. However our new customer requires Jboss 4.0.x.
I have found a lot of information regarding jboss-web.xml file, but noting how to actually register factory in jboss JNDI.

web.xml


jboss-web.xml
Thank you for any help, Jan
16 years ago
I would like to ask why Afresco does not implement nt:Foleder and nt:File as defined in JSR 170 (optional part), but implement its own types cm:Folder and cm:content?

It makes Alfresco hard inter operable with the other CMS systems, which implement files and folders as mentioned in JSR 170 specification (e.g. JRabbit) implementation.

It makes us hard to use JSR170, if every implementation uses different types for folders and files.

Jan
17 years ago
Thank you for answer
I added namespace declaration for xml namespace, but got the same result
Hi,
based on RMH page 117 it is possible to define language for fault string using xml:lang attribute as follows


However when I try to parse this code with DOM parser in JSE 5 I got this exception

DO you have any idea what's going wrong. I am building DOM in following code


Thank you, Jan
How to authenticate new thread for accessing EJB?
When a request object is created it gets security credentials based on how user is logged in. It is possible to access EJB�s in that thread
However if a new thread is created, it does not inherit security credentials from request thread.
Is there any way, how to create new working Thread, which inherits security credentials of current request thread?
It is not possible to mix scope attributes and method variables.
If a variable is created in scriptlet, it is transformed into regular variable in jsp service method and it is accessible in another scriptlets on the same jsp page.
If a variable is created in jsp declaration, it is transformed into regular instance variable in jsp object and it is accessible in another scriptlets on the same jsp page.
However jsp:useBean standard action does not create variable, it creates attribute in scope defined in scope element.

If you want top use standard action use jsp:setProperty standard action to set property for a bean
If you want to use scriptlets create variable in scriptlet as well
When page is included statically, content (not result) of page is inserted into enclosing page. In this case, compile error occurs, because of duplicity declaration of variable named
The reason, why it does not work, is jsp:useBean standard action's default scope is page.
It is impossible to set attribute into page scope in servlet.
If appropriate scope attribute is added into jsp:useBean, the example should work.
JSP container provides for each JSP page, implicit variables, you can you in code. One of these variables is session. In order to get session, JSP container calls sesion = request.getSession(), before jsp is started to be executed.

This is fragment of translated jsp page. The attached code is placed before acutal JSP code

try {
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType("text/html;charset=UTF-8");
pageContext = _jspxFactory.getPageContext(this, request, response,
null, true, 8192, true);
_jspx_page_context = pageContext;
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
.....
Hi
I have a doubt about error data for mockup question 1 chapter 5
The question is
When using a request Dispatcher, the use of which methods can often lead to an IllegalStateExceltion?
My answer was flush(), which is correct in my oppinion and is correct by the book. However I found in err data that method write() is corroct as well.
However by my experience write() writes only to servet response buffer, which is big enough for most pages not to flush its content to client when write() is called.
What is your oppinion on write() method?
Hi,

I am preparing for java 1.5 SCJP exam and reading Complete Java 2 Certification book from Phil Heller ans Simon Roberts.

I have doubt about one review question:

char c = 0x1234;

I made test program and this code works for me.
By the book this statement is illegal and legal one is
char c = '0x1234';

Do you have any idea, why
char c = 0x1234; should be wrong?

Thanks
Jan