aspose file tools
The moose likes Websphere and the fly likes MVC in Visualage ( WTE) Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Products » Websphere
Reply Bookmark "MVC in Visualage ( WTE)" Watch "MVC in Visualage ( WTE)" New topic
Author

MVC in Visualage ( WTE)

Nehal Dave
Greenhorn

Joined: Dec 22, 2000
Posts: 28
I am trying to test MVC in visualage with a simple application.
I have servlet whichgets the request, adds a String object in session & forwards it to JSP which just displays the Session variable...
here is the code
Controller Servlet
String a= new String("TeStInG MvC .....");
HttpSession s = request.getSession();
s.setAttribute("test",a);

ServletContext sc= getServletContext();
RequestDispatcher rd = sc.getRequestDispatcher("/view.jsp");

if (rd != null)
rd.forward(request,response);
View.jsp
String a=(String)session.getAttribute("test");
out.println(a);

View.jsp is in following dir..
D:\Program Files\ibm\VisualAge for Java\ide\project_resources\IBM WebSphere Test Environment\hosts\default_host\default_app\web
The error i get in console is...
javax.servlet.ServletException: non-HTTP request or response
I dont understand what is goign wrong Plz help...
Nehal.
Matthew X. Brown
Ranch Hand

Joined: Nov 08, 2000
Posts: 165
Can you post the stack trace. It would help.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: MVC in Visualage ( WTE)
 
Similar Threads
Jsp and javabean
WebsphereAS 4.0 RequestDispatcher.forward() problem
How to get header?
RequestDispatcher
How to pass instance variable to the JSP