You are here

New to Luminis Need Help

Submitted by twstrahan on Thu, 01/19/2012 - 14:25

I am new to Luminis, currently using 4.2.2. Have been able to modify the login page and a minimum number of changes within the internal pages. Need help with:

Where is cp/home located. It's not in our directory structure so I assume it's an alias but can't locate where it's declared if that's the case.

New at JSP, Java and wondering is there a good site for beginners to understand how these files work and what is needed if changes are made. Been trying for a while now, flustered and need help.

Thanks

CodeStorm:

Luminis Version:

You are correct that it is an alias, sort of. It's actually an environment variable that point to the location or your portal installation. So, if you installed to "/opt/luminis/" then `cd $CPHOME` would change to the /opt/luminis/ directory.

What exactly are you trying to do? There are URLs that you might see in the address bar that do not correspond to a page or file on disk.

-Tom

I'm being tasked to customized the inner pages (once you've logged in). I have figured out some of the xsl files that for modifying parts of the pages. I'm currently learning about JSP and don't know if compiling is needed after changes or server restart.

Basically I was hired about a year ago, and put onto this portal. It was already in place for about a year before I got here and I have had no training on it. Just was given a large manual and that's the extent of my knowledge.

That URL is handled by a servlet. It does not map directly to any files in the filesystem. That particular servlet actually pulls in data and mixes it with several files (the login html file, a login.jsp file, etc.).

That's what I'm trying to understand. What file is the root for these pages. If I could figure that out I might be able to trace my way through the code. I figured out a few minor things such as xsl files, but can't figure out where they're being called from.

Very new at this, no training, and never worked with Java or JSP before. But am trying to learn as I go.

A lot of the paths are derived from the directory structures in jar/class files in the $CP_WEBINF/lib directory, but then can be remapped in the $CP_WEBINF/web.xml to other paths.

So for instance, in $CP_WEBINF/classes we created a custom class called MyClass.class. We then add a line in $CP_WEBINF/web.xml like:

servlet-mapping>
MyClass
/myVirtualPath/MyClass/*
/servlet-mapping>

So to access that compiled java class with a web browser it's http://yoursite.edu/myVirtualPath/MyClass

Much of Luminis is structured by the cp.jar file. Sometimes it is necessary to edit that jar file in order to change parts of the portal.

In general, it is easiest to just learn where the main file locations are, instead of attempting to reverse engineer their locations. Since java developers can pretty much make any physical file appear on any URL path, it is difficult to systematically find things.

But in general, if you are trying to make appearance changes, search for threads on skinning. In $CP_ROOT/custom/ there should be two folders, classic and xp_style. Either of those can be copied, modified, and then deployed. That takes care of about 80% of the changes you'd want to make.

When I first started with Luminis, being able to search $CP_ROOT with find and grep commands really helped. If you are logged into your portal, view the source code, and then grep for that code in $CP_ROOT. Oftentimes you can find the file that way.

The other main area is $CP_ROOT/jsp/. You can find the login.jsp, footer.jsp, and other main display jsp's here. Here is a list of all files we've modified over the years:

channel.xsl - skin file that controls some parts of how channels display.
css.jsp - $CP_ROOT/jsp/lib/ One file that controls the order in which style sheets are loaded.
custom.css - skin file
custom.jsp - skin file that controls a few layout things
custom.xsl - skin file that controls layout and order of display, parts of the footer.
customIcons.xsl - skin file that is one of a few files needed to create custom icons.
FolderTreeHead.jsf - $CP_ROOT/jsp/grouptools/fileshare/ I think I modified this to make the file tree list in groups and courses open and close by clicking the file name instead of the little arrow.
footer.jsp - $CP_ROOT/jsp/lib/ cut out the 'made by sungard' stuff and added google
FrameTopnav.jsp - $CP_ROOT/jsp/grouptools/frame/ Removed the 'request a group' feature unless you are an admin.
GroupMyGroups.jsp - $CP_ROOT/jsp/grouptools/group I forget what I modified on that one hehe.
login.html - $CP_ROOT/site - This file and login.jsp make up the login page.
login.jsp - $CP_ROOT/portal/ - This file and login.html make up the login page.
nested-tables.xsl - Main controlling xsl for the entire portal. Be sure to back this one up! You can completely break the portal if you typo in this file. But it is necessary to edit if you are doing deep skinning / and or want to do major overhauls of the underlying code.
personDirectory.xml - $CP_ROOT/webapps/luminis/WEB-INF/uPortal/properties Controls what data and what variables are available for custom code. Search this site for iPerson for more information.
schedule.jsp - $CP_ROOT/jsp/services/ Controls how the 'My Courses' course list looks. I think I added CRN to this so that instructors with multiple courses with the same names could tell them apart.
server.xml - $CP_ROOT/products/tomcat/tomcat-cp/conf/ Used to tweak tomcat for better performance or other changes.
etc....

So...basically very few paths that you see in the URL bar are going to match any physical file path. You are best off asking for help with the specific change you'd like to make, or seeing how far you get with skinning, or grep'ing your $CP_ROOT for the specific code junks you are trying to find.

I appreciate the info very much. I'll work on what you have given and see where it leads me. Thanks again.