cancel
Showing results for 
Search instead for 
Did you mean: 

Writing a custom JSP

asurjit
Champ in-the-making
Champ in-the-making
Hi All,

I am getting to the next steps of Alfresco where I am trying to customize a JSP and then deploy now..

To start with, I used SDK Custom JSP project itself where we have document-details.jsp

I build the project using ant -f build and it has created a jar file and zip file for me. To deploy this extension, I copied the alfresco.war file to my project location and ran ant integrate-extension and it has given me the updated alfresco.war file.

After this I copied this war file inside my tomcat and restarted Alfresco. I have few questions now on the complete process

1) I am unable to see any changes for document-details.jsp file when I login to Alfresco using admin user id
2) Can I test this extension using my eclipse itself because in the current state, to make a simple change and test, it takes 10-15 mins for deployment part only. Any quick method will be helpful

3) We have lots of rules defined in faces-config.xml. How do we identify which rules have to come in this config file? Any ready reference for it?

4) If I want to keep all my extensions inside a single project then what is the best process we should adhere. I am looking into Jeff Potts book as well to modify login.jsp but it did not work either.

Will look forward to hear from people on the same..

Cheers!
-Amar
1 REPLY 1

dranakan
Champ on-the-rise
Champ on-the-rise
Hello Asurjit,

1) Check your document-details.jsp : put it in /jsp/content (erase the document-details.jsp which exist). If now you see the changements, then your face-config.xml is bad configured.

2) You can run the server with eclipse (not all alfresco start). It's useful to check the actions for example. (http://wiki.alfresco.com/wiki/Custom_Actions#Testing_the_action). But your are working with the UI, you can't do that. But 10-15 m to start the server? really ? (for comparaison, I do 3-4 m with 2.66 GHz one proc, Alfresco 3.0 MySql (also with Linux/Ingres).
Perhaps you add the time to add your module manually. You can also make all automatic. Just increment the version of the module (module.properties) and you the ant (execute the build.xml). It creates the module (xx.amp). You can set it to add the amp in the alfresco.war and start the server.
To resume, you click run and wait, it's ready…

3) Take a look here : http://wiki.alfresco.com/wiki/Packaging_And_Deploying_Extensions#JSF_configuration_files

4) For this point and also all other, I will recommand to read this post : http://forums.alfresco.com/en/viewtopic.php?f=10&t=20249#p66019
It's an example to modify the document-details.jsp.

Good luck 🙂