cancel
Showing results for 
Search instead for 
Did you mean: 

Creting a website with jsp and servlets

johnjohn
Champ in-the-making
Champ in-the-making
I'm trying to create a web content project by importing JSP files from an existing website developed in NetBeans.  I've successfully created a web content project with static html files from a previously developed website.   If I convert the JSP files to HTML, zip the files, then import them, I can then preview the website.  I need to create the website as JSP because they've got dynamic content.  Am I missing something?  Thanks in advance for any help.

John
8 REPLIES 8

mrogers
Star Contributor
Star Contributor
What are you trying to ask?     Certainly JSP is one way to write a dynamic web site and any J2EE textbook will tell you how to do it.

However since this is an Alfresco forum perhaps you mean manage a web site via Alfresco WCM?   In which case you can choose whichever technology you want to implement your web site, Alfresco WCM is fairly agnostic as to the technologies to use for your managed web site.   JSP is one choice,  you may also want to look at JSF or you could use the Microsoft stack for page rendition technology.    Or use some sort of web site generator application, there's a lot of interest in Freemarker at the moment.      

If you manage your web site as JSP files then you will need to deploy your wcm content to a JSP servlet engine like Tomcat, Web Logic, WebSphere, Jboss, Orion etc.   And those JSP files can access the services of Alfresco if they need to.

johnjohn
Champ in-the-making
Champ in-the-making
Hello,
Thanks for the reply.  I guess I wasn't very clear.  I did mean managing a website using Alfresco.  The website has already been developed using JSP and servlets and has already been deployed (developed in Netbeans).  I've just started looking at Alfresco (literally) to manage the website, so that certain users can update content themselves.  I was able to create a web project by importing a zipped file of static html web pages, and could preview the website in Alfresco.  I then tried to create a web project by importing a zipped file of the aforementioned jsp files, but got an error when I tried to preview .  Even when I tried to preview individual files, the code would display.  I renamed 'home.jsp' file to 'index.jsp' hoping this was my problem, but got the same result.  Some of the files have just html while others have java code in them.  All the files start with(for what it's worth):

<%–
Document   : company
Created on : Jan 15, 2008, 2:44:41 PM
Author     : jscott
–%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
standard code here…


I'm assuming I'm missing something obvious.

johnjohn
Champ in-the-making
Champ in-the-making
I ended up simply importing the WAR file from my Netbeans project and everything works fine.

goldy736
Champ in-the-making
Champ in-the-making
hi,

I have also created files of jsp (WAR file)for my website , but  when i try to import the file i get the following error


Please correct the errors below then click OK.
A system error happened during the operation: Unable to process Zip file. File may not be of the expected format.

Uploaded Content
simplejsp.war.rar   
  ZIP file contains high-byte filename characters such as Japanese, Chinese or Korean.


Thanks in advance for any help !

mrogers
Star Contributor
Star Contributor
Your file name is simplejsp.war.rar

Has the file been double encoded ?

The bulk import will expect a Zip file encoding so a .zip or .war

goldy736
Champ in-the-making
Champ in-the-making
hi,
My folder  name simplejsp.war which contains the jsp files, WEB-INF,META-INF, Cluster folders too …since i bulk import need zip  file, i zipped the folder using Winrar it becomes simplejsp.war.rar  .
But it not works …Please point  out what mistake i made.
Thank you !

samuel_penn
Champ in-the-making
Champ in-the-making
As mrogers said, the bulk import will accept a .war file (these are really zip files anyway). So just import the .war file directly without trying to compress it again with winrar.

btw, rar is a different format to zip

Sam.

goldy736
Champ in-the-making
Champ in-the-making
hi ,
    Thanks sam for your suggestion to clarify me  , i could  now  deploy all my jsp file in web project folder , i wonder how to run the jsp file, there is no  preview file icon near the files…or whether i should need to do further any basic steps to view it….please give me solutions for the problem.


Thank you !
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.