cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco & Servlets

tonizz
Champ in-the-making
Champ in-the-making
Hi everybody,

I have a kind of portal developed in java. This portal is composed of a dynamic part and a static part. (static for usual information and dynamic for searching, catalogues …)Internally I have two servlets, one for dynamic contents and another for static content. I though in alfresco to manage all the static contents.

Now I upload my entire application, (including its web.xml file that says which is the welcome page: "jsp/index.jsp" within the application) and when I try to preview the site I can't see anything.

I dont know if my problem is that from the begining I have made a not good design for managing the site with alfresco.

Has somebody faced with a similar situation??

Thanks in advance!
4 REPLIES 4

kvc
Champ in-the-making
Champ in-the-making
Hmmmm … couple of quick questions: are you uploading your entire WAR file?  And, I assuming that that WAR file deployed to any other standalone Tomcat server runs fine?

tonizz
Champ in-the-making
Champ in-the-making
Hi,

I am really uploading the entire war, coping and pasting with CIFS. The application is running ok in a usual tomcat.

Thanks!

kvc
Champ in-the-making
Champ in-the-making
Ah … CIFS may be the key here.

To register a web app, we need a trigger.  The bulk import command in the GUI when you upload a WAR file is one.  A second is during submit, when you get to "see" what app resources you're committing to the repo.

Have you first tried to submit to Staging?  If not, try that, and then check preview.

Kevin

jcox
Champ in-the-making
Champ in-the-making
If you want to un-jar a warfile within CIFS rather than doing a bulk upload using the GUI,
then you must  do something let the virtualization server know about it (the GUI does this for you).

Assuming you have done the bulk upload directly  to staging (the most efficient technique),
then just navigate to the staging sandbox of that web project and hit the "Refresh" button
(actually it would be better named "Reload"). That will kick the virt server and tell it about
the new webapp.   Note that you don't have to do this every time you upload contens via CIFS;
the only case is when you modify the contents of WEB-INF or META-INF… which is exactly what
you're doing.   

Again, actions through the GUI take care of this  for you automatically, so the only time you've
got to manually "Refresh" is when you modify WEB-INF or META-INF via CIFS.

Another thing:   I'm assuming you are un-jaring your .war file.    Here's how to do that:

GIVEN:
  • Your webapp war file is called alfresco-sample-website.war

  • Your web project is called "test"

  • Your CIFS mount point is the "v" drive

  • This will be the ROOT webapp of the project
THEN:
Navigate to:
v:/test/HEAD/DATA/www/avm_webapps/ROOT
And say:
jar xvf  alfresco-sample-website.war

If you've done this properly, then within:
v:/test/HEAD/DATA/www/avm_webapps/ROOT
you should see the WEB-INF and META-INF directories.

At this point, you can go back to the GUI and hit the "Refresh"
control associated with the staging sandbox of your web project.
Once the virtualization server has reloaded it,  you should be
able to click on the  "eyeball" icon in staging  (or any of the
associated author sandboxes) and see your webapp virtualized.


*********** DEBUGGING ***********

If you really want to see what's going on at a deeper level,
you can  edit:
$VIRTUAL_TOMCAT_HOME/conf/logging.properties
Then set:
org.alfresco.catalina.host.AVMHostConfig.level = FINE
However, changing the debug level of the virtualization server requires you to restart it;
you only need to restart the virt server, not the alfresco webapp, if you want to employ
this low-level debugging technique. 

  I hope this helps,
  -Jon

——————————
PS: This is now in the Virtualization Server FAQ:
http://wiki.alfresco.com/wiki/Virtualization_Server_FAQ#Are_files_edited.2Fcreated_in_CIFS_immediate...