aspose file tools*
The moose likes Struts and the fly likes How to run Struts 2 offline Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to run Struts 2 offline" Watch "How to run Struts 2 offline" New topic
Author

How to run Struts 2 offline

Vic Hood
Ranch Hand

Joined: Jan 05, 2011
Posts: 477

Hi All,
I'm new to Struts 2 and would like to run it without being connected to the internet all the while(as I think ,every time i try to run my app , the struts.xml references--
"http://struts.apache.org/dtds/struts-2.0.dtd">

)
IS there any way I could perform my development offline . I'm using the Eclipse IDE , if that's of any help.
Thanks.


Learning and Learning!-- Java all the way!
Vic Hood
Ranch Hand

Joined: Jan 05, 2011
Posts: 477

Bounce!
Rupesh Mhatre
Ranch Hand

Joined: Apr 29, 2011
Posts: 35

I was wondering why would it not be running offline
Alex Barnes
Greenhorn

Joined: May 03, 2011
Posts: 5

Look in Eclipse under Window > Preferences > General > Network Connections > Cache

Is there an entry for this DTD?
Vic Hood
Ranch Hand

Joined: Jan 05, 2011
Posts: 477

Alex Barnes wrote:Look in Eclipse under Window > Preferences > General > Network Connections > Cache

Is there an entry for this DTD?

Yes, there is an entry . How should i go about modifying it ,to be able to work offline??
Alex Barnes
Greenhorn

Joined: May 03, 2011
Posts: 5

I would have guessed that the presence of this cache entry means that you wouldn't need to access the internet to get the DTD.
Alex Barnes
Greenhorn

Joined: May 03, 2011
Posts: 5

Can you try changing your struts.xml to this:

<!DOCTYPE struts SYSTEM "struts-2.0.dtd"> rather than

<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts
Configuration//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">

as discussed here. This will ensure that the DTD is loaded from the struts2-core jar on the classpath rather than from a remote URL.
Vic Hood
Ranch Hand

Joined: Jan 05, 2011
Posts: 477

Thanks Alex, it seems to be working now , without making the changes , I tried after momentarily disconnecting from the internet .Thanks for replying !
Rupesh Mhatre
Ranch Hand

Joined: Apr 29, 2011
Posts: 35

nice stuff Alex
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to run Struts 2 offline