[Hypercontent-users] Re: Can hypercontent handle servlets and JSP?
Brought to you by:
alexvigdor
From: Alex V. <av...@co...> - 2005-10-31 18:07:39
|
Hi Mike, You could host a website in HC2, but for your average site it = makes=20 more sense to publish it out to be hosted by a dedicated web server,=20 which is usually Apache. uPortal is not a web server, but a portal=20 server which can aggregate information and applications from multiple=20 back-end sources, including Apache or HyperContent. As such, uPortal=20 is not well suited to hosting complete web sites, but rather "bite=20 size" bits of information and functionality that can be arranged in a=20 configureable way based upon a user's rights and responsibilities. You=20= might manage some of these discrete portlets in HC2 and serve them=20 directly to uPortal, for example if you want to require authentication=20= to view that particular information, since you can configure single=20 sign-on between uPortal and HC2. You could also publish static portlet=20= content from HC2 to an Apache server, which uPortal could then pull=20 form. HC2 has a flexible workflow for delivering content; the "build"=20= and "publish" model is presented by default for maximum backwards=20 compatibility with HC1.4, but at Columbia we're actually migrating most=20= sites to a one-step publish, where the site as it appears in HC2 is=20 rendered directly into the public web space. You could also set up=20 multiple "build" or staging steps, which would primarily useful for=20 very sensitive information that might need to go through several steps=20= of vetting. The crashing sounds a bit strange; one possible solution would = be to=20 boost the JVM memory in the ant "build.xml" script - you'll see it's=20 currently set to 'maxmemory=3D"256m"', which really should be adequate=20= for the sample. Make suer to check the "hypercontent.log" for error=20 messages. Another probably more useful idea would be to download the=20 latest code from CVS; while those don't remind me of any particular=20 bugs that have been fixed since the 2.0b4 release, there have been a=20 ton of overall fixes resulting from our production migration these last=20= few weeks. The current code in CVS is exactly what we're running in=20 production; you can find info on how to download it from the web site. =20= The CVS files are in the exact same structure as the distribution, but=20= lack the sample project, which you can add in yourself. There are two ways to add users in HC2; if you use an external=20 authentication provider such as CAS, the users are automatically added=20= to the system once they have logged in the first time. To add a user=20 manually to HC2, you need to create a file under the "users" directory.=20= You'll see an example of where these go if you click the "Admin User"=20= link after logging in using the sample admin user. Basically, the file=20= has to live beneath a couple of directories that represent the first,=20 then the first and second letters of the user name. E.g. http://localhost:8080/users/m/my/myuser/user.xml You would add this by starting at http://localhost:8080/users/ If the first letter of the username is not already in the list, use the=20= "add" menu to add "First letter". It will then appear in the list;=20 click it, then add "First two letters". Click that directory, then=20 add "User" and enter the username. This will bring you to the VCard=20 editor where you can search LDAP for the user's info, upload a .vcf=20 file from your PIM, or manually enter it by clicking "Start from=20 scratch". The main things to worry about in the VCard editor are the=20 Full Name, which is displayed when the user logs in, and the email=20 address for workflow notifications. You'll see a second editor called=20= "Change Password" where you can enter a password for the user. Once=20 you have done this, save the user file, and you are ready to log in as=20= that user. Once you have users in the system, in order for them to do anything you=20= will have to add them to groups in the groups file (/config/groups.xml=20= in each project) and/or assign permissions to them or their groups in=20 the permissions files (/config/permissions.xml). I think there's more=20= discussion of the groups and permissions in the mailing list archives. Cheers, Alex On Oct 31, 2005, at 11:10 AM, michael ayodele wrote: > I think I am a little confused with the roles of hypercontent and=20 > uportal. Let me see if I got this right. Hypercontent is a web=20 > application platform that allows groups of people to work together in=20= > order to build a consistent web application. Hypercontent just creates=20= > the website, and does not host the website. Once a website is complete=20= > it must be built and then published to a host server(uportal) where=20= > it is actually used by end users. And uportal is a serverside=20 > framework for handling accesses by many users=A0for university = websites.=20 > Hopefully you can help me fill in gaps and misunderstandings. > =A0 > Also things I found using hypercontent > - whenever I try to=A0build the sample project=A0it builds half of it = then=20 > crashes=A0 > - When I try to download the entire sample project zip(in workflow)=A0it= =20 > crashes > =A0 > Other Questions > - How do I create new users and their passwords and permissions? > =A0 > Thanks Alex > =A0 > On 10/28/05, Alex Vigdor <av...@co...> wrote: HI Mike, >> =A0=A0=A0=A0=A0=A0 There isn't currently a plugin for rendering JSPs, = but it=20 >> should be >> possible.=A0=A0Similarly, there is no built-in database access, but = you >> should be able to accommodate that via plugins. >> >> There are 2 APIs you should look at: >> >> org.hypercontent.project.engine.IPipelineStage >> =A0=A0=A0=A0=A0=A0 - sample implementations under=20 >> org.hypercontent.project.engine.stage >> =A0=A0=A0=A0=A0=A0 - can be added into any view by binding into a = pipeline; see >> "/config/pipelines.xml" in the bootstrap project for how all the >> built-in screens are configured >> =A0=A0=A0=A0=A0=A0 - this is where you would query the database to = pre-populate a=20 >> form. >> You could render the information into XML and follow with an XSL = stage >> for presentation, >> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 or bind the values into = java objects and place them in=20 >> a >> VelocityContext for presentation with a Velocity template (see >> VelocityStage.getContext()) >> =A0=A0=A0=A0=A0=A0 - you could develop a stage which would render = with a JSP,=20 >> though this >> would probably take more work >> =A0=A0=A0=A0=A0=A0 - the stage "process" method gives you a Task = which has a=20 >> buffer of >> type "IWriteableAsset".=A0=A0You control what comes out of the stage = by >> setting the >> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 IDataLoader on the buffer; = this is simply an object=20 >> that returns an >> InputStream with your data (e.g. your XML rendered information).=A0=A0I= f >> you're using velocity, >> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 all you have to do is add = your objects into the=20 >> context and follow up >> with a VelocityStage that runs through a .vm template that references >> those objects. >> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 If you were to develop a = JSP stage, you would create=20 >> an IDataLoader >> implementation that presents the output of the JSP as an InputStream. >> >> org.hypercontent.form.IFormProcessor >> =A0=A0=A0=A0=A0=A0 - this is where you collect data from user form = inputs >> =A0=A0=A0=A0=A0=A0 - you could write a form processor to store the = form inputs in=20 >> a >> database >> =A0=A0=A0=A0=A0=A0 - see samples under "org.hypercontent.form" >> =A0=A0=A0=A0=A0=A0 - these are bound into views in the pipelines file = once again;=20 >> you >> assign them a key like "my-form", and assign individual form inputs = to >> it like so: >> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 XSL: >> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 = <input name=3D"{$my-form}name"/> >> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Velocity >> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 = <input name=3D"${my-form}name"/> >> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Your processor will see it = with the name "name": the=20 >> prefix is used >> by the framework to route individual inputs to individual processors. >> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 In this way, you could = have different inputs in the=20 >> same form routed >> to separate logical processors, e.g. >> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 = <input name=3D"${my-form}name"/> >> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 = <input name=3D"${my-other-form}name"/> >> >> All the built in application screens are developed with these two=20 >> APIs, >> so there are plenty of examples.=A0=A0There are some screen-specific >> stages, like "ManagePrepStage", and other commonly reused stages like >> "XSLTransformStage", "VelocityStage" and "TrimStage".=A0=A0You can = chain >> any number of stages in any way, so the possibilties are endless! >> >> -Alex >> >> >> On Oct 28, 2005, at 12:14 PM, michael ayodele wrote: >> >> > How would one go about querying and storing information in=20 >> databases? >> > Thanks again for all your help. >> > >> > Michael Ayodele |