Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

I need to call a HtML file in c drive from my jsp

 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi .,

Please tell me if this is possible .

I need to call a HTML file which is in C drive from my jsp running under server .

Thanks in advance .
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean by call?
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Means i need to show that HTML content which is in C drive . It is a simple HTML page .
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So, all you need to do is forward to it from your JSP?
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes Paul . Please tell me the solution
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have a read of the documentation for <jsp:forward />.
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried with this <jsp:forward > but its not working an dalso i tried with

 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What happened when you tried? "Its not working" doesn't give us much to work with; you need to TellTheDetails otherwise we can't help.
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I mean to ask is this possible to access client files from server ??

To your question

I got different exceptions when used different ways :

when used RequestDispatcher.include or forward i got NullPoilterException at Rd.include(request,response);

Used response.sendRedirect the browser used to show a default page of windows(the page we will get when internet is not accessable)



 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I mean to ask is this possible to access client files from server ??

Not this way. You can only redirect to stuff on the server. If you want to "call" an HTML file from the server you will need to first get the client to upload it.

Seems like a wierd thing to be trying. Why do you want to do this?
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks paul ,

Our requirement is that we are getting some data/ reports from database and it is kept in the form of HTML files stored on to the client drive . so we need to access it .( I can't answer more queries on this as i am not an architect , just developing what my Manager wishes)

Please tell me if this task is possible using an HttpClient or an java.net package ) anything is okay to achieve this .

( sorry for the late reply as we don't have access to internet at work, just post questions from a different machine when it is free )
 
Vikas Kapoor
Ranch Hand
Posts: 1374
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ravi whatever you are trying looks odd. What do you store on client side? Actually, why do you need to store anything on client side? Please describe the situation.
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


As i already said . I need to do this .Please tell me if there is any way to achive this task .
 
Abhi Roy
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
use jsp:include...
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks i will try and inform you the status .
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Abhi Roy wrote:use jsp:include...

This will not work if the include exists on the client


Our requirement is that we are getting some data/ reports from database and it is kept in the form of HTML files stored on to the client drive . so we need to access it .( I can't answer more queries on this as i am not an architect , just developing what my Manager wishes)

So, this data is stored in the database, but you have been asked to access it once it has been downloaded on to the client's machine?! Why not just access it directly from the database? I would speak to your architect - that requirement is just plain crazy. A bit of discussion with your architect might be a good thing, it sounds like this needs clarification.
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul .This project has not got an architect .

What the manager thinks that has to be done .

Anyway jsp:include also not working . But i have managed it calling explorer.exe and it somehow worked .
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have managed to call explore.exe on the client? How?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic