• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

HtmlUnit problem: Change the Request

 
Greenhorn
Posts: 22
Android Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I have a problem. I'm using a webApplication, which I run via a Jetty-Server
Now I want to send Requests, to test the responses.



But, I don't undersatnd it to change the session. A class of my application calls an attribut from the request. How is it possible to change the atrribut in my request.




Sam
 
Ranch Hand
Posts: 754
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
request.getSession().setAttribute("newValue", newValue);
 
sam backet
Greenhorn
Posts: 22
Android Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It doesn' work, because I'm using the WebRequest from HMTL-Unit. and there is no "request.getSession"?

And if I use the WebRequest from class "HttpServletRequest" I don't know how to initialize the client. and send the message.

Do you know, how I can solve it?

michael
 
reply
    Bookmark Topic Watch Topic
  • New Topic