Blogging example with jsp ?

anyone built a blogging (web log) interface with jsp
I suppose i cold find a php example and translate it to jsp

http://java-source.net/open-source/bloggers/jsp-blog
What scares me is that I didn't even want this information, but since you asked I just typed "jsp blog" into google.
/k1

Similar Messages

  • Best way to create, modify, XML with JSP ?  HELP

    Hi friends,
    As i am new to XML,
    I know there are two APIs used for XML processing, i want to know as a begineer level, which API
    is easy and good to implement XML with JSP.
    1) SAX
    2) DOM
    i want to make a log file in XML, so on web page it will be displayed on HTML form through XSL.
    Since there is good tutorial on http://www.w3schools.com/dom
    but i think its HTML dom
    I want XML procession through JAVA CODE , what should i use ? and give some good tutorials on XML DOM
    that is used with JAVA / JSP.
    HELP.
    Edited by: Ghanshyam on Sep 19, 2007 3:24 PM

    Well what i think is you gonna checkout with your requirements before implementing any of the popular XML parsing mechnisms.
    If you are intrested in faster processing @sacrifising a gud amount of your Memory,DOM is the one which you are looking for.
    If you are instrested in Managing your memory and but if you are ok with sacrifising speed SAX is the best solution.it works on what is called a push technology.
    and if you think either way you might have to look towards a pull parser which is StAX (Streaming API for XML Parsing)
    it'd be a gr8 idea if you can go through the below article which explians about each of the parsing mechanisms
    http://www.stylusstudio.com/xml/parser.html#*
    coming back to helpful resources as far java is concern checkout the below link which might be of some help.
    and the main thing is that all of these parser there is a defined specification you might find implementations of different vendors on this.
    eg:Sun Provides one with JDK itself,same as IBM provides one,oracle does the same & so on...
    your first task would be to focus on one such implementation which can cater your requirements.
    DOM:*
    Basic Parsing Objects / Interfaces Involved while DOM parsing:
    http://www.w3.org/TR/DOM-Level-2-Core/java-binding.html
    Breif Overview & few important API details:
    http://www.developerlife.com/domintro/default.htm
    Simple Example:
    http://www.brics.dk/~amoeller/XML/programming/domexample.html
    Others:
    http://www.roseindia.net/xml/dom/
    http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JAXPDOM.html#wp79994
    http://java.sun.com/webservices/jaxp/dist/1.1/docs/tutorial/dom/1_read.html
    SAX:*
    http://www.javacommerce.com/displaypage.jsp?name=saxparser1.sql&id=18232
    http://java.sun.com/webservices/jaxp/dist/1.1/docs/tutorial/sax/index.htm
    http://java.sun.com/developer/Books/xmljava/ch03.pdf
    http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JAXPSAX.html#wp69937
    http://www.onjava.com/pub/a/onjava/excerpt/java_xslt_ch5/index.html?page=6
    StAX:*
    http://java.sun.com/webservices/docs/1.6/tutorial/doc/SJSXP2.html
    http://javaboutique.internet.com/tutorials/stax/
    http://today.java.net/pub/a/today/2006/07/20/introduction-to-stax.html
    Hope this might be of some help :)
    REGARDS,
    RaHuL
    http://weblogs.java.net/blog/spericas/archive/2006/04/sun_stax_parser.html

  • How can I create a Login-page with jsp???

    Hello,
    I have to create a page with JSP code on the Netweaver Developer Studio.
    But I do not know how I do it.
    Can anyone tell me what to write in the portalapp.xml?
    An example would be very helpful.
    Thank you
    Greetings

    As you can see in the example:
    The portalapp.xml file (deployment descriptor) provides configuration information for your application, and defines the components and services in your application. For each component and service, you specify the implementing Java class and configuration information.
    For more information on the format of the portalapp.xml, see Deployment Descriptor (portalapp.xml).
    <application>
        <application-config>
            <property name="SharingReference" value="com.sap.portal.navigation.service, com.sap.portal.navigation.api_mimeservice, com.sap.portal.navigation.helperservice"/>
            <property name="Vendor" value="MY_COMPANY"/>
            <property name="SecurityArea" value="PERMISSION"/>
        </application-config>
        <components>
            <component name="SimpleNavigationExample">
                <component-config>
                    <property name="ClassName" value="MY_CLASS"/>
                    <property name="SecurityZone" value="no_safety"/>
                </component-config>
                <component-profile/>
            </component>
        </components>
        <services/>
    </application>
    You can only update in this example, your class name and other details:
    <property name="Vendor" value="sap.com"/>
    <property name="SecurityArea" value="MyCompany"/>
    <property name="ClassName" value="LOGINCLASS"/>
    <property name="SecurityZone" value="no_safety"/>
    Modify this portalapp.xml file as follows:
           1.      NAVIGATION SERVICE, so you must add references to the following portal applications that define these services:
            com.sap.portal.navigation.service
            com.sap.portal.navigation.api_mimeservice
            com.sap.portal.navigation.helperservice
           2.      In the <application-config> section, create the following properties that help to define the security zone for all components and services in this application:
    ○     Vendor: String identifying the company or organization that provided the application, for example, sap.com.
    ○     SecurityArea: String identifying the security area for the application, for example, NetWeaver.portal.
           3.      In the <component-config> section for the mySiteMap component, create the property SecurityZone to define the specific security zone for the component.
    For Permission, check this document:
    http://help.sap.com/saphelp_nw04s/helpdata/en/44/489e2df5ee4e35e10000000a1553f6/frameset.htm

  • How to migrate sites and blogs made with iWeb 1.1.2 into MobileMe?

    How to republish or migrate sites and blogs made with iWeb 1.1.2 into MobileMe?
    I can not find instructions for that, and when trying to publish into .Mac, I consistently get an error message. The sites would look better as they are, but ...

    tortuga wrote:
    How to republish or migrate sites and blogs made with iWeb 1.1.2 into MobileMe?
    If you're referring to last year's transition from .Mac to MobileMe, your iWeb websites are still available at the same URLs and have also been given a new URL at (www.me.com). For example, (web.mac.com/emily_parker/) will work as will (web.me.com/emily_parker)
    tortuga wrote:
    I can not find instructions for that...
    I don't think there's anything special you need to do, but anyway, this Apple doc may be of interest:
    _dotMac to MobileMe transition FAQ_
    tortuga wrote:
    ...and when trying to publish into .Mac, I consistently get an error message.
    What's the exact text of the error msg? This Apple doc may help:
    MobileMe: Troubleshooting iWeb publishing issues
    Also, MobileMe live chat support is now 24/7 — see this announcement.
    By the way, your Public Profile indicates you're running Mac OS X (10.5.4) — if that's true, you should upgrade to 10.5.8 via  menu > Software Update...

  • Excel with JSP

    Hi everyone
    I relly do need some help...
    I have an Oracle Database and I need to:
    1. View my results (of any request) in an excel spreadsheet using JSP (I think this part is the easiest...)
    2. And that is my real problem: Use an excel spreadsheet to insert values in the database with JSP...
    I hope I made it clear because even for me it's really tricky...
    Thanks a lot...
    Yassi

    There is a example in Marty Hal;l's book"Core Servlets and JSP pages".
    It is static, but the same idea would work coming from a database.
    <HTML>
    <HEAD>
    <TITLE>Comparing Apples and Oranges</TITLE>
    </HEAD>
    <BODY>
    <CENTER>
    <H2>Comparing Apples and Oranges</H2>
    <%
    String format = request.getParameter("format");
    if ((format != null) && (format.equals("excel"))) {
    response.setContentType("application/vnd.ms-excel");
    %>
    <TABLE BORDER=1>
    <TR><TH></TH><TH>Apples<TH>Oranges
    <TR><TH>First Quarter<TD>2307<TD>4706
    <TR><TH>Second Quarter<TD>2982<TD>5104
    <TR><TH>Third Quarter<TD>3011<TD>5220
    <TR><TH>Fourth Quarter<TD>3055<TD>5287
    </TABLE>
    </CENTER>
    </BODY>
    </HTML>

  • Use of Threads with JSP's

    Can you use threads in a web application that uses JSP's plus Servlets and Beans ?
    We have a JRUN 3.1 application using JSPs, Servlets and Beans. Shortly after we went live it became apparent that any 2 users using the same object experienced problems as one object was overwriting another. In a panic the problem was solved by whacking SYNCHRONISED on all objects.
    Now we want to write another application, are there strategies for using Threads with JSPs?
    Would this be part of the webserver configuration or would the application be coded in a certain way ?
    Please can you give me a simplistic answer or point me to some documentation that gives a simple overview.
    Thanks Steve

    Hi,
    You can use thread with jsp, i am sending u a example
    package thread;
    import java.io.Serializable;
    public class TaskBean implements Runnable, Serializable {
    private int counter;
    private int sum;
    private boolean started;
    private boolean running;
    private int sleep;
    public TaskBean() {
    counter = 0;
    sum = 0;
    started = false;
    running = false;
    sleep = 100;
    protected void work() {
    try {
    Thread.sleep(sleep);
    counter++;
    sum += counter;
    } catch (InterruptedException e) {
    setRunning(false);
    public synchronized int getPercent() {
    return counter;
    public synchronized boolean isStarted() {
    return started;
    public synchronized boolean isCompleted() {
    return counter == 100;
    public synchronized boolean isRunning() {
    return running;
    public synchronized void setRunning(boolean running) {
    this.running = running;
    if (running)
    started = true;
    public synchronized Object getResult() {
    if (isCompleted())
    return new Integer(sum);
    else
    return null;
    public void run() {
    try {
    setRunning(true);
    while (isRunning() && !isCompleted())
    work();
    } finally {
    setRunning(false);
    And JSP page start.jsp
    <% session.removeAttribute("task"); %>
    <jsp:useBean id="task" scope="session"
    class="thread.TaskBean"/>
    <% task.setRunning(true); %>
    <% new Thread(task).start(); %>
    <jsp:forward page="status.jsp"/>
    ///////////////// status .jsp
    <jsp:useBean id="task" scope="session"
    class="thread.TaskBean"/>
    <HTML>
    <HEAD>
    <TITLE>JSP Progress Bar</TITLE>
    <% if (task.isRunning()) { %>
    <SCRIPT LANGUAGE="JavaScript">
    setTimeout("location='status.jsp'", 1000);
    </SCRIPT>
    <% } %>
    </HEAD>
    <BODY>
    <H1 ALIGN="CENTER">JSP Progress Bar</H1>
    <H2 ALIGN="CENTER">
    Result: <%= task.getResult() %><BR>
    <% int percent = task.getPercent(); %>
    <%= percent %>%
    </H2>
    <TABLE WIDTH="60%" ALIGN="CENTER"
    BORDER=1 CELLPADDING=0 CELLSPACING=2>
    <TR>
    <% for (int i = 10; i <= percent; i += 10) { %>
    <TD WIDTH="10%" BGCOLOR="#000080"> </TD>
    <% } %>
    <% for (int i = 100; i > percent; i -= 10) { %>
    <TD WIDTH="10%"> </TD>
    <% } %>
    </TR>
    </TABLE>
    <TABLE WIDTH="100%" BORDER=0 CELLPADDING=0 CELLSPACING=0>
    <TR>
    <TD ALIGN="CENTER">
    <% if (task.isRunning()) { %>
    Running
    <% } else { %>
    <% if (task.isCompleted()) { %>
    Completed
    <% } else if (!task.isStarted()) { %>
    Not Started
    <% } else { %>
    Stopped
    <% } %>
    <% } %>
    </TD>
    </TR>
    <TR>
    <TD ALIGN="CENTER">
    <BR>
    <% if (task.isRunning()) { %>
    <FORM METHOD="GET" ACTION="stop.jsp">
    <INPUT TYPE="SUBMIT" VALUE="Stop">
    </FORM>
    <% } else { %>
    <FORM METHOD="GET" ACTION="start.jsp">
    <INPUT TYPE="SUBMIT" VALUE="Start">
    </FORM>
    <% } %>
    </TD>
    </TR>
    </TABLE>
    </BODY>
    </HTML>
    ////////////////////////////// stop.jsp
    <jsp:useBean id="task" scope="session"
    class="thread.TaskBean"/>
    <% task.setRunning(false); %>
    <jsp:forward page="status.jsp"/>
    deploy it into ur server and run start.jsp
    and see whatb happens

  • Design issue with JSP

    I've been rather thrown into the deep end of a JSP project, of which I have no prior experience, and have a couple of basic design questions.
    My project requires a number of web pages, delivered in sequence, to guide a user to a result. A 'wizard' if you will. The presentation code will need to make frequent trips to the back end system which will update it with status and what to do next.
    My assumption is that for this type of application, a set of JSP pages would be the right way forward. Access stage1.jsp, which provides an HTML link to stage2.jsp, and so on. Each page uses a bean which does the required clever back end stuff.
    The alternative, being pushed by a colleague, is to have a set of servlet/JSP page pairs.The servlet is the entry point, which does the back end stuff and sets up a bunch of values within the request, then it forwards to a JSP page which displays the values using EL to get at the values the servlet has prepared.
    Is one of these the "standard" way of doing it? After several hours of discussion we've not been able to decide if either way has any particular benefits that the other doesn't.
    One problem I'm starting to see with my approach is that returning information from the bean to the JSP page leaves the page needing to understand how to present the information, and that sort of logic isn't easy to express in JSP. For example, the JSP uses the bean to learn that 6 wotsits are available, but numbers 2 and 3 have been disabled.The JSP page needs to list the 4 that are ready, then perhaps list the other 2 elsewhere depending on another bean-derived value. Putting this sort of presentation logic into a servlet is straightforward, but if we do it my way than it's up to the JSP to try to sort it out. Which right now I don't know how to do, or whether it's even possible. I think what I need is for the JSP to hand this 6-wotsit list off to another piece of Java code which will generate the appropriate HTML for it - clearly not something the bean should be doing. Can I do that from another bit of servlet code somehow, without using a servlet to do the whole page?

    thrice wrote:
    BalusC wrote:
    thrice wrote:
    Is one of these the "standard" way of doing it? After several hours of discussion we've not been able to decide if either way has any particular benefits that the other doesn't.When you comes to the point that the standard taglibs/EL doesn't provide the needed functionality and you're forced to use a scriptlet, then it's time to use a Servlet.Um, so you're saying that both approaches are valid under the appropriate circumstances?There are circumstances/webapps where just a JSP page and a (smart) Javabean suffices without the need for any servlet (and scriptlet). It all solely depends on what you need and what the technology provides. If you need to have more control over the request (e.g. forwarding to another destination page depending on submitted input and/or result), a Servlet is more appropriate.
    Scriptlets are bad? Or at least not recommended?It's for sure NOT recommended. It's simply a sign of a bad practice. It unneccessarily tight-couples your presentation logic with business or even database logic. They simply doesn't belong in a JSP and collides with the "MVC" nature and also makes the code harder to read/maintain/test/debug/reuse. It's a (too) long living remnant of the first form of the JSP technology and its use has been discouraged since the introduction of taglibs/EL about a decade ago. Right now, it's at highest only useful for "quick testing" and "prototyping", for sole playing, testing and demonstration purposes only.

  • Problem when inserting "Thai language" string to MS Access with JSP

    Dear sir,
    I have the problem when try to insert "Thai langusge" string to MS access database through JDBC in JSP page.
    The JSP page is shown in the following.
    <HTML><HEAD><TITLE>Personalt Information</TITLE>
    <%@ page contentType="text/html; charset=MS874" %>
    <%@ page import = "java.io.*" %>
    <%@     page import = "java.lang.*"%>
    <%@     page import = "java.sql.*"%>
    <%
              Connection dbconn,conn;
              ResultSet results;
              String sql;
              Statement stmt;
              // Creating a conection with a database
              String url = "jdbc:odbc:bg3hrDB"; // the database file.
              //Statement stmt;
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   dbconn = DriverManager.getConnection(url);
                   stmt = dbconn.createStatement();
                   ResultSet rs;
    %>               
    %>
    <%
              String code=new String(request.getParameter("code").getBytes("ISO8859_1"),"MS874");
              String status=new String(request.getParameter("status").getBytes("ISO8859_1"),"MS874");
                   String fname=new String(request.getParameter("fname").getBytes("ISO8859_1"),"MS874");
                   sql = "INSERT INTO employee VALUES (' "+ code +" ',' "+ status +" ',' "+ fname +" ')";
    stmt.executeUpdate(sql);
    %>
    <%=fname%> //In this line, "fname" can show "Thai" correctly
    But after inserted to database, the record in Access was always show "?????" instead of "Thai"......
    How can i solve this?
    Thank you for your kindness in advances.
    Yongyos K.

    It's a pain in the butt, but you'll have to write your own character set conversion to handle the problem. Check out the link shown below (just replace BIG5 in the example with MS874):
    http://www.geocities.com/siufai6/java/JDBC_Chinese.html
    ;o)
    V.V.

  • A grid (2*2 for example) with a circle in a selected place

    Dear Forum members,
    Please tell me how to make (in swing , but NOT applet) a grid (2*2 for example) with a circle in a selected place (in one or more of the 4 cells). I want to be able to turn on and off (circle or no circle) any cell in the grid.
    Thanks
    Eran

    Doubleposted,
    http://forum.java.sun.com/thread.jsp?forum=54&thread=477343&tstart=0&trange=15

  • HOW can I call EJB with JSP?

    Hi, I'm working with JSP and want to include some EJB. I dont know how can I access EJB through JSP. I dont know if I use the right code in JSP for calling EJB. Did someone know how to use that? Can someone tell me if is the right code in JSP in my example?
    Thanks, Kristjan
    THIS IS THE JSP: (useejb.jsp)
    <%@ taglib uri="http://xmlns.oracle.com/j2ee/jsp/tld/ojsp/ejbtaglib.tld" prefix="EJB" %>
    <%@ page import="mypackage1.MySessionEJB" %>
    <%@ page import="mypackage1.MySessionEJBHome" %>
    <%@ page import="mypackage1.impl.MySessionEJBBean" %>
    <HTML>
    <head><TITLE>USEBEAN</TITLE></head>
    <body>
    <EJB:useHome id="mySessionEJBHome" type="mypackage1.MySessionEJBHome" location="java:comp/env/ejb/mySessionEJB" local="false" />
    <EJB:useBean id="mySessionEJBBean" type="mypackage1.impl.MySessionEJBBean" local="false">
    <EJB:createBean instance="<%=mySessionEJBHome.create() %>" />
    </EJB:useBean>
    <%= mySessionEJBBean.calc() %>
    </body>
    </html>
    THIS IS THE EJB CODE:(MySessionEJBBean.java)
    package mypackage1.impl;
    import javax.ejb.SessionBean;
    import javax.ejb.SessionContext;
    import java.lang.String.*;
    public class MySessionEJBBean implements SessionBean
    public void ejbCreate(){}
    public void ejbActivate(){}
    public void ejbPassivate(){}
    public void ejbRemove(){}
    public void setSessionContext(SessionContext ctx){}
    public String calc(String value)
    return value + value;
    public String zanka(String x)
    return x;
    (MySessionEJB.java)
    package mypackage1;
    import javax.ejb.EJBObject;
    import java.rmi.RemoteException;
    public interface MySessionEJB extends EJBObject
    public String calc(String value) throws RemoteException;
    String zanka(String x) throws RemoteException;
    (MySessionEJBHome.java)
    package mypackage1;
    import javax.ejb.EJBHome;
    import java.rmi.RemoteException;
    import javax.ejb.CreateException;
    public interface MySessionEJBHome extends EJBHome
    public MySessionEJB create() throws RemoteException, CreateException;
    }

    You might want to look at using a Java Bean wrapper, this can be done automically using WebSphere. It creates what is called an access bean which the JSP imports.
    HTH,
    J.Clancey

  • Flex with jsp?

    can anyone tell me if flex can be integrated with jsp and if yes, can i get a small example of it... plz help.. its uugent

    http://flex3.info/using-flex-with-javaserver-pages/
    http://livedocs.adobe.com/flex/3/html/help.html?content=data_access_2.html
    http://www.coderanch.com/t/478820/Flex/Application-Frameworks/Flex-recive-data-JSP-submitt ed
    If this post answers your question or helps, please mark it as such.
    Greg Lafrance - Flex 2 and 3 ACE certified
    www.ChikaraDev.com

  • Authentification and Security in WebApp with JSP

    Hello to all.
    I'm developing a Web Applications with JSP's. To use the application a user must first Login.
    To restrict access via URL typing I have included in every JSP page a user_logged_in_check page that verifies that the user is logged in, and if not redirects to the Login page.
    The problem is that I must not forget to include that page in all my JSPs, and if the name of the page changes, it must be changed everywhere (though a search/replace might do the job just fine).
    I used this approach because is not server dependent (such as the Tomcat Realms example I have seen on this forum).
    Is there a better strategy?
    Is there a way to enforce security check and not rely on my attention ;)?
    Is there a pattern that solves the problem?
    Any help would be greatly appreciated.

    The first and biggest disadvantage is the repetitive coding - what happens if you realise that you need to change something - you will need to modify each of your JSP files. The chances of someone forgetting to add it in are a security risk.
    Secondly, using the web server's mechanism, in most cases, would mean that you are using a proven and much more stable security mechanism then you can whip up.
    For example, in Weblogic, you can configure a JAAS provider -- that means you are not limited to using uname/password. Your customer may have an enterprise wide single sign on policy that is supported by the JAAS provider and you can use it straight away - by just making a declarative change in the web*.xml files.
    If you must, use the Filter class (its a Servlet class, I checked after I had posted) as described in the Intercepting Filter pattern - at least thats a standard approach and will cut down on you having to rely on adding a snip of code to each of your JSPs.

  • Best websites with JSP and Servlets

    I would like to see some examples of the best well-known websites realised with jsp & servlets.(if it's possible some awarded ones)
    thx

    This forum is using JSPs. I can see post.jsp in the URL as I type this. Famous enough?
    I believe eBay is 100% J2EE:
    http://www.theserverside.com/home/thread.jsp?thread_id=8906
    MOD

  • Path Pronlem with jsp:plugin 's codebase

    I am unable to call my JApplet Class with <jsp:plugin> tag in my JSP Page. I have tried almost every combination for codebase (absolute and relative paths ) but still there is an Error ClassNotFound .
    Please tell me the right way to call the Applet in JSP.
    along with a small example ...
    Jsp and the Class File exists in Different directories in My Web Project.

    Well, then I would just put in the object/embed tags yourself. You can get whatever the plugin tag writes by just using the tag once with static values and view the source in the browser and copy it out, then replace whatever values with scriptlets (or other taglib tags) to fill in the correct values.

  • How to combine with JSP??

    I am a newble to Flex 2
    I am confuse that how can i combine with JSP to send and
    retrive data with mysql ??
    I have seen some examples that juz make a linking with jsp
    which is printed to XML format for data extracting.
    But how to insert and retrive data dynamically?
    Some people say that it can directly programming mxml in .jsp
    by importing mxml tag library....and finally complie on the web
    server. But .... Wazz is the reason i have to buy flex builder.....
    Are there any way i can program with jsp in flex 2 ?
    i am sorry for my poor english
    any help will be highly appreciated

    Eran,
    Can you elaborate on what you're looking for?
    UCM comes with a number of sample custom element forms. These forms are leveraged within a pretty strict context of the site studio contributor. The primary api is javascript based.
    I don't believe you would be restricted on the types of custom element forms you can create if you're implementing into a jsp/x site. I believe the issue is mostly dependent on how you're calling the SS contributor.
    -ryan

Maybe you are looking for