Jennifer Moran

Ranch Hand
+ Follow
since Oct 21, 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 Jennifer Moran

Here is my scaled down XSD


Here is XML


Here is the unmarshalling code


I get this error

javax.xml.bind.UnmarshalException: unexpected element (uri:"", local:"AirAvailabilityRS"). Expected elements are <{http://farelogix.com/flx/tc}agent>,<{http://farelogix.com/flx/tc}iden>,<{http://farelogix.com/flx/tc}provider>,<{http://farelogix.com/flx/tc}script>,<{http://farelogix.com/flx/tc}tc>

Which is weird because the expected elements are for a different schema that is used in the soap header


Any help would be appreciated...

Thanks!
I have a List defined as <Foo> - Foo has a field called ID
I have a Map defined as <String, String> - this is created by a properties file early on

I need to compare the values in the Map to see if they exist as an ID in Foo.

So what is the best way to do this? Do I loop through each and compare? That seems not such a good idea. I was looking at contains but I need an object of Foo and I only have a Map<String, String>. I know I am missing something I am just not sure what

Thanks,

Jennifer
10 years ago
I think I got it. It was way easier than I thought.

I just added this code to my contextInitialized



and it seems to work so far!!

Jennifer
11 years ago
I am using Struts 1.3.10 and am trying to convert a String (the JSP) into a Calendar (the bean). I am thinking I need to create a custom converter that is going to extend org.apache.commons.beanutils.converters.DateTimeConverter and somehow overwrite convertToType??

I basically need help on what class/method to override?? AbstractConverter or DateTimeConverter?

And how to implement it? Where do I register it ??


Any help would be appreciated.

jennifer
11 years ago
First I apologize if this is in the wrong forum.

I have a web application that utilizes, Struts, Tiles and ExtJS & JQuery. I am confused on how the Store object url configuration works. I see many php examples but no servlet examples. What I would like to do is when a menu item is clicked, I want to open a tabbed panel that has a grid on it. The grid data needs to come from a backend database.

I am assuming that when user clicks on menu item, it has href to 'backend servlet'.action which will just forward to the jsp page that contains my grid.
Currently my grid is coded for an xml file that I am manually creating and dropping in the directory, but what I want is for the data to be loaded from the 'backend servlet'.action and that should either create XML or JSON??? And I'm confused because I am assuming that the url is going to read 'backend servlet.action' but then how does it know the name of the xml or json file???

One more thing When I code the servlet and create the JSON/XML do I need to change the struts.xml result type? Right now it's tiles, but if it needs to change to json or whatever, will my tiles still work??

Any help would be greatly appreciated.

11 years ago
I have an ApplicationResources file that has definitions in it. I am using tiles and have the standard layout (header, body, footer, etc). In my header, I want to include a Page Title definition that exists in the ApplicationResources file. I don't know if I'm supposed to use put/get or put/useAttribute or put/importAttribute. I don't think the Tiles Ref clearly explains what is the difference between these?? Heres the code

ApplicationResources


tiles.xml


header.jsp



I know the header is totally wrong because I cannot nest the bean and tiles tag, but I can't even get it to work with



HELP!!

Jennifer
11 years ago
NEVERMIND - silly error, file was in wrong directory folder and it couldn't find it...

11 years ago
I have two applications, one in Struts 1.2.9 and one in Struts 1.3.10. I have a global forward defined for errors and my BaseDispatchAction which extends Struts DispatchAction catches the exceptions and forwards to the global error. This all works fine in Struts 1.2.9, I get forwarded to the error page, Actionmessages are being displayed, etc. The EXACT same code does NOT work in Struts 1.3.10. I think it has something to do with the new RequestProcessor introduced in 1.3.10 but I don't know how to fix this.

Code is

struts-config.xml


tiles.xml


BaseDispatchAction.java



Any help would be greatly appreciated.

Thanks!!

Jennifer
11 years ago
I'll definitely check it out.

Thanks again!!

Jennifer
11 years ago
Thanks so much for the point in the right direction.

Much appreciated,

Jennifer
11 years ago
Hi -

I wanted to Capitalize all first letters of a name (whether it's a proper name or company name etc). I was thinking instead of writing a function I could do it with a regexp but I am not that 'good' with regexp and was looking for advice. Should I use regexp or just code a function? If I use regexp could someone provide me with the details?

thanks,

Jennifer
11 years ago
Okay I am almost too embarrassed to post this but my problem was my folder javascript had a typo in it. It's really enough to make me scream at the top of my lungs...stupid stupid stupid mistake......

Anyway, sorry for the waste of time, but I did learn the proper way to include my js files so I guess it wasn't a total waste
11 years ago
JSP
The jQuery script is actually from the jqGrid plugin documentation found at

jqGrid

I am trying to do the tutorial and I just cut and paste the code from the above link.

Maybe the jQuery is a typo?? Is it defined somewhere?? How do I know, how can I track it down to see what it should be? I want to understand behind the code also.

I originally had the onLoad function coded in a file called test.js which I also tried to include and then call from the onload method in the body tag but then i was getting the additional error of 'onLoad() not defined'. Which makes me think for some reason it still isnt including the js files. Because when I coded it right in the head tags of the default page (previous post) it worked.

thanks,

jennifer
11 years ago
JSP
Thanks for the reply Bear.

I used the request.getContextPath and it looks like it is resolving correctly (see below from firebug console)



but I am still getting JQuery is not defined.

I also coded this javascript directly inside the <head> tag



and this for the <body> tag



and that works fine.

Any other thoughts would be greatly appreciated....

Jennifer
11 years ago
JSP
I am going to go insane. I have a web project using JSP and JQuery (which are included js files in the JSP pages). The only way I can get it to work is if I move ALL files to the same level as the WEB-INF folder. When I put them in a folder structure (mind you folders are ALSO the same level as the WEB-INF just in different folders) I keep getting the message JQuery is not defined. I have moved these files, folders all over the place and cannot get it to work except in that one scenario. Can someone PLEASE help me!!!

Here is the default.jsp (BTW the default.css has no problem loading)


Directory structure is



Thanks,

Jennifer
11 years ago
JSP