I am working on prototyping something, and I’m hoping someone can help me. I am trying to create an Add event to calendar link which will download and open an iCal file (.ics), so that they can add it to their calendar.
We are using Jax-RS with Jersey and tomcat as the container, and I have the iCal4j package. The client is jQuery/backbone.
- I am not sure which is the correct way to return the data. If I should be creating an ics file and storing it somewhere before returning it, or sending back a CalendarOutputter filestream from iCal4j?
- If I do create an ics file, where do I store that? WEB-INF folder? How?
- If returning the filestream, what is the correct @Produces(?) for Jax-RX?
Thanks,
Ray
You should not create a file to return the data. You should be able to return your Calendar object directly. Try something like: