Adding a .jsp file to access

Posted:
Thu May 03, 2012 8:08 pm
by nutt318
I am wanting to test a modification and the file is written in .jsp. Is there a way that SubSonic will allow to call this file type? For example I put a textfile.txt into the webapp directory and if I go to
https://localhost:8080/textfile.txt it shows up, however if I try to do this with a .jsp file I get a SubSonic error.
Is there a way to tell SubSonic that my .jsp file can be accessed?
Re: Adding a .jsp file to access

Posted:
Fri May 04, 2012 3:25 am
by hakko
You can alter an existing .jsp file and the changes takes immediate effect, but if you want to add a completely new page, you have to make some modifications in the Java code as well, defining a Controller and a view for the new page.
Re: Adding a .jsp file to access

Posted:
Mon May 07, 2012 3:08 pm
by nutt318
Any pointers on how I would go about defining a controller and a view for the new page?
Thanks for the help.
Re: Adding a .jsp file to access

Posted:
Mon May 07, 2012 3:43 pm
by hakko
If you're used to Java programming and Spring Injection, just check the use of an existing page in the source code (everything's in the project subsonic-main). Like podcast.jsp, and it's equivalents podcast.view and PodcastController.java. Check how application logic is divided aswell, like in PodcastService.java.
Check subsonic-servlet.xml, applicationContext-security.xml, and applicationContext-service.xml. Follow the same naming conventions as are already in there. Your view is supposed to have the same name as your jsp file.
The existing code is pretty clear actually, it shouldn't be too hard to get something done if you have worked with similar technologies before.