• 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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

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
 
Die Fledermaus does not fear such a tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic