1

我的项目包含两个模块。一个。用户注册 B. 用户视图配置文件

在 UserRegistration 模块中,我从用户那里获取了详细信息,并将插入到数据库中。听到 UserRegistrationImpl 将为每个用户生成一个 ID 并附加到会话。以及它向 UserRegistration 客户端程序发送插入详细信息的确认。这样 Userregistration 客户端将重定向到 UserViewProfile 模块,该模块将从会话中访问 Common ID,并基于此从数据库中检索数据以向用户显示详细信息。我正在使用最新的 GWT 版本。

重定向时,我在 web.xml 中面临 servlet 引用问题。显示如下错误:

com.google.appengine.tools.development.LocalResourceFileServlet doGet
WARNING: No file found for: //userviewpath/userview

看我的代码:

#UserRegistrationImpl#
HttpServletRequest request = this.getThreadLocalRequest();
HttpSession session = request.getSession(true);
System.out.println("s1:"+session);
session.setAttribute("SessionId", newId);
status="pass";
returnId.add(status);
returnId.add(Integer.toString(newId));

#UserRegistration#
if (result.get(0).equals("pass")) {
int addedID=Integer.parseInt(result.get(1));
String url=URLUtils.getRedirectURL("/UserViewProfile.html");
Window.Location.replace(url);
} else if (result.equals("fail")) {
dialogBox1.setWidget(Unotsuccesslbl);
#UserRegistrationInterface#
@RemoteServiceRelativePath("userreg")
public interface UserRegistrationInterface extends RemoteService 
{
ArrayList<String> addRegistrationDetails(UserRegDetails userDetails)throws 
IllegalArgumentException;
}
#UserViewProfileImpl#
HttpServletRequest request = this.getThreadLocalRequest();
HttpSession session = request.getSession(false);
System.out.println("s2 val:"+session.getAttribute("AyushId")); 
//userViewProfile need  this Id value
#UserViewProfileInterface#
@RemoteServiceRelativePath("userview")
public interface UserViewProfileInterface extends RemoteService 
ArrayList<String> GetProfileDetails(ArrayList<String> userProfileArray)
throws IllegalArgumentException;{}
#web.xml#
<!-- User Registration part start-->
<servlet>
<servlet-name>UserRegistrationImpl</servlet-name>
<servlet-class>com.testegg.ayushcare.server.UserRegistrationImpl</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>UserRegistrationImpl</servlet-name>
<url-pattern>/userregpath/userreg</url-pattern>
</servlet-mapping>
<!-- User Registration part end-->
<!-- UserViewProfile part start -->
<servlet>
<servlet-name>UserViewProfileImpl</servlet-name>
<servlet-class>com.testegg.ayushcare.server.UserViewProfileImpl
</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>UserViewProfileImpl</servlet-name>
<url-pattern>/userviewpath/userview</url-pattern>
</servlet-mapping>
<!-- UserViewProfile part end -->
4

0 回答 0