Adding a .jsp file to access

Need help? Post your questions here.

Moderator: moderators

Adding a .jsp file to access

Postby nutt318 » Thu May 03, 2012 8:08 pm

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?
nutt318
 
Posts: 54
Joined: Thu Dec 09, 2010 9:24 pm

Re: Adding a .jsp file to access

Postby hakko » Fri May 04, 2012 3:25 am

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.
MusicCabinet developer
hakko
 
Posts: 1416
Joined: Tue Apr 17, 2012 7:05 pm
Location: Sweden

Re: Adding a .jsp file to access

Postby nutt318 » Mon May 07, 2012 3:08 pm

Any pointers on how I would go about defining a controller and a view for the new page?

Thanks for the help.
nutt318
 
Posts: 54
Joined: Thu Dec 09, 2010 9:24 pm

Re: Adding a .jsp file to access

Postby hakko » Mon May 07, 2012 3:43 pm

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.
MusicCabinet developer
hakko
 
Posts: 1416
Joined: Tue Apr 17, 2012 7:05 pm
Location: Sweden


Return to Help

Who is online

Users browsing this forum: No registered users and 18 guests