Ben Klug

Ranch Hand
+ Follow
since Jan 28, 2002
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ben Klug

Solved with setResultTransformer(Criteria.ALIAS_TO_ENTITY_MAP)
Hi,

I'm trying to generate a Query by Criterion. But I got lost now Can someone see the mistake I make?



No I add another criterion



level -> admin is a one to many connection.

Result: Request.getLevel().getAdmin() returns n Admins, but I only want the one with the matching field-value pair.


How do I do that?

Thanks so much!
b.
[ November 28, 2005: Message edited by: Ben Klug ]
Hi,

I have a datasource in WAS51 defined and I want to use the connection pooling. how do I have to write the code?

- get the inital context, the datasource and the connection each time required
- keep the context and get the datasource and the connction every time
- keep the datasource and get the connection everytime or
- keep the connection

what is the best way to do it? do I have to close the connection after each execution or is this managed by the server?

thanks
b
15 years ago
Hi,

is there a way to view the SQL-Statement that was created from a PreparedStatement? I'd like to view it filled with parameters instead of ?'s for debug reasons.

Thanks, b.
Hello,

I have the this xslt-stylesheet:



this works fine. but when I pass the sortfield "request-information/userid" into the parameter sort1 (or "request-information/username") and replace the sorting tag with <xsl:sort select="{$sort1}" order="ascending" /> it is not working. I found some documentation, but that did not work with my situtaution, because my sortfield is not a child of <for:each / >

How can I solve this?

Thanks so much! B.
[ February 04, 2005: Message edited by: Ben Klug ]
I have a FormBean stored in an external Jar-File, which is included in the classpath. On loading the application, I get the Error

12/29/04 1:02:29:942 UTC] b132a78f WebGroup E SRVE0020E: [Servlet Error]-[action]: Failed to load servlet: java.lang.ExceptionInInitializerError
at java.lang.Throwable.<init>(Throwable.java:180)
at java.lang.Error.<init>(Error.java:37)
at java.lang.ExceptionInInitializerError.<init>(ExceptionInInitializerError.java:61)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
....

any Ideas?

Thanks,
B.
15 years ago
Hi what ist the best way, to get a String out of a XLST-Tranfomation instead ouf a Output-Stream:



any ideas??
thanks
[ October 13, 2004: Message edited by: Ben Klug ]
Hi,

I included a page in a tiles templet by adding

<tiles:insert attribute="main" />

now, I want to use request.getRequestURI() to optian the file-name of the page "main" (in this example "/contaxtroot/..../main.jsp") inside the main-page. But what I get is "/contaxtroot/..../template.jsp".

How can I get the included page's name inside the page?

Thanks!
B.
15 years ago
Hello,

I have a <for-each> loop where I select the node set with a key. This works fine, but I need to do the select with two keys.

is there a way, to do something like that?

<for-each select="key('key1'..) and key('key2'..)">

pseudo-code: select nodes where email==value and status==value2

Any Idea?
thanks
Hi,

when I open a workspace in WSAD5.1, that is commng from another WSAD Installation, I'm not able to view the Servers and their configuration.

How can I load them?

thnaks,
B.
15 years ago
Hi,
the http-server plug-in does not route requests for *.html-, *.gif-, *.css-files (and all common static web-files) to the WAS 5.1. he tries to serve them from the http-server and receives a 404. JSP's, Servlets work fine!
Where can I change that?
Thanks
16 years ago
a simple wrong URL-Message like:
_____
Virtual host or webapplication not found
/anyfolder/any.jsp is not defined
IBM WebSphere Application Server
_____
Thanks for your efforts!
16 years ago
Did you find the solution?? Otherwise, give us some more information (code, exception...)
16 years ago
Hi
I try to put a WAS4 Application to WAS5. I got one Problem:
for example, we have the following sourcecode in a JSP:

In WAS4 the target of the redirect-commad is:
http://host/anyfolder/any.jsp
or, if I use the context-root = /test
http://host/test/anyfolder/any.jsp

in WAS5 an error occures:
http://host/anyfolder/any.jsp
or, if I use the context-root = /test
http://host/anyfolder/any.jsp
WAS5 removes the context-root, if there is one.
Any Idea, how I can solve this, without changing the source-codes??
Thanks & Happy New Year
B.
16 years ago
Hi,
I just installed a working WebSphere 4 Application on Websphere 5 (win). Some pages get compiled, other fail. I get the following message:

code:
--------------------------------------------------------------------------------
Error Code: 0Target Servlet: nullError Stack: org.apache.jasper.JasperException: Unable to compile class for JSP D:\WebSphere\AppServer\temp\node\server1\App\App.war\_errorreport.java:14: Class or interface declaration expected. import javax.servlet.*; ^ D:\WebSphere\AppServer\temp\node\server1\App\App.war\_errorreport.java:21: class org.apache.jsp._errorreport must be declared abstract. It does not define void _jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) from class com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase. public class _errorreport extends com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase { ^ ...... (and so on)End of error-page:at org.apache.jasper.compiler.Compiler.compile(Compiler.java:369) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:129) at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.loadJSP(JspServlet.java:939) at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:285) at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:321) at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:675) at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:773) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110) at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174) at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313) at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116) at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283) at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42) at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:948) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:530) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:176) at com.ibm.ws.webcontainer.webapp.WebApp.handleError(WebApp.java:1029) at com.ibm.ws.webcontainer.webapp.WebApp.sendError(WebApp.java:891) at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:121) at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:201) at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71) at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182) at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334) at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56) at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:610) at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:435) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
--------------------------------------------------------------------------------
Any Ideas???
thanks
16 years ago
JSP