Hi :)

I'm trying to creat a social web application with JAVA eclipse and google 
app engine that offers its users to share and discuss photos.It should 
consist of a single web page, that displays posts and the comments to each 
post. Each comment belongs to exactly one post and therefore each post has 
a (possibly empty) list of comments. i still have many problems with 
displaying posts and saving comments with App Engine Datastore (HRD) !! 

Could you please give some suggestions,how can i post image and save 
comment using HRD ?

The web application is supposed to look roughly like this:

<https://lh4.googleusercontent.com/-W59y0oosBic/UcsffZ3ffgI/AAAAAAAAAsw/utRLaKVVWHs/s1600/Sans+titre.png>

and this is what i got :

<https://lh4.googleusercontent.com/--S8vqnwFSj8/Ucsfz9oRgNI/AAAAAAAAAs4/6vi_THtwD-A/s1600/Untitled20130626182219.png>


this is the servlet that i used :

package de.tuberlin.cit.tublr;
public class TUBlrServlet extends HttpServlet {

 private static final long serialVersionUID = 3218329961842485677L;

 public void doGet(HttpServletRequest req, HttpServletResponse resp)
        throws IOException {

    resp.sendRedirect("/tublr.jsp");
}

public void doPost(HttpServletRequest req, HttpServletResponse resp)
        throws IOException { }


and this is my JSP :

<%@page language="java" contentType="text/html; charset=UTF-8" 
pageEncoding="UTF-8"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"     
"http://www.w3.org/TR/html4/strict.dtd";>

<html>

<body>
  <div id="header-wrap">    
    <div id="header">
        <img src="images/tublr.png" alt="tublr"></img>  
        <h3>A photo-sharing service !</h3>      
    </div>
</div>

<div class="post_form_wrap">
    <form class="post_form" action="FIXME" 
          method="post" enctype="multipart/form-data">

        <h3>Post a new image:</h3>
        Image: <input name="post_image" type="file" size="35" 
maxlength="5000000"/><br/>
        Message [optional]: <input name="post_text" type="text" size="30" 
maxlength="30"/>
        <p><input type="submit" value="Post!"/></p>
        <input type="hidden" name="type" value="post"/>
    </form>
    <hr/>
</div>


<div id="content-wrapper">
    <div class="post">
        <div class="post_data">
            <div class="post_image">
                <a href="FIXME"><img src="FIXME"/></a>
            </div>
            <h4>Posted on FIXME:</h4>
            <div class="post_text">FIXME</div>
        </div>

        <div class="comment_data">
            <div class="comment_image">
                <a href="FIXME"><img src="FIXME"/></a>
            </div>
            <h4>Comment posted on FIXME:</h4>
            <div class="comment_text">FIXME</div>       
        </div>      
        <div class="comment_form">
            <form action="FIXME" method="post" 
                  enctype="multipart/form-data">
                Image: <input name="comment_image" type="file" size="35" 
maxlength="5000000"/><br/>
                Message [optional]: <input name="comment_text" type="text" 
size="30" maxlength="30"/><br/>
                <input type="submit" value="Post Comment!"/>
                <input type="hidden" name="type" value="comment"/>
            </form>
        </div>
    </div>
    <hr/>
</div>
</body>
</html>



-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to