Benny Gee

Greenhorn
+ Follow
since Nov 28, 2011
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 Benny Gee

I'm in the process of trying to decide on a forum solution for an application I'm working on.

The business want to prevent anyone that hasn't already logged in to the main application from having access to the forum - but the forum should still use its own user management (user ends up logging in).
ie. login to /myapplication, click on a link and end up at the login screen /myapplication/forum. Anyone navigating directly to /myapplication/forum without a /myapplication session should end up at the /myapplication login page and not be able to see anything in the forum.

Have you tried this before? Ideally using the Spring Security annotations.
9 years ago
Got my issue fixed, ended up with something like:

JSP:


Tagfile:


Hope that helps someone.
11 years ago
JSP
@Johnnie Smith - did you manage to resolve this issue?
It looks very much like something I'm experiencing now.
11 years ago
JSP
Hi all,

I'm trying to build a Spring/Hibernate application on top of an existing database structure and having some problems when trying to map my Java objects to existing data using annotations. The code below is an amalgamation from a number of tutorials and general web trawling so my understand isn't as full as it should be, particularly being new to both Spring and Hibernate!

The actual problem is that when the servlet returns the JSON back to JS in my page, it seems to be creating an infinate recursion problem that manages to take down Tomcat(!!).
When I make the JS call to fetch JSON representing a Route I want to get back the Route fields along with a List/Set of which checkpoints a route uses rather than this massive recursion I'm getting.

Returned JSON:
[{"name":"External Test Patrol","duration":-2209161600000,"maxTime":-2209161000000,"minTime":-2209161600000,"oid":15138,"routePoints":[{"oid":25703,"pointNo":4,"route":{"name":"External Test Patrol","duration":-2209161600000,"maxTime":-2209161000000,"minTime":-2209161600000,"oid":15138,"routePoints":[{"oid":25703,"pointNo":4,"route":{"name":"External Test Patrol","duration":-2209161600000,"maxTime":-2209161000000,"minTime":-2209161600000,"oid":15138,"routePoints":[{"oid":25703,"pointNo":4,"route":{"name":"External Test Patrol","duration":-2209161600000,"maxTime":-2209161000000,"minTime":-2209161600000,"oid":15138,"routePoints":[{"oid":25703,"pointNo":4,"route":{"name":"External Test Patrol","duration":-2209161600000,"maxTime":-2209161000000,"minTime":-2209161600000,"oid":15138,"routePoints":[{"oid":25703,"pointNo":4,"route":{"name":"External Test Patrol","duration":-2209161600000,"maxTime":-2209161000000,"minTime":-2209161600000,"oid":15138,"routePoints":[{"oid":25703,"pointNo":4,"route":{"name":"External Test Patrol","duration":-2209161600000,"maxTime":-2209161000000,"minTime":-2209161600000,"oid":15138,"routePoints":[{"oid":25703,"pointNo":4,"route":{"name":"External Test Patrol","duration":-2209161600000,"maxTime":-2209161000000,"minTime":-2209161600000,"oid":15138,"routePoints":[{"oid":25703,"pointNo":4,"route" ............. etc etc

Both Spring and Hibernate are recent (summer 2011) versions.

The tables of interest in the DB:
ROUTES {OID, name, <other fields of no significance>}
CHECKPOINTS {OID, name, <other dull fields of no interest>}
ROUTEPOINTS {OID, route*, checkpoint*, pointno} //where route is a FK ref to ROUTES.OID and checkpoint is FK ref to CHECKPOINTS.OID

A route may have several checkpoints, a checkpoint may feature in several routes. So a manytomany relationship.

Some Java:

Route.java represents a Route object


CheckPoint.java


RoutePoint.java - the mapping table


RouteCheckPointPK.java
12 years ago