This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Web Services and the fly likes Integration session-web service Rest Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Integration session-web service Rest" Watch "Integration session-web service Rest" New topic
Author

Integration session-web service Rest

marco mmmm
Greenhorn

Joined: Jun 03, 2011
Posts: 1

Can I use the session in RESTful web services?

@Path("start")
@GET
@Produces("text/xml")
public String start(@Context HttpServletRequest request)
{
session = request.getSession(true);
String[] c = new String[6];/*
c[0]=request.getParameter("server");
c[1]=request.getParameter("username");
c[2]=request.getParameter("password");
c[3]=request.getParameter("port");
c[4]=request.getParameter("room");
c[5]=request.getParameter("nickname");


session.setAttribute(c[1], c);
}

this code don't work
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Integration session-web service Rest
 
Similar Threads
Retrieving Session variables into another JSP
Struggling With Passing Data Between Data Access Class, Business Bean, and Controller
dispatching to servlets and JSPs
Java mail problem
Inserting Image in a PDF File generated using JAVA PdfWriter object