Didier Varon

Greenhorn
+ Follow
since Jul 14, 2005
Merit badge: grant badges
For More
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 Didier Varon

Hi,

I have two entities (EntityA, EntityB), linked this way:



In my process I load a EntityB by getting proxies as follows:


Then I create an EnittyA



I do this for thousands of records, and when I persist those EntityA objects, Hibernate tries to initialize the proxies, I can see hibernate logging

Hibernate: /* load com.somecompany.bean.EnitityB */



Is there any way to let hibernate know that I don't want those proxies to be initialized?

Many thanks
Dave, thanks for your answer, in the code that I posted I was trying that, since the other ideas that I had did not work.

First I tried:
same Action:

in the jsp:

but threw an exception since List does not have a method depto, then I tried:


but the List deptos is empty.

I have populated collections of Strings before, but I am clueless on how to populate a Collection of objects.

The yui code that I have is that when an image is dropped into a workArea node then a new Depto object should be created and added to the deptos List.

Thank you again for your time and help.
13 years ago
I have a jsp to create Department objects and I need to put them inside a Collection, those Department objects need to be created dynamically in the jsp, I have been able to create one Department object, but I am clueless on how to create more of these objects and how to put them in a collection. Here is the code:

createDepartment.jsp:


Here is the javaScript that create the input tag for the new Department object:


And the action this page goes is:


The List deptos always has a null entry, what I want is to be able to create as many Depto objects as the users needs and store them in the List Deptos. Is it possible to do so?

Thank you.
13 years ago
David, thank you so much, I forgot about it.
13 years ago
Hello,

I am having a problem trying to make tiles to work with Spring and struts, I'm getting this stack trace when trying to redirect to a page:

org.apache.tiles.definition.NoSuchDefinitionException: /WEB-INF/pages/organizaciones/crearOrg.jsp
org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:624)
org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:322)
org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:105)
org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186)
com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:362)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:266)
com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:165)
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:252)
org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:179)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:235)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:89)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:130)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:126)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:138)
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:165)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:179)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:488)
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:395)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
java.lang.Thread.run(Thread.java:619)

this is the web.xml on my app:


this is the spring context file:


and this is the tiles-def.xml


and this is the struts mapping file:


I have try to change the jsp file path on the struts file, I have try to load the tiles listener from struts, but when I try to go to the redirect action always got the same exception, I have downloaded the code and step on the load and the tiles-def.xml is loaded, but when redirecting the BasicTilesContainer class on the render method can't find a definition for the resource that is the path to the jsp.

Thanks for any help.

13 years ago
Thank you David,

But if I have more than one role do I have to iterate over the roles collection on the Principal object?
15 years ago
Hi,

I am migrating a struts 1.3 application and I haven't found how to migrate the <logic resent role="someRole">
<!-- some html code for someRole users-->
</logic resent>

Does anyone know how's it done?
15 years ago
Hello all,

First of all my apologies if my issue has already answered, but I haven't been able to find an answer.

I need to authenticate users from a LDAP server (I already did this using JNDI realm) and load roles from a sql server database, the problem that I am having is that roles on the ActionMapping class are set when the context is loaded and they are null since LDAP does not have the roles, so if I do HttpServletRequest.isUserInRole(), that call returns false. I was thinking on extending the JNDI realm, but I've got the feeling that's no the right path, I am looking into using JAAS realm and write a custom login that will call the JNDI class and write a custom getRoles that will call the db and do a load of the roles table, but I not sure if that is feasible.

Any input will be highly appreciated.

Thanks in advance and happy New Year 2008.
16 years ago
In the assignment description says:

"It must allow the user to search the data for all records, or for records where the name and/or location fields exactly match values specified by the user."

So what I was doing is displaying all records if no criteria is enter by the user, but does it make sense to display records that are not in the 48 hours rule?
Thanks B Chen,

I think I understand now =)
Hi guys,

On the URLyBird assignment there is a restriction about booking time:
"They take bookings only within 48 hours of the start of room occupancy"

But when I am reading the db file I have found that all records are for previous years (2003 to 2005), so any query returns an empty set, because I am using the machine's date to validate against the records' date to enforce this requirement.

I am wondering if I am using a right criterion for that validation or if I should download the application again.
Hi Zhixiong

What I think, is to mark the record deleted on memory (using the flag value for it) and write the flag byte on disk and when a new record needs to be created you can find the first deleted record from the collection and overwrite it on memory and permament storage.
Thanks Kevin, I think I got it. =)
Hi Kevin,

the thing that confused me was
// making the record number and associated disk storage available for reuse

specially the "associated disk storage available" comment, first I was thinking mark the record using the flag value and remove it from the system, but here it seems that is requesting to remove it from the file too, but I could be wrong.